You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Brett Porter (JIRA)" <ji...@codehaus.org> on 2005/06/09 03:31:10 UTC
[jira] Updated: (MNG-460) Direct access to the POM expressions as ant properties
[ http://jira.codehaus.org/browse/MNG-460?page=all ]
Brett Porter updated MNG-460:
-----------------------------
Fix Version: 2.0-alpha-3
ok, just to be clear - you're currently still working on it, and will be incorporating it in the pom task so that these both hold:
- you can still define multiple poms with different references
- you don't need to list <pomproperties/>, it is done by <...:pom />
if so, that sounds great - thanks!
> Direct access to the POM expressions as ant properties
> ------------------------------------------------------
>
> Key: MNG-460
> URL: http://jira.codehaus.org/browse/MNG-460
> Project: Maven 2
> Type: New Feature
> Components: maven-artifact-ant
> Reporter: Nicola Ken Barozzi
> Priority: Minor
> Fix For: 2.0-alpha-3
> Attachments: POMProperties.java
>
>
> ** Disclaimer **
> I have no time now to test it fully ATM, but it should basically work.
> ****************
> This task sets up a PropertyHelper that makes it possible to resolve pom values directly from Ant properties.
> IOW this:
> <artifact:setProperty property="my.artifactid"
> expression="project.artifactId"
> pomRefId="my.maven.project" />
>
> then use ${my.artifactid}
> can be replaced by this:
> use ${pom:my.maven.project/project.artifactId}
> - ~ -
> Here is a sample test buildfile:
> <?xml version="1.0" encoding="UTF-8"?>
> <project name="foo"
> xmlns:artifact="antlib:org.apache.maven.artifact.ant"
> default="test-pom">
>
> <taskdef classpath="C:\Documents and Settings\barozzink\Desktop\m2-artifact-nkb\build\classes"
> name="pomproperties"
> classname="org.apache.maven.artifact.ant.POMProperties"/>
>
> <target name="test-pom">
> <artifact:pom file="pom.xml" id="my.maven.project"/>
> <artifact:setProperty property="my.artifactid" expression="project.artifactId" pomRefId="my.maven.project" />
> <echo>Artifact ID = ${my.artifactid}</echo>
>
> <pomproperties/>
> <echo>Artifact ID with PropertyHelper = ${pom:my.maven.project/project.artifactId}</echo>
>
> </target>
> </project>
>
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org