ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maarten Coene <>
Subject Re: how to publish and retreive multiple artifacts.
Date Mon, 08 Mar 2010 21:52:18 GMT
Does your repository also contains the ivy.xml file of your logback module?
If not, Ivy will create a default one containing a single publication artifact.


----- Original Message ----
From: Travis <>
Sent: Mon, March 8, 2010 3:29:44 PM
Subject: how to publish and retreive multiple artifacts.

I am trying to set up a local repository where I publish a module that has more than one .jar
file artifact, and then later retrieve the artifacts.

So far it would appear publish into the local repository is working, I do see all of the artifacts
making it into
the local repository folder.

The problem is when I try to resolve the module it appears only the first artifact file is
getting resolved, not the other ones.

using ivy 2.1.0 on ant 1.7.1

The ivy file in the module I am trying to stuff into the local repository. I just created
one for the logback module, but the idea where i wouldhave a module  (e.g. logback) and more
than one jar file for api and implementation pieces (e.g. -core,  -classic).

<?xml version="1.0" encoding="ISO-8859-1"?>
<ivy-module version="2.0" xmlns:xsi=""
<artifact name="logback-core"/>
<artifact name="logback-classic"/>

where publishing is done in an ant task with
<ivy:resolve file="${file}"/>

So in the following jar files exist in the local repository folder after publishing:


[ivy:publish] :: publishing ::
[ivy:publish]   published logback-classic to /home/thein/.ivy2/local/
[ivy:publish]   published logback-core to /home/thein/.ivy2/local/

And then in the module where I want to resolve it, the ivy.xml dependencies
<dependency org=""  name="logback" rev="latest.integration"/>

And the build.xml uses the default ivy resolve so far.

And this does resolve the logback-core  jar file, but not the logback-classic jar file.

At first I had thought this was because the -core jar was the first artifact. But when I reorder
the artifacts list, and clean out the cache and local repository and re-publish, re-resolve,
It still unexpectedly only fetches the -core one.

<artifact name="logback-classic"/>
<artifact name="logback-core"/>

So, am I doing it wrong to try to use a single ivy.xml file to define a 'module' that has
more than one jar file (e.g. within the same configuration) to all be resolved at the same
time. ?


View raw message