ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carl Quinn <>
Subject Re: Getting a module's artifacts for build
Date Wed, 10 Feb 2010 03:54:26 GMT

Yes, I've had that part all figured out for awhile. I can build and publish
all my simple projects now.

What I would like to do next is to remove all knowledge of specific
artifacts from my Ant files, and derive the artifact build actions from the
metadata already available in the ivy.xml file. (I don't like redundancy)

So, I would like to have something like Ivy:info that also gave me the
artifact declarations from my module's ivy file, including extra attributes
if possible. All of that this is well before publish. I could then know what
to build and put into the dist dir and then invoke publish on all of that.

Ideas? Or should I write a new Ivy Ant task?

Mitch Gitman wrote:
> Carl, no need to set special properties. Ivy's pattern matching takes care
> of finding the correct origin artifacts. Suppose in your project's ivy.xml
> you say you want to publish foo.jar like so:
>   <publications>
>     <artifact name="foo" type="jar" conf="default" />
>   </publications>
> And suppose that, in the course of your build, you create a foo-1.0.jar in
> your dist directory where 1.0 is your desired version. To get ivy:publish
> to
> know where to look, you would specify ivy:publish's artifactpattern
> attribute like so:
>     <ivy:publish
> artifactspattern="${dist.dir}/[artifact]-[revision].[ext]"
> ... />
> Ivy's smart enough to know to match each artifact in your ivy.xml against
> each potential [artifact]-[revision].[ext]-matching file in ${dist.dir}.
> As
> for how Ivy negotiates the revision, check the documentation on the
> ivy:publish task:
> On Tue, Feb 9, 2010 at 6:49 PM, Carl Quinn <> wrote:
>> I'm trying to put together a set of standard Ant build scripts for my
>> company
>> and I'd like the Ant code to be able to derive what to do based almost
>> entirely from each module's ivy.xml file.
>> Where I am having trouble is getting the list of artifacts for the module
>> into Ant properties. The closest I've gotten to to fake a publish and
>> then
>> capture the pre-publish-artifact trigger information. This seems like a
>> terrible hack though.
>> It seems like ivy:info could give me more info. Is there any way to coax
>> it
>> to do that?
>> --
>> View this message in context:
>> Sent from the ivy-user mailing list archive at

View this message in context:
Sent from the ivy-user mailing list archive at

View raw message