ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jasper Floor <jasper.fl...@m4n.nl>
Subject Re: ivy makepom can I manually set properties such as ivy.pom.version
Date Thu, 29 Mar 2012 08:33:24 GMT
On Wed, Mar 28, 2012 at 11:25 PM, leopardy <florisalcedo@gmail.com> wrote:
>
> When using makepom my pom gets a strange value in the version property like
> this
> <version>working@node128</version>
> I believe the weird value has something to do with my ip address
> The reason why this is happening is because according to the documentation
> here: http://ant.apache.org/ivy/history/latest-milestone/use/makepom.html
> ivy.pom.version: defaults to the revision as defined in the ivy.xml file.
>
> but in my ivy.xml I don't have a revision(just the organisation and module)
> and don't want to add a revision(though I did try it just to verify and as
> soon as I put something for revision thats what gets slapped in the pom
> version). I would like the version in my pom to be whatever value I decide
> to give it right as I am invoking the makepom
>
> Is this possible?
>
> In case it helps this is what the makepom looks something like
> <target .....
>       <property name="pomfile"
> value="${project.dir}/target/artifacts/${project.conf}/${project.artifactname}.pom"
> />
>       <property name="ivy.file" location="${project.dir}/ivy.xml" />
>       <property name="project.conf" value="default" />
>
>       <ivy:makepom ivyfile="${ivy.file}" pomfile="${pomfile}"
> conf="${project.conf}"  >
>            </ivy:makepom>
>
> </target>

If you call ant with -Dartifact.revision=1.2.3 you will have a
property artifact.revision with value 1.2.3

Then before you call makepom call deliver:

        <ivy:deliver pubrevision="${artifact.revision}"
deliverpattern="dist/ivy.xml" status="${artifact.status}"/>

This will create an ivy.xml in dist/ with revision artifact.revision
and status artifact.status. If you don't give values for the
properties here then it will use default values.

mvg,
Jasper

Mime
View raw message