[ http://jira.codehaus.org/browse/MEAR-1?page=comments#action_54192 ] 

Siarhei Dudzin commented on MEAR-1:
-----------------------------------

This only works for me if  the pom file of "test-ear" project does not have 
"<build>" section (that attached project still does not build with the applied 
patch). As soon as I put that <build> section back I have the same error as 
above. For some reason the module variable is not Ejb3Module but EjbModule 
which cause getType() returning "ejb" and not "ejb3" which make the exception 
to be thrown. Unfortunately I could not find how the modules are initialized if 
the <build> element is present in the pom file.

> Plugin configuration doesn't support .ejb3 and .par EJB modules
> ---------------------------------------------------------------
>
>          Key: MEAR-1
>          URL: http://jira.codehaus.org/browse/MEAR-1
>      Project: Maven 2.x Ear Plugin
>         Type: Bug

>     Reporter: Tim Kettler
>     Assignee: Stephane Nicoll
>     Priority: Minor
>      Fix For: 2.1
>  Attachments: MNG-1723.patch, test-prj.zip
>
>
> When specifying a module configuration for an EJB-Module which is of the type 
> .ejb3 or .par maven fails with ther following error:
> [EMAIL PROTECTED]:~/Develop/test-prj$ mvn -e package
> + Error stacktraces are turned on.
> [INFO] Scanning for projects...
> [INFO] Reactor build order:
> [INFO]   Unnamed - test:test-project:pom:1.0-SNAPSHOT
> [INFO]   Unnamed - test:test-ejb:ejb3:1.0-SNAPSHOT
> [INFO]   Unnamed - test:test-ear:ear:1.0-SNAPSHOT
> [INFO] 
> ----------------------------------------------------------------------------
> [INFO] Building Unnamed - test:test-project:pom:1.0-SNAPSHOT
> [INFO]    task-segment: [package]
> [INFO] 
> ----------------------------------------------------------------------------
> [INFO] No goals needed for project - skipping
> [INFO] 
> ----------------------------------------------------------------------------
> [INFO] Building Unnamed - test:test-ejb:ejb3:1.0-SNAPSHOT
> [INFO]    task-segment: [package]
> [INFO] 
> ----------------------------------------------------------------------------
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [compiler:compile]
> Compiling 1 source file to /home/tik/Develop/test-prj/test-ejb/target/classes
> [INFO] [resources:testResources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [compiler:testCompile]
> [INFO] No sources to compile
> [INFO] [surefire:test]
> [INFO] No tests to run.
> [INFO] [ejb3:ejb3]
> [INFO] Building jar: 
> /home/tik/Develop/test-prj/test-ejb/target/test-ejb-1.0-SNAPSHOT.ejb3
> [INFO] 
> ----------------------------------------------------------------------------
> [INFO] Building Unnamed - test:test-ear:ear:1.0-SNAPSHOT
> [INFO]    task-segment: [package]
> [INFO] 
> ----------------------------------------------------------------------------
> [INFO] [ear:generate-application-xml]
> [INFO] 
> ----------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO] 
> ----------------------------------------------------------------------------
> [INFO] Artifact[test:test-ejb:ejb] is not a dependency of the project.
> [INFO] 
> ----------------------------------------------------------------------------
> [INFO] Trace
> org.apache.maven.BuildFailureException: Artifact[test:test-ejb:ejb] is not a 
> dependency of the project.
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:540)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:469)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:448)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:301)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:268)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:137)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         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)
> Caused by: org.apache.maven.plugin.MojoFailureException: 
> Artifact[test:test-ejb:ejb] is not a dependency of the project.
>         at 
> org.apache.maven.plugin.ear.AbstractEarModule.resolveArtifact(AbstractEarModule.java:98)
>         at 
> org.apache.maven.plugin.ear.AbstractEarMojo.execute(AbstractEarMojo.java:98)
>         at 
> org.apache.maven.plugin.ear.GenerateApplicationXmlMojo.execute(GenerateApplicationXmlMojo.java:96)
>         at 
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:519)
>         ... 16 more
> [INFO] 
> ----------------------------------------------------------------------------
> [INFO] Total time: 5 seconds
> [INFO] Finished at: Thu Dec 01 09:50:04 CET 2005
> [INFO] Final Memory: 4M/7M
> [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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to