If I understand correctly, using this approach the client will have its version number before the "_client" in its name, i.e.:
ejb: foo-1.0.jar client: foo-1.0_client.jar If so, given Maven's default expectation that version numbers immediately precede the extension, I presume the appropriate way for other projects to express a dependency on the client would be something like: <dependency> <id>foo</id> <version>1.0_client</version> </dependency> Is this right? Thanks. ..Russ Jubenville -----Original Message----- From: Tom Bostelmann [mailto:[EMAIL PROTECTED] Sent: January 27, 2005 13:09 To: Maven Users List Subject: RE: installing different named artifact... So, I ended up with a bit of a hack for a solution. I ended up writing an ArtifactTypeHandler to handle 'ejb-client' type artifacts, which makes sure it copies it with the correct name. I also overrode the ejb:ejb-client and ejb:install-client goals so that they use the new type handler. <goal name="qpass:ejb:ejb-client" description="Build a client ejb file"> <ant:jar jarfile="${maven.build.dir}/${maven.final.name}_client.jar" basedir="${maven.build.dest}" excludes="${maven.ejb.client.base.excludes},${maven.ejb.client.excludes} " index="${maven.ejb.client.index}" > </ant:jar> </goal> <goal name="qpass:ejb:install-client" prereqs="qpass:ejb:ejb-client" description="Install the ejb client in the local repository"> <j:new var="typeHandler" className="net.qpass.maven.ejbclient.EjbClientArtifactTypeHandler"/> <artifact:install artifact="${maven.build.dir}/${maven.final.name}_client.jar" type="ejb-client" project="${pom}" typeHandler="${typeHandler}"/> </goal> Suggestions? Any better ideas? -----Original Message----- From: Tom Bostelmann [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 26, 2005 10:06 PM To: Maven Users List Subject: RE: installing different named artifact... Actually, in addition to that bug it also doesn't work well with a multi-project. In a multi-project it executes ejb:ejb, however, if I want to include the ejb:install-client, I end up having to do ejb:ejb again because the ejb:ejb-client has a prereq of "ejb:ejb". So, there are two problems: 1.) ejb:install-client doesn't install the client jar in your local repository with a name that ends with '-client' (it uses the same name as the ejb-jar artifact which is confusing). 2.) You can't have the project build both the client and the ejb-jar without building the ejb-jar twice (because ejb:install-client 'prereqs' ejb:ejb). How have others solved this?? -----Original Message----- From: Brett Porter [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 26, 2005 5:47 PM To: Maven Users List Subject: Re: installing different named artifact... looks like a bug then, though I'll defer to someone with more knowledge of the ejb plugins as I don't use them directly. - Brett On Wed, 26 Jan 2005 17:40:20 -0800, Tom Bostelmann <[EMAIL PROTECTED]> wrote: > It copies it to the repository under jars using the same name, > unfortunately. > > Here's the end of the output of 'maven ejb:install-client' > > ejb:ejb: > [echo] Building ejb qpass_nextel_outbound-1.0 > [jar] Building jar: > /home/tbostelm/views/tbostelm_cnextel_bnd_2/vobs/Cnextel/ejb-jars/outbou > nd/target/qpass_nextel_outbound-1.0.jar > > ejb:ejb-client: > [jar] Building jar: > /home/tbostelm/views/tbostelm_cnextel_bnd_2/vobs/Cnextel/ejb-jars/outbou > nd/target/qpass_nextel_outbound-1.0-client.jar > Copying: from > '/home/tbostelm/views/tbostelm_cnextel_bnd_2/vobs/Cnextel/ejb-jars/outbo > und/target/qpass_nextel_outbound-1.0-client.jar' to: > '/home/tbostelm/.maven/repository/qpass_nextel/jars/qpass_nextel_outboun > d-1.0.jar' > Copying: from > '/home/tbostelm/views/tbostelm_cnextel_bnd_2/vobs/Cnextel/ejb-jars/outbo > und/project.xml' to: > '/home/tbostelm/.maven/repository/qpass_nextel/poms/qpass_nextel_outboun > d-1.0.pom' > BUILD SUCCESSFUL > Total time: 19 seconds > Finished at: Wed Jan 26 17:38:00 PST 2005 > > -----Original Message----- > From: Brett Porter [mailto:[EMAIL PROTECTED] > Sent: Wednesday, January 26, 2005 5:29 PM > To: Maven Users List > Subject: Re: installing different named artifact... > > doesn't the ejb plugin already do this for you? > > - Brett > > On Wed, 26 Jan 2005 17:03:05 -0800, Tom Bostelmann <[EMAIL PROTECTED]> > wrote: > > I'm sure this question has been asked several times but I'm not sure > > what the 'best-practice' is at this point. My problem is that I'm > > generating an ejb-jar and would like the same project to generate the > > client-jar. So, the ejb-jar would have the name outbound-1.0.jar, and > > would be of type 'ejb', and the client would be > outboud_client-1.0.jar, > > which would be of type 'jar'. How do I do this using the same Maven > > project? > > > > I've tried fiddling with 'maven.final.name' and setting the > > 'pom.artifactId' but they both ultimately get installed using the same > > name (just different types). > > > > What's the best practice here? > > > > > > --------------------------------------------------------------------- > 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] ######################################################################## ############# This e-mail message has been scanned for Viruses and Content and cleared by NetIQ MailMarshal ######################################################################## ############# ##################################################################################### This e-mail message has been scanned for Viruses and Content and cleared by NetIQ MailMarshal ##################################################################################### --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]