Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
1.4.1, 3.0.0-M1, 3.0.0-M2
-
None
-
None
-
Maven 3.3.9
Description
Upgrading maven-enforcer-plugin to a version above 1.4 causes maven-assembly-plugin to generate the following error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:3.1.0:single (assemble) on project extjars: Execution assemble of goal org.apache.maven.plugins:maven-assembly-plugin:3.1.0:single failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:3.1.0:single (assemble) on project extjars: Execution assemble of goal org.apache.maven.plugins:maven-assembly-plugin:3.1.0:single failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution assemble of goal org.apache.maven.plugins:maven-assembly-plugin:3.1.0:single failed.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
Caused by: java.lang.NullPointerException
at org.apache.maven.plugins.assembly.archive.archiver.AssemblyProxyArchiver$DefaultFileInfo.isFile(AssemblyProxyArchiver.java:1025)
at org.apache.maven.plugins.assembly.filter.ComponentsXmlArchiverFileFilter.isSelected(ComponentsXmlArchiverFileFilter.java:179)
at org.apache.maven.plugins.assembly.archive.archiver.AssemblyProxyArchiver.acceptFile(AssemblyProxyArchiver.java:794)
at org.apache.maven.plugins.assembly.archive.archiver.AssemblyProxyArchiver.addFile(AssemblyProxyArchiver.java:396)
at org.apache.maven.plugins.assembly.archive.task.AddArtifactTask.asFile(AddArtifactTask.java:171)
at org.apache.maven.plugins.assembly.archive.task.AddArtifactTask.execute(AddArtifactTask.java:132)
at org.apache.maven.plugins.assembly.archive.task.AddDependencySetsTask.addNormalArtifact(AddDependencySetsTask.java:263)
at org.apache.maven.plugins.assembly.archive.task.AddDependencySetsTask.addDependencySet(AddDependencySetsTask.java:175)
at org.apache.maven.plugins.assembly.archive.task.AddDependencySetsTask.execute(AddDependencySetsTask.java:120)
at org.apache.maven.plugins.assembly.archive.phase.DependencySetAssemblyPhase.execute(DependencySetAssemblyPhase.java:104)
at org.apache.maven.plugins.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:181)
at org.apache.maven.plugins.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:478)
at org.apache.maven.plugins.assembly.mojos.SingleAssemblyMojo.execute(SingleAssemblyMojo.java:61)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
... 21 more
[ERROR]
[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
The attached pom and assembly descriptor can be used to reproduce:
mvn -Denforcer=1.4
will work
mvn -Denforcer=3.0.0-M2
will fail.
Please note that this is only slightly different from MENFORCER-156. The difference is that the scope of artifact asm:asm this time is set to runtime.
Attachments
Attachments
Issue Links
- duplicates
-
MENFORCER-308 NullPointerException when using enforcer and assembly plugin in same pom.xml
- Closed
- is related to
-
MENFORCER-156 Upgrading maven-enforcer-plugin from 1.2 to 1.3 breaks maven-assembly-plugin
- Closed