Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException in org.codehaus.plexus.util.AbstractScanner using dynamic overlay exclusions #1

Closed
vernyquartara opened this issue Feb 11, 2015 · 0 comments

Comments

@vernyquartara
Copy link

Hi everybody,
I want to inform you about a NPE during a Maven build.
I'm using an overlay with dynamic exclusions, as follows:

<overlays>
    <overlay>
        <groupId>it.visura.ecm</groupId>
        <artifactId>visura-ecm-web-static</artifactId>
        <classifier>visura</classifier>
        <excludes>
                <exclude>${overlayExcludes}</exclude>
            </excludes>
    </overlay>
</overlays>

The NPE appears if the value of the overlayExcludes property

  1. is not defined or
  2. is null or
  3. is an empty string ("")

I'm building on a Win7 machine, using Maven 3.0.4 embedded in Eclipse Kelper, jdk1.6.0_45

Here is the fullstacktrace:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.4:war (default-war) on project visura-ecm-web: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.4:war failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.4:war (default-war) on project visura-ecm-web: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.4:war 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-war of goal org.apache.maven.plugins:maven-war-plugin:2.4:war 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.util.AbstractScanner.normalizePattern(AbstractScanner.java:309)
at org.codehaus.plexus.util.AbstractScanner.setExcludes(AbstractScanner.java:296)
at org.apache.maven.plugin.war.packaging.AbstractWarPackagingTask.getFilesToIncludes(AbstractWarPackagingTask.java:394)
at org.apache.maven.plugin.war.packaging.AbstractWarPackagingTask.getFilesToIncludes(AbstractWarPackagingTask.java:375)
at org.apache.maven.plugin.war.packaging.OverlayPackagingTask.performPackaging(OverlayPackagingTask.java:76)
at org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:505)
at org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:433)
at org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:213)
at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:175)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
... 20 more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant