You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Olivier Lamy (JIRA)" <ji...@codehaus.org> on 2006/02/10 12:07:47 UTC
[jira] Reopened: (MNG-2037) Strange NPE with profile and
injectPlugins
[ http://jira.codehaus.org/browse/MNG-2037?page=all ]
Olivier Lamy reopened MNG-2037:
-------------------------------
I reopen this because I have reproduced the trouble.
I attached the pom.
Just try : mvn -P intdotw clean.
Failed on windows+cygwin/cmd and solaris.
On windows : my settings doesn't contains the profile.
On solaris : my settings contains the profile but not activeByDefault and not in activeProfiles section
> Strange NPE with profile and injectPlugins
> ------------------------------------------
>
> Key: MNG-2037
> URL: http://jira.codehaus.org/browse/MNG-2037
> Project: Maven 2
> Type: Bug
> Versions: 2.0.2
> Environment: solaris and windowns
> Reporter: Olivier Lamy
> Priority: Blocker
>
>
> I use the war plugin with a default configuration :
> <plugin>
> <artifactId>maven-war-plugin</artifactId>
> <configuration>
> <warSourceDirectory implementation="java.io.File">${basedir}/src/main/web</warSourceDirectory>
> <webXml>${basedir}/src/main/resources/war/web.xml</webXml>
> <webappDirectory implementation="java.io.File">${basedir}/webappdir</webappDirectory>
> </configuration>
> </plugin>
> And a profile with only
> <profile>
> <id>rec-ap2</id>
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-war-plugin</artifactId>
> <configuration>
> <webappDirectory implementation="java.io.File">/local/tomcat/jakarta-tomcat-5.5.9/webapps/SLSTester</webappDirectory>
> </configuration>
> </plugin>
> </plugins>
> </build>
> </profile>
> mvn -P rec-ap2 -X -e war:exploded generate the NPE :
> + Error stacktraces are turned on.
> [DEBUG] Building Maven user-level plugin registry from: '/local/tomcat/.m2/plugin-registry.xml'
> [DEBUG] Building Maven global-level plugin registry from: '/local/maven/maven-2.0.2/conf/plugin-registry.xml'
> [INFO] Scanning for projects...
> [INFO] ----------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] ----------------------------------------------------------------------------
> [INFO] null
> [INFO] ----------------------------------------------------------------------------
> [DEBUG] Trace
> java.lang.NullPointerException
> at org.apache.maven.project.injection.DefaultProfileInjector.injectPlugins(DefaultProfileInjector.java:147)
> at org.apache.maven.project.injection.DefaultProfileInjector.injectBuild(DefaultProfileInjector.java:134)
> at org.apache.maven.project.injection.DefaultProfileInjector.inject(DefaultProfileInjector.java:80)
> at org.apache.maven.project.DefaultMavenProjectBuilder.injectActiveProfiles(DefaultMavenProjectBuilder.java:1035)
> at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultMavenProjectBuilder.java:836)
> at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:593)
> at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFile(DefaultMavenProjectBuilder.java:303)
> at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:274)
> at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:515)
> at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:447)
> at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:351)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:278)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
> 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)
> [INFO] ----------------------------------------------------------------------------
> [INFO] Total time: < 1 second
> [INFO] Finished at: Fri Feb 03 23:39:41 MET 2006
> [INFO] Final Memory: 2M/126M
> [INFO] ----------------------------------------------------------------------------
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org