You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Adrian Herscu <bm...@fastmail.fm> on 2007/04/17 11:10:01 UTC

[m2] exec-maven-plugin in a multiproject

Hi all,

I am using Maven 2.0.6 with the exec-maven-plugin 1.1-beta-1.
My project has a structure similar to this:

root
	+child1
	+child2

In child2 I am using the java goal and in child1 I am using the exec goal.

When I am building child2 alone everything works fine.
When I am building the root I am getting the error below.
If I remove the exec-maven-plugin from child1 then every works fine 
again. Something from the first instance (child1) interferes with the 
second instance (child2).

Please help,
Adrian.

Here is the error:

[INFO] Preparing exec:java
[WARNING] Removing: java from forked lifecycle, to prevent recursive 
invocation.

[INFO] No goals needed for project - skipping
[INFO] [exec:java {execution: default}]
[INFO] 
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] 
------------------------------------------------------------------------
---------------------------------------------------
constituent[0]: 
file:/C:/PROGRA~1/Java/MAVEN-~1.6/bin/../lib/maven-core-2.0.6-ub
er.jar
constituent[1]: 
file:/C:/DOCUME~1/pm/M2639C~1/REPOSI~1/org/myproject/build/extensio
ns/myproject-build-extensions/1.0-alpha-1/myproject-build-extensions-1.0-alpha-1.jar

[AH] NOTE: this artifact is produced by some other child under the root.
[AH] NOTE: I have other children which use it, but without using the 
exec-maven-plugin, and it doesn't interfere.

---------------------------------------------------
java.lang.NullPointerException
         at 
org.apache.maven.usability.MojoExecutionExceptionDiagnoser.diagnose(M
ojoExecutionExceptionDiagnoser.java:64)
         at 
org.apache.maven.usability.diagnostics.ErrorDiagnostics.diagnose(Erro
rDiagnostics.java:84)
         at 
org.apache.maven.DefaultMaven.logDiagnostics(DefaultMaven.java:711)
         at org.apache.maven.DefaultMaven.logError(DefaultMaven.java:656)
         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:131)
         at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.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)


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org