thomas collignon created MENFORCER-308: ------------------------------------------
Summary: NullPointerException when using enforcer and assembly plugin in same pom.xml Key: MENFORCER-308 URL: https://issues.apache.org/jira/browse/MENFORCER-308 Project: Maven Enforcer Plugin Issue Type: Bug Components: Plugin Affects Versions: 3.0.0-M2, 3.0.0-M1, 1.4.1 Environment: Windows 7, JDK 1.8.0_172 Reporter: thomas collignon Attachments: error.log Hi, I got a problem when a project contain a declaration of maven-enforcer-plugin >= 1.4.1 and maven-assembly-plugin, and I think one dependency with runtime scope. I have made a little project who reproduce the case : [https://github.com/tcollignon/maven_reproduce_cases/tree/master/enforcer_and_assembly] => just run _mvn clean install_ and see the error : {quote}$ mvn clean install [INFO] Scanning for projects... [INFO] [INFO] ------------------< org.tcollignon:enforcer-assembly >------------------ [INFO] Building enforcer and assembly reproduce case 1.0.0-SNAPSHOT [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ enforcer-assembly --- [INFO] Deleting D:\java\workspaces\developpement_test\maven_reproduce_cases\enforcer_and_assembly\target [INFO] [INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven-version) @ enforcer-assembly --- [INFO] [INFO] --- maven-assembly-plugin:3.1.0:single (make-assembly) @ enforcer-assembly --- [INFO] Reading assembly descriptor: zip.xml [WARNING] Cannot include project artifact: org.tcollignon:enforcer-assembly:pom:1.0.0-SNAPSHOT; it doesn't have an associated file or directory. [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.092 s [INFO] Finished at: 2018-06-21T15:59:17+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:3.1.0:single (make-assembly) on project enforcer-assembly: Execution make-assembly of goal org.apache.maven.plugins:maven-assembly-plugin:3.1.0:single failed.: NullPointerException -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0 {quote} I put in attach the full log in debug mode. With a little debug, I can see that on runtime scope dependency this is null : Artifact#getFile, but I don't know why. When I try with maven-enforcer-plugin 1.4 it works well. I try with other version of maven-assembly-plugin and it doesn't change anything. -- This message was sent by Atlassian JIRA (v7.6.3#76005)