Maven WAR Plugin
  1. Maven WAR Plugin
  2. MWAR-246

NullPointerException Processing Web Resources

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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
      

        Issue Links

          Activity

          Gary Murphy created issue -
          Stephane Nicoll made changes -
          Field Original Value New Value
          Fix Version/s 2.2 [ 15001 ]
          Dennis Lundberg made changes -
          Fix Version/s 2.3 [ 18298 ]
          Fix Version/s 2.2 [ 15001 ]
          Dennis Lundberg made changes -
          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
          NullPointerException on packaging of web resources. Configuration is:

          {code:xml}
                   <plugin>
                      <artifactId>maven-war-plugin</artifactId>
                      <configuration>
                         <webResources>
                            <resource>
          <excludes>
          <exclude>xercesImpl-*.jar</exclude>
          </excludes>
                            </resource>
                         </webResources>
                      </configuration>
                   </plugin>
          {code}

          Stack trace is:

          {noformat}
          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
          {noformat}
          Dennis Lundberg made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Assignee Dennis Lundberg [ dennislundberg ]
          Dennis Lundberg made changes -
          Link This issue is duplicated by MWAR-202 [ MWAR-202 ]
          Dennis Lundberg made changes -
          Link This issue is duplicated by MWAR-293 [ MWAR-293 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 13:28:45 UTC 2015 [ 1428240525159 ]
          Mark Thomas made changes -
          Workflow jira [ 12728656 ] Default workflow, editable Closed status [ 12764843 ]
          Mark Thomas made changes -
          Project Import Mon Apr 06 01:49:55 UTC 2015 [ 1428284995525 ]
          Mark Thomas made changes -
          Workflow jira [ 12966597 ] Default workflow, editable Closed status [ 13003186 ]
          Mark Thomas made changes -
          Assignee dennislundberg [ dennislundberg ] Dennis Lundberg [ dennisl@apache.org ]

            People

            • Assignee:
              Dennis Lundberg
              Reporter:
              Gary Murphy
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development