You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Angel Cervera Claudio <an...@silyan.com> on 2009/02/24 17:32:54 UTC
Re: commons-beans (and other commons-* libraries) java doc jar (or
sources sometime) rather than the classes jar [solved]
Maarten Coene escribió:
> It is caused because multiple artifacts (a jar with classes and a jar with sources) are mapped to the same filename by your retrieve pattern.
>
> A solution would be:
> - specify the [type] token in your retrieve pattern, or
Whith pattern <ivy:retrieve pattern="${ivy.lib.dir}/[conf]/[type]/[artifact].[revision].[ext]" sync="true"/> all go ok.
> - add type="jar" to your retrieve task
>
> Maarten
Thanks Maarten
>
>
> ----- Original Message ----
> From: Jorge Medina <jm...@e-dialog.com>
> To: ivy-user@ant.apache.org
> Sent: Tuesday, February 24, 2009 4:25:02 PM
> Subject: RE: commons-beans (and other commons-* libraries) java doc jar (or sources sometime) rather than the classes jar
>
> I had a similar problem with Ivy 2.0 that I did not have with 2.0 beta.
> Ivy was retrieving jar files with the source code instead of the
> compiled classes.
>
> Adding the <artifact> element in my dependencies solved the problem:
>
> E.g.
>
> Before:
> <dependency org="log4j" name="log4j" rev=1.2.+"/>
>
> After:
>
> <dependency org="log4j" name="log4j" rev=1.2.+">
> <artifact name="log4j" type="jar"/>
> </dependency>
>
>
>
>
> -----Original Message-----
> From: Angel Cervera Claudio [mailto:angelcervera@silyan.com]
> Sent: Tuesday, February 24, 2009 10:16 AM
> To: ivy-user@ant.apache.org
> Subject: commons-beans (and other commons-* libraries) java doc jar (or
> sources sometime) rather than the classes jar
>
> I'm migrating maven project to ivy 2.0 I get a compile failure because
> Ivy has delivered me the commons-beans (and other commons-* libraries)
> java doc jar (or sources sometime) rather than the classes jar.
> In ivy cache directory, all files downloaded are ok, so i supposed that
> "resolve" phase is ok and it's a "retrieve" problem.
>
> With ivy in repository, equals results.
>
> I'm testing with a clean version of ivy, that is without
> "ivysettings.xml" file.
>
> With this test, result it's similar:
>
> build.xml:
> -----------------------------
> <project xmlns:ivy="antlib:org.apache.ivy.ant" name="ivy-commons">
>
> <target name="retrieve" description="--> retrieve dependencies with
> ivy">
> <ivy:retrieve pattern="./lib/[conf]/[artifact].[revision].[ext]"
> sync="true"/>
> </target>
>
> <target name="clean-cache" description="--> clean the cache">
> <ivy:cleancache />
> </target>
>
> </project>
> -----------------------------
>
>
> ivy.xml
> -----------------------------
> <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="com.company" module="testingivy"/>
> <dependencies >
> <dependency org="commons-logging" name="commons-logging"
> rev="1.1.1"/>
> <dependency org="javax.xml.bind" name="jsr173_api" rev="1.0"/>
> <dependency org="javax.activation" name="activation" rev="1.1"/>
> <dependency org="com.sun.xml.bind" name="jaxb-impl"
> rev="2.1.9"/>
> <dependency org="javax.xml.bind" name="jaxb-api" rev="2.1"/>
> <dependency org="commons-lang" name="commons-lang" rev="2.3"/>
> <dependency org="commons-vfs" name="commons-vfs" rev="1.0"/>
> <dependency org="commons-logging" name="commons-logging"
> rev="1.1.1"/>
> <dependency org="commons-beanutils" name="commons-beanutils"
> rev="1.8.0"/>
> <dependency org="commons-collections" name="commons-collections"
> rev="3.2"/>
> <dependency org="commons-io" name="commons-io" rev="1.3.1"/>
> <dependency org="log4j" name="log4j" rev="1.2.14"/>
> </dependencies>
>
> </ivy-module>
> --------------------------------
>
> Please, help. And Thank's
>
>
>
>