You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Nidhi Tuli <nt...@paymentone.com> on 2006/03/07 18:26:40 UTC
ejb3 plugin
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: ejb3 plugin
Posted by Wayne Fay <wa...@gmail.com>.
Thanks a lot for all that info/documentation Marco. Way more than I
expected, even if it is "only" for Maven1. ;-)
Wayne
On 3/7/06, Marco Mistroni <mm...@gmail.com> wrote:
> Hello
> One more thing
>
> Please NOTE that i have generated myself the persistence.xml file int he
> META-INF directory..
>
> not sure if you were expecting maven to do that
>
> and, just to clarify, file i sent you works wtih Maven 1.1
>
>
> regards
> marco
>
> On 3/7/06, Marco Mistroni <mm...@gmail.com> wrote:
> >
> > Hello,
> > yes sorry for that..
> > this is a maven 1.1 version though....
> >
> > directory structure is as follows
> >
> > ejbs
> > |___ META-INF
> > |___ src
> > |____java
> > |____ com....
> >
> > ***** maven.xml ********
> > <?xml version="1.0"?>
> > <project xmlns:m="jelly:maven"
> > xmlns:ant="jelly:ant">
> >
> >
> > <preGoal name="ejb3">
> > <attainGoal name="clean"/>
> > <copy todir="${maven.build.dir}/classes/${meta.inf.dir}">
> > <fileset dir="${meta.inf.dir}"/>
> > </copy>
> >
> > </preGoal>
> >
> > <goal name="ejb3">
> > <attainGoal name="ejb:ejb"/>
> > <attainGoal name="ejb:install"/>
> > </goal>
> > </project>
> >
> > this is part of the project.xml
> >
> > <build>
> > <nagEmailAddress>turbine-maven-dev@jakarta.apache.org
> > </nagEmailAddress>
> > <sourceDirectory>src/java</sourceDirectory>
> > <unitTestSourceDirectory>test</unitTestSourceDirectory>
> > <unitTest>
> > <includes>
> > <include>**/*Test.java</include>
> > </includes>
> > <excludes>
> > <exclude>**/NaughtyTest.java</exclude>
> > </excludes>
> > </unitTest>
> > <resources>
> > <resource>
> > <directory>src/conf</directory>
> > <includes>
> > <include>*.properties</include>
> > <include>*.xml</include>
> > </includes>
> > </resource>
> > </resources>
> > </build>
> >
> > **********
> >
> > NOthing special so far, but when i build an ear this is the project.xmlthat i use
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> >
> > <project>
> > <extend>${basedir}/../project.xml</extend>
> > <groupId>ejb3</groupId>
> >
> > <id>ejb-deploy</id>
> >
> > <name>EJB3 EAR</name>
> > <organization>
> > <name>Apache Software Foundation</name>
> > <url>http://www.apache.org/</url>
> > <logo> http://maven.apache.org/images/jakarta-logo-blue.gif</logo>
> > </organization>
> >
> > <description>EAR file for EJB3 sample project </description>
> >
> > <shortDescription>How to use maven with EJB3</shortDescription>
> >
> > <dependencies>
> > <dependency>
> > <groupId>ejb3</groupId>
> > <artifactId>ejbs</artifactId>
> > <version>${pom.currentVersion}</version>
> > <type>ejb</type>
> > <properties>
> > <ear.bundle>true</ear.bundle>
> > <ear.bundle.name>ejbs.par</ear.bundle.name>
> > </properties>
> > </dependency>
> >
> > <dependency>
> > <groupId>ejb3</groupId>
> > <artifactId>ejb3-web</artifactId>
> > <version>${ pom.currentVersion}</version>
> > <type>war</type>
> > <properties>
> > <ear.bundle>true</ear.bundle>
> > <ear.appxml.war.context-root>ejb3</ear.appxml.war.context-root>
> >
> > </properties>
> > </dependency>
> >
> > <dependency>
> > <groupId>ejb3</groupId>
> > <artifactId>shared</artifactId>
> > <version>${ pom.currentVersion}</version>
> > <type>jar</type>
> > <properties>
> > <ear.module>true</ear.module>
> > <ear.bundle>true</ear.bundle>
> > </properties>
> > </dependency>
> >
> >
> > </dependencies>
> >
> > </project>
> >
> > HTH
> > marco
> >
> > If not, i can send you my sample application, it works out of the
> > box.......
> >
> > regards
> > marco
> >
> >
> >
> >
> >
> >
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: ejb3 plugin
Posted by Marco Mistroni <mm...@gmail.com>.
Hello
One more thing
Please NOTE that i have generated myself the persistence.xml file int he
META-INF directory..
not sure if you were expecting maven to do that
and, just to clarify, file i sent you works wtih Maven 1.1
regards
marco
On 3/7/06, Marco Mistroni <mm...@gmail.com> wrote:
>
> Hello,
> yes sorry for that..
> this is a maven 1.1 version though....
>
> directory structure is as follows
>
> ejbs
> |___ META-INF
> |___ src
> |____java
> |____ com....
>
> ***** maven.xml ********
> <?xml version="1.0"?>
> <project xmlns:m="jelly:maven"
> xmlns:ant="jelly:ant">
>
>
> <preGoal name="ejb3">
> <attainGoal name="clean"/>
> <copy todir="${maven.build.dir}/classes/${meta.inf.dir}">
> <fileset dir="${meta.inf.dir}"/>
> </copy>
>
> </preGoal>
>
> <goal name="ejb3">
> <attainGoal name="ejb:ejb"/>
> <attainGoal name="ejb:install"/>
> </goal>
> </project>
>
> this is part of the project.xml
>
> <build>
> <nagEmailAddress>turbine-maven-dev@jakarta.apache.org
> </nagEmailAddress>
> <sourceDirectory>src/java</sourceDirectory>
> <unitTestSourceDirectory>test</unitTestSourceDirectory>
> <unitTest>
> <includes>
> <include>**/*Test.java</include>
> </includes>
> <excludes>
> <exclude>**/NaughtyTest.java</exclude>
> </excludes>
> </unitTest>
> <resources>
> <resource>
> <directory>src/conf</directory>
> <includes>
> <include>*.properties</include>
> <include>*.xml</include>
> </includes>
> </resource>
> </resources>
> </build>
>
> **********
>
> NOthing special so far, but when i build an ear this is the project.xmlthat i use
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <project>
> <extend>${basedir}/../project.xml</extend>
> <groupId>ejb3</groupId>
>
> <id>ejb-deploy</id>
>
> <name>EJB3 EAR</name>
> <organization>
> <name>Apache Software Foundation</name>
> <url>http://www.apache.org/</url>
> <logo> http://maven.apache.org/images/jakarta-logo-blue.gif</logo>
> </organization>
>
> <description>EAR file for EJB3 sample project </description>
>
> <shortDescription>How to use maven with EJB3</shortDescription>
>
> <dependencies>
> <dependency>
> <groupId>ejb3</groupId>
> <artifactId>ejbs</artifactId>
> <version>${pom.currentVersion}</version>
> <type>ejb</type>
> <properties>
> <ear.bundle>true</ear.bundle>
> <ear.bundle.name>ejbs.par</ear.bundle.name>
> </properties>
> </dependency>
>
> <dependency>
> <groupId>ejb3</groupId>
> <artifactId>ejb3-web</artifactId>
> <version>${ pom.currentVersion}</version>
> <type>war</type>
> <properties>
> <ear.bundle>true</ear.bundle>
> <ear.appxml.war.context-root>ejb3</ear.appxml.war.context-root>
>
> </properties>
> </dependency>
>
> <dependency>
> <groupId>ejb3</groupId>
> <artifactId>shared</artifactId>
> <version>${ pom.currentVersion}</version>
> <type>jar</type>
> <properties>
> <ear.module>true</ear.module>
> <ear.bundle>true</ear.bundle>
> </properties>
> </dependency>
>
>
> </dependencies>
>
> </project>
>
> HTH
> marco
>
> If not, i can send you my sample application, it works out of the
> box.......
>
> regards
> marco
>
>
>
>
>
>
Re: ejb3 plugin
Posted by Marco Mistroni <mm...@gmail.com>.
Hello,
yes sorry for that..
this is a maven 1.1 version though....
directory structure is as follows
ejbs
|___ META-INF
|___ src
|____java
|____ com....
***** maven.xml ********
<?xml version="1.0"?>
<project xmlns:m="jelly:maven"
xmlns:ant="jelly:ant">
<preGoal name="ejb3">
<attainGoal name="clean"/>
<copy todir="${maven.build.dir}/classes/${meta.inf.dir}">
<fileset dir="${meta.inf.dir}"/>
</copy>
</preGoal>
<goal name="ejb3">
<attainGoal name="ejb:ejb"/>
<attainGoal name="ejb:install"/>
</goal>
</project>
this is part of the project.xml
<build>
<nagEmailAddress>turbine-maven-dev@jakarta.apache.org</nagEmailAddress>
<sourceDirectory>src/java</sourceDirectory>
<unitTestSourceDirectory>test</unitTestSourceDirectory>
<unitTest>
<includes>
<include>**/*Test.java</include>
</includes>
<excludes>
<exclude>**/NaughtyTest.java</exclude>
</excludes>
</unitTest>
<resources>
<resource>
<directory>src/conf</directory>
<includes>
<include>*.properties</include>
<include>*.xml</include>
</includes>
</resource>
</resources>
</build>
**********
NOthing special so far, but when i build an ear this is the project.xml that
i use
<?xml version="1.0" encoding="UTF-8"?>
<project>
<extend>${basedir}/../project.xml</extend>
<groupId>ejb3</groupId>
<id>ejb-deploy</id>
<name>EJB3 EAR</name>
<organization>
<name>Apache Software Foundation</name>
<url>http://www.apache.org/</url>
<logo>http://maven.apache.org/images/jakarta-logo-blue.gif</logo>
</organization>
<description>EAR file for EJB3 sample project </description>
<shortDescription>How to use maven with EJB3</shortDescription>
<dependencies>
<dependency>
<groupId>ejb3</groupId>
<artifactId>ejbs</artifactId>
<version>${pom.currentVersion}</version>
<type>ejb</type>
<properties>
<ear.bundle>true</ear.bundle>
<ear.bundle.name>ejbs.par</ear.bundle.name>
</properties>
</dependency>
<dependency>
<groupId>ejb3</groupId>
<artifactId>ejb3-web</artifactId>
<version>${pom.currentVersion}</version>
<type>war</type>
<properties>
<ear.bundle>true</ear.bundle>
<ear.appxml.war.context-root>ejb3</ear.appxml.war.context-root>
</properties>
</dependency>
<dependency>
<groupId>ejb3</groupId>
<artifactId>shared</artifactId>
<version>${pom.currentVersion}</version>
<type>jar</type>
<properties>
<ear.module>true</ear.module>
<ear.bundle>true</ear.bundle>
</properties>
</dependency>
</dependencies>
</project>
HTH
marco
If not, i can send you my sample application, it works out of the box.......
regards
marco
Re: ejb3 plugin
Posted by Wayne Fay <wa...@gmail.com>.
It would probably be helpful for Nidhi if you could post some samples
from your pom.xml and other associated files (you mentioned
persistence.xml and a .par file).
Just saying "I've done this" doesn't really help anyone.
Wayne
On 3/7/06, Marco Mistroni <mm...@gmail.com> wrote:
> hello,
> i have use dejb3 with maven1.1,, all you need is to deploy your enties in a
> .par file
> and write include the persistence.xml file...
>
>
> HTH
> marco
>
> On 3/7/06, Nidhi Tuli <nt...@paymentone.com> wrote:
> >
> > 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: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: ejb3 plugin
Posted by Marco Mistroni <mm...@gmail.com>.
hello,
i have use dejb3 with maven1.1,, all you need is to deploy your enties in a
.par file
and write include the persistence.xml file...
HTH
marco
On 3/7/06, Nidhi Tuli <nt...@paymentone.com> wrote:
>
> 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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: ejb3 plugin
Posted by Tim Kettler <ti...@udo.edu>.
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: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: ejb3 plugin
Posted by Marco Mistroni <mm...@gmail.com>.
Hello Tim,
i have downloaded the plugins,but they are as sources...
can you tell me how do i go from sources to install them in my local
repository?
thanks in advance an dregards
marco
On 3/7/06, Tim Kettler <ti...@udo.edu> wrote:
>
> 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.
>
> -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: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
Re: ejb3 plugin
Posted by Tim Kettler <ti...@udo.edu>.
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.
-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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org