RE: retrieve the path of a particular artifact
-Original Message- From: Jerome Lacoste [mailto:[EMAIL PROTECTED] Sent: 04 June 2004 16:53 To: Maven Users List Subject: RE: retrieve the path of a particular artifact [snip] I guess there's something cleaner allowing to access directly an artifact given its name or id. Any idea? Yes! Check the maven plugin jelly code for example... ;-) In that file? maven-plugins/plugin/plugin.jelly No, no. I meant in the Cactus maven plugin... you mean that? u:file var=localPluginFile name=${maven.repo.local}/${groupId}/plugins/${artifactId}-${version}.ja r / Here I have to hardcode even more things. And it's dependant on the layout of the local repos. Nope. Here's an extract from the Cactus plugin's jelly file: ant:path id=cactus.classpath ant:pathelement location=${plugin.getDependencyPath('cactus:cactus-ant')}/ ant:pathelement location=${plugin.getDependencyPath('cactus:cactus')}/ ant:pathelement location=${plugin.getDependencyPath('commons-logging:commons-logging')} / [...] Maybe I misunderstood you?! I wasn't clear enough it seems... ;-) Thanks -Vincent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: retrieve the path of a particular artifact
-Original Message- From: Jerome Lacoste [mailto:[EMAIL PROTECTED] Sent: 03 June 2004 17:18 To: [EMAIL PROTECTED] Subject: retrieve the path of a particular artifact Hei, I have tried to use cactus ant script within maven (without the maven-cactus plugin, because I was offline and couldn't download it). I managed to make it work. At some point I needed to add some cactus libs (or dependencies) to the classpath, which required me to add a particular path. I solved it doing the following: j:forEach var=artifact items=${pom.artifacts} j:if test=${artifact.dependency.artifactId =='httpunit'} ant:property name=httpunit.path value=${artifact.path}/ echo message=found httpunit path ${httpunit.path}/ /j:if [...] /j:forEach I guess there's something cleaner allowing to access directly an artifact given its name or id. Any idea? Yes! Check the maven plugin jelly code for example... ;-) -Vincent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: retrieve the path of a particular artifact
On Fri, 2004-06-04 at 04:59, Vincent Massol wrote: -Original Message- From: Jerome Lacoste [mailto:[EMAIL PROTECTED] Sent: 03 June 2004 17:18 To: [EMAIL PROTECTED] Subject: retrieve the path of a particular artifact Hei, I have tried to use cactus ant script within maven (without the maven-cactus plugin, because I was offline and couldn't download it). I managed to make it work. At some point I needed to add some cactus libs (or dependencies) to the classpath, which required me to add a particular path. I solved it doing the following: j:forEach var=artifact items=${pom.artifacts} j:if test=${artifact.dependency.artifactId =='httpunit'} ant:property name=httpunit.path value=${artifact.path}/ echo message=found httpunit path ${httpunit.path}/ /j:if [...] /j:forEach I guess there's something cleaner allowing to access directly an artifact given its name or id. Any idea? Yes! Check the maven plugin jelly code for example... ;-) In that file? maven-plugins/plugin/plugin.jelly you mean that? u:file var=localPluginFile name=${maven.repo.local}/${groupId}/plugins/${artifactId}-${version}.jar / Here I have to hardcode even more things. And it's dependant on the layout of the local repos. Maybe I misunderstood you?! J - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]