You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Maarten Billemont (JIRA)" <ji...@codehaus.org> on 2008/09/05 15:50:58 UTC
[jira] Created: (MWAR-169) NPE during packaging.
NPE during packaging.
---------------------
Key: MWAR-169
URL: http://jira.codehaus.org/browse/MWAR-169
Project: Maven 2.x War Plugin
Issue Type: Bug
Affects Versions: 2.1-alpha-2
Reporter: Maarten Billemont
The following NPE happens when I run maven from the parent in a multi-module project; though it does not occur when I run mvn clean install from within the module itself.
[INFO] [war:war]
[INFO] Packaging webapp
[INFO] Assembling webapp[safe-online-startup-runtime] in [/Users/mbillemo/Documents/workspace/safe-online/safe-online-startup-runtime/target/safe-online-startup-
runtime-1.1-SNAPSHOT]
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] null
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException
at org.apache.maven.plugin.war.util.WebappStructure.getDependencies(WebappStructure.java:109)
at org.apache.maven.plugin.war.util.WebappStructure.analyseDependencies(WebappStructure.java:288)
at org.apache.maven.plugin.war.packaging.DependenciesAnalysisPackagingTask.performPackaging(DependenciesAnalysisPackagingTask.java:46)
at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:439)
at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:375) at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:181) at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:143) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:287) 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:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MWAR-169) NPE during packaging.
Posted by "Jonathan Ramsey (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MWAR-169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=147152#action_147152 ]
Jonathan Ramsey commented on MWAR-169:
--------------------------------------
Maarten - do you still have the 'war/work/webapp-cache.xml' from the build that failed? If so, could you attach it to the issue. Thanks.
> NPE during packaging.
> ---------------------
>
> Key: MWAR-169
> URL: http://jira.codehaus.org/browse/MWAR-169
> Project: Maven 2.x War Plugin
> Issue Type: Bug
> Affects Versions: 2.1-alpha-2
> Reporter: Maarten Billemont
>
> The following NPE happens when I run maven from the parent in a multi-module project; though it does not occur when I run mvn clean install from within the module itself.
> [INFO] [war:war]
> [INFO] Packaging webapp
> [INFO] Assembling webapp[safe-online-startup-runtime] in [/Users/mbillemo/Documents/workspace/safe-online/safe-online-startup-runtime/target/safe-online-startup-
> runtime-1.1-SNAPSHOT]
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] null
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NullPointerException
> at org.apache.maven.plugin.war.util.WebappStructure.getDependencies(WebappStructure.java:109)
> at org.apache.maven.plugin.war.util.WebappStructure.analyseDependencies(WebappStructure.java:288)
> at org.apache.maven.plugin.war.packaging.DependenciesAnalysisPackagingTask.performPackaging(DependenciesAnalysisPackagingTask.java:46)
> at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:439)
> at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:375) at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:181) at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:143) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:287) 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:585)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (MWAR-169) NPE during packaging.
Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MWAR-169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olivier Lamy closed MWAR-169.
-----------------------------
Assignee: Olivier Lamy (was: Stephane Nicoll)
Resolution: Fixed
fixed in rev 712569.
> NPE during packaging.
> ---------------------
>
> Key: MWAR-169
> URL: http://jira.codehaus.org/browse/MWAR-169
> Project: Maven 2.x War Plugin
> Issue Type: Bug
> Affects Versions: 2.1-alpha-2
> Reporter: Maarten Billemont
> Assignee: Olivier Lamy
> Fix For: 2.1
>
>
> The following NPE happens when I run maven from the parent in a multi-module project; though it does not occur when I run mvn clean install from within the module itself.
> [INFO] [war:war]
> [INFO] Packaging webapp
> [INFO] Assembling webapp[safe-online-startup-runtime] in [/Users/mbillemo/Documents/workspace/safe-online/safe-online-startup-runtime/target/safe-online-startup-
> runtime-1.1-SNAPSHOT]
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] null
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NullPointerException
> at org.apache.maven.plugin.war.util.WebappStructure.getDependencies(WebappStructure.java:109)
> at org.apache.maven.plugin.war.util.WebappStructure.analyseDependencies(WebappStructure.java:288)
> at org.apache.maven.plugin.war.packaging.DependenciesAnalysisPackagingTask.performPackaging(DependenciesAnalysisPackagingTask.java:46)
> at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:439)
> at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:375) at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:181) at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:143) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:287) 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:585)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Issue Comment Edited: (MWAR-169) NPE during packaging.
Posted by "Jonathan Ramsey (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MWAR-169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=147323#action_147323 ]
jonathan.ramsey edited comment on MWAR-169 at 9/8/08 8:26 AM:
--------------------------------------------------------------
This problem occurs when you run any of the goals on version 2.1-alpha-2 of the maven-war-plugin after running any of the goals on version 2.1-alpha-1, without a clean of the project in between. The change in version might occur without you knowing if you hadn't explicitly set the version of maven-war-plugin in your pom.xml. The first war goal is executed prior to the release of 2.1-alpha-2, and the second war goal is executed after 2.1-alpha-2 was released.
The problem is caused because a dependenciesInfo variable was added to org.apache.maven.plugin.war.util.WebappStructure in [r606628|http://svn.apache.org/viewvc/maven/plugins/tags/maven-war-plugin-2.1-alpha-2/src/main/java/org/apache/maven/plugin/war/util/WebappStructure.java?view=diff&r1=606627&r2=606628], but no defensive initialization of the variable was added to the readResolve() method. r606628 was released in maven-war-plugin version 2.1-alpha-2.
When one of the war goals is executed, maven-war-plugin 2.1-alpha-1 uses XStream to serialize a WebappStructure object to target\war\work\webapp-cache.xml. Provided you haven't cleaned your project, when you next run one of the war goals the maven-war-plugin 2.1-alpha-2 deserializes the WebappStructure object from target\war\work\webapp-cache.xml. The dependenciesInfo variable is not initialized with a value because the webapp-cache.xml doesn't contain a <dependenciesInfo> element and the readResolve() method doesn't initialize the variable defensively. When the WebappStructure.getDependencies() method is invoked, dependenciesInfo is dereferenced which triggers a NullPointerException.
Steps to reproduce:
1. mvn archetype:create -DarchetypeArtifactId=maven-archetype-webapp -DarchetypeVersion=1.0 -DgroupId=test -DartifactId=webapp
2. cd webapp
3. Add this to <build> in pom.xml.
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1-alpha-1</version>
</plugin>
</plugins>
4. mvn package
5. Change version from 2.1-alpha-1 to 2.1-alpha-2
6. mvn package
You reproduce the error:
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building webapp Maven Webapp
[INFO] task-segment: [package]
[INFO] ----------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] No sources to compile
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [war:war]
[INFO] Packaging webapp
[INFO] Assembling webapp[webapp] in [C:\WebTeam\projects\webapp\target\webapp]
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] null
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException
at org.apache.maven.plugin.war.util.WebappStructure.getDependencies(WebappStructure.java:109)
at org.apache.maven.plugin.war.util.WebappStructure.analyseDependencies(WebappStructure.java:288)
at org.apache.maven.plugin.war.packaging.DependenciesAnalysisPackagingTask.performPackaging(DependenciesAnalysisPackagingTask.java:46)
at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:439)
at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:375)
at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:181)
at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:143)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
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.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Mon Sep 08 14:14:58 BST 2008
[INFO] Final Memory: 8M/63M
[INFO] ------------------------------------------------------------------------
was (Author: jonathan.ramsey):
This problem occurs when you run any of the goals on version 2.1-alpha-2 of the maven-war-plugin after running any of the goals on version 2.1-alpha-1, without a clean of the project between. The change in version might occur without you knowing if you hadn't explictely set the version of maven-war-plugin in your pom.xml. Your first run of a war:goal occur prior to the release of 2.1-alpha-2, and your second run of a war:goal your first goal was run before 2.1-alpha-2 was released, and your second goal was run after 2.1-alpha-2 was released and you hadn't explictely set the version of maven-war-plugin in your pom.xml.
The problem is caused because a dependenciesInfo variable was added to org.apache.maven.plugin.war.util.WebappStructure in r606628, but no defensive initialization of the variable was added to the readResolve() method. r606628 was released in maven-war-plugin version 2.1-alpha-2.
http://svn.apache.org/viewvc/maven/plugins/tags/maven-war-plugin-2.1-alpha-2/src/main/java/org/apache/maven/plugin/war/util/WebappStructure.java?view=diff&r1=606627&r2=606628
When one of the war goals is executed, maven-war-plugin 2.1-alpha-1 uses XStream to serialize a WebappStructure object to target\war\work\webapp-cache.xml. Provided you haven't cleaned your project, when you next run one of the war goals the maven-war-plugin 2.1-alpha-2 deserializes the WebappStructure object from target\war\work\webapp-cache.xml. The dependenciesInfo variable is not initialized with a value because the webapp-cache.xml doesn't contain a <dependenciesInfo> element and the readResolve() method doesn't initialize the variable defensively. When the WebappStructure.getDependencies() method is invoked, dependenciesInfo is dereferenced which triggers a NullPointerException.
Steps to reproduce:
1. mvn archetype:create -DarchetypeArtifactId=maven-archetype-webapp -DarchetypeVersion=1.0 -DgroupId=test -DartifactId=webapp
2. cd webapp
3. Add this to <build> in pom.xml.
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1-alpha-1</version>
</plugin>
</plugins>
4. mvn package
5. Change version from 2.1-alpha-1 to 2.1-alpha-2
6. mvn package
You reproduce the error:
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building webapp Maven Webapp
[INFO] task-segment: [package]
[INFO] ----------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] No sources to compile
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [war:war]
[INFO] Packaging webapp
[INFO] Assembling webapp[webapp] in [C:\WebTeam\projects\webapp\target\webapp]
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] null
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException
at org.apache.maven.plugin.war.util.WebappStructure.getDependencies(WebappStructure.java:109)
at org.apache.maven.plugin.war.util.WebappStructure.analyseDependencies(WebappStructure.java:288)
at org.apache.maven.plugin.war.packaging.DependenciesAnalysisPackagingTask.performPackaging(DependenciesAnalysisPackagingTask.java:46)
at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:439)
at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:375)
at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:181)
at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:143)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
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.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Mon Sep 08 14:14:58 BST 2008
[INFO] Final Memory: 8M/63M
[INFO] ------------------------------------------------------------------------
> NPE during packaging.
> ---------------------
>
> Key: MWAR-169
> URL: http://jira.codehaus.org/browse/MWAR-169
> Project: Maven 2.x War Plugin
> Issue Type: Bug
> Affects Versions: 2.1-alpha-2
> Reporter: Maarten Billemont
>
> The following NPE happens when I run maven from the parent in a multi-module project; though it does not occur when I run mvn clean install from within the module itself.
> [INFO] [war:war]
> [INFO] Packaging webapp
> [INFO] Assembling webapp[safe-online-startup-runtime] in [/Users/mbillemo/Documents/workspace/safe-online/safe-online-startup-runtime/target/safe-online-startup-
> runtime-1.1-SNAPSHOT]
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] null
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NullPointerException
> at org.apache.maven.plugin.war.util.WebappStructure.getDependencies(WebappStructure.java:109)
> at org.apache.maven.plugin.war.util.WebappStructure.analyseDependencies(WebappStructure.java:288)
> at org.apache.maven.plugin.war.packaging.DependenciesAnalysisPackagingTask.performPackaging(DependenciesAnalysisPackagingTask.java:46)
> at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:439)
> at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:375) at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:181) at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:143) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:287) 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:585)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MWAR-169) NPE during packaging.
Posted by "Maarten Billemont (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MWAR-169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=147136#action_147136 ]
Maarten Billemont commented on MWAR-169:
----------------------------------------
This has happened to me on artifacts that have no overlays defined and on artifacts that do have overlays defined.
> NPE during packaging.
> ---------------------
>
> Key: MWAR-169
> URL: http://jira.codehaus.org/browse/MWAR-169
> Project: Maven 2.x War Plugin
> Issue Type: Bug
> Affects Versions: 2.1-alpha-2
> Reporter: Maarten Billemont
>
> The following NPE happens when I run maven from the parent in a multi-module project; though it does not occur when I run mvn clean install from within the module itself.
> [INFO] [war:war]
> [INFO] Packaging webapp
> [INFO] Assembling webapp[safe-online-startup-runtime] in [/Users/mbillemo/Documents/workspace/safe-online/safe-online-startup-runtime/target/safe-online-startup-
> runtime-1.1-SNAPSHOT]
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] null
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NullPointerException
> at org.apache.maven.plugin.war.util.WebappStructure.getDependencies(WebappStructure.java:109)
> at org.apache.maven.plugin.war.util.WebappStructure.analyseDependencies(WebappStructure.java:288)
> at org.apache.maven.plugin.war.packaging.DependenciesAnalysisPackagingTask.performPackaging(DependenciesAnalysisPackagingTask.java:46)
> at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:439)
> at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:375) at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:181) at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:143) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:287) 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:585)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MWAR-169) NPE during packaging.
Posted by "Jonathan Ramsey (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MWAR-169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=147323#action_147323 ]
Jonathan Ramsey commented on MWAR-169:
--------------------------------------
This problem occurs when you run any of the goals on version 2.1-alpha-2 of the maven-war-plugin after running any of the goals on version 2.1-alpha-1, without a clean of the project between. The change in version might occur without you knowing if you hadn't explictely set the version of maven-war-plugin in your pom.xml. Your first run of a war:goal occur prior to the release of 2.1-alpha-2, and your second run of a war:goal your first goal was run before 2.1-alpha-2 was released, and your second goal was run after 2.1-alpha-2 was released and you hadn't explictely set the version of maven-war-plugin in your pom.xml.
The problem is caused because a dependenciesInfo variable was added to org.apache.maven.plugin.war.util.WebappStructure in r606628, but no defensive initialization of the variable was added to the readResolve() method. r606628 was released in maven-war-plugin version 2.1-alpha-2.
http://svn.apache.org/viewvc/maven/plugins/tags/maven-war-plugin-2.1-alpha-2/src/main/java/org/apache/maven/plugin/war/util/WebappStructure.java?view=diff&r1=606627&r2=606628
When one of the war goals is executed, maven-war-plugin 2.1-alpha-1 uses XStream to serialize a WebappStructure object to target\war\work\webapp-cache.xml. Provided you haven't cleaned your project, when you next run one of the war goals the maven-war-plugin 2.1-alpha-2 deserializes the WebappStructure object from target\war\work\webapp-cache.xml. The dependenciesInfo variable is not initialized with a value because the webapp-cache.xml doesn't contain a <dependenciesInfo> element and the readResolve() method doesn't initialize the variable defensively. When the WebappStructure.getDependencies() method is invoked, dependenciesInfo is dereferenced which triggers a NullPointerException.
Steps to reproduce:
1. mvn archetype:create -DarchetypeArtifactId=maven-archetype-webapp -DarchetypeVersion=1.0 -DgroupId=test -DartifactId=webapp
2. cd webapp
3. Add this to <build> in pom.xml.
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1-alpha-1</version>
</plugin>
</plugins>
4. mvn package
5. Change version from 2.1-alpha-1 to 2.1-alpha-2
6. mvn package
You reproduce the error:
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building webapp Maven Webapp
[INFO] task-segment: [package]
[INFO] ----------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] No sources to compile
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [war:war]
[INFO] Packaging webapp
[INFO] Assembling webapp[webapp] in [C:\WebTeam\projects\webapp\target\webapp]
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] null
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException
at org.apache.maven.plugin.war.util.WebappStructure.getDependencies(WebappStructure.java:109)
at org.apache.maven.plugin.war.util.WebappStructure.analyseDependencies(WebappStructure.java:288)
at org.apache.maven.plugin.war.packaging.DependenciesAnalysisPackagingTask.performPackaging(DependenciesAnalysisPackagingTask.java:46)
at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:439)
at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:375)
at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:181)
at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:143)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
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.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Mon Sep 08 14:14:58 BST 2008
[INFO] Final Memory: 8M/63M
[INFO] ------------------------------------------------------------------------
> NPE during packaging.
> ---------------------
>
> Key: MWAR-169
> URL: http://jira.codehaus.org/browse/MWAR-169
> Project: Maven 2.x War Plugin
> Issue Type: Bug
> Affects Versions: 2.1-alpha-2
> Reporter: Maarten Billemont
>
> The following NPE happens when I run maven from the parent in a multi-module project; though it does not occur when I run mvn clean install from within the module itself.
> [INFO] [war:war]
> [INFO] Packaging webapp
> [INFO] Assembling webapp[safe-online-startup-runtime] in [/Users/mbillemo/Documents/workspace/safe-online/safe-online-startup-runtime/target/safe-online-startup-
> runtime-1.1-SNAPSHOT]
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] null
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NullPointerException
> at org.apache.maven.plugin.war.util.WebappStructure.getDependencies(WebappStructure.java:109)
> at org.apache.maven.plugin.war.util.WebappStructure.analyseDependencies(WebappStructure.java:288)
> at org.apache.maven.plugin.war.packaging.DependenciesAnalysisPackagingTask.performPackaging(DependenciesAnalysisPackagingTask.java:46)
> at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:439)
> at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:375) at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:181) at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:143) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:287) 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:585)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (MWAR-169) NPE during packaging.
Posted by "Stephane Nicoll (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MWAR-169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stephane Nicoll updated MWAR-169:
---------------------------------
Fix Version/s: 2.1
Nice bug hunting :)
> NPE during packaging.
> ---------------------
>
> Key: MWAR-169
> URL: http://jira.codehaus.org/browse/MWAR-169
> Project: Maven 2.x War Plugin
> Issue Type: Bug
> Affects Versions: 2.1-alpha-2
> Reporter: Maarten Billemont
> Assignee: Stephane Nicoll
> Fix For: 2.1
>
>
> The following NPE happens when I run maven from the parent in a multi-module project; though it does not occur when I run mvn clean install from within the module itself.
> [INFO] [war:war]
> [INFO] Packaging webapp
> [INFO] Assembling webapp[safe-online-startup-runtime] in [/Users/mbillemo/Documents/workspace/safe-online/safe-online-startup-runtime/target/safe-online-startup-
> runtime-1.1-SNAPSHOT]
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] null
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NullPointerException
> at org.apache.maven.plugin.war.util.WebappStructure.getDependencies(WebappStructure.java:109)
> at org.apache.maven.plugin.war.util.WebappStructure.analyseDependencies(WebappStructure.java:288)
> at org.apache.maven.plugin.war.packaging.DependenciesAnalysisPackagingTask.performPackaging(DependenciesAnalysisPackagingTask.java:46)
> at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:439)
> at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:375) at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:181) at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:143) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:287) 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:585)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Issue Comment Edited: (MWAR-169) NPE during packaging.
Posted by "Maarten Billemont (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MWAR-169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=147131#action_147131 ]
lhunath edited comment on MWAR-169 at 9/5/08 8:56 AM:
----------------------------------------------------------------
After running mvn clean install in the module in question and then running another mvn install in the parent; the problem no longer occurs.
was (Author: lhunath):
Commenting out these options in the maven-war-plugin's configuration section avoids this problem:
<packagingExcludes>WEB-INF/lib/*</packagingExcludes>
<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
> NPE during packaging.
> ---------------------
>
> Key: MWAR-169
> URL: http://jira.codehaus.org/browse/MWAR-169
> Project: Maven 2.x War Plugin
> Issue Type: Bug
> Affects Versions: 2.1-alpha-2
> Reporter: Maarten Billemont
>
> The following NPE happens when I run maven from the parent in a multi-module project; though it does not occur when I run mvn clean install from within the module itself.
> [INFO] [war:war]
> [INFO] Packaging webapp
> [INFO] Assembling webapp[safe-online-startup-runtime] in [/Users/mbillemo/Documents/workspace/safe-online/safe-online-startup-runtime/target/safe-online-startup-
> runtime-1.1-SNAPSHOT]
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] null
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NullPointerException
> at org.apache.maven.plugin.war.util.WebappStructure.getDependencies(WebappStructure.java:109)
> at org.apache.maven.plugin.war.util.WebappStructure.analyseDependencies(WebappStructure.java:288)
> at org.apache.maven.plugin.war.packaging.DependenciesAnalysisPackagingTask.performPackaging(DependenciesAnalysisPackagingTask.java:46)
> at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:439)
> at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:375) at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:181) at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:143) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:287) 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:585)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MWAR-169) NPE during packaging.
Posted by "Maarten Billemont (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MWAR-169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=147131#action_147131 ]
Maarten Billemont commented on MWAR-169:
----------------------------------------
Commenting out these options in the maven-war-plugin's configuration section avoids this problem:
<packagingExcludes>WEB-INF/lib/*</packagingExcludes>
<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
> NPE during packaging.
> ---------------------
>
> Key: MWAR-169
> URL: http://jira.codehaus.org/browse/MWAR-169
> Project: Maven 2.x War Plugin
> Issue Type: Bug
> Affects Versions: 2.1-alpha-2
> Reporter: Maarten Billemont
>
> The following NPE happens when I run maven from the parent in a multi-module project; though it does not occur when I run mvn clean install from within the module itself.
> [INFO] [war:war]
> [INFO] Packaging webapp
> [INFO] Assembling webapp[safe-online-startup-runtime] in [/Users/mbillemo/Documents/workspace/safe-online/safe-online-startup-runtime/target/safe-online-startup-
> runtime-1.1-SNAPSHOT]
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] null
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NullPointerException
> at org.apache.maven.plugin.war.util.WebappStructure.getDependencies(WebappStructure.java:109)
> at org.apache.maven.plugin.war.util.WebappStructure.analyseDependencies(WebappStructure.java:288)
> at org.apache.maven.plugin.war.packaging.DependenciesAnalysisPackagingTask.performPackaging(DependenciesAnalysisPackagingTask.java:46)
> at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:439)
> at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:375) at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:181) at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:143) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:287) 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:585)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (MWAR-169) NPE during packaging.
Posted by "Maarten Billemont (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MWAR-169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=147139#action_147139 ]
Maarten Billemont commented on MWAR-169:
----------------------------------------
This might be interesting; done after the process of building from the parent failed on artifact "safe-online-owner-webapp":
cd "safe-online-owner-webapp"
cp -a target target~
mvn clean install # successful
diff -ur target~ target
The result shows only one file is different: "war/work/webapp-cache.xml"
The old version of this file (from target~; the target dir that caused the build to fail) contained an entry for "net.lin-k.safe-online:safe-online-startup-runtime" which is NOT the artifact that should be overlayed on this artifact.
The new version of this file (from target; the target dir that caused the build to succeed) contained an entry for "net.lin-k.safe-online:safe-online-webapp-base" which IS the artifact that should be overlayed on this artifact. So that's good.
Basically; I conclude something has gone wrong in the caching backend of maven-war-plugin.
> NPE during packaging.
> ---------------------
>
> Key: MWAR-169
> URL: http://jira.codehaus.org/browse/MWAR-169
> Project: Maven 2.x War Plugin
> Issue Type: Bug
> Affects Versions: 2.1-alpha-2
> Reporter: Maarten Billemont
>
> The following NPE happens when I run maven from the parent in a multi-module project; though it does not occur when I run mvn clean install from within the module itself.
> [INFO] [war:war]
> [INFO] Packaging webapp
> [INFO] Assembling webapp[safe-online-startup-runtime] in [/Users/mbillemo/Documents/workspace/safe-online/safe-online-startup-runtime/target/safe-online-startup-
> runtime-1.1-SNAPSHOT]
> [INFO] ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] null
> [INFO] ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NullPointerException
> at org.apache.maven.plugin.war.util.WebappStructure.getDependencies(WebappStructure.java:109)
> at org.apache.maven.plugin.war.util.WebappStructure.analyseDependencies(WebappStructure.java:288)
> at org.apache.maven.plugin.war.packaging.DependenciesAnalysisPackagingTask.performPackaging(DependenciesAnalysisPackagingTask.java:46)
> at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:439)
> at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:375) at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:181) at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:143) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:287) 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:585)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira