You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by nicolas De Loof <ni...@cgey.com> on 2004/02/09 15:32:32 UTC

ejb:ejb-client usage

Hi

I'm trying to migrate an existing project to maven. This projects has 
some Ejbs, and I would like multiproject:install to build Ejb.jar AND 
Ejb-client.jar. Another sub-project (webapp) has ejb-client.jar for 
dependency.

When using multiproject:install, Ejb.jar is build but not 
Ejb-client.jar. I can see in plugin.jelly that "ejb:ejb-client" looks 
like an optional goal in the ejb plugin.

Do I need to define a postgoal to call ejb:ejb-client and 
install:artifact for Ejb-client.jar or is they're any way to handle this 
automatically ?

Nico.

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


Re: ejb:ejb-client usage

Posted by nicolas De Loof <ni...@cgey.com>.
... and I defined this in my webapp project.xml to make Eclipse 
.classpath have a src reference to the ejb project :

<dependency>
   <groupId>${project.name}</groupId>
   <artifactId>${project.name}-ejbxxx</artifactId>
   <version>client-${pom.currentVersion}</version>
   <type>jar</type>
   <properties>
      <war.bundle>true</war.bundle>
      <eclipse.dependency>true</eclipse.dependency>
   <properties>
</dependency>

Hope it can help.

Nico.

nicolas De Loof a écrit :

> Just for info to other users having the same needs, I've defined this 
> postgoal to make it work fine. Jelly code comes form patches 
> http://jira.codehaus.org/ViewIssue.jspa?key=MPEJB-2
>
> <postGoal name="ejb:install">
>
>     <attainGoal name="ejb:ejb-client" />
>
>     <j:set var="maven.ejb.final.client.name"
>        value="${maven.build.dir}/${maven.final.name}-client.jar"/>
>           <j:set var="artifactId_original" value="${pom.artifactId}"/>
>     <j:set var="artifactId_client" value="${pom.artifactId}-client"/>
>     <j:expr value="${pom.setArtifactId(artifactId_client)}" />        
> <artifact:install
>        artifact="${maven.ejb.final.client.name}"
>        type="jar"
>        project="${pom}"/>
>     <j:expr value="${pom.setArtifactId(artifactId_original)}" />
> </postGoal>
>
> Nico.
>
>
> Emmanuel Venisse a écrit :
>
>> ----- Original Message ----- From: "nicolas De Loof" 
>> <ni...@cgey.com>
>> To: "Maven Users List" <us...@maven.apache.org>
>> Sent: Monday, February 09, 2004 3:32 PM
>> Subject: ejb:ejb-client usage
>>
>>
>>  
>>
>>> Hi
>>>
>>> I'm trying to migrate an existing project to maven. This projects has
>>> some Ejbs, and I would like multiproject:install to build Ejb.jar AND
>>> Ejb-client.jar. Another sub-project (webapp) has ejb-client.jar for
>>> dependency.
>>>
>>> When using multiproject:install, Ejb.jar is build but not
>>> Ejb-client.jar. I can see in plugin.jelly that "ejb:ejb-client" looks
>>> like an optional goal in the ejb plugin.
>>>
>>> Do I need to define a postgoal to call ejb:ejb-client and
>>> install:artifact for Ejb-client.jar or is they're any way to handle 
>>> this
>>> automatically ?
>>>   
>>
>>
>> Yes or if you have a default goal for all your project, you can add an
>> attainGoal to ejb:ejb-client.
>>
>>  
>>
>>> Nico.
>>>
>>> ---------------------------------------------------------------------
>>> 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
>

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


Re: ejb:ejb-client usage

Posted by nicolas De Loof <ni...@cgey.com>.
Just for info to other users having the same needs, I've defined this 
postgoal to make it work fine. Jelly code comes form patches 
http://jira.codehaus.org/ViewIssue.jspa?key=MPEJB-2

<postGoal name="ejb:install">

     <attainGoal name="ejb:ejb-client" />
 
     <j:set var="maven.ejb.final.client.name"
        value="${maven.build.dir}/${maven.final.name}-client.jar"/>
       
     <j:set var="artifactId_original" value="${pom.artifactId}"/>
     <j:set var="artifactId_client" value="${pom.artifactId}-client"/>
     <j:expr value="${pom.setArtifactId(artifactId_client)}" />    
     <artifact:install
        artifact="${maven.ejb.final.client.name}"
        type="jar"
        project="${pom}"/>
     <j:expr value="${pom.setArtifactId(artifactId_original)}" />
</postGoal>

Nico.


Emmanuel Venisse a écrit :

>----- Original Message ----- 
>From: "nicolas De Loof" <ni...@cgey.com>
>To: "Maven Users List" <us...@maven.apache.org>
>Sent: Monday, February 09, 2004 3:32 PM
>Subject: ejb:ejb-client usage
>
>
>  
>
>>Hi
>>
>>I'm trying to migrate an existing project to maven. This projects has
>>some Ejbs, and I would like multiproject:install to build Ejb.jar AND
>>Ejb-client.jar. Another sub-project (webapp) has ejb-client.jar for
>>dependency.
>>
>>When using multiproject:install, Ejb.jar is build but not
>>Ejb-client.jar. I can see in plugin.jelly that "ejb:ejb-client" looks
>>like an optional goal in the ejb plugin.
>>
>>Do I need to define a postgoal to call ejb:ejb-client and
>>install:artifact for Ejb-client.jar or is they're any way to handle this
>>automatically ?
>>    
>>
>
>Yes or if you have a default goal for all your project, you can add an
>attainGoal to ejb:ejb-client.
>
>  
>
>>Nico.
>>
>>---------------------------------------------------------------------
>>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: ejb:ejb-client usage

Posted by Emmanuel Venisse <em...@venisse.net>.
----- Original Message ----- 
From: "nicolas De Loof" <ni...@cgey.com>
To: "Maven Users List" <us...@maven.apache.org>
Sent: Monday, February 09, 2004 3:32 PM
Subject: ejb:ejb-client usage


> Hi
>
> I'm trying to migrate an existing project to maven. This projects has
> some Ejbs, and I would like multiproject:install to build Ejb.jar AND
> Ejb-client.jar. Another sub-project (webapp) has ejb-client.jar for
> dependency.
>
> When using multiproject:install, Ejb.jar is build but not
> Ejb-client.jar. I can see in plugin.jelly that "ejb:ejb-client" looks
> like an optional goal in the ejb plugin.
>
> Do I need to define a postgoal to call ejb:ejb-client and
> install:artifact for Ejb-client.jar or is they're any way to handle this
> automatically ?

Yes or if you have a default goal for all your project, you can add an
attainGoal to ejb:ejb-client.

>
> Nico.
>
> ---------------------------------------------------------------------
> 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