tags:

views:

26

answers:

1

How to tell IVY to not download source and .txt files. I have a dependency and it downloads license.txt files with it, when i use soemthing like this

<ivy:cachepath pathid="ivy-src-classpath" conf="compile"/>

it put the .txt files in the classpath which errors out while using java task

Unable to obtain resource from /home/muthiah/Work/ivy/cache/org.apache.commons/com.springsource.org.apache.commons.logging/licenses/license-1.1.1.txt: java.util.zip.ZipException: error in opening zip file
A: 

In your ivy.xml file add a configuration mapping to the other module's "default" configuration:

<dependency org="commons-lang" name="commons-lang" rev="2.5" conf="compile->default"/>

Without this mapping you're retrieving both the default and optional dependencies of the remote module.

Another good mapping (for Maven modules) to use is:

conf="compile->master"

This will retrieve the remote artifact without it's transient dependencies.

Mark O'Connor