ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maarten Coene <maarten_co...@yahoo.com>
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.

Maarten




----- Original Message ----
From: Travis <travis62@travnet.org>
To: ivy-user@ant.apache.org
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="http://www.w3.org/2001/XMLSchema-instance"
       xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
<info
        organisation="qos.ch"
        module="logback"
        revision="0.9.18"
        status="integration"
        publication="20091203221300">
</info>
<publications>
<artifact name="logback-core"/>
<artifact name="logback-classic"/>
</publications>
</ivy-module>


where publishing is done in an ant task with
<ivy:resolve file="${file}"/>
<ivy:publish
        resolver="internal"
        update="true"
        overwrite="true"
        publishivy="false"
        organisation="${org}"
        module="${module}"/>

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

logback-core-0.9.18.jar
logback-classic-0.9.18.jar

[ivy:publish] :: publishing :: qos.ch#logback
[ivy:publish]   published logback-classic to /home/thein/.ivy2/local/qos.ch/logback/logback-classic-0.9.18.jar
[ivy:publish]   published logback-core to /home/thein/.ivy2/local/qos.ch/logback/logback-core-0.9.18.jar


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


And the build.xml uses the default ivy resolve so far.
<ivy:resolve/>
<ivy:retrieve/>

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.

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


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. ?


      

Mime
View raw message