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:
http://ant.apache.org/ivy/history/trunk/use/publish.html
On Tue, Feb 9, 2010 at 6:49 PM, Carl Quinn <[email protected]> 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:
> http://old.nabble.com/Getting-a-module%27s-artifacts-for-build-tp27525526p27525526.html
> Sent from the ivy-user mailing list archive at Nabble.com.
>
>