Hi,
sorry, my fault. I added the project to demonstrate exactly the error you are
getting :-|
This was solved by adding a <ejb3Module> tag to the plugin configuration (See Stephane's
comment on the issue). But you normally don't need the module configuration at all. It is
only necassery if you want to customize the module configuration. So you can just delete
the entire build section from the pom.
-Tim
Pete schrieb:
Hi there,
I'm trying to build the example EJB3 maven project mentioned above by Tim,
but am getting
[INFO] Building Unnamed - test:test-ear:ear:1.0-SNAPSHOT
[INFO] task-segment: [clean, install]
[INFO]
----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] [ear:generate-application-xml]
[INFO]
----------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
----------------------------------------------------------------------------
[INFO] Artifact[test:test-ejb:ejb] is not a dependency of the project.
[INFO]
----------------------------------------------------------------------------
I managed to install the par and ejb3 plugins from the sandbox, the above
message seems confusing as EAR pom.xml does have the ejb as a dependency :-
<dependency>
<groupId>test</groupId>
<artifactId>test-ejb</artifactId>
<version>1.0-SNAPSHOT</version>
<type>ejb3</type>
</dependency>
This dependency appears to be correct because it is valid i.e. if I change
the artifactid it fails earlier.
So it seems its the <ejbModule> part below that it doesn't like. My local
repo has version 2.1 of the ear plugin, I tried building the EAR project in
the trunk, but same error.
<ejbModule>
<groupId>test</groupId>
<artifactId>test-ejb</artifactId>
<bundleFileName>name-without-version.ejb3</bundleFileName>
</ejbModule>
On 07/03/06, Nidhi Tuli <[EMAIL PROTECTED]> wrote:
Changing the version on maven archiver in pom.xml made install to work.
I changed the version to point to 2.01. version in my local copy.
/Nidhi
-----Original Message-----
From: Tim Kettler [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 07, 2006 11:53 AM
To: Maven Users List
Subject: Re: ejb3 plugin
Tim Kettler schrieb:
Hi Nidhi,
you can checkout the maven-ejb3-plugin vie svn from the maven sandbox
at:
http://svn.apache.org/repos/asf/maven/sandbox/plugins/maven-ejb3-plugin
you then probably also want the maven-par-plugin from:
http://svn.apache.org/repos/asf/maven/sandbox/plugins/maven-par-plugin
Once you have the plugins on your harddrive you can install them to
your
local repository by executing 'mvn install' in the project root
directories.
There is an attached zip file (test-prj.zip) at
http://jira.codehaus.org/browse/MNG-1723 which contains a very
minimalistic test project with an EJB3 project and an EAR project that
packages the EJB file. You can use that as an starting point for your
project.
However, according to the latest draft of the spec (see section 6.2 of
ejb-3_0-pfd-spec-persistence.pdf and chapter 19 of
ejb-3_0-pfd-spec-ejbcore.pdf)
Enterprise Beans are packaged in plain Jar files (not .ejb3 and .par).
So if you use an EJB3 implementation that implements the latest spec
(like the one from JBoss) you can use the 'standard' maven-ejb-plugin.
The only problem with this is that the plugin enforces the presence of
an 'ejb-jar.xml' file which is not needed with EJB3 if you use
annotations. I submitted a patch for the plugin
(http://jira.codehaus.org/browse/MEJB-6) to make the 'ejb-jar.xml'
optional but i don't know if this will be applyed in the near furure.
...applied in the near future.
Grmmph.
-Tim
Nidhi Tuli schrieb:
Hi,
I just started working on Maven 2 and trying to build my EJB3 project
using maven2. Any ideas what plug-in should I use? In one of the
articles I am advised to do ejb3 on the jar file which I created. The
package for that is suggested to be "maven-ejb3-plugin" with groupId
of
goal bindings "org.apache.maven.plugins". But I am not able to find
this
plugin?
Any suggestions?
Thanks
Nidhi
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]