ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Baron, Randy" <>
Subject RE: ivy extra attributes not available in build.xml?
Date Fri, 08 Jan 2010 17:09:50 GMT
hi,, and when I add <ivy:info/> I do indeed get a value for my ${ivy.extra.submodule}
property. Thanks.  I still can't use [submodule] in the publish pattern though:

 <ivy:publish overwrite="true" resolver="filesystem-inhouse" pubrevision="${software.version}"
            <artifacts pattern="dist/${ivy.extra.submodule}-[revision].[ext]"/> 
<!--this fails:  <artifacts pattern="dist/[submodule]-[revision].[ext]"/>   -->

...although I guess I can use the property as above instead.

  So it kind of works now but although it publishes my app jar and a resource jar (the jars
from my build), with the right names, they are in fact both the same jar file.  I guess it's
something with the (confusing) way patterns work for publishing.


-----Original Message-----
From: Maarten Coene [] 
Sent: Friday, January 08, 2010 12:18 AM
Subject: Re: ivy extra attributes not available in build.xml?

Are you sure you call the ivy:info task?
I don't see this in your build.xml snippet.


----- Original Message ----
From: "Baron, Randy" <>
To: "" <>
Sent: Thu, January 7, 2010 3:15:04 PM
Subject: ivy extra attributes not available in build.xml?

  I've been trying to use ivy "extra attributes" but am not entirely successful.  When I try
the publish ant task and use my extra attribute in the artifact pattern the attribute doesn't
seem to be defined.

Some relevant snippets:
<ivy-module version="2.0" xmlns:e="" >
    <info organisation="someorg" module="gvs"  e:submodule="gvs-orm"/>

<project name="gvs-orm" default="all" basedir="." >
    <import file="ivy-init.xml"/>
     <target name="publish" depends="resolve" description="--> compile test and publish
this project in the local ivy repository">
        <!-- according to shouldn't
ivy.extra.submodule variable be set now? -->
        <echo message="extra attribute 'submodule': ${ivy.extra.submodule}"/>
        <ivy:publish overwrite="true" resolver="filesystem-inhouse" pubrevision="${software.version}"
        <artifacts pattern="dist/${ivy.extra.submodule}-[revision].[ext]"/>
<!--    <artifacts pattern="dist/${ivy.extra.submodule}-[revision].[ext]"/>   this
didn't work either-->

When I run "ant publish" it prints:
        [echo] extra attribute 'submodule': ${ivy.extra.submodule} so, the apparently variable
is undefined, and then puts an ivy file in "dist" but with the (bad) name "${ivy.extra.submodule}-1.0.9.xml"

I have tried many other things--using [submodule] or [e:submodule] in the pattern, adding
xmlns:e to the build, etc.--but nothing worked so far.

Anyone know what might be going wrong?


View raw message