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

Stephane Nicoll commented on MEAR-1:
------------------------------------

Yeah, I understand it's confusing. Ear plugin 2.1 brings compatiblity with the 
PAR and EJB3 artifacts. To customize them, you now need to configure it as an 
ejb3Module. (In 2.1 the module variable *is* Ejb3Module).

Make sure you are using EAR plugin 2.1 and update the EAR pom as follows:

<build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-ear-plugin</artifactId>
        <configuration>
          <modules>
            <ejb3Module>
              <groupId>test</groupId>
              <artifactId>test-ejb</artifactId>
              <bundleFileName>name-without-version.ejb3</bundleFileName>
            </ejb3Module>
          </modules>
        </configuration>
      </plugin>
    </plugins>
  </build>

notice  the ejbModule -> ejb3Module

> 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