Search code examples
javamavenopendaylight

Failure: org.apache.maven plugins:maven-jar-plugin:2.6:test-jar


I'm trying to compile a project but I'm running into a Maven plugin error.

I use Apache Maven 3.3.9 and java-9-openjdk, with the command

mvn clean install -DskipTests=true

but that fails with the following message:

Error: Failed to execute goal org.apache.maven plugins:maven-jar-plugin:2.6:test-jar

Do I have to modify my pom file?

 <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-install-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <sourcepath>*/target/generated-sources/mdsal-binding/*</sourcepath>
          <excludePackageNames>*</excludePackageNames>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

Solution

  • Based on the mention of mdsal-binding in your POM, you’re trying to build an OpenDaylight project (I’m guessing either coretutorials or transportpce) with JDK 9. We don’t support that yet; you must build with JDK 8.