[ https://jira.codehaus.org/browse/MASSEMBLY-626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dennis Lundberg closed MASSEMBLY-626. ------------------------------------- Resolution: Fixed Fix Version/s: 2.4 Assignee: Dennis Lundberg Fixed in [r1402674|http://svn.apache.org/viewvc?view=revision&revision=1402674]. Thanks Kristian! > NullPointerException in PlexusIoURLResource.getContents > ------------------------------------------------------- > > Key: MASSEMBLY-626 > URL: https://jira.codehaus.org/browse/MASSEMBLY-626 > Project: Maven 2.x Assembly Plugin > Issue Type: Bug > Affects Versions: 2.3 > Reporter: Nathaniel Mishkin > Assignee: Dennis Lundberg > Fix For: 2.4 > > > I have a situation where I can reliably reproduce an NPE during assembly in > one dev environment but not in another. Probably the most notable difference > between the environments is that the working one is running Windows and the > non-working one is running Linux, but it's not clear why that should matter. > The project is unfortunately part of a large multi-module project so I can't > readily attach it here and I haven't yet attempted to boil it down. So > hopefully this stack trace will help: > {noformat} > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-assembly-plugin:2.3:single (default) on > project system-tests: Execution default of goal > org.apache.maven.plugins:maven-assembly-plugin:2.3:single failed. > NullPointerException -> [Help 1] > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute > goal org.apache.maven.plugins:maven-assembly-plugin:2.3:single (default) on > project system-tests: Execution default of goal > org.apache.maven.plugins:maven-assembly-plugin:2.3:single failed. > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225) > 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:84) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) > at > org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) > at > org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) > at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) > at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) > at > org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) > at > org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) > at > org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) > Caused by: org.apache.maven.plugin.PluginExecutionException: Execution > default of goal org.apache.maven.plugins:maven-assembly-plugin:2.3:single > failed. > at > org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) > ... 19 more > Caused by: java.lang.NullPointerException > at > org.codehaus.plexus.components.io.resources.PlexusIoURLResource.getContents(PlexusIoURLResource.java:38) > at > org.codehaus.plexus.archiver.ArchiveEntry.getInputStream(ArchiveEntry.java:106) > at > org.codehaus.plexus.archiver.zip.AbstractZipArchiver.zipFile(AbstractZipArchiver.java:552) > at > org.codehaus.plexus.archiver.zip.AbstractZipArchiver.addResources(AbstractZipArchiver.java:387) > at > org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(AbstractZipArchiver.java:312) > at > org.codehaus.plexus.archiver.zip.AbstractZipArchiver.execute(AbstractZipArchiver.java:211) > at > org.codehaus.plexus.archiver.AbstractArchiver.createArchive(AbstractArchiver.java:897) > at > org.apache.maven.plugin.assembly.archive.archiver.AssemblyProxyArchiver.createArchive(AssemblyProxyArchiver.java:512) > at > org.apache.maven.plugin.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:185) > at > org.apache.maven.plugin.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:452) > at > org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) > ... 20 more > {noformat} > The relevant bit of the effective POM is pretty simple, but here it is anyway: > {code:xml} > <plugin> > <artifactId>maven-assembly-plugin</artifactId> > <version>2.3</version> > <executions> > <execution> > <phase>package</phase> > <goals> > <goal>single</goal> > </goals> > <configuration> > <descriptorRefs> > <descriptorRef>jar-with-dependencies</descriptorRef> > </descriptorRefs> > </configuration> > </execution> > </executions> > <configuration> > <descriptorRefs> > <descriptorRef>jar-with-dependencies</descriptorRef> > </descriptorRefs> > </configuration> > </plugin> > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira