Error: log4j-api-2.9.0.jar is a multi-release jar file but --multi-release option is not set

Solution 1:

Regarding the plugin itself, following configuration works.

  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-jdeps-plugin</artifactId>
    <version>3.1.1</version>
    <executions>
      <execution>
        <goals>
          <goal>jdkinternals</goal> <!-- verify main classes -->
          <goal>test-jdkinternals</goal> <!-- verify test classes -->
        </goals>
      </execution>
    </executions>
    <configuration>
      <multiRelease>9</multiRelease> <!-- Check this out -->
    </configuration>
  </plugin>

Solution 2:

This is user error. Please enter jdeps -? on the command line. You will see you need to enter

jdeps --multi-release 9 ~/.m2/repository/org/apache/logging/log4j/log4j-api/2.9.1/log4j-api-2.9.1.jar