You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Brian Jackson (JIRA)" <ji...@codehaus.org> on 2009/02/09 03:08:19 UTC

[jira] Commented: (MDEPLOY-94) Variables in the version element in pom.xml need to be expanded before deployment

    [ http://jira.codehaus.org/browse/MDEPLOY-94?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=164511#action_164511 ] 

Brian Jackson commented on MDEPLOY-94:
--------------------------------------

Well I started writing a new ArtifactTransformation to handle this logic but I've hit a road block since I'm now discovering that Plexus isn't recognizing my class as an additional component when I add my project as a plugin dependency of maven-install-plugin or maven-deploy-plugin in my pom.  So instead I got the source for maven-artifact-manager and tried adding it directly there.  But it appears Maven loads these directly from the maven-2.0.x-uber.jar under M2_HOME instead of from the maven-artifact-manager jar from within my local m2 repository.  This makes it impossible for me to test this without ripping apart the maven-2.0.x-uber.jar.  Am I missing a simple way to override maven-artifact-manager?

> Variables in the version element in pom.xml need to be expanded before deployment
> ---------------------------------------------------------------------------------
>
>                 Key: MDEPLOY-94
>                 URL: http://jira.codehaus.org/browse/MDEPLOY-94
>             Project: Maven 2.x Deploy Plugin
>          Issue Type: Bug
>            Reporter: Brian Jackson
>
> We use an external tool to manage our releases (instead of maven-release-plugin). The version in our pom.xml is declared as:
> <version>${build.number}</version>
> The actual version number is passed in during a release deployment on the command line "mvn deploy -Dbuild.number=1.2.3"
> The pom.xml is deployed literally without the variable replaced with the actual value.  This causes problems, in particular multi-module releases are impossible since the parent pom can't be resolved properly as well as this issue with Nexus  https://issues.sonatype.org/browse/NEXUS-1552
> I started digging into the code and see deployment is deferred to the DefaultArtifactDeployer
> http://maven.apache.org/ref/current/xref/org/apache/maven/artifact/deployer/DefaultArtifactDeployer.html
> Can I somehow install a custom ArtifactTransformation that expands these variables before deployment?  How would I install it in my builds?  Would I build it as a Plexus component and add it as a plugin dependency of maven-deploy-plugin?  If someone could give me a little guidance I'd be happy to implement it, test it and submit a patch.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira