ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xav...@apache.org
Subject svn commit: r632788 - in /ant/ivy/core/trunk: doc/configuration/ src/java/org/apache/ivy/core/settings/ test/java/org/apache/ivy/core/settings/
Date Sun, 02 Mar 2008 17:12:14 GMT
Author: xavier
Date: Sun Mar  2 09:12:13 2008
New Revision: 632788

URL: http://svn.apache.org/viewvc?rev=632788&view=rev
Log:
add defaultResolveMode in settings (as part of IVY-740)

Modified:
    ant/ivy/core/trunk/doc/configuration/conf.html
    ant/ivy/core/trunk/src/java/org/apache/ivy/core/settings/XmlSettingsParser.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/core/settings/XmlSettingsParserTest.java
    ant/ivy/core/trunk/test/java/org/apache/ivy/core/settings/ivysettings-resolveMode.xml

Modified: ant/ivy/core/trunk/doc/configuration/conf.html
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/doc/configuration/conf.html?rev=632788&r1=632787&r2=632788&view=diff
==============================================================================
--- ant/ivy/core/trunk/doc/configuration/conf.html (original)
+++ ant/ivy/core/trunk/doc/configuration/conf.html Sun Mar  2 09:12:13 2008
@@ -52,6 +52,8 @@
         <td>No, defaults to latest-revision</td></tr>
     <tr><td>defaultBranch</td><td>the default branch to use for all
modules, except if they have a <a href="../configuration/module.html"> module specific
branch setting</a>. <span class="since">since 1.4</span></td>
         <td>No, defaults to no default branch</td></tr>
+    <tr><td>defaultResolveMode</td><td>the default [[ant:resolve
resolve mode]] to use for all modules, except if they have a <a href="../configuration/module.html">
module specific resolve mode setting</a>. <span class="since">since 2.0</span></td>
+        <td>No, defaults to 'default'</td></tr>
     <tr><td><a name="circularDependencyStrategy"></a>circularDependencyStrategy</td><td>the
name of the <a href="../concept.html#circular">circular dependency strategy</a>
to use <span class="since">since 1.4</span></td>
         <td>No, defaults to warn</td></tr>
     <tr><td>validate</td><td>Indicates if ivy files should be validated
against ivy.xsd or not.</td>

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/core/settings/XmlSettingsParser.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/core/settings/XmlSettingsParser.java?rev=632788&r1=632787&r2=632788&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/core/settings/XmlSettingsParser.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/core/settings/XmlSettingsParser.java Sun Mar
 2 09:12:13 2008
@@ -265,6 +265,10 @@
         if (defaultBranch != null) {
             ivy.setDefaultBranch(defaultBranch);
         }
+        String defaultResolveMode = (String) attributes.get("defaultResolveMode");
+        if (defaultResolveMode != null) {
+            ivy.setDefaultResolveMode(defaultResolveMode);
+        }
         String validate = (String) attributes.get("validate");
         if (validate != null) {
             ivy.setValidate(Boolean.valueOf(validate).booleanValue());

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/core/settings/XmlSettingsParserTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/core/settings/XmlSettingsParserTest.java?rev=632788&r1=632787&r2=632788&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/core/settings/XmlSettingsParserTest.java (original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/core/settings/XmlSettingsParserTest.java Sun
Mar  2 09:12:13 2008
@@ -168,6 +168,8 @@
         XmlSettingsParser parser = new XmlSettingsParser(settings);
         parser.parse(XmlSettingsParserTest.class.getResource("ivysettings-resolveMode.xml"));
 
+        assertEquals("dynamic", settings.getDefaultResolveMode());
+        assertEquals("dynamic", settings.getResolveMode(new ModuleId("foo", "bar")));
         assertEquals("dynamic", settings.getResolveMode(new ModuleId("apache", "ivyde")));
         assertEquals("default", settings.getResolveMode(new ModuleId("apache", "ant")));
     }

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/core/settings/ivysettings-resolveMode.xml
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/core/settings/ivysettings-resolveMode.xml?rev=632788&r1=632787&r2=632788&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/core/settings/ivysettings-resolveMode.xml
(original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/core/settings/ivysettings-resolveMode.xml
Sun Mar  2 09:12:13 2008
@@ -17,6 +17,7 @@
    under the License.    
 -->
 <ivysettings>
+	<settings defaultResolveMode="dynamic" />
 	<modules>
 		<module organisation="apache" name="ivy*" matcher="glob" resolveMode="dynamic"/>
 		<module organisation="apache" name=".*" resolveMode="default"/>



Mime
View raw message