I have modified IvyLibrary class, as seen below
Basically if the default cache is the IvyJar file followed by "/
cache", it is replaced by ${user.home}/.ivy2/cache
default cache: /opt/lib/apache-ivy-2.1.0-rc2/ivy-2.1.0-rc2.jar/cache
private void configure() {
try {
ivy.configure(settingsURL);
IvySettings ivySettings = ivy.getSettings();
String ivyJarPath = System.getProperty("ivy.home");
if (ivySettings.getDefaultCache().equals(new File(ivyJarPath +
"/cache"))) {
File defaultCacheDir = new File(System.getProperty
("user.home") + "/.ivy2/cache");
ivySettings.setDefaultCache(defaultCacheDir);
}
} catch (ParseException e) {
throw new IvyLibraryParsingException(e.getMessage(),
settingsURL, e);
} catch (IOException e) {
throw new IvyLibraryIOException(e.getMessage(), settingsURL,
e);
}
}
The resolve and retrieve tasks work fine. But the javac compilation,
doesn't work
:: resolving dependencies :: nb1-ivy#nb1-ivy;1.0
confs: [compile, runtime, compile-test, runtime-test]
/home/claudio/tmp/nb1-ivy/nbproject/ivy-impl.xml:59: impossible to
resolve dependencies:
java.io.FileNotFoundException: /opt/lib/apache-ivy-2.1.0-rc2/
ivy-2.1.0-rc2.jar/cache/resolved-nb1-ivy-nb1-ivy-1.0.xml (Not a
directory)
BUILD FAILED (total time: 15 seconds)
The jar files at the cache
$ find ~/.ivy2/cache/ -type f -name \*.jar
/home/claudio/.ivy2/cache/org.apache.wicket/wicket/javadocs/
wicket-1.4.0-javadoc.jar
/home/claudio/.ivy2/cache/org.apache.wicket/wicket/sources/
wicket-1.4.0-sources.jar
/home/claudio/.ivy2/cache/org.apache.wicket/wicket/jars/
wicket-1.4.0.jar
/home/claudio/.ivy2/cache/junit/junit/javadocs/junit-4.4-javadoc.jar
/home/claudio/.ivy2/cache/junit/junit/sources/junit-4.4-sources.jar
/home/claudio/.ivy2/cache/junit/junit/jars/junit-4.4.jar
/home/claudio/.ivy2/cache/commons-cli/commons-cli/javadocs/commons-
cli-1.2-javadoc.jar
/home/claudio/.ivy2/cache/commons-cli/commons-cli/sources/commons-
cli-1.2-sources.jar
/home/claudio/.ivy2/cache/commons-cli/commons-cli/jars/commons-
cli-1.2.jar
/home/claudio/.ivy2/cache/org.slf4j/slf4j-api/sources/slf4j-api-1.4.2-
sources.jar
/home/claudio/.ivy2/cache/org.slf4j/slf4j-api/jars/slf4j-api-1.4.2.jar
/home/claudio/.ivy2/cache/joda-time/joda-time/javadocs/joda-time-1.5.1-
javadoc.jar
/home/claudio/.ivy2/cache/joda-time/joda-time/sources/joda-time-1.5.1-
sources.jar
/home/claudio/.ivy2/cache/joda-time/joda-time/jars/joda-time-1.5.1.jar
/home/claudio/.ivy2/cache/asm/asm/jars/asm-1.5.3.jar
/home/claudio/.ivy2/cache/cglib/cglib/sources/cglib-2.1_3-sources.jar
/home/claudio/.ivy2/cache/cglib/cglib/jars/cglib-2.1_3.jar
Is there other place where the default cache dir can be configured ?
Thanks
Claudio Miranda