Uploaded image for project: 'Maven WAR Plugin'
  1. Maven WAR Plugin
  2. MWAR-246

NullPointerException Processing Web Resources

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.1
    • Fix Version/s: 2.3
    • Component/s: None
    • Labels:
      None
    • Environment:
      Linux, JDK 6

      Description

      NullPointerException on packaging of web resources. Configuration is:

               <plugin>
                  <artifactId>maven-war-plugin</artifactId>
                  <configuration>
                     <webResources>
                        <resource>
      	                  <excludes>
      	                     <exclude>xercesImpl-*.jar</exclude>
      	                  </excludes>
                        </resource>
                     </webResources>
                  </configuration>
               </plugin>
      

      Stack trace is:

      Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war failed.
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:211)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140)
      	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:316)
      	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153)
      	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:451)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:188)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:134)
      	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-war of goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war failed.
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:116)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195)
      	... 19 more
      Caused by: java.lang.NullPointerException
      	at java.io.File.<init>(File.java:222)
      	at org.apache.maven.plugin.war.packaging.WarProjectPackagingTask.handleWebResources(WarProjectPackagingTask.java:124)
      	at org.apache.maven.plugin.war.packaging.WarProjectPackagingTask.performPackaging(WarProjectPackagingTask.java:91)
      	at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:472)
      	at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:404)
      	at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:197)
      	at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:159)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
      	... 20 more
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dennisl@apache.org Dennis Lundberg
                Reporter:
                glm@hilbertinc.com Gary Murphy
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: