You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-commits@incubator.apache.org by xa...@apache.org on 2007/07/09 13:41:27 UTC
svn commit: r554645 - in /incubator/ivy/core/trunk: CHANGES.txt
doc/configuration/conf.html
src/java/org/apache/ivy/core/settings/IvySettings.java
test/java/org/apache/ivy/ant/IvyConfigureTest.java
Author: xavier
Date: Mon Jul 9 06:41:26 2007
New Revision: 554645
URL: http://svn.apache.org/viewvc?view=rev&rev=554645
Log:
IMPROVEMENT: Expose default cache location as an ant property (IVY-563)
Modified:
incubator/ivy/core/trunk/CHANGES.txt
incubator/ivy/core/trunk/doc/configuration/conf.html
incubator/ivy/core/trunk/src/java/org/apache/ivy/core/settings/IvySettings.java
incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyConfigureTest.java
Modified: incubator/ivy/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/CHANGES.txt?view=diff&rev=554645&r1=554644&r2=554645
==============================================================================
--- incubator/ivy/core/trunk/CHANGES.txt (original)
+++ incubator/ivy/core/trunk/CHANGES.txt Mon Jul 9 06:41:26 2007
@@ -54,6 +54,7 @@
- NEW: A checkstyle report is generated (IVY-483) (thanks to Jan Materne)
- NEW: Hide private or specific conf when publishing (IVY-77)
+- IMPROVEMENT: Expose default cache location as an ant property (IVY-563)
- IMPROVEMENT: Expose Ivy variables as Ant Properties (IVY-564)
- IMPROVEMENT: Change default cache location (IVY-530)
- IMPROVEMENT: Upgraded VFS dependency to 1.0 and removed dependency on VFS-sandbox (IVY-498)
Modified: incubator/ivy/core/trunk/doc/configuration/conf.html
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/doc/configuration/conf.html?view=diff&rev=554645&r1=554644&r2=554645
==============================================================================
--- incubator/ivy/core/trunk/doc/configuration/conf.html (original)
+++ incubator/ivy/core/trunk/doc/configuration/conf.html Mon Jul 9 06:41:26 2007
@@ -30,6 +30,7 @@
Configures some important ivy info: default cache, default resolver, ...
Default cache is used whenever a cache is not provided. It usually points to a directory in your filesystem. <strong>This should not point to a directory used as a repository!</strong>
+<span class="since">Since 2.0</span> Once the settings are loaded, the value of the defaultCache (either configured or the default value) is stored in an Ivy variable: ivy.cache.dir.
Default resolver is used whenever nothing else is configured in the modules section of the configuration file. It should give the name of a dependency resolver defined in the resolvers section of the configuration file.
Modified: incubator/ivy/core/trunk/src/java/org/apache/ivy/core/settings/IvySettings.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/java/org/apache/ivy/core/settings/IvySettings.java?view=diff&rev=554645&r1=554644&r2=554645
==============================================================================
--- incubator/ivy/core/trunk/src/java/org/apache/ivy/core/settings/IvySettings.java (original)
+++ incubator/ivy/core/trunk/src/java/org/apache/ivy/core/settings/IvySettings.java Mon Jul 9 06:41:26 2007
@@ -633,6 +633,7 @@
}
public void setDefaultCache(File cacheDirectory) {
+ setVariable("ivy.cache.dir", cacheDirectory.getAbsolutePath(), false);
defaultCache = cacheDirectory;
}
@@ -685,7 +686,7 @@
public File getDefaultCache() {
if (defaultCache == null) {
- defaultCache = new File(getDefaultIvyUserDir(), "cache");
+ setDefaultCache(new File(getDefaultIvyUserDir(), "cache"));
Message.verbose("no default cache defined: set to " + defaultCache);
}
return defaultCache;
Modified: incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyConfigureTest.java
URL: http://svn.apache.org/viewvc/incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyConfigureTest.java?view=diff&rev=554645&r1=554644&r2=554645
==============================================================================
--- incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyConfigureTest.java (original)
+++ incubator/ivy/core/trunk/test/java/org/apache/ivy/ant/IvyConfigureTest.java Mon Jul 9 06:41:26 2007
@@ -143,6 +143,9 @@
assertEquals("value",
configure.getProject().getProperty("ivy.test.variable"));
+
+ assertEquals(configure.getIvyInstance().getSettings().getDefaultCache().getAbsolutePath(),
+ configure.getProject().getProperty("ivy.cache.dir"));
}
public void testOverrideVariables() throws Exception {