You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Raúl Arabaolaza Barquín <ra...@mundivia.net> on 2007/06/06 12:54:08 UTC

Generate a ear from a ejb project

Hi:

 

I have a ejb Project wich i would like to package as an ear too without creating a specific ear project but using the ejb project´s pom

 

I´ve tried to add the project as a ebjModule in the pom.xml this way

 

<modelVersion>4.0.0</modelVersion> 

  <groupId>com.endesa</groupId> 

  <artifactId>XmlWriterTransmisor</artifactId> 

  <name>XmlWriterTransmisor</name> 

  <packaging>ejb</packaging> 

  <version>0.0.1-SNAPSHOT</version> 

  <url>http://192.168.0.87/XmlWriterTransmisor</url>

            [...]

 

            <artifactId>maven-ear-plugin</artifactId> 

  <version>2.3</version> 

- <configuration>

- <jboss>

  <version>4</version> 

  </jboss>

- <modules>

- <ejbModule>

  <groupId>com.endesa</groupId> 

  <artifactId>XmlWriterTransmisor</artifactId> 

  </ejbModule>

  </modules>

  </configuration>

  </plugin>

 

It dosen´t work, it says (obviously) I need to add the dependency, but I can´t add one project as dependency for itself,so my question is:

 

Can I generate a ear file with a ejb module without creating a ear project? Can I use the ejb project´s pom to generate the ear too? 

 

 


------------------------------------------------------------------
This e-mail and the documents attached are confidential and intended solely
for the addressee; it may also be privileged. If you receive this e-mail
in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group
liability cannot be triggered for the message content. Although the
sender endeavours to maintain a computer virus-free network, the sender does
not warrant that this transmission is virus-free and will not be liable for
any damages resulting from any virus transmitted.

Este mensaje y los ficheros adjuntos pueden contener informacion
confidencial destinada solamente a la(s) persona(s) mencionadas
anteriormente. Pueden estar protegidos por secreto profesional Si usted
recibe este correo electronico por error, gracias de informar inmediatamente
al remitente y destruir el mensaje.
Al no estar asegurada la integridad de este mensaje sobre la red, Atos
Origin no se hace responsable por su contenido. Su contenido no constituye
ningun compromiso para el grupo Atos Origin, salvo ratificacion escrita por
ambas partes.
Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor
no puede garantizar nada al respecto y no sera responsable de cualesquiera
danos que puedan resultar de una transmision de virus
------------------------------------------------------------------

Re: Generate a ear from a ejb project

Posted by Jo Vandermeeren <jo...@gmail.com>.
On 6/6/07, Raúl Arabaolaza Barquín <ra...@mundivia.net> wrote:
>
> Can I generate a ear file with a ejb module without creating a ear
> project? Can I use the ejb project´s pom to generate the ear too?


Hi Raul,

Short answer: no, you can't.

All good developers are a bit lazy, that's usually the inspiration for great
tools and software..
But you're being a bit too lazy IMHO ;-)

If you create an EJB module, the output will be an EJB jar.
If you want an EAR that includes the EJB module's artifact, you have to
define a separate module for it with packaging set to "ear", that's how it
goes..

Cheers
Jo

Re: Generate a ear from a ejb project

Posted by vgpande <pa...@yahoo.co.in>.
Hello,

Yes Raul, you can package a ejb project as an ear with the ejb modules as
submodules.

And in this case you do not even need to create an ear project.You can
configure your ejb modules as sub-modules for your ear packaging inside the
maven-ear-plugin.  

Just keep in mind which all modules you need to package exclude the ones
which are not intended to be packaged.



Raúl Arabaolaza Barquín wrote:
> 
> Hi:
> 
>  
> 
> I have a ejb Project wich i would like to package as an ear too without
> creating a specific ear project but using the ejb project´s pom
> 
>  
> 
> I´ve tried to add the project as a ebjModule in the pom.xml this way
> 
>  
> 
> <modelVersion>4.0.0</modelVersion> 
> 
>   <groupId>com.endesa</groupId> 
> 
>   <artifactId>XmlWriterTransmisor</artifactId> 
> 
>   <name>XmlWriterTransmisor</name> 
> 
>   <packaging>ejb</packaging> 
> 
>   <version>0.0.1-SNAPSHOT</version> 
> 
>   <url>http://192.168.0.87/XmlWriterTransmisor</url>
> 
>             [...]
> 
>  
> 
>             <artifactId>maven-ear-plugin</artifactId> 
> 
>   <version>2.3</version> 
> 
> - <configuration>
> 
> - <jboss>
> 
>   <version>4</version> 
> 
>   </jboss>
> 
> - <modules>
> 
> - <ejbModule>
> 
>   <groupId>com.endesa</groupId> 
> 
>   <artifactId>XmlWriterTransmisor</artifactId> 
> 
>   </ejbModule>
> 
>   </modules>
> 
>   </configuration>
> 
>   </plugin>
> 
>  
> 
> It dosen´t work, it says (obviously) I need to add the dependency, but I
> can´t add one project as dependency for itself,so my question is:
> 
>  
> 
> Can I generate a ear file with a ejb module without creating a ear
> project? Can I use the ejb project´s pom to generate the ear too? 
> 
>  
> 
>  
> 
> 
> ------------------------------------------------------------------
> This e-mail and the documents attached are confidential and intended
> solely
> for the addressee; it may also be privileged. If you receive this e-mail
> in error, please notify the sender immediately and destroy it.
> As its integrity cannot be secured on the Internet, the Atos Origin group
> liability cannot be triggered for the message content. Although the
> sender endeavours to maintain a computer virus-free network, the sender
> does
> not warrant that this transmission is virus-free and will not be liable
> for
> any damages resulting from any virus transmitted.
> 
> Este mensaje y los ficheros adjuntos pueden contener informacion
> confidencial destinada solamente a la(s) persona(s) mencionadas
> anteriormente. Pueden estar protegidos por secreto profesional Si usted
> recibe este correo electronico por error, gracias de informar
> inmediatamente
> al remitente y destruir el mensaje.
> Al no estar asegurada la integridad de este mensaje sobre la red, Atos
> Origin no se hace responsable por su contenido. Su contenido no constituye
> ningun compromiso para el grupo Atos Origin, salvo ratificacion escrita
> por
> ambas partes.
> Aunque se esfuerza al maximo por mantener su red libre de virus, el emisor
> no puede garantizar nada al respecto y no sera responsable de cualesquiera
> danos que puedan resultar de una transmision de virus
> ------------------------------------------------------------------
> 
> 

-- 
View this message in context: http://www.nabble.com/Generate-a-ear-from-a-ejb-project-tf3877162s177.html#a11006869
Sent from the Maven - Users mailing list archive at Nabble.com.


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