ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xav...@apache.org
Subject svn commit: r644398 - in /ant/ivy/core/trunk: CHANGES.txt src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java
Date Thu, 03 Apr 2008 16:36:16 GMT
Author: xavier
Date: Thu Apr  3 09:36:14 2008
New Revision: 644398

URL: http://svn.apache.org/viewvc?rev=644398&view=rev
Log:
FIX: setting m2compatible on ibiblio resolver overwrite root and pattern settings (IVY-437)
(thanks to Jing Xue)

Modified:
    ant/ivy/core/trunk/CHANGES.txt
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java

Modified: ant/ivy/core/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=644398&r1=644397&r2=644398&view=diff
==============================================================================
--- ant/ivy/core/trunk/CHANGES.txt (original)
+++ ant/ivy/core/trunk/CHANGES.txt Thu Apr  3 09:36:14 2008
@@ -76,6 +76,7 @@
 - IMPROVEMENT: Change allownomd and skipbuildwithoutivy into a more semantically correct
name (IVY-297)
 - IMPROVEMENT: Smarter determination if an expression is exact or not for RegexpPatternMatcher
and GlobPatternMatcher
 
+- FIX: setting m2compatible on ibiblio resolver overwrite root and pattern settings (IVY-437)
(thanks to Jing Xue)
 - FIX: unable to resolve snapshot versions (IVY-501)
 - FIX: No error or warning when a resolver references a non-existent cache (IVY-777)
 - FIX: ivy properties defined in an include file not available in the file that includes
it (IVY-780)

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java?rev=644398&r1=644397&r2=644398&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java Thu Apr
 3 09:36:14 2008
@@ -65,6 +65,7 @@
     public static final String DEFAULT_PATTERN = "[module]/[type]s/[artifact]-[revision].[ext]";
 
     public static final String DEFAULT_ROOT = "http://www.ibiblio.org/maven/";
+    public static final String DEFAULT_M2_ROOT = "http://repo1.maven.org/maven2/";
 
     private String root = null;
 
@@ -214,7 +215,7 @@
         super.setM2compatible(m2compatible);
         if (m2compatible) {
             if (root == null) {
-                root = "http://repo1.maven.org/maven2/";
+                root = DEFAULT_M2_ROOT;
             }
             if (pattern == null) {
                 pattern = M2_PATTERN;
@@ -224,8 +225,13 @@
     }
 
     public void ensureConfigured(ResolverSettings settings) {
-        if (settings != null && (root == null || pattern == null)) {
-            if (root == null) {
+        Message.debug("Current IBIBLIO ROOT: " + root);
+        boolean isDefaultRoot = (root == null 
+                || (!isM2compatible() && root.equalsIgnoreCase(DEFAULT_ROOT))
+                || (isM2compatible() && root.equalsIgnoreCase(DEFAULT_M2_ROOT)));
+        Message.debug("Current settings: " + settings);
+        if (settings != null && (isDefaultRoot || pattern == null)) {
+            if (isDefaultRoot) {
                 String root = settings.getVariable("ivy.ibiblio.default.artifact.root");
                 if (root != null) {
                     this.root = root;



Mime
View raw message