You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Arto Pastinen <ar...@canter.fi> on 2004/07/16 10:58:16 UTC

How to change artifactId

Hi!

How can i temporarly change artifactId from project.
I need to change it because i want to deply snapshot jar, which contains
only some specific stuff from my project, and
org.apache.maven.artifact.deployer.*Deployer's deploySnapshot method
need's project object.

Artsi


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


Re: How to change artifactId

Posted by Gilles Dodinet <rh...@free.fr>.
Arto Pastinen wrote:

>Hi!
>
>How can i temporarly change artifactId from project.
>I need to change it because i want to deply snapshot jar, which contains
>only some specific stuff from my project, and
>org.apache.maven.artifact.deployer.*Deployer's deploySnapshot method
>need's project object.
>  
>
something similar to the lines below should work. however there may be 
some unexpected side-effects.. use at your own risk ;)

<!-- backing up artifactId -->
<j:set var="oldId" value="${pom.artifactId}"/>
<!-- getting the pom instance -->
<maven:pom projectDescriptor="${basedir}/project.xml" var="projectVar"/>
<!-- setting new artifactId value -->
${projectVar.setArtifactId("newArtifactId")}
<!-- doStuff with projectVar -->
<!-- restoring artifactId -->
${projectVar.setArtifactId(oldId)}


-- gd

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