You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by hi...@apache.org on 2014/10/28 22:37:04 UTC

[01/35] git commit: Add support for packed jar within an OSGi bundle

Repository: ant-ivy
Updated Branches:
  refs/heads/2.4.x 0d55ab15c -> a5bbbec54


Add support for packed jar within an OSGi bundle


git-svn-id: https://svn.apache.org/repos/asf/ant/ivy/core/trunk@1587110 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/069d003e
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/069d003e
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/069d003e

Branch: refs/heads/2.4.x
Commit: 069d003efc343a9a2d627d5805431be5d88e5344
Parents: 01cf090
Author: Nicolas Lalevee <hi...@apache.org>
Authored: Sun Apr 13 22:14:03 2014 +0000
Committer: Nicolas Lalevee <hi...@apache.org>
Committed: Sun Apr 13 22:14:03 2014 +0000

----------------------------------------------------------------------
 doc/concept.html                                |  1 +
 .../apache/ivy/core/pack/OsgiBundlePacking.java | 48 +++++++++++
 .../apache/ivy/core/pack/Pack200Packing.java    | 29 +------
 .../apache/ivy/core/pack/PackingRegistry.java   |  1 +
 .../org/apache/ivy/core/pack/ZipPacking.java    | 25 +++---
 .../apache/ivy/osgi/core/BundleInfoAdapter.java |  4 +-
 .../apache/ivy/osgi/core/ManifestParser.java    |  1 +
 .../ivy/osgi/repo/AbstractOSGiResolver.java     |  3 +
 src/java/org/apache/ivy/util/FileUtil.java      | 91 ++++++++++++++++++++
 .../apache/ivy/osgi/p2/P2DescriptorTest.java    |  7 +-
 10 files changed, 171 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/069d003e/doc/concept.html
----------------------------------------------------------------------
diff --git a/doc/concept.html b/doc/concept.html
index 77b6ebe..76029f2 100644
--- a/doc/concept.html
+++ b/doc/concept.html
@@ -289,6 +289,7 @@ A <i>packaged</i> artifact needs to be declared as such in the module descriptor
 <ul>
     <li><tt>zip</tt>, <tt>jar</tt> or <tt>war</tt>: the artifact will be uncompressed as a folder</li>
     <li><tt>pack200</tt>: the artifact will be unpacked to a file via the <a href="http://docs.oracle.com/javase/7/docs/technotes/tools/share/pack200.html">pack200</a> algorithm</li>
+    <li><tt>bundle</tt>: the OSGi artifact will be uncompressed as a folder, and every embedded jar file entry which is packed via the the <a href="http://docs.oracle.com/javase/7/docs/technotes/tools/share/pack200.html">pack200</a> algorithm will be unpacked</li>
 </ul>
 
 So, if in an <tt>ivy.xml</tt>, there would be declared a such artifact:

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/069d003e/src/java/org/apache/ivy/core/pack/OsgiBundlePacking.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/pack/OsgiBundlePacking.java b/src/java/org/apache/ivy/core/pack/OsgiBundlePacking.java
new file mode 100644
index 0000000..a9f9344
--- /dev/null
+++ b/src/java/org/apache/ivy/core/pack/OsgiBundlePacking.java
@@ -0,0 +1,48 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ivy.core.pack;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.apache.ivy.util.FileUtil;
+
+/**
+ * Packaging which handle OSGi bundles with inner packed jar
+ */
+public class OsgiBundlePacking extends ZipPacking {
+
+    private static final String[] NAMES = {"bundle"};
+
+    @Override
+    public String[] getNames() {
+        return NAMES;
+    }
+
+    @Override
+    protected void writeFile(InputStream zip, File f) throws FileNotFoundException, IOException {
+        // XXX maybe we should only unpack file listed by the 'Bundle-ClassPath' MANIFEST header ?
+        if (f.getName().endsWith(".jar.pack.gz")) {
+            zip = FileUtil.unwrapPack200(zip);
+            f = new File(f.getParentFile(), f.getName().substring(0, f.getName().length() - 8));
+        }
+        super.writeFile(zip, f);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/069d003e/src/java/org/apache/ivy/core/pack/Pack200Packing.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/pack/Pack200Packing.java b/src/java/org/apache/ivy/core/pack/Pack200Packing.java
index 13b945f..f2039d1 100644
--- a/src/java/org/apache/ivy/core/pack/Pack200Packing.java
+++ b/src/java/org/apache/ivy/core/pack/Pack200Packing.java
@@ -17,15 +17,10 @@
  */
 package org.apache.ivy.core.pack;
 
-import java.io.BufferedInputStream;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
-import java.util.jar.JarOutputStream;
-import java.util.jar.Pack200;
-import java.util.jar.Pack200.Unpacker;
-import java.util.zip.GZIPInputStream;
+
+import org.apache.ivy.util.FileUtil;
 
 public class Pack200Packing extends StreamPacking {
 
@@ -54,25 +49,7 @@ public class Pack200Packing extends StreamPacking {
 
     @Override
     public InputStream unpack(InputStream packed) throws IOException {
-        BufferedInputStream buffered = new BufferedInputStream(packed);
-        buffered.mark(4);
-        byte[] magic = new byte[4];
-        buffered.read(magic, 0, 4);
-        buffered.reset();
-
-        InputStream in = buffered;
-
-        if (magic[0] == (byte) 0x1F && magic[1] == (byte) 0x8B && magic[2] == (byte) 0x08) {
-            // this is a gziped pack200
-            in = new GZIPInputStream(in);
-        }
-
-        Unpacker unpacker = Pack200.newUnpacker();
-        ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        JarOutputStream jar = new JarOutputStream(baos);
-        unpacker.unpack(in, jar);
-        jar.close();
-        return new ByteArrayInputStream(baos.toByteArray());
+        return FileUtil.unwrapPack200(packed);
     }
 
 }

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/069d003e/src/java/org/apache/ivy/core/pack/PackingRegistry.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/pack/PackingRegistry.java b/src/java/org/apache/ivy/core/pack/PackingRegistry.java
index a42f4ce..6688677f 100644
--- a/src/java/org/apache/ivy/core/pack/PackingRegistry.java
+++ b/src/java/org/apache/ivy/core/pack/PackingRegistry.java
@@ -28,6 +28,7 @@ public class PackingRegistry {
         // register defaults
         register(new ZipPacking());
         register(new Pack200Packing());
+        register(new OsgiBundlePacking());
     }
 
     public void register(ArchivePacking packing) {

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/069d003e/src/java/org/apache/ivy/core/pack/ZipPacking.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/pack/ZipPacking.java b/src/java/org/apache/ivy/core/pack/ZipPacking.java
index aee058a..87cfbdf 100644
--- a/src/java/org/apache/ivy/core/pack/ZipPacking.java
+++ b/src/java/org/apache/ivy/core/pack/ZipPacking.java
@@ -18,6 +18,7 @@
 package org.apache.ivy.core.pack;
 
 import java.io.File;
+import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -66,16 +67,7 @@ public class ZipPacking extends ArchivePacking {
                 if (entry.isDirectory()) {
                     f.mkdirs();
                 } else {
-                    FileOutputStream out = new FileOutputStream(f);
-                    try {
-                        FileUtil.copy(zip, out, null, false);
-                    } finally {
-                        try {
-                            out.close();
-                        } catch (IOException e) {
-                            // ignore
-                        }
-                    }
+                    writeFile(zip, f);
                 }
 
                 f.setLastModified(entry.getTime());
@@ -91,4 +83,17 @@ public class ZipPacking extends ArchivePacking {
         }
     }
 
+    protected void writeFile(InputStream zip, File f) throws FileNotFoundException, IOException {
+        FileOutputStream out = new FileOutputStream(f);
+        try {
+            FileUtil.copy(zip, out, null, false);
+        } finally {
+            try {
+                out.close();
+            } catch (IOException e) {
+                // ignore
+            }
+        }
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/069d003e/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java b/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
index 2945dd9..29e3341 100644
--- a/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
+++ b/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
@@ -115,8 +115,8 @@ public class BundleInfoAdapter {
                 String type = "jar";
                 String ext = "jar";
                 String packaging = null;
-                if (bundle.hasInnerClasspath()) {
-                    packaging = "zip";
+                if (bundle.hasInnerClasspath() && !bundleArtifact.isSource()) {
+                    packaging = "bundle";
                 }
                 if ("packed".equals(bundleArtifact.getFormat())) {
                     ext = "jar.pack.gz";

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/069d003e/src/java/org/apache/ivy/osgi/core/ManifestParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/core/ManifestParser.java b/src/java/org/apache/ivy/osgi/core/ManifestParser.java
index d98c4fd..2aec72f 100644
--- a/src/java/org/apache/ivy/osgi/core/ManifestParser.java
+++ b/src/java/org/apache/ivy/osgi/core/ManifestParser.java
@@ -204,6 +204,7 @@ public class ManifestParser {
         if (bundleClasspath != null) {
             ManifestHeaderValue bundleClasspathValue = new ManifestHeaderValue(bundleClasspath);
             bundleInfo.setClasspath(bundleClasspathValue.getValues());
+            bundleInfo.setHasInnerClasspath(true);
         }
 
         return bundleInfo;

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/069d003e/src/java/org/apache/ivy/osgi/repo/AbstractOSGiResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/repo/AbstractOSGiResolver.java b/src/java/org/apache/ivy/osgi/repo/AbstractOSGiResolver.java
index 6156d95..44c4e0a 100644
--- a/src/java/org/apache/ivy/osgi/repo/AbstractOSGiResolver.java
+++ b/src/java/org/apache/ivy/osgi/repo/AbstractOSGiResolver.java
@@ -234,6 +234,9 @@ public abstract class AbstractOSGiResolver extends BasicResolver {
     public ResolvedResource findResource(ResolvedResource[] rress, ResourceMDParser rmdparser,
             ModuleRevisionId mrid, Date date) {
         ResolvedResource found = super.findResource(rress, rmdparser, mrid, date);
+        if (found == null) {
+            return null;
+        }
 
         String osgiType = mrid.getOrganisation();
         // for non bundle requirement : log the selected bundle

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/069d003e/src/java/org/apache/ivy/util/FileUtil.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/FileUtil.java b/src/java/org/apache/ivy/util/FileUtil.java
index 465abab..7a7be31 100644
--- a/src/java/org/apache/ivy/util/FileUtil.java
+++ b/src/java/org/apache/ivy/util/FileUtil.java
@@ -17,7 +17,10 @@
  */
 package org.apache.ivy.util;
 
+import java.io.BufferedInputStream;
 import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
@@ -36,7 +39,12 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Stack;
 import java.util.StringTokenizer;
+import java.util.jar.JarOutputStream;
+import java.util.jar.Pack200;
+import java.util.jar.Pack200.Unpacker;
 import java.util.regex.Pattern;
+import java.util.zip.GZIPInputStream;
+import java.util.zip.ZipInputStream;
 
 import org.apache.ivy.util.url.URLHandlerRegistry;
 
@@ -637,4 +645,87 @@ public final class FileUtil {
         return l;
     }
 
+    public static InputStream unwrapPack200(InputStream packed) throws IOException {
+        BufferedInputStream buffered = new BufferedInputStream(packed);
+        buffered.mark(4);
+        byte[] magic = new byte[4];
+        buffered.read(magic, 0, 4);
+        buffered.reset();
+
+        InputStream in = buffered;
+
+        if (magic[0] == (byte) 0x1F && magic[1] == (byte) 0x8B && magic[2] == (byte) 0x08) {
+            // this is a gziped pack200
+            in = new GZIPInputStream(in);
+        }
+
+        Unpacker unpacker = Pack200.newUnpacker();
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        JarOutputStream jar = new JarOutputStream(baos);
+        unpacker.unpack(new UncloseInputStream(in), jar);
+        jar.close();
+        return new ByteArrayInputStream(baos.toByteArray());
+    }
+
+    /**
+     * Wrap an input stream and do not close the stream on call to close(). Used to avoid closing a
+     * {@link ZipInputStream} used with {@link Unpacker#unpack(File, JarOutputStream)}
+     */
+    private static final class UncloseInputStream extends InputStream {
+
+        private InputStream wrapped;
+
+        public UncloseInputStream(InputStream wrapped) {
+            this.wrapped = wrapped;
+        }
+
+        public void close() throws IOException {
+            // do not close
+        }
+
+        public int read() throws IOException {
+            return wrapped.read();
+        }
+
+        public int hashCode() {
+            return wrapped.hashCode();
+        }
+
+        public int read(byte[] b) throws IOException {
+            return wrapped.read(b);
+        }
+
+        public boolean equals(Object obj) {
+            return wrapped.equals(obj);
+        }
+
+        public int read(byte[] b, int off, int len) throws IOException {
+            return wrapped.read(b, off, len);
+        }
+
+        public long skip(long n) throws IOException {
+            return wrapped.skip(n);
+        }
+
+        public String toString() {
+            return wrapped.toString();
+        }
+
+        public int available() throws IOException {
+            return wrapped.available();
+        }
+
+        public void mark(int readlimit) {
+            wrapped.mark(readlimit);
+        }
+
+        public void reset() throws IOException {
+            wrapped.reset();
+        }
+
+        public boolean markSupported() {
+            return wrapped.markSupported();
+        }
+
+    }
 }

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/069d003e/test/java/org/apache/ivy/osgi/p2/P2DescriptorTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/osgi/p2/P2DescriptorTest.java b/test/java/org/apache/ivy/osgi/p2/P2DescriptorTest.java
index 1a877cd..f1766a9 100644
--- a/test/java/org/apache/ivy/osgi/p2/P2DescriptorTest.java
+++ b/test/java/org/apache/ivy/osgi/p2/P2DescriptorTest.java
@@ -195,7 +195,12 @@ public class P2DescriptorTest extends TestCase {
 
             assertEquals(artifact, ar.getArtifact());
             assertEquals(DownloadStatus.SUCCESSFUL, ar.getDownloadStatus());
-            assertNotNull(ar.getUnpackedLocalFile());
+            // only the binary get unpacked
+            if (ar.getArtifact().getType().equals("source")) {
+                assertNull(ar.getUnpackedLocalFile());
+            } else {
+                assertNotNull(ar.getUnpackedLocalFile());
+            }
         }
     }
 


[18/35] git commit: Use the same .gitignore as the IvyDE project

Posted by hi...@apache.org.
Use the same .gitignore as the IvyDE project


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/4cdcea46
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/4cdcea46
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/4cdcea46

Branch: refs/heads/2.4.x
Commit: 4cdcea465f5bac7e0e12429ddf95f7521f9682c6
Parents: f1d68f9
Author: maartenc <ma...@apache.org>
Authored: Mon May 26 23:12:09 2014 +0200
Committer: maartenc <ma...@apache.org>
Committed: Mon May 26 23:12:09 2014 +0200

----------------------------------------------------------------------
 .gitignore | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/4cdcea46/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index e3a7943..dac4fd5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,5 @@ test/test-repo/ivyrepo/org.apache.ivy.osgi
 .DS_Store
 doc/samples/target-platform/bundles
 doc/samples/target-platform/cache
+.idea
+*.iml
\ No newline at end of file


[05/35] git commit: MPROVEMENT: ModuleRules.getRule is O(n) leading to resolution slowness (IVY-1465) (Thanks to Zhong Wang aka Kewpie)

Posted by hi...@apache.org.
MPROVEMENT: ModuleRules.getRule is O(n) leading to resolution slowness (IVY-1465) (Thanks to Zhong Wang aka Kewpie)

git-svn-id: https://svn.apache.org/repos/asf/ant/ivy/core/trunk@1590481 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/a6a5e303
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/a6a5e303
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/a6a5e303

Branch: refs/heads/2.4.x
Commit: a6a5e3033d424468cbd3a6af051aabf3b5bd4d00
Parents: c66b237
Author: Antoine Levy-Lambert <an...@apache.org>
Authored: Sun Apr 27 20:02:51 2014 +0000
Committer: Antoine Levy-Lambert <an...@apache.org>
Committed: Sun Apr 27 20:02:51 2014 +0000

----------------------------------------------------------------------
 CHANGES.txt                                     |   2 +
 .../ivy/core/module/id/MatcherLookup.java       | 153 +++++++++++++++++++
 .../apache/ivy/core/module/id/ModuleRules.java  |  37 ++---
 3 files changed, 174 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/a6a5e303/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 26a4367..8739f80 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -138,10 +138,12 @@ for detailed view of each issue, please consult http://issues.apache.org/jira/br
 	Jaroslaw Wypychowski
 	Sven Zethelius
 	Aleksey Zhukov
+	Zhong Wang
 	
    trunk
 =====================================
 - IMPROVEMENT: Add support for packed jar within an OSGi bundle
+- IMPROVEMENT: ModuleRules.getRule is O(n) leading to resolution slowness (IVY-1465) (Thanks to Zhong Wang aka Kewpie)
 
 - FIX: impossible to get artifacts when data has not been loaded. (IVY-1399) (Thanks to David Turner)
 

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/a6a5e303/src/java/org/apache/ivy/core/module/id/MatcherLookup.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/id/MatcherLookup.java b/src/java/org/apache/ivy/core/module/id/MatcherLookup.java
new file mode 100644
index 0000000..76a44fc
--- /dev/null
+++ b/src/java/org/apache/ivy/core/module/id/MatcherLookup.java
@@ -0,0 +1,153 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.ivy.core.module.id;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.ivy.core.IvyPatternHelper;
+import org.apache.ivy.plugins.matcher.ExactPatternMatcher;
+import org.apache.ivy.plugins.matcher.MapMatcher;
+import org.apache.ivy.plugins.matcher.PatternMatcher;
+
+/**
+ * This class targets to speed up lookup for exact pattern matcher by keys, which are created with
+ * (organization, module) information. When exact pattern matcher is added, the key is created from
+ * matcher's attributes. When matcher is looked up against specific module, the key is recreated
+ * from module's attributes.
+ * <p>
+ * </p>
+ * The lookup doesn't target to speed up lookup for non exact pattern matcher. All non exact
+ * matchers are placed in non-keyed collection.
+ * <p>
+ * </p>
+ * At lookup for matchers against specific module, all non exact pattern matchers are iterated to
+ * match with module attributes, and exact pattern matchers binding to the same key will also
+ * iterated to match with module attributes.
+ * <p>
+ * </p>
+ * If there are much more exact pattern matchers than non exact pattern matchers, the matcher lookup
+ * speed can benefit from this class significantly. A quick example could be user declares lots of
+ * dependencyOverrides which are typically exact pattern matchers.
+ * <p>
+ * </p>
+ * If there are balanced exact and non exact pattern matchers, the matcher lookup speed doesn't hurt
+ * by this class.
+ * <p>
+ * </p>
+ */
+public class MatcherLookup {
+
+    //private static final String FORMAT = "{org:%s, module:%s}";
+
+    private static final String DEFAULT = "{org:" + "default" + ", module:" + "default" + "}";
+
+    private Map/* <String, List<MapMatcher>> */lookup = new HashMap();
+
+    private List/* <MapMatcher> */non_exact_matchers = new ArrayList();
+
+    /**
+     * Add matcher.
+     * 
+     * If matcher is exact pattern matcher, it will be associated with a key and placed in keyed
+     * collection.
+     * 
+     * If matcher is not exact pattern matcher, it will be placed into non-keyed collection
+     * 
+     * @param matcher
+     */
+    public void add(MapMatcher matcher) {
+        if (!(matcher.getPatternMatcher() instanceof ExactPatternMatcher)) {
+            non_exact_matchers.add(matcher);
+            return;
+        }
+        Object key = key(matcher.getAttributes());
+        List exact_matchers = (List) lookup.get(key);
+        if (exact_matchers == null) {
+            exact_matchers = new ArrayList();
+            lookup.put(key, exact_matchers);
+        }
+        exact_matchers.add(matcher);
+    }
+
+    /**
+     * Get a list of matchers which can apply to module with specified attributes
+     * 
+     * @param attrs
+     *            A map of attributes that matcher should match.
+     * 
+     * @return list A list of candidate matchers that matches specified attributes
+     */
+    public List get(Map attrs) {
+        List matchers = new ArrayList();
+        // Step 1: find matchers from non_exact_matchers list
+        if (!non_exact_matchers.isEmpty()) {
+            for (Iterator iter = non_exact_matchers.iterator(); iter.hasNext();) {
+                MapMatcher matcher = (MapMatcher) iter.next();
+                if (matcher.matches(attrs)) {
+                    matchers.add(matcher);
+                }
+            }
+        }
+        // Step 2: find matchers from exact_matchers list of key
+        Object key = key(attrs);
+        List exact_matchers = (List) lookup.get(key);
+        if (exact_matchers != null) {
+            for (Iterator iter = exact_matchers.iterator(); iter.hasNext();) {
+                MapMatcher matcher = (MapMatcher) iter.next();
+                if (matcher.matches(attrs)) {
+                    matchers.add(matcher);
+                }
+            }
+        }
+        // Step 3: (iff key != DEFAULT) find matchers from exact_matchers of DEFAULT
+        if (key != DEFAULT) {
+            List default_exact_matchers = (List) lookup.get(DEFAULT);
+            if (default_exact_matchers != null) {
+                for (Iterator iter = default_exact_matchers.iterator(); iter.hasNext();) {
+                    MapMatcher matcher = (MapMatcher) iter.next();
+                    if (matcher.matches(attrs)) {
+                        matchers.add(matcher);
+                    }
+                }
+            }
+        }
+        return matchers;
+    }
+
+    /**
+     * Create a key from specified attributes
+     * 
+     * @param attrs
+     *            A map of attributes
+     * @return key object
+     */
+    private Object key(Map attrs) {
+        Object org = attrs.get(IvyPatternHelper.ORGANISATION_KEY);
+        Object module = attrs.get(IvyPatternHelper.MODULE_KEY);
+        if (org == null || PatternMatcher.ANY_EXPRESSION.equals(org) || module == null
+                || PatternMatcher.ANY_EXPRESSION.equals(module)) {
+            return DEFAULT;
+        }
+        return "{org:" + org + ", module:" + module + "}";
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/a6a5e303/src/java/org/apache/ivy/core/module/id/ModuleRules.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/id/ModuleRules.java b/src/java/org/apache/ivy/core/module/id/ModuleRules.java
index 1251dbe..f16981d 100644
--- a/src/java/org/apache/ivy/core/module/id/ModuleRules.java
+++ b/src/java/org/apache/ivy/core/module/id/ModuleRules.java
@@ -23,7 +23,6 @@ import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Map.Entry;
 
 import org.apache.ivy.plugins.matcher.MapMatcher;
 import org.apache.ivy.util.Checks;
@@ -53,6 +52,8 @@ import org.apache.ivy.util.filter.NoFilter;
 public class ModuleRules {
     private Map/* <MapMatcher,Object> */rules = new LinkedHashMap();
 
+    private MatcherLookup matcher_lookup = new MatcherLookup();
+
     /**
      * Constructs an empty ModuleRules.
      */
@@ -61,6 +62,9 @@ public class ModuleRules {
 
     private ModuleRules(Map/* <MapMatcher,Object> */rules) {
         this.rules = new LinkedHashMap(rules);
+        for (Iterator iter = rules.keySet().iterator(); iter.hasNext();) {
+            matcher_lookup.add((MapMatcher) iter.next());
+        }
     }
 
     /**
@@ -76,6 +80,7 @@ public class ModuleRules {
         Checks.checkNotNull(rule, "rule");
 
         rules.put(condition, rule);
+        matcher_lookup.add(condition);
     }
 
     /**
@@ -123,7 +128,7 @@ public class ModuleRules {
      * Returns the rule object matching the given {@link ModuleId} and accepted by the given
      * {@link Filter}, or <code>null</code> if no rule applies.
      * 
-     * @param mrid
+     * @param mid
      *            the {@link ModuleRevisionId} to search the rule for. Must not be <code>null</code>
      *            .
      * @param filter
@@ -164,14 +169,12 @@ public class ModuleRules {
     }
 
     private Object getRule(Map moduleAttributes, Filter filter) {
-        for (Iterator iter = rules.entrySet().iterator(); iter.hasNext();) {
-            Map.Entry ruleEntry = (Entry) iter.next();
-            MapMatcher midm = (MapMatcher) ruleEntry.getKey();
-            if (midm.matches(moduleAttributes)) {
-                Object rule = ruleEntry.getValue();
-                if (filter.accept(rule)) {
-                    return rule;
-                }
+        List matchers = matcher_lookup.get(moduleAttributes);
+        for (Iterator iter = matchers.iterator(); iter.hasNext();) {
+            MapMatcher midm = (MapMatcher) iter.next();
+            Object rule = rules.get(midm);
+            if (filter.accept(rule)) {
+                return rule;
             }
         }
         return null;
@@ -198,15 +201,13 @@ public class ModuleRules {
     }
 
     private Object[] getRules(Map moduleAttributes, Filter filter) {
+        List matchers = matcher_lookup.get(moduleAttributes);
         List matchingRules = new ArrayList();
-        for (Iterator iter = rules.entrySet().iterator(); iter.hasNext();) {
-            Map.Entry ruleEntry = (Entry) iter.next();
-            MapMatcher midm = (MapMatcher) ruleEntry.getKey();
-            if (midm.matches(moduleAttributes)) {
-                Object rule = ruleEntry.getValue();
-                if (filter.accept(rule)) {
-                    matchingRules.add(rule);
-                }
+        for (Iterator iter = matchers.iterator(); iter.hasNext();) {
+            MapMatcher midm = (MapMatcher) iter.next();
+            Object rule = rules.get(midm);
+            if (filter.accept(rule)) {
+                matchingRules.add(rule);
             }
         }
         return matchingRules.toArray();


[13/35] git commit: when building the release, also include in the sources the test data about the OSGi tests

Posted by hi...@apache.org.
when building the release, also include in the sources the test data about the OSGi tests


git-svn-id: https://svn.apache.org/repos/asf/ant/ivy/core/trunk@1593848 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/2257485b
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/2257485b
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/2257485b

Branch: refs/heads/2.4.x
Commit: 2257485bfe4d479dbbdb96d0a52b68282a8507a1
Parents: d37c384
Author: Nicolas Lalevee <hi...@apache.org>
Authored: Sun May 11 20:11:29 2014 +0000
Committer: Nicolas Lalevee <hi...@apache.org>
Committed: Sun May 11 20:11:29 2014 +0000

----------------------------------------------------------------------
 build-release.xml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/2257485b/build-release.xml
----------------------------------------------------------------------
diff --git a/build-release.xml b/build-release.xml
index 9b9cc5a..a164d67 100644
--- a/build-release.xml
+++ b/build-release.xml
@@ -239,7 +239,10 @@
 			<zipfileset dir="${basedir}/src/example" prefix="${snapshot.full.name}/src/example"/>
 			<zipfileset dir="${basedir}/src/etc" prefix="${snapshot.full.name}/src/etc"/>
 			<zipfileset dir="${test.dir}" prefix="${snapshot.full.name}/test/java"/>
-			<zipfileset dir="${basedir}/test/repositories" prefix="${snapshot.full.name}/test/repositories"/>
+            <zipfileset dir="${basedir}/test/test-obr" prefix="${snapshot.full.name}/test/test-obr" />
+            <zipfileset dir="${basedir}/test/test-p2" prefix="${snapshot.full.name}/test/test-p2" />
+            <zipfileset dir="${basedir}/test/test-repo" prefix="${snapshot.full.name}/test/test-repo" excludes="**/bundlerepo/*.jar,**/ivyrepo/org*" />
+            <zipfileset dir="${basedir}/test/repositories" prefix="${snapshot.full.name}/test/repositories"/>
 			<zipfileset dir="${basedir}/test/buildlist" prefix="${snapshot.full.name}/test/buildlist"/>
 			<zipfileset dir="${basedir}/test/triggers" prefix="${snapshot.full.name}/test/triggers" excludes="**/cache/**"/>
 			<zipfileset dir="${basedir}/test/xsl" prefix="${snapshot.full.name}/test/xsl"/>


[30/35] git commit: document the fix of IVY-1487

Posted by hi...@apache.org.
document the fix of IVY-1487

Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/5f9c83bd
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/5f9c83bd
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/5f9c83bd

Branch: refs/heads/2.4.x
Commit: 5f9c83bd976802eea2d940b70aa749fd58b4cb46
Parents: 81fec31
Author: Nicolas Lalevée <ni...@hibnet.org>
Authored: Sun Sep 28 02:10:48 2014 +0200
Committer: Nicolas Lalevée <ni...@hibnet.org>
Committed: Sun Sep 28 02:10:48 2014 +0200

----------------------------------------------------------------------
 CHANGES.txt | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/5f9c83bd/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index ddf8591..7fde7ff 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -102,6 +102,7 @@ for detailed view of each issue, please consult http://issues.apache.org/jira/br
 	Douglas Palmer
 	Jesper Pedersen
 	Emmanuel Pellereau
+	Carsten Pfeiffer
 	Yanus Poluektovich
 	Roshan Punnoose
 	Jean-Baptiste Quenot
@@ -150,6 +151,7 @@ for detailed view of each issue, please consult http://issues.apache.org/jira/br
 - FIX: regression introduced by IVY-1457, dependency management wasn't properly handled introducing lots of resolution failures
 - FIX: The SSH resolvers fails if the un-required jsch jar is missing (IVY-1471)
 - FIX: failed to resolve dynamic revisions in some cases for URL repositories (IVY-1472)
+- FIX: ClassCastException in Eclipse 4.4.1 (IVY-1487) (Thanks to Carsten Pfeiffer)
 
    2.4.0-rc1
 =====================================


[17/35] git commit: junit test fix: the order of the extra-info elements has changed from undefined (from Map) to predictable (from List)

Posted by hi...@apache.org.
junit test fix: the order of the extra-info elements has changed from undefined (from Map) to predictable (from List)

git-svn-id: https://svn.apache.org/repos/asf/ant/ivy/core/trunk@1596972 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/f1d68f9c
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/f1d68f9c
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/f1d68f9c

Branch: refs/heads/2.4.x
Commit: f1d68f9c0a577e665b89cf88a7a8771084ca3f34
Parents: 3e5c9e3
Author: Maarten Coene <ma...@apache.org>
Authored: Thu May 22 21:29:06 2014 +0000
Committer: Maarten Coene <ma...@apache.org>
Committed: Thu May 22 21:29:06 2014 +0000

----------------------------------------------------------------------
 .../xml/test-write-extrainfo-from-maven.xml     | 110 +++++++++----------
 1 file changed, 55 insertions(+), 55 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/f1d68f9c/test/java/org/apache/ivy/plugins/parser/xml/test-write-extrainfo-from-maven.xml
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/parser/xml/test-write-extrainfo-from-maven.xml b/test/java/org/apache/ivy/plugins/parser/xml/test-write-extrainfo-from-maven.xml
index 1c18cd4..40c5fb2 100644
--- a/test/java/org/apache/ivy/plugins/parser/xml/test-write-extrainfo-from-maven.xml
+++ b/test/java/org/apache/ivy/plugins/parser/xml/test-write-extrainfo-from-maven.xml
@@ -1,55 +1,55 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-   Licensed to the Apache Software Foundation (ASF) under one
-   or more contributor license agreements.  See the NOTICE file
-   distributed with this work for additional information
-   regarding copyright ownership.  The ASF licenses this file
-   to you under the Apache License, Version 2.0 (the
-   "License"); you may not use this file except in compliance
-   with the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing,
-   software distributed under the License is distributed on an
-   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-   KIND, either express or implied.  See the License for the
-   specific language governing permissions and limitations
-   under the License.    
--->
-<ivy-module version="2.0" xmlns:m="http://ant.apache.org/ivy/maven">
-	<info organisation="org.apache"
-		module="test-depMgt"
-		revision="1.0"
-		status="release"
-		publication="20140429153143"
-	>
-		<description homepage="http://ivy.jayasoft.org/" />
-		<m:properties__commons.logging.version>1.0.4</m:properties__commons.logging.version>
-		<m:properties__commons.collections.version>1.0.5</m:properties__commons.collections.version>
-		<m:dependency.management__commons-logging__commons-logging__version>1.0.4</m:dependency.management__commons-logging__commons-logging__version>
-		<m:dependency.management__commons-collections__commons-collections__version>1.0.5</m:dependency.management__commons-collections__commons-collections__version>
-		<m:dependency.management__commons-collections__commons-collections__exclusion_0>javax.mail__mail</m:dependency.management__commons-collections__commons-collections__exclusion_0>
-		<m:dependency.management__commons-collections__commons-collections__exclusion_1>javax.jms__jms</m:dependency.management__commons-collections__commons-collections__exclusion_1>
-	</info>
-	<configurations>
-		<conf name="default" visibility="public" description="runtime dependencies and master artifact can be used with this conf" extends="runtime,master"/>
-		<conf name="master" visibility="public" description="contains only the artifact published by this module itself, with no transitive dependencies"/>
-		<conf name="compile" visibility="public" description="this is the default scope, used if none is specified. Compile dependencies are available in all classpaths."/>
-		<conf name="provided" visibility="public" description="this is much like compile, but indicates you expect the JDK or a container to provide it. It is only available on the compilation classpath, and is not transitive."/>
-		<conf name="runtime" visibility="public" description="this scope indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath." extends="compile"/>
-		<conf name="test" visibility="private" description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases." extends="runtime"/>
-		<conf name="system" visibility="public" description="this scope is similar to provided except that you have to provide the JAR which contains it explicitly. The artifact is always available and is not looked up in a repository."/>
-		<conf name="sources" visibility="public" description="this configuration contains the source artifact of this module, if any."/>
-		<conf name="javadoc" visibility="public" description="this configuration contains the javadoc artifact of this module, if any."/>
-		<conf name="optional" visibility="public" description="contains all optional dependencies"/>
-	</configurations>
-	<publications>
-		<artifact name="test-depMgt" type="jar" ext="jar" conf="master"/>
-	</publications>
-	<dependencies>
-		<dependency org="commons-logging" name="commons-logging" rev="1.0.4" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
-		<override org="commons-logging" module="commons-logging" matcher="exact" rev="1.0.4"/>
-		<override org="commons-collections" module="commons-collections" matcher="exact" rev="1.0.5"/>
-	</dependencies>
-</ivy-module>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
+<ivy-module version="2.0" xmlns:m="http://ant.apache.org/ivy/maven">
+	<info organisation="org.apache"
+		module="test-depMgt"
+		revision="1.0"
+		status="release"
+		publication="20140429153143"
+	>
+		<description homepage="http://ivy.jayasoft.org/" />
+		<m:properties__commons.collections.version>1.0.5</m:properties__commons.collections.version>
+		<m:properties__commons.logging.version>1.0.4</m:properties__commons.logging.version>
+		<m:dependency.management__commons-logging__commons-logging__version>1.0.4</m:dependency.management__commons-logging__commons-logging__version>
+		<m:dependency.management__commons-collections__commons-collections__version>1.0.5</m:dependency.management__commons-collections__commons-collections__version>
+		<m:dependency.management__commons-collections__commons-collections__exclusion_0>javax.mail__mail</m:dependency.management__commons-collections__commons-collections__exclusion_0>
+		<m:dependency.management__commons-collections__commons-collections__exclusion_1>javax.jms__jms</m:dependency.management__commons-collections__commons-collections__exclusion_1>
+	</info>
+	<configurations>
+		<conf name="default" visibility="public" description="runtime dependencies and master artifact can be used with this conf" extends="runtime,master"/>
+		<conf name="master" visibility="public" description="contains only the artifact published by this module itself, with no transitive dependencies"/>
+		<conf name="compile" visibility="public" description="this is the default scope, used if none is specified. Compile dependencies are available in all classpaths."/>
+		<conf name="provided" visibility="public" description="this is much like compile, but indicates you expect the JDK or a container to provide it. It is only available on the compilation classpath, and is not transitive."/>
+		<conf name="runtime" visibility="public" description="this scope indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath." extends="compile"/>
+		<conf name="test" visibility="private" description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases." extends="runtime"/>
+		<conf name="system" visibility="public" description="this scope is similar to provided except that you have to provide the JAR which contains it explicitly. The artifact is always available and is not looked up in a repository."/>
+		<conf name="sources" visibility="public" description="this configuration contains the source artifact of this module, if any."/>
+		<conf name="javadoc" visibility="public" description="this configuration contains the javadoc artifact of this module, if any."/>
+		<conf name="optional" visibility="public" description="contains all optional dependencies"/>
+	</configurations>
+	<publications>
+		<artifact name="test-depMgt" type="jar" ext="jar" conf="master"/>
+	</publications>
+	<dependencies>
+		<dependency org="commons-logging" name="commons-logging" rev="1.0.4" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
+		<override org="commons-logging" module="commons-logging" matcher="exact" rev="1.0.4"/>
+		<override org="commons-collections" module="commons-collections" matcher="exact" rev="1.0.5"/>
+	</dependencies>
+</ivy-module>


[06/35] git commit: When parsing an OSGi MANIFEST, add its entries in the extra infos of the module descriptor

Posted by hi...@apache.org.
When parsing an OSGi MANIFEST, add its entries in the extra infos of the module descriptor


git-svn-id: https://svn.apache.org/repos/asf/ant/ivy/core/trunk@1592238 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/ff2f32b9
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/ff2f32b9
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/ff2f32b9

Branch: refs/heads/2.4.x
Commit: ff2f32b914a5486e4f4870c6bc6fae14a85fb086
Parents: a6a5e30
Author: Nicolas Lalevee <hi...@apache.org>
Authored: Sat May 3 16:22:05 2014 +0000
Committer: Nicolas Lalevee <hi...@apache.org>
Committed: Sat May 3 16:22:05 2014 +0000

----------------------------------------------------------------------
 .../org/apache/ivy/ant/ConvertManifestTask.java |  2 +-
 .../apache/ivy/osgi/core/BundleInfoAdapter.java | 20 +++++++++++++++-----
 .../ivy/osgi/core/OSGiManifestParser.java       |  2 +-
 .../parser/xml/XmlModuleDescriptorParser.java   |  2 ++
 .../apache/ivy/osgi/obr/OBRResolverTest.java    | 15 ++++++++-------
 5 files changed, 27 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/ff2f32b9/src/java/org/apache/ivy/ant/ConvertManifestTask.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/ant/ConvertManifestTask.java b/src/java/org/apache/ivy/ant/ConvertManifestTask.java
index ad91093..ab470d7 100644
--- a/src/java/org/apache/ivy/ant/ConvertManifestTask.java
+++ b/src/java/org/apache/ivy/ant/ConvertManifestTask.java
@@ -84,7 +84,7 @@ public class ConvertManifestTask extends IvyTask {
             throw new BuildException("Incorrect manifest file '" + manifest + "'", e);
         }
         ModuleDescriptor md = BundleInfoAdapter.toModuleDescriptor(
-            OSGiManifestParser.getInstance(), null, bundleInfo, profileProvider);
+            OSGiManifestParser.getInstance(), null, bundleInfo, m, profileProvider);
 
         try {
             XmlModuleDescriptorWriter.write(md, ivyFile);

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/ff2f32b9/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java b/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
index 29e3341..27a24c0 100644
--- a/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
+++ b/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
@@ -27,7 +27,9 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Map.Entry;
 import java.util.Set;
+import java.util.jar.Manifest;
 
 import org.apache.ivy.Ivy;
 import org.apache.ivy.core.module.descriptor.Artifact;
@@ -68,19 +70,21 @@ public class BundleInfoAdapter {
 
     public static final String EXTRA_INFO_EXPORT_PREFIX = "_osgi_export_";
 
+    public static DefaultModuleDescriptor toModuleDescriptor(ModuleDescriptorParser parser,
+            URI baseUri, BundleInfo bundle, ExecutionEnvironmentProfileProvider profileProvider) {
+        return toModuleDescriptor(parser, baseUri, bundle, null, profileProvider);
+    }
+
     /**
      * 
      * @param baseUri
      *            uri to help build the absolute url if the bundle info has a relative uri.
-     * @param bundle
-     * @param profileProvider
-     * @param parser
      * @return
      * @throws ProfileNotFoundException
      */
     public static DefaultModuleDescriptor toModuleDescriptor(ModuleDescriptorParser parser,
-            URI baseUri, BundleInfo bundle, ExecutionEnvironmentProfileProvider profileProvider)
-            throws ProfileNotFoundException {
+            URI baseUri, BundleInfo bundle, Manifest manifest,
+            ExecutionEnvironmentProfileProvider profileProvider) throws ProfileNotFoundException {
         DefaultModuleDescriptor md = new DefaultModuleDescriptor(parser, null);
         md.addExtraAttributeNamespace("o", Ivy.getIvyHomeURL() + "osgi");
         ModuleRevisionId mrid = asMrid(BundleInfo.BUNDLE_TYPE, bundle.getSymbolicName(),
@@ -160,6 +164,12 @@ public class BundleInfoAdapter {
             }
         }
 
+        if (manifest != null) {
+            for (Entry<Object, Object> entries : manifest.getMainAttributes().entrySet()) {
+                md.addExtraInfo(entries.getKey().toString(), entries.getValue().toString());
+            }
+        }
+
         return md;
     }
 

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/ff2f32b9/src/java/org/apache/ivy/osgi/core/OSGiManifestParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/core/OSGiManifestParser.java b/src/java/org/apache/ivy/osgi/core/OSGiManifestParser.java
index fb3d1a3..66cced1 100644
--- a/src/java/org/apache/ivy/osgi/core/OSGiManifestParser.java
+++ b/src/java/org/apache/ivy/osgi/core/OSGiManifestParser.java
@@ -69,7 +69,7 @@ public class OSGiManifestParser implements ModuleDescriptorParser {
         } catch (URISyntaxException e) {
             throw new RuntimeException("Unsupported repository, resources names are not uris", e);
         }
-        return BundleInfoAdapter.toModuleDescriptor(this, null, bundleInfo, profileProvider);
+        return BundleInfoAdapter.toModuleDescriptor(this, null, bundleInfo, m, profileProvider);
     }
 
     public void toIvyFile(InputStream is, Resource res, File destFile, ModuleDescriptor md)

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/ff2f32b9/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java b/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
index 35f93e3..800b963 100644
--- a/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
+++ b/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
@@ -561,6 +561,8 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
                 Namespace parentNamespace = ((DefaultModuleDescriptor) parent).getNamespace();
                 descriptor.setNamespace(parentNamespace);
             }
+
+            descriptor.getExtraInfo().putAll(parent.getExtraInfo());
         }
 
         private static String mergeRevisionValue(String inherited, String override) {

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/ff2f32b9/test/java/org/apache/ivy/osgi/obr/OBRResolverTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/osgi/obr/OBRResolverTest.java b/test/java/org/apache/ivy/osgi/obr/OBRResolverTest.java
index 4b42917..0a97e8a 100644
--- a/test/java/org/apache/ivy/osgi/obr/OBRResolverTest.java
+++ b/test/java/org/apache/ivy/osgi/obr/OBRResolverTest.java
@@ -25,6 +25,7 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 import java.util.jar.JarInputStream;
+import java.util.jar.Manifest;
 
 import junit.framework.AssertionFailedError;
 import junit.framework.TestCase;
@@ -294,9 +295,9 @@ public class OBRResolverTest extends TestCase {
 
     private void genericTestResolve(String jarName, String conf, ModuleRevisionId[] expectedMrids,
             ModuleRevisionId[] expected2Mrids) throws Exception {
-        JarInputStream in = new JarInputStream(new FileInputStream("test/test-repo/bundlerepo/"
-                + jarName));
-        BundleInfo bundleInfo = ManifestParser.parseManifest(in.getManifest());
+        Manifest manifest = new JarInputStream(new FileInputStream("test/test-repo/bundlerepo/"
+                + jarName)).getManifest();
+        BundleInfo bundleInfo = ManifestParser.parseManifest(manifest);
         bundleInfo.addArtifact(new BundleArtifact(false, new File("test/test-repo/bundlerepo/"
                 + jarName).toURI(), null));
         DefaultModuleDescriptor md = BundleInfoAdapter.toModuleDescriptor(
@@ -326,13 +327,13 @@ public class OBRResolverTest extends TestCase {
     }
 
     private void genericTestFailingResolve(String jarName, String conf) throws Exception {
-        JarInputStream in = new JarInputStream(new FileInputStream("test/test-repo/bundlerepo/"
-                + jarName));
-        BundleInfo bundleInfo = ManifestParser.parseManifest(in.getManifest());
+        Manifest manifest = new JarInputStream(new FileInputStream("test/test-repo/bundlerepo/"
+                + jarName)).getManifest();
+        BundleInfo bundleInfo = ManifestParser.parseManifest(manifest);
         bundleInfo.addArtifact(new BundleArtifact(false, new File("test/test-repo/bundlerepo/"
                 + jarName).toURI(), null));
         DefaultModuleDescriptor md = BundleInfoAdapter.toModuleDescriptor(
-            OSGiManifestParser.getInstance(), null, bundleInfo, profileProvider);
+            OSGiManifestParser.getInstance(), null, bundleInfo, manifest, profileProvider);
         ResolveReport resolveReport = ivy.resolve(md,
             new ResolveOptions().setConfs(new String[] {conf}).setOutputReport(false));
         assertTrue(resolveReport.hasError());


[29/35] git commit: IVYDE-372: fix ClassCastException: System properties may not be strings

Posted by hi...@apache.org.
IVYDE-372: fix ClassCastException: System properties may not be strings


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/81fec319
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/81fec319
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/81fec319

Branch: refs/heads/2.4.x
Commit: 81fec3193ad12a0f78eb021c4a1548484595860b
Parents: a6b9ca3
Author: Carsten Pfeiffer <ca...@gebit.de>
Authored: Wed Sep 24 10:23:19 2014 +0200
Committer: Nicolas Lalevée <ni...@hibnet.org>
Committed: Sun Sep 28 02:07:17 2014 +0200

----------------------------------------------------------------------
 src/java/org/apache/ivy/core/settings/IvySettings.java | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/81fec319/src/java/org/apache/ivy/core/settings/IvySettings.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/settings/IvySettings.java b/src/java/org/apache/ivy/core/settings/IvySettings.java
index 5c99787..1ef8dc7 100644
--- a/src/java/org/apache/ivy/core/settings/IvySettings.java
+++ b/src/java/org/apache/ivy/core/settings/IvySettings.java
@@ -604,11 +604,13 @@ public class IvySettings implements SortEngineSettings, PublishEngineSettings, P
         addAllVariables(variables, true);
     }
 
-    public synchronized void addAllVariables(Map variables, boolean overwrite) {
-        for (Iterator iter = variables.keySet().iterator(); iter.hasNext();) {
-            String key = (String) iter.next();
-            String val = (String) variables.get(key);
-            setVariable(key, val, overwrite);
+    public synchronized void addAllVariables(Map<?, ?> variables, boolean overwrite) {
+        for (Map.Entry<?, ?> entry : variables.entrySet()) {
+            String key = entry.getKey().toString();
+            Object val = entry.getValue();
+            if (val == null || val instanceof String) {
+                setVariable(key, (String) val, overwrite);
+            }
         }
     }
 


[25/35] git commit: ignore emacs auto-save files

Posted by hi...@apache.org.
ignore emacs auto-save files


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/17e4fb4f
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/17e4fb4f
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/17e4fb4f

Branch: refs/heads/2.4.x
Commit: 17e4fb4fb16905615ec54c206bd79f23a4fed5ff
Parents: 5063d25
Author: Stefan Bodewig <bo...@apache.org>
Authored: Tue Aug 12 12:22:29 2014 +0200
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Tue Aug 12 12:22:29 2014 +0200

----------------------------------------------------------------------
 .gitignore | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/17e4fb4f/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index bdf1753..5299ec4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,4 +12,5 @@ test/test-repo/bundlerepo/*.jar
 test/test-repo/ivyrepo/org.apache.ivy.osgi
 .DS_Store
 doc/samples/target-platform/bundles
-doc/samples/target-platform/cache
\ No newline at end of file
+doc/samples/target-platform/cache
+*~


[34/35] git commit: IVY-1493 : Can't resolve wildcard dependencies when remote artifact server does not set content-type header (Thanks to Andrew Bernhagen)

Posted by hi...@apache.org.
IVY-1493 : Can't resolve wildcard dependencies when remote artifact server does not set content-type header (Thanks to Andrew Bernhagen)

Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/b84f786d
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/b84f786d
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/b84f786d

Branch: refs/heads/2.4.x
Commit: b84f786db6d85cbf9973adfccdf135cb71824b87
Parents: 902a680
Author: Nicolas Lalevée <ni...@hibnet.org>
Authored: Tue Oct 28 00:37:04 2014 +0100
Committer: Nicolas Lalevée <ni...@hibnet.org>
Committed: Tue Oct 28 00:37:04 2014 +0100

----------------------------------------------------------------------
 CHANGES.txt                                           | 2 ++
 src/java/org/apache/ivy/util/url/ApacheURLLister.java | 7 ++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/b84f786d/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 4d18a9d..da4a7ff 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -22,6 +22,7 @@ for detailed view of each issue, please consult http://issues.apache.org/jira/br
 	Andreas Axelsson
 	Stephane Bailliez
 	Karl Baum
+	Andrew Bernhagen
 	Mikkel Bjerg
 	Per Arnold Blaasmo
 	Jeffrey Blattman
@@ -154,6 +155,7 @@ for detailed view of each issue, please consult http://issues.apache.org/jira/br
 - FIX: failed to resolve dynamic revisions in some cases for URL repositories (IVY-1472)
 - FIX: ClassCastException in Eclipse 4.4.1 (IVY-1487) (Thanks to Carsten Pfeiffer)
 - FIX: NullPointerException when accessing charset to invalid URL (IVY-1452) (Thanks to Frédéric Riviere)
+- FIX: Can't resolve wildcard dependencies when remote artifact server does not set content-type header (IVY-1493) (Thanks to Andrew Bernhagen)
 
    2.4.0-rc1
 =====================================

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/b84f786d/src/java/org/apache/ivy/util/url/ApacheURLLister.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/url/ApacheURLLister.java b/src/java/org/apache/ivy/util/url/ApacheURLLister.java
index 2df69b0..e2e7dea 100644
--- a/src/java/org/apache/ivy/util/url/ApacheURLLister.java
+++ b/src/java/org/apache/ivy/util/url/ApacheURLLister.java
@@ -117,7 +117,12 @@ public class ApacheURLLister {
         String charset = urlInfo.getBodyCharset();
 
         InputStream contentStream = urlHandler.openStream(url);
-        BufferedReader r = new BufferedReader(new InputStreamReader(contentStream, charset));
+        BufferedReader r = null;
+        if (charset == null) {
+            r = new BufferedReader(new InputStreamReader(contentStream));
+        } else {
+            r = new BufferedReader(new InputStreamReader(contentStream, charset));
+        }
 
         String htmlText = FileUtil.readEntirely(r);
 


[14/35] git commit: Make getExtraInfos and getExtraInfo work on the same data, with the explicit bias on getting the data out on the deprecated mathod

Posted by hi...@apache.org.
Make getExtraInfos and getExtraInfo work on the same data, with the explicit bias on getting the data out on the deprecated mathod


git-svn-id: https://svn.apache.org/repos/asf/ant/ivy/core/trunk@1593855 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/86d1c404
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/86d1c404
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/86d1c404

Branch: refs/heads/2.4.x
Commit: 86d1c40475d6962e6ad256f248636467bf0a58cf
Parents: 2257485
Author: Nicolas Lalevee <hi...@apache.org>
Authored: Sun May 11 20:38:12 2014 +0000
Committer: Nicolas Lalevee <hi...@apache.org>
Committed: Sun May 11 20:38:12 2014 +0000

----------------------------------------------------------------------
 .../descriptor/DefaultModuleDescriptor.java     | 20 ++++++++++++++------
 .../module/descriptor/ModuleDescriptor.java     | 13 ++++++++-----
 .../apache/ivy/core/report/ResolveReport.java   |  1 +
 .../apache/ivy/osgi/core/BundleInfoAdapter.java |  3 ++-
 .../parser/xml/XmlModuleDescriptorParser.java   |  2 --
 5 files changed, 25 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/86d1c404/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java b/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java
index 1a62d55..2c544c5 100644
--- a/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java
@@ -194,7 +194,6 @@ public class DefaultModuleDescriptor implements ModuleDescriptor {
         nmd.description = md.getDescription();
         nmd.lastModified = md.getLastModified();
         nmd.extraAttributesNamespaces = md.getExtraAttributesNamespaces();
-        nmd.extraInfo = md.getExtraInfo();
         nmd.extraInfos = md.getExtraInfos();
         nmd.namespace = ns;
 
@@ -256,8 +255,6 @@ public class DefaultModuleDescriptor implements ModuleDescriptor {
 
     private Map/* <String,String> */extraAttributesNamespaces = new LinkedHashMap();
 
-    private Map/* <String,String> */extraInfo = new HashMap();
-
     private List<ExtraInfoHolder> extraInfos = new ArrayList<ExtraInfoHolder>();
 
     public DefaultModuleDescriptor(ModuleRevisionId id, String status, Date pubDate) {
@@ -839,12 +836,23 @@ public class DefaultModuleDescriptor implements ModuleDescriptor {
 
     @Deprecated
     public void addExtraInfo(String infoKey, String value) {
-        extraInfo.put(infoKey, value);
+        extraInfos.add(new ExtraInfoHolder(infoKey, value));
     }
 
     @Deprecated
-    public Map getExtraInfo() {
-        return extraInfo;
+    public Map<String, String> getExtraInfo() {
+        Map<String, String> map = new HashMap<String, String>();
+        for (ExtraInfoHolder extraInfo : extraInfos) {
+            populateExtraInfoMap(map, extraInfo);
+        }
+        return map;
+    }
+
+    private void populateExtraInfoMap(Map<String, String> map, ExtraInfoHolder extraInfo) {
+        map.put(extraInfo.getName(), extraInfo.getContent());
+        for (ExtraInfoHolder nested : extraInfo.getNestedExtraInfoHolder()) {
+            populateExtraInfoMap(map, nested);
+        }
     }
 
     public List<ExtraInfoHolder> getExtraInfos() {

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/86d1c404/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java b/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java
index 1f85787..4eb4a1e 100644
--- a/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java
@@ -254,22 +254,23 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
      * @return the list of xml namespaces used by extra attributes, as Map from prefix to namespace
      *         URIs.
      */
-    Map/* <String,String> */getExtraAttributesNamespaces();
+    Map<String, String> getExtraAttributesNamespaces();
 
     /**
      * Returns the custom info provided in the info tag. All the tags except the description are
-     * given. The key is the name of the tag, the value is its content.
+     * given. The key is the name of the tag, the value is its content. <br />
      * 
-     * @deprecated please use getExtraInfos() method instead
-     * @return
+     * @deprecated this method is not returning the full content of the extra info: to get the full
+     *             structure of the extra infos, use getExtraInfos()
      */
     @Deprecated
-    Map/* <String,String> */getExtraInfo();
+    Map<String, String> getExtraInfo();
 
     /**
      * Returns a list of extras infos (tag name, attributes and content). All the tags except the
      * description are given.
      * 
+     * @since 2.4.0
      * @return
      */
     List<ExtraInfoHolder> getExtraInfos();
@@ -277,6 +278,7 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
     /**
      * Returns content from first extrainfo matching with given tag name
      * 
+     * @since 2.4.0
      * @return
      */
     String getExtraInfoContentByTagName(String tagName);
@@ -284,6 +286,7 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
     /**
      * Returns first extrainfo matching with given tag name
      * 
+     * @since 2.4.0
      * @return
      */
     ExtraInfoHolder getExtraInfoByTagName(String tagName);

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/86d1c404/src/java/org/apache/ivy/core/report/ResolveReport.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/report/ResolveReport.java b/src/java/org/apache/ivy/core/report/ResolveReport.java
index 54732aa..0f12488 100644
--- a/src/java/org/apache/ivy/core/report/ResolveReport.java
+++ b/src/java/org/apache/ivy/core/report/ResolveReport.java
@@ -371,6 +371,7 @@ public class ResolveReport {
     public ModuleDescriptor toFixedModuleDescriptor(IvySettings settings, List<ModuleId> midToKeep) {
         DefaultModuleDescriptor fixedmd = new DefaultModuleDescriptor(md.getModuleRevisionId(),
                 md.getStatus(), new Date());
+        fixedmd.getExtraInfos().addAll(md.getExtraInfos());
 
         // copy configurations
         List<String> resolvedConfs = Arrays.asList(getConfigurations());

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/86d1c404/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java b/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
index 8f269db..136a32c 100644
--- a/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
+++ b/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
@@ -168,7 +168,8 @@ public class BundleInfoAdapter {
 
         if (manifest != null) {
             for (Entry<Object, Object> entries : manifest.getMainAttributes().entrySet()) {
-                md.addExtraInfo(entries.getKey().toString(), entries.getValue().toString());
+                md.addExtraInfo(new ExtraInfoHolder(entries.getKey().toString(), entries.getValue()
+                        .toString()));
             }
         }
 

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/86d1c404/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java b/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
index b70f2a3..de28d74 100644
--- a/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
+++ b/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
@@ -562,7 +562,6 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
                 descriptor.setNamespace(parentNamespace);
             }
 
-            descriptor.getExtraInfo().putAll(parent.getExtraInfo());
             descriptor.getExtraInfos().addAll(parent.getExtraInfos());
         }
 
@@ -1251,7 +1250,6 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
             } else if (state == State.EXTRA_INFO) {
                 String content = buffer == null ? "" : buffer.toString();
                 buffer = null;
-                getMd().addExtraInfo(qName, content);
                 ExtraInfoHolder extraInfo = extraInfoStack.pop();
                 extraInfo.setContent(content);
                 if (extraInfoStack.isEmpty()) {


[26/35] git commit: mechanically replace URIs so TLS is used by default for Maven Central

Posted by hi...@apache.org.
mechanically replace URIs so TLS is used by default for Maven Central


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/750dbb84
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/750dbb84
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/750dbb84

Branch: refs/heads/2.4.x
Commit: 750dbb845b51219655bfb105331c4ad1907dfc6a
Parents: 17e4fb4
Author: Stefan Bodewig <bo...@apache.org>
Authored: Tue Aug 12 12:29:18 2014 +0200
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Tue Aug 12 12:29:18 2014 +0200

----------------------------------------------------------------------
 doc/install.html                                               | 2 +-
 doc/principle.html                                             | 2 +-
 doc/resolver/ibiblio.html                                      | 2 +-
 doc/resolver/mirrored.html                                     | 2 +-
 doc/resolver/packager.html                                     | 2 +-
 doc/samples/build-install.xml                                  | 2 +-
 doc/samples/build.xml                                          | 2 +-
 .../build-a-ivy-repository/settings/ivysettings-advanced.xml   | 2 +-
 src/example/go-ivy/build.xml                                   | 2 +-
 .../ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java      | 4 ++--
 src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java  | 2 +-
 src/java/org/apache/ivy/plugins/resolver/packager/packager.xsl | 2 +-
 src/java/org/apache/ivy/util/ChecksumHelper.java               | 2 +-
 test/java/org/apache/ivy/osgi/obr/OBRParserTest.java           | 2 +-
 .../ivy/osgi/updatesite/UpdateSiteAndIbiblioResolverTest.java  | 2 +-
 test/java/org/apache/ivy/plugins/resolver/IBiblioHelper.java   | 4 ++--
 .../org/apache/ivy/plugins/resolver/IBiblioResolverTest.java   | 2 +-
 test/java/org/apache/ivy/plugins/resolver/mirrorlist-fail.txt  | 4 ++--
 .../org/apache/ivy/plugins/resolver/mirrorlist-failover.txt    | 4 ++--
 test/java/org/apache/ivy/plugins/resolver/mirrorlist-solo.txt  | 2 +-
 .../java/org/apache/ivy/util/url/HttpclientURLHandlerTest.java | 2 +-
 test/test-obr/sources.xml                                      | 6 +++---
 22 files changed, 28 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/750dbb84/doc/install.html
----------------------------------------------------------------------
diff --git a/doc/install.html b/doc/install.html
index bfa4804..864b71e 100644
--- a/doc/install.html
+++ b/doc/install.html
@@ -64,7 +64,7 @@ If you want to use Ivy only in your ant build scripts, and have an internet conn
 
         <mkdir dir="${ivy.jar.dir}"/>
         <!-- download Ivy from web site so that it can be used even without any special installation -->
-        <get src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar" 
+        <get src="https://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar" 
              dest="${ivy.jar.file}" usetimestamp="true"/>
     </target>
 

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/750dbb84/doc/principle.html
----------------------------------------------------------------------
diff --git a/doc/principle.html b/doc/principle.html
index 3188172..14e95e2 100644
--- a/doc/principle.html
+++ b/doc/principle.html
@@ -36,7 +36,7 @@ Ivy needs to be configured to be able to resolve your dependencies. This configu
 
 The configuration is also responsible for indicating which resolver should be used to resolve which module. This configuration is dependent only on your environment, i.e. where the modules and artifacts can be found. 
 
-A default configuration is used by ivy when none is given. This configuration uses an <a href="resolver/ibiblio.html">ibiblio resolver</a> pointing to http://repo1.maven.org/maven2/ to resolve all modules.
+A default configuration is used by ivy when none is given. This configuration uses an <a href="resolver/ibiblio.html">ibiblio resolver</a> pointing to https://repo1.maven.org/maven2/ to resolve all modules.
 <h1>Resolve</h1>
 The resolve time is the moment when ivy actually resolves the dependencies of one module. It first needs to access the ivy file of the module for which it resolves the dependencies. 
 

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/750dbb84/doc/resolver/ibiblio.html
----------------------------------------------------------------------
diff --git a/doc/resolver/ibiblio.html b/doc/resolver/ibiblio.html
index f38e1b1..80057c4 100644
--- a/doc/resolver/ibiblio.html
+++ b/doc/resolver/ibiblio.html
@@ -37,7 +37,7 @@
 <span class="since">since 1.4</span> When using the m2compatible flag, you can disable the use of poms by setting the usepoms flag to false. It is then roughly equivalent to a url resolver configured like this:
 <code type="xml">
 <url name="test" m2compatible="true">
-  <artifact pattern="http://repo1.maven.org/maven2/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/>
+  <artifact pattern="https://repo1.maven.org/maven2/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/>
 </url>
 </code>
 

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/750dbb84/doc/resolver/mirrored.html
----------------------------------------------------------------------
diff --git a/doc/resolver/mirrored.html b/doc/resolver/mirrored.html
index 27ac6b7..f8bfb19 100644
--- a/doc/resolver/mirrored.html
+++ b/doc/resolver/mirrored.html
@@ -65,7 +65,7 @@ This resolver shares the <a href="../settings/resolvers.html#common">common attr
 
 Having the file mavenrepolist.txt content:
 <code>
-http://repo1.maven.org/maven2/
+https://repo1.maven.org/maven2/
 http://repo2.maven.org/maven2/
 </code>
 And the piece of settings:

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/750dbb84/doc/resolver/packager.html
----------------------------------------------------------------------
diff --git a/doc/resolver/packager.html b/doc/resolver/packager.html
index e8a4cbf..abe3ffe 100644
--- a/doc/resolver/packager.html
+++ b/doc/resolver/packager.html
@@ -338,7 +338,7 @@ The m2resource XML tag supports the following attributes:
   <tr>
     <td>repo</td>
     <td>Maven repository URL</td>
-    <td>No; defaults to http://repo1.maven.org/maven2/ </td>
+    <td>No; defaults to https://repo1.maven.org/maven2/ </td>
   </tr>
 </tbody>
 </table>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/750dbb84/doc/samples/build-install.xml
----------------------------------------------------------------------
diff --git a/doc/samples/build-install.xml b/doc/samples/build-install.xml
index ab36c48..8f7183a 100644
--- a/doc/samples/build-install.xml
+++ b/doc/samples/build-install.xml
@@ -48,7 +48,7 @@
 		<url name="public">
 			<ivy pattern="http://ivyrep.jayasoft.org/[organisation]/[module]/ivy-[revision].xml"/>
 			<artifact pattern="http://ivyrep.jayasoft.org/[organisation]/[module]/[revision]/[artifact].[ext]"/>
-			<artifact pattern="http://repo1.maven.org/maven/[module]/[type]s/[artifact]-[revision].[ext]"/>
+			<artifact pattern="https://repo1.maven.org/maven/[module]/[type]s/[artifact]-[revision].[ext]"/>
 		</url>
 	</resolvers>
 </ivysettings>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/750dbb84/doc/samples/build.xml
----------------------------------------------------------------------
diff --git a/doc/samples/build.xml b/doc/samples/build.xml
index 1f5f567..a7dbbcd 100644
--- a/doc/samples/build.xml
+++ b/doc/samples/build.xml
@@ -50,7 +50,7 @@
     	<mkdir dir="${ivy.jar.dir}"/>
 		<!-- download Ivy from web site so that it can be used even without any special installation -->
 		<echo message="installing ivy..."/>
-    	<get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
+    	<get src="https://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
     		 dest="${ivy.jar.file}" usetimestamp="true"/>
     </target>
     

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/750dbb84/src/example/build-a-ivy-repository/settings/ivysettings-advanced.xml
----------------------------------------------------------------------
diff --git a/src/example/build-a-ivy-repository/settings/ivysettings-advanced.xml b/src/example/build-a-ivy-repository/settings/ivysettings-advanced.xml
index f20f53a..09ca0d4 100644
--- a/src/example/build-a-ivy-repository/settings/ivysettings-advanced.xml
+++ b/src/example/build-a-ivy-repository/settings/ivysettings-advanced.xml
@@ -25,7 +25,7 @@
 	   You can override this property to use one of the mirrors listed on
 	   http://docs.codehaus.org/display/MAVENUSER/Mirrors+Repositories
 	-->
-	<property name="ibiblio-maven2-root" value="http://repo1.maven.org/maven2/" override="false" />
+	<property name="ibiblio-maven2-root" value="https://repo1.maven.org/maven2/" override="false" />
 
 	<namespaces>
     	<namespace name="maven2">

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/750dbb84/src/example/go-ivy/build.xml
----------------------------------------------------------------------
diff --git a/src/example/go-ivy/build.xml b/src/example/go-ivy/build.xml
index de52c29..d92b11f 100644
--- a/src/example/go-ivy/build.xml
+++ b/src/example/go-ivy/build.xml
@@ -50,7 +50,7 @@
     	<mkdir dir="${ivy.jar.dir}"/>
 		<!-- download Ivy from web site so that it can be used even without any special installation -->
 		<echo message="installing ivy..."/>
-    	<get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
+    	<get src="https://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
     		 dest="${ivy.jar.file}" usetimestamp="true"/>
     </target>
     

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/750dbb84/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java b/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
index 199cd19..896c533 100644
--- a/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
+++ b/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
@@ -286,7 +286,7 @@ public class PomModuleDescriptorBuilder {
             dep.getArtifactId(), version);
 
         // Some POMs depend on theirselfves, don't add this dependency: Ivy doesn't allow this!
-        // Example: http://repo2.maven.org/maven2/net/jini/jsk-platform/2.1/jsk-platform-2.1.pom
+        // Example: https://repo1.maven.org/maven2/net/jini/jsk-platform/2.1/jsk-platform-2.1.pom
         ModuleRevisionId mRevId = ivyModuleDescriptor.getModuleRevisionId();
         if ((mRevId != null) && mRevId.getModuleId().equals(moduleRevId.getModuleId())) {
             return;
@@ -354,7 +354,7 @@ public class PomModuleDescriptorBuilder {
         // Some POMs depend on themselves through their parent pom, don't add this dependency
         // since Ivy doesn't allow this!
         // Example:
-        // http://repo2.maven.org/maven2/com/atomikos/atomikos-util/3.6.4/atomikos-util-3.6.4.pom
+        // https://repo1.maven.org/maven2/com/atomikos/atomikos-util/3.6.4/atomikos-util-3.6.4.pom
         ModuleId dependencyId = descriptor.getDependencyId();
         ModuleRevisionId mRevId = ivyModuleDescriptor.getModuleRevisionId();
         if ((mRevId != null) && mRevId.getModuleId().equals(dependencyId)) {

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/750dbb84/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java b/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java
index b746a1c..8072e3f 100644
--- a/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java
+++ b/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java
@@ -69,7 +69,7 @@ public class IBiblioResolver extends URLResolver {
 
     public static final String DEFAULT_ROOT = "http://www.ibiblio.org/maven/";
 
-    public static final String DEFAULT_M2_ROOT = "http://repo1.maven.org/maven2/";
+    public static final String DEFAULT_M2_ROOT = "https://repo1.maven.org/maven2/";
 
     private String root = null;
 

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/750dbb84/src/java/org/apache/ivy/plugins/resolver/packager/packager.xsl
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/resolver/packager/packager.xsl b/src/java/org/apache/ivy/plugins/resolver/packager/packager.xsl
index 2f7d58e..f42e7d3 100644
--- a/src/java/org/apache/ivy/plugins/resolver/packager/packager.xsl
+++ b/src/java/org/apache/ivy/plugins/resolver/packager/packager.xsl
@@ -24,7 +24,7 @@
     <xsl:param name="restricted"/>
     <xsl:param name="quiet"/>
 
-    <xsl:variable name="maven2repo" select="'http://repo1.maven.org/maven2/'"/>
+    <xsl:variable name="maven2repo" select="'https://repo1.maven.org/maven2/'"/>
 
     <xsl:template match="/packager-module">
         <xsl:comment> GENERATED FILE - DO NOT EDIT </xsl:comment>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/750dbb84/src/java/org/apache/ivy/util/ChecksumHelper.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/ChecksumHelper.java b/src/java/org/apache/ivy/util/ChecksumHelper.java
index cddfdb8..56aa936 100644
--- a/src/java/org/apache/ivy/util/ChecksumHelper.java
+++ b/src/java/org/apache/ivy/util/ChecksumHelper.java
@@ -67,7 +67,7 @@ public final class ChecksumHelper {
                 expected = csFileContent.substring(0, spaceIndex);
 
                 // IVY-1155: support some strange formats like this one:
-                // http://repo2.maven.org/maven2/org/apache/pdfbox/fontbox/0.8.0-incubator/fontbox-0.8.0-incubator.jar.md5
+                // https://repo1.maven.org/maven2/org/apache/pdfbox/fontbox/0.8.0-incubator/fontbox-0.8.0-incubator.jar.md5
                 if (expected.endsWith(":")) {
                     StringBuffer result = new StringBuffer();
                     char[] chars = csFileContent.substring(spaceIndex + 1).toCharArray();

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/750dbb84/test/java/org/apache/ivy/osgi/obr/OBRParserTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/osgi/obr/OBRParserTest.java b/test/java/org/apache/ivy/osgi/obr/OBRParserTest.java
index 345a846..56dbac5 100644
--- a/test/java/org/apache/ivy/osgi/obr/OBRParserTest.java
+++ b/test/java/org/apache/ivy/osgi/obr/OBRParserTest.java
@@ -59,7 +59,7 @@ public class OBRParserTest extends TestCase {
                 String url0 = md.getAllArtifacts()[0].getUrl().toExternalForm();
                 String type1 = md.getAllArtifacts()[1].getType();
                 String url1 = md.getAllArtifacts()[1].getUrl().toExternalForm();
-                String jarUrl = "http://repo1.maven.org/maven2/org/apache/felix/"
+                String jarUrl = "https://repo1.maven.org/maven2/org/apache/felix/"
                         + "org.apache.felix.bundlerepository/1.0.3/org.apache.felix.bundlerepository-1.0.3.jar";
                 String srcUrl = "http://oscar-osgi.sf.net/obr2/org.apache.felix.bundlerepository/"
                         + "org.apache.felix.bundlerepository-1.0.3-src.jar";

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/750dbb84/test/java/org/apache/ivy/osgi/updatesite/UpdateSiteAndIbiblioResolverTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/osgi/updatesite/UpdateSiteAndIbiblioResolverTest.java b/test/java/org/apache/ivy/osgi/updatesite/UpdateSiteAndIbiblioResolverTest.java
index fd11176..0d83910 100644
--- a/test/java/org/apache/ivy/osgi/updatesite/UpdateSiteAndIbiblioResolverTest.java
+++ b/test/java/org/apache/ivy/osgi/updatesite/UpdateSiteAndIbiblioResolverTest.java
@@ -65,7 +65,7 @@ public class UpdateSiteAndIbiblioResolverTest extends TestCase {
 
         resolver2 = new IBiblioResolver();
         resolver2.setName("maven2");
-        settings.setVariable("ivy.ibiblio.default.artifact.root", "http://repo1.maven.org/maven2/");
+        settings.setVariable("ivy.ibiblio.default.artifact.root", "https://repo1.maven.org/maven2/");
         settings.setVariable("ivy.ibiblio.default.artifact.pattern",
             "[organisation]/[module]/[revision]/[artifact]-[revision].[ext]");
         resolver2.setSettings(settings);

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/750dbb84/test/java/org/apache/ivy/plugins/resolver/IBiblioHelper.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/resolver/IBiblioHelper.java b/test/java/org/apache/ivy/plugins/resolver/IBiblioHelper.java
index e96bfbd..131de90 100644
--- a/test/java/org/apache/ivy/plugins/resolver/IBiblioHelper.java
+++ b/test/java/org/apache/ivy/plugins/resolver/IBiblioHelper.java
@@ -34,9 +34,9 @@ public class IBiblioHelper {
 
     public static String getIBiblioMirror() throws Exception {
         if (!_checked) {
-            String[] mirrors = new String[] {"http://repo1.maven.org/maven/REPOSITORY-V1.txt",
+            String[] mirrors = new String[] {"https://repo1.maven.org/maven/REPOSITORY-V1.txt",
                     "http://www.ibiblio.org/maven"};
-            String[] mirrorsRoot = new String[] {"http://repo1.maven.org/maven",
+            String[] mirrorsRoot = new String[] {"https://repo1.maven.org/maven",
                     "http://www.ibiblio.org/maven"};
 
             long best = -1;

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/750dbb84/test/java/org/apache/ivy/plugins/resolver/IBiblioResolverTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/resolver/IBiblioResolverTest.java b/test/java/org/apache/ivy/plugins/resolver/IBiblioResolverTest.java
index 5166c04..de79421 100644
--- a/test/java/org/apache/ivy/plugins/resolver/IBiblioResolverTest.java
+++ b/test/java/org/apache/ivy/plugins/resolver/IBiblioResolverTest.java
@@ -124,7 +124,7 @@ public class IBiblioResolverTest extends AbstractDependencyResolverTest {
         assertNotNull(l);
         assertEquals(1, l.size());
         assertEquals(
-            "http://repo1.maven.org/maven2/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]",
+            "https://repo1.maven.org/maven2/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]",
             l.get(0));
 
         resolver = (IBiblioResolver) _settings.getResolver("ibiblioD");

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/750dbb84/test/java/org/apache/ivy/plugins/resolver/mirrorlist-fail.txt
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/resolver/mirrorlist-fail.txt b/test/java/org/apache/ivy/plugins/resolver/mirrorlist-fail.txt
index 68062ae..d33fc2c 100644
--- a/test/java/org/apache/ivy/plugins/resolver/mirrorlist-fail.txt
+++ b/test/java/org/apache/ivy/plugins/resolver/mirrorlist-fail.txt
@@ -1,2 +1,2 @@
-http://repo1.maven.org/_this_should_not_exist/
-http://repo1.maven.org/_this_should_not_exist_either/
\ No newline at end of file
+https://repo1.maven.org/_this_should_not_exist/
+https://repo1.maven.org/_this_should_not_exist_either/

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/750dbb84/test/java/org/apache/ivy/plugins/resolver/mirrorlist-failover.txt
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/resolver/mirrorlist-failover.txt b/test/java/org/apache/ivy/plugins/resolver/mirrorlist-failover.txt
index 2ad245f..6944735 100644
--- a/test/java/org/apache/ivy/plugins/resolver/mirrorlist-failover.txt
+++ b/test/java/org/apache/ivy/plugins/resolver/mirrorlist-failover.txt
@@ -1,2 +1,2 @@
-http://repo1.maven.org/_this_should_not_exist/
-http://repo1.maven.org/maven2/
\ No newline at end of file
+https://repo1.maven.org/_this_should_not_exist/
+https://repo1.maven.org/maven2/

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/750dbb84/test/java/org/apache/ivy/plugins/resolver/mirrorlist-solo.txt
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/resolver/mirrorlist-solo.txt b/test/java/org/apache/ivy/plugins/resolver/mirrorlist-solo.txt
index 75c67b2..ad4a8a9 100644
--- a/test/java/org/apache/ivy/plugins/resolver/mirrorlist-solo.txt
+++ b/test/java/org/apache/ivy/plugins/resolver/mirrorlist-solo.txt
@@ -1 +1 @@
-http://repo1.maven.org/maven2/
\ No newline at end of file
+https://repo1.maven.org/maven2/

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/750dbb84/test/java/org/apache/ivy/util/url/HttpclientURLHandlerTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/util/url/HttpclientURLHandlerTest.java b/test/java/org/apache/ivy/util/url/HttpclientURLHandlerTest.java
index 1a8adc5..630a973 100644
--- a/test/java/org/apache/ivy/util/url/HttpclientURLHandlerTest.java
+++ b/test/java/org/apache/ivy/util/url/HttpclientURLHandlerTest.java
@@ -55,7 +55,7 @@ public class HttpclientURLHandlerTest extends TestCase {
         URLHandler handler = new HttpClientHandler();
         URLInfo info = handler
                 .getURLInfo(new URL(
-                        "http://repo1.maven.org/maven2/commons-lang/commons-lang/[1.0,3.0[/commons-lang-[1.0,3.0[.pom"));
+                        "https://repo1.maven.org/maven2/commons-lang/commons-lang/[1.0,3.0[/commons-lang-[1.0,3.0[.pom"));
 
         assertEquals(URLHandler.UNAVAILABLE, info);
     }

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/750dbb84/test/test-obr/sources.xml
----------------------------------------------------------------------
diff --git a/test/test-obr/sources.xml b/test/test-obr/sources.xml
index e4ddcc5..7bb94ac 100644
--- a/test/test-obr/sources.xml
+++ b/test/test-obr/sources.xml
@@ -17,7 +17,7 @@
    under the License.    
 -->
 <repository name='Felix-Releases' lastmodified='20120203022437.168'>
-  <resource id='org.apache.felix.bundlerepository/1.0.3' symbolicname='org.apache.felix.bundlerepository' presentationname='Apache Felix Bundle Repository' uri='http://repo1.maven.org/maven2/org/apache/felix/org.apache.felix.bundlerepository/1.0.3/org.apache.felix.bundlerepository-1.0.3.jar' version='1.0.3'>
+  <resource id='org.apache.felix.bundlerepository/1.0.3' symbolicname='org.apache.felix.bundlerepository' presentationname='Apache Felix Bundle Repository' uri='https://repo1.maven.org/maven2/org/apache/felix/org.apache.felix.bundlerepository/1.0.3/org.apache.felix.bundlerepository-1.0.3.jar' version='1.0.3'>
     <description>Bundle repository service.</description>
     <size>130451</size>
     <documentation>http://oscar-osgi.sf.net/obr2/org.apache.felix.bundlerepository/</documentation>
@@ -41,7 +41,7 @@
     <require name='package' filter='(&amp;(package=org.osgi.framework)(version&gt;=1.3.0))' extend='false' multiple='false' optional='false'>Import package org.osgi.framework ;version=1.3.0</require>
     <require name='package' filter='(&amp;(package=org.osgi.service.obr)(version&gt;=1.0.0))' extend='false' multiple='false' optional='false'>Import package org.osgi.service.obr ;version=1.0.0</require>
   </resource>
-  <resource id='org.apache.felix.eventadmin/1.0.0' symbolicname='org.apache.felix.eventadmin' presentationname='Apache Felix EventAdmin' uri='http://repo1.maven.org/maven2/org/apache/felix/org.apache.felix.eventadmin/1.0.0/org.apache.felix.eventadmin-1.0.0.jar' version='1.0.0'>
+  <resource id='org.apache.felix.eventadmin/1.0.0' symbolicname='org.apache.felix.eventadmin' presentationname='Apache Felix EventAdmin' uri='https://repo1.maven.org/maven2/org/apache/felix/org.apache.felix.eventadmin/1.0.0/org.apache.felix.eventadmin-1.0.0.jar' version='1.0.0'>
     <description>This bundle provides an implementation of the OSGi R4 EventAdmin service.</description>
     <size>73643</size>
     <source>http://felix.apache.org/site/downloads.cgi</source>
@@ -68,4 +68,4 @@
     <require name='package' filter='(&amp;(package=org.osgi.framework)(version&gt;=1.3.0))' extend='false' multiple='false' optional='false'>Import package org.osgi.framework ;version=1.3.0</require>
     <require name='package' filter='(&amp;(package=org.osgi.service.event)(version&gt;=1.1.0))' extend='false' multiple='false' optional='false'>Import package org.osgi.service.event ;version=1.1.0</require>
   </resource>
-</repository>
\ No newline at end of file
+</repository>


[08/35] git commit: IMPROVEMENT: ivy:makepom will generate an exclusion when transitive=false on a dependency (IVY-1470)

Posted by hi...@apache.org.
IMPROVEMENT: ivy:makepom will generate an exclusion when transitive=false on a dependency (IVY-1470)

git-svn-id: https://svn.apache.org/repos/asf/ant/ivy/core/trunk@1592628 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/e484646c
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/e484646c
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/e484646c

Branch: refs/heads/2.4.x
Commit: e484646c60eaca1f89921db7058d8927302d7226
Parents: 8d85139
Author: Maarten Coene <ma...@apache.org>
Authored: Mon May 5 20:56:51 2014 +0000
Committer: Maarten Coene <ma...@apache.org>
Committed: Mon May 5 20:56:51 2014 +0000

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../parser/m2/PomModuleDescriptorWriter.java    | 25 +++++++++---
 .../m2/PomModuleDescriptorWriterTest.java       | 15 +++++++
 .../ivy/plugins/parser/m2/test-transitive.pom   | 42 ++++++++++++++++++++
 .../ivy/plugins/parser/m2/test-transitive.xml   | 24 +++++++++++
 5 files changed, 102 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/e484646c/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 572a09a..b59693e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -144,6 +144,7 @@ for detailed view of each issue, please consult http://issues.apache.org/jira/br
 =====================================
 - IMPROVEMENT: Add support for packed jar within an OSGi bundle
 - IMPROVEMENT: ModuleRules.getRule is O(n) leading to resolution slowness (IVY-1465) (Thanks to Zhong Wang aka Kewpie)
+- IMPROVEMENT: ivy:makepom will generate an exclusion when transitive=false on a dependency (IVY-1470)
 
 - FIX: impossible to get artifacts when data has not been loaded. (IVY-1399) (Thanks to David Turner)
 - FIX: regression introduced by IVY-1457, dependency management wasn't properly handled introducing lots of resolution failures

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/e484646c/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriter.java b/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriter.java
index 5e62288..5cd254a 100644
--- a/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriter.java
+++ b/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriter.java
@@ -228,7 +228,7 @@ public final class PomModuleDescriptorWriter {
                     version = md.getModuleRevisionId().getRevision();
                 }
                 printDependency(out, indent, groupId, dep.getArtifact(), version, dep.getType(),
-                    dep.getClassifier(), dep.getScope(), dep.isOptional(), null);
+                    dep.getClassifier(), dep.getScope(), dep.isOptional(), true, null);
             }
 
             // now print the dependencies listed in the ModuleDescriptor
@@ -251,13 +251,15 @@ public final class PomModuleDescriptorWriter {
                         String scope = mapping.getScope(dds[i].getModuleConfigurations());
                         boolean optional = mapping.isOptional(dds[i].getModuleConfigurations());
                         printDependency(out, indent, mrid.getOrganisation(), mrid.getName(),
-                            mrid.getRevision(), type, classifier, scope, optional, excludes);
+                            mrid.getRevision(), type, classifier, scope, optional,
+                            dds[i].isTransitive(), excludes);
                     }
                 } else {
                     String scope = mapping.getScope(dds[i].getModuleConfigurations());
                     boolean optional = mapping.isOptional(dds[i].getModuleConfigurations());
                     printDependency(out, indent, mrid.getOrganisation(), mrid.getName(),
-                        mrid.getRevision(), null, null, scope, optional, excludes);
+                        mrid.getRevision(), null, null, scope, optional, dds[i].isTransitive(),
+                        excludes);
                 }
             }
 
@@ -270,7 +272,7 @@ public final class PomModuleDescriptorWriter {
 
     private static void printDependency(PrintWriter out, int indent, String groupId,
             String artifactId, String version, String type, String classifier, String scope,
-            boolean isOptional, ExcludeRule[] excludes) {
+            boolean isOptional, boolean isTransitive, ExcludeRule[] excludes) {
         indent(out, indent * 2);
         out.println("<dependency>");
         indent(out, indent * 3);
@@ -295,7 +297,20 @@ public final class PomModuleDescriptorWriter {
             indent(out, indent * 3);
             out.println("<optional>true</optional>");
         }
-        if (excludes != null) {
+        if (!isTransitive) {
+            indent(out, indent * 3);
+            out.println("<exclusions>");
+            indent(out, indent * 4);
+            out.println("<exclusion>");
+            indent(out, indent * 5);
+            out.println("<groupId>*</groupId>");
+            indent(out, indent * 5);
+            out.println("<artifactId>*</artifactId>");
+            indent(out, indent * 4);
+            out.println("</exclusion>");
+            indent(out, indent * 3);
+            out.println("</exclusions>");
+        } else if (excludes != null) {
             printExclusions(excludes, out, indent);
         }
         indent(out, indent * 2);

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/e484646c/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriterTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriterTest.java b/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriterTest.java
index bebd6a7..d37a869 100644
--- a/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriterTest.java
+++ b/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorWriterTest.java
@@ -27,6 +27,7 @@ import junit.framework.TestCase;
 
 import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
 import org.apache.ivy.core.settings.IvySettings;
+import org.apache.ivy.plugins.parser.ModuleDescriptorParserRegistry;
 import org.apache.ivy.util.FileUtil;
 
 public class PomModuleDescriptorWriterTest extends TestCase {
@@ -121,6 +122,20 @@ public class PomModuleDescriptorWriterTest extends TestCase {
         assertEquals(expected, wrote);
     }
 
+    public void testTransitive() throws Exception {
+        ModuleDescriptor md = ModuleDescriptorParserRegistry.getInstance().parseDescriptor(
+            new IvySettings(), getClass().getResource("test-transitive.xml"), false);
+        PomModuleDescriptorWriter.write(md, _dest, getWriterOptions());
+        assertTrue(_dest.exists());
+
+        String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(_dest)))
+                .replaceAll("\r\n", "\n").replace('\r', '\n');
+        System.out.println(wrote);
+        String expected = readEntirely("test-transitive.pom").replaceAll("\r\n", "\n").replace(
+            '\r', '\n');
+        assertEquals(expected, wrote);
+    }
+
     public void testPackaging() throws Exception {
         ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(
             new IvySettings(), getClass().getResource("test-packaging.pom"), false);

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/e484646c/test/java/org/apache/ivy/plugins/parser/m2/test-transitive.pom
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/parser/m2/test-transitive.pom b/test/java/org/apache/ivy/plugins/parser/m2/test-transitive.pom
new file mode 100644
index 0000000..f723715
--- /dev/null
+++ b/test/java/org/apache/ivy/plugins/parser/m2/test-transitive.pom
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>apache</groupId>
+  <artifactId>test-transitive</artifactId>
+  <packaging>jar</packaging>
+  <version>1.0</version>
+  <dependencies>
+    <dependency>
+      <groupId>apache</groupId>
+      <artifactId>ivy</artifactId>
+      <version>1.0</version>
+      <optional>true</optional>
+      <exclusions>
+        <exclusion>
+          <groupId>*</groupId>
+          <artifactId>*</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+  </dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/e484646c/test/java/org/apache/ivy/plugins/parser/m2/test-transitive.xml
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/parser/m2/test-transitive.xml b/test/java/org/apache/ivy/plugins/parser/m2/test-transitive.xml
new file mode 100644
index 0000000..d95cb6d
--- /dev/null
+++ b/test/java/org/apache/ivy/plugins/parser/m2/test-transitive.xml
@@ -0,0 +1,24 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
+<ivy-module version="1.0">
+    <info organisation="apache" module="test-transitive" revision="1.0"/>
+    <dependencies>
+        <dependency org="apache" name="ivy" rev="1.0" transitive="false" />
+    </dependencies>
+</ivy-module>


[15/35] git commit: IVY-1471 : remove the catch of the exception which makes the class not load if the optional jsch-agent jar is missing

Posted by hi...@apache.org.
IVY-1471 : remove the catch of the exception which makes the class not load if the optional jsch-agent jar is missing


git-svn-id: https://svn.apache.org/repos/asf/ant/ivy/core/trunk@1594279 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/fe487b33
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/fe487b33
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/fe487b33

Branch: refs/heads/2.4.x
Commit: fe487b3336f8279d8b74eff05c5ebfe6e01281f0
Parents: 86d1c40
Author: Nicolas Lalevee <hi...@apache.org>
Authored: Tue May 13 16:52:49 2014 +0000
Committer: Nicolas Lalevee <hi...@apache.org>
Committed: Tue May 13 16:52:49 2014 +0000

----------------------------------------------------------------------
 CHANGES.txt                                                  | 1 +
 src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/fe487b33/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b59693e..75c262d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -148,6 +148,7 @@ for detailed view of each issue, please consult http://issues.apache.org/jira/br
 
 - FIX: impossible to get artifacts when data has not been loaded. (IVY-1399) (Thanks to David Turner)
 - FIX: regression introduced by IVY-1457, dependency management wasn't properly handled introducing lots of resolution failures
+- FIX: The SSH resolvers fails if the un-required jsch jar is missing (IVY-1471)
 
    2.4.0-rc1
 =====================================

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/fe487b33/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java b/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java
index f28a6a6..095ec61 100644
--- a/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java
+++ b/src/java/org/apache/ivy/plugins/repository/ssh/SshCache.java
@@ -39,7 +39,6 @@ import com.jcraft.jsch.JSchException;
 import com.jcraft.jsch.Session;
 import com.jcraft.jsch.UIKeyboardInteractive;
 import com.jcraft.jsch.UserInfo;
-import com.jcraft.jsch.agentproxy.AgentProxyException;
 import com.jcraft.jsch.agentproxy.Connector;
 import com.jcraft.jsch.agentproxy.ConnectorFactory;
 import com.jcraft.jsch.agentproxy.RemoteIdentityRepository;
@@ -302,7 +301,7 @@ public final class SshCache {
             Connector con = ConnectorFactory.getDefault().createConnector();
             jsch.setIdentityRepository(new RemoteIdentityRepository(con));
             return true;
-        } catch (AgentProxyException e) {
+        } catch (Exception e) {
             Message.verbose(":: SSH :: Failure connecting to agent :: " + e.toString());
             return false;
         }


[24/35] git commit: getModuleDescriptorParser now takes a file as argument. Currently ivy use XmlModuleDescriptorParser in DefaultResolutionCacheManager and DefaultRepositoryCacheManager by default like in previous versions

Posted by hi...@apache.org.
getModuleDescriptorParser now takes a file as argument. Currently ivy use XmlModuleDescriptorParser in DefaultResolutionCacheManager and DefaultRepositoryCacheManager by default like in previous versions


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/5063d256
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/5063d256
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/5063d256

Branch: refs/heads/2.4.x
Commit: 5063d256221e7fe8a8c433401bea988d7ccb0a35
Parents: 3076802
Author: Jean-Louis Boudart <je...@gmail.com>
Authored: Thu Jul 3 19:27:00 2014 +0200
Committer: Jean-Louis Boudart <je...@gmail.com>
Committed: Thu Jul 3 19:27:00 2014 +0200

----------------------------------------------------------------------
 .../ivy/core/cache/DefaultRepositoryCacheManager.java    | 11 +++++++++--
 .../ivy/core/cache/DefaultResolutionCacheManager.java    | 11 +++++++++--
 2 files changed, 18 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/5063d256/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java b/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java
index b9439a4..55f498d 100644
--- a/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java
+++ b/src/java/org/apache/ivy/core/cache/DefaultRepositoryCacheManager.java
@@ -722,7 +722,7 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
             if (ivyFile.exists()) {
                 // found in cache !
                 try {
-                    ModuleDescriptorParser parser = getModuleDescriptorParser();
+                    ModuleDescriptorParser parser = getModuleDescriptorParser(ivyFile);
                     ModuleDescriptor depMD = getMdFromCache(parser, options, ivyFile);
                     String resolverName = getSavedResolverName(depMD);
                     String artResolverName = getSavedArtResolverName(depMD);
@@ -790,7 +790,14 @@ public class DefaultRepositoryCacheManager implements RepositoryCacheManager, Iv
         return null;
     }
 
-    protected ModuleDescriptorParser getModuleDescriptorParser() {
+    /**
+     * Choose write module descriptor parser for a given moduleDescriptor
+     * 
+     * @param moduleDescriptorFile
+     *            a given module descriptor
+     * @return
+     */
+    protected ModuleDescriptorParser getModuleDescriptorParser(File moduleDescriptorFile) {
         return XmlModuleDescriptorParser.getInstance();
     }
 

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/5063d256/src/java/org/apache/ivy/core/cache/DefaultResolutionCacheManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/cache/DefaultResolutionCacheManager.java b/src/java/org/apache/ivy/core/cache/DefaultResolutionCacheManager.java
index 5ad338c..2683702 100644
--- a/src/java/org/apache/ivy/core/cache/DefaultResolutionCacheManager.java
+++ b/src/java/org/apache/ivy/core/cache/DefaultResolutionCacheManager.java
@@ -155,10 +155,17 @@ public class DefaultResolutionCacheManager implements ResolutionCacheManager, Iv
         ParserSettings pSettings = new CacheParserSettings(settings, paths);
 
         URL ivyFileURL = ivyFile.toURI().toURL();
-        return getModuleDescriptorParser().parseDescriptor(pSettings, ivyFileURL, false);
+        return getModuleDescriptorParser(ivyFile).parseDescriptor(pSettings, ivyFileURL, false);
     }
 
-    protected ModuleDescriptorParser getModuleDescriptorParser() {
+    /**
+     * Choose write module descriptor parser for a given moduleDescriptor
+     * 
+     * @param moduleDescriptorFile
+     *            a given module descriptor
+     * @return
+     */
+    protected ModuleDescriptorParser getModuleDescriptorParser(File moduleDescriptorFile) {
         return XmlModuleDescriptorParser.getInstance();
     }
 


[07/35] git commit: FIX: regression introduced by IVY-1457, dependency management wasn't properly handled introducing lots of resolution failures

Posted by hi...@apache.org.
FIX: regression introduced by IVY-1457, dependency management wasn't properly handled introducing lots of resolution failures

git-svn-id: https://svn.apache.org/repos/asf/ant/ivy/core/trunk@1592624 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/8d851390
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/8d851390
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/8d851390

Branch: refs/heads/2.4.x
Commit: 8d851390736dcb916646b043a5ed7ff8f212e37c
Parents: ff2f32b
Author: Jean-Louis Boudart <jl...@apache.org>
Authored: Mon May 5 19:52:53 2014 +0000
Committer: Jean-Louis Boudart <jl...@apache.org>
Committed: Mon May 5 19:52:53 2014 +0000

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../descriptor/DefaultModuleDescriptor.java     | 20 +++++
 .../module/descriptor/ModuleDescriptor.java     | 14 ++++
 .../apache/ivy/osgi/core/BundleInfoAdapter.java |  6 +-
 .../ivy/osgi/repo/AbstractOSGiResolver.java     |  4 +-
 .../parser/m2/PomModuleDescriptorBuilder.java   | 86 ++++++++++++++------
 .../parser/m2/PomModuleDescriptorParser.java    |  4 +-
 .../parser/xml/XmlModuleDescriptorParser.java   |  1 +
 .../m2/PomModuleDescriptorParserTest.java       |  1 +
 .../xml/XmlModuleDescriptorWriterTest.java      | 17 ++++
 .../xml/test-write-extrainfo-from-maven.xml     | 55 +++++++++++++
 11 files changed, 179 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/8d851390/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 8739f80..572a09a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -146,6 +146,7 @@ for detailed view of each issue, please consult http://issues.apache.org/jira/br
 - IMPROVEMENT: ModuleRules.getRule is O(n) leading to resolution slowness (IVY-1465) (Thanks to Zhong Wang aka Kewpie)
 
 - FIX: impossible to get artifacts when data has not been loaded. (IVY-1399) (Thanks to David Turner)
+- FIX: regression introduced by IVY-1457, dependency management wasn't properly handled introducing lots of resolution failures
 
    2.4.0-rc1
 =====================================

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/8d851390/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java b/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java
index 43de686..1a62d55 100644
--- a/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/DefaultModuleDescriptor.java
@@ -837,10 +837,12 @@ public class DefaultModuleDescriptor implements ModuleDescriptor {
         extraAttributesNamespaces.put(prefix, namespace);
     }
 
+    @Deprecated
     public void addExtraInfo(String infoKey, String value) {
         extraInfo.put(infoKey, value);
     }
 
+    @Deprecated
     public Map getExtraInfo() {
         return extraInfo;
     }
@@ -852,4 +854,22 @@ public class DefaultModuleDescriptor implements ModuleDescriptor {
     public void addExtraInfo(ExtraInfoHolder extraInfo) {
         extraInfos.add(extraInfo);
     }
+
+    public String getExtraInfoContentByTagName(String tagName) {
+        ExtraInfoHolder extraInfoByTagName = getExtraInfoByTagName(tagName);
+        if (extraInfoByTagName != null) {
+            return extraInfoByTagName.getContent();
+        }
+        return null;
+    }
+
+    public ExtraInfoHolder getExtraInfoByTagName(String tagName) {
+        for (ExtraInfoHolder extraInfoHolder : extraInfos) {
+            if (extraInfoHolder.getName().equals(tagName)) {
+                return extraInfoHolder;
+            }
+        }
+        return null;
+
+    }
 }

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/8d851390/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java b/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java
index fc09715..2cc7049 100644
--- a/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java
@@ -272,4 +272,18 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
      * @return
      */
     List<ExtraInfoHolder> getExtraInfos();
+
+    /**
+     * Returns content from first extrainfo matching with given tag name
+     * 
+     * @return
+     */
+    String getExtraInfoContentByTagName(String tagName);
+
+    /**
+     * Returns first extrainfo matching with given tag name
+     * 
+     * @return
+     */
+    ExtraInfoHolder getExtraInfoByTagName(String tagName);
 }

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/8d851390/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java b/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
index 27a24c0..8f269db 100644
--- a/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
+++ b/src/java/org/apache/ivy/osgi/core/BundleInfoAdapter.java
@@ -39,6 +39,7 @@ import org.apache.ivy.core.module.descriptor.DefaultArtifact;
 import org.apache.ivy.core.module.descriptor.DefaultDependencyDescriptor;
 import org.apache.ivy.core.module.descriptor.DefaultExcludeRule;
 import org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor;
+import org.apache.ivy.core.module.descriptor.ExtraInfoHolder;
 import org.apache.ivy.core.module.id.ArtifactId;
 import org.apache.ivy.core.module.id.ModuleId;
 import org.apache.ivy.core.module.id.ModuleRevisionId;
@@ -98,8 +99,9 @@ public class BundleInfoAdapter {
 
         Set<String> exportedPkgNames = new HashSet<String>(bundle.getExports().size());
         for (ExportPackage exportPackage : bundle.getExports()) {
-            md.getExtraInfo().put(EXTRA_INFO_EXPORT_PREFIX + exportPackage.getName(),
-                exportPackage.getVersion().toString());
+            md.getExtraInfos().add(
+                new ExtraInfoHolder(EXTRA_INFO_EXPORT_PREFIX + exportPackage.getName(),
+                        exportPackage.getVersion().toString()));
             exportedPkgNames.add(exportPackage.getName());
             String[] confDependencies = new String[exportPackage.getUses().size() + 1];
             int i = 0;

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/8d851390/src/java/org/apache/ivy/osgi/repo/AbstractOSGiResolver.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/osgi/repo/AbstractOSGiResolver.java b/src/java/org/apache/ivy/osgi/repo/AbstractOSGiResolver.java
index 44c4e0a..45e92ed 100644
--- a/src/java/org/apache/ivy/osgi/repo/AbstractOSGiResolver.java
+++ b/src/java/org/apache/ivy/osgi/repo/AbstractOSGiResolver.java
@@ -197,8 +197,8 @@ public abstract class AbstractOSGiResolver extends BasicResolver {
             ModuleDescriptor md) {
         String org = dd.getDependencyRevisionId().getOrganisation();
         String name = dd.getDependencyRevisionId().getName();
-        String rev = (String) md.getExtraInfo().get(
-            BundleInfoAdapter.EXTRA_INFO_EXPORT_PREFIX + name);
+        String rev = md.getExtraInfoContentByTagName(BundleInfoAdapter.EXTRA_INFO_EXPORT_PREFIX
+                + name);
         ModuleRevisionId capabilityRev = ModuleRevisionId.newInstance(org, name, rev,
             Collections.singletonMap(CAPABILITY_EXTRA_ATTR, md.getModuleRevisionId().toString()));
 

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/8d851390/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java b/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
index 0eebff8..3d18b02 100644
--- a/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
+++ b/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
@@ -41,6 +41,7 @@ import org.apache.ivy.core.module.descriptor.DefaultDependencyDescriptor;
 import org.apache.ivy.core.module.descriptor.DefaultExcludeRule;
 import org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor;
 import org.apache.ivy.core.module.descriptor.DependencyDescriptor;
+import org.apache.ivy.core.module.descriptor.ExtraInfoHolder;
 import org.apache.ivy.core.module.descriptor.License;
 import org.apache.ivy.core.module.descriptor.MDArtifact;
 import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
@@ -367,11 +368,11 @@ public class PomModuleDescriptorBuilder {
         ivyModuleDescriptor.addDependencyManagement(dep);
 
         String key = getDependencyMgtExtraInfoKeyForVersion(dep.getGroupId(), dep.getArtifactId());
-        ivyModuleDescriptor.addExtraInfo(key, dep.getVersion());
+        overwriteExtraInfoIfExists(key, dep.getVersion());
         if (dep.getScope() != null) {
             String scopeKey = getDependencyMgtExtraInfoKeyForScope(dep.getGroupId(),
                 dep.getArtifactId());
-            ivyModuleDescriptor.addExtraInfo(scopeKey, dep.getScope());
+            overwriteExtraInfoIfExists(scopeKey, dep.getScope());
         }
         if (!dep.getExcludedModules().isEmpty()) {
             final String exclusionPrefix = getDependencyMgtExtraInfoPrefixForExclusion(
@@ -379,7 +380,7 @@ public class PomModuleDescriptorBuilder {
             int index = 0;
             for (final Iterator iter = dep.getExcludedModules().iterator(); iter.hasNext();) {
                 final ModuleId excludedModule = (ModuleId) iter.next();
-                ivyModuleDescriptor.addExtraInfo(
+                overwriteExtraInfoIfExists(
                     exclusionPrefix + index,
                     excludedModule.getOrganisation() + EXTRA_INFO_DELIMITER
                             + excludedModule.getName());
@@ -396,18 +397,25 @@ public class PomModuleDescriptorBuilder {
     public void addPlugin(PomDependencyMgt plugin) {
         String pluginValue = plugin.getGroupId() + EXTRA_INFO_DELIMITER + plugin.getArtifactId()
                 + EXTRA_INFO_DELIMITER + plugin.getVersion();
-        String pluginExtraInfo = (String) ivyModuleDescriptor.getExtraInfo().get("m:maven.plugins");
+        ExtraInfoHolder extraInfoByTagName = ivyModuleDescriptor
+                .getExtraInfoByTagName("m:maven.plugins");
+        if (extraInfoByTagName == null) {
+            extraInfoByTagName = new ExtraInfoHolder();
+            extraInfoByTagName.setName("m:maven.plugins");
+            ivyModuleDescriptor.addExtraInfo(extraInfoByTagName);
+        }
+        String pluginExtraInfo = extraInfoByTagName.getContent();
         if (pluginExtraInfo == null) {
             pluginExtraInfo = pluginValue;
         } else {
             pluginExtraInfo = pluginExtraInfo + "|" + pluginValue;
         }
-        ivyModuleDescriptor.getExtraInfo().put("m:maven.plugins", pluginExtraInfo);
+        extraInfoByTagName.setContent(pluginExtraInfo);
     }
 
     public static List /* <PomDependencyMgt> */getPlugins(ModuleDescriptor md) {
         List result = new ArrayList();
-        String plugins = (String) md.getExtraInfo().get("m:maven.plugins");
+        String plugins = md.getExtraInfoContentByTagName("m:maven.plugins");
         if (plugins == null) {
             return new ArrayList();
         }
@@ -461,7 +469,7 @@ public class PomModuleDescriptorBuilder {
                 moduleId)).getVersion();
         }
         String key = getDependencyMgtExtraInfoKeyForVersion(dep.getGroupId(), dep.getArtifactId());
-        return (String) ivyModuleDescriptor.getExtraInfo().get(key);
+        return ivyModuleDescriptor.getExtraInfoContentByTagName(key);
     }
 
     private String getDefaultScope(PomDependencyData dep) {
@@ -472,7 +480,7 @@ public class PomModuleDescriptorBuilder {
                 moduleId)).getScope();
         } else {
             String key = getDependencyMgtExtraInfoKeyForScope(dep.getGroupId(), dep.getArtifactId());
-            result = (String) ivyModuleDescriptor.getExtraInfo().get(key);
+            result = ivyModuleDescriptor.getExtraInfoContentByTagName(key);
         }
         if ((result == null) || !MAVEN2_CONF_MAPPING.containsKey(result)) {
             result = "compile";
@@ -511,12 +519,10 @@ public class PomModuleDescriptorBuilder {
         }
         String exclusionPrefix = getDependencyMgtExtraInfoPrefixForExclusion(groupId, artifactId);
         List /* <ModuleId> */exclusionIds = new LinkedList /* <ModuleId> */();
-        Map /* <String,String> */extras = descriptor.getExtraInfo();
-        for (final Iterator entIter = extras.entrySet().iterator(); entIter.hasNext();) {
-            Map.Entry /* <String,String> */ent = (Map.Entry) entIter.next();
-            String key = (String) ent.getKey();
+        for (ExtraInfoHolder extraInfoHolder : descriptor.getExtraInfos()) {
+            String key = extraInfoHolder.getName();
             if (key.startsWith(exclusionPrefix)) {
-                String fullExclusion = (String) ent.getValue();
+                String fullExclusion = extraInfoHolder.getContent();
                 String[] exclusionParts = fullExclusion.split(EXTRA_INFO_DELIMITER);
                 if (exclusionParts.length != 2) {
                     Message.error(WRONG_NUMBER_OF_PARTS_MSG + exclusionParts.length + " : "
@@ -540,16 +546,16 @@ public class PomModuleDescriptorBuilder {
                 ret.put(e.getKey(), dependencyMgt.getVersion());
             }
         } else {
-            for (Iterator iterator = md.getExtraInfo().entrySet().iterator(); iterator.hasNext();) {
-                Map.Entry entry = (Map.Entry) iterator.next();
-                String key = (String) entry.getKey();
+            for (ExtraInfoHolder extraInfoHolder : md.getExtraInfos()) {
+                String key = extraInfoHolder.getName();
                 if ((key).startsWith(DEPENDENCY_MANAGEMENT)) {
                     String[] parts = key.split(EXTRA_INFO_DELIMITER);
                     if (parts.length != DEPENDENCY_MANAGEMENT_KEY_PARTS_COUNT) {
                         Message.warn("what seem to be a dependency management extra info "
                                 + "doesn't match expected pattern: " + key);
                     } else {
-                        ret.put(ModuleId.newInstance(parts[1], parts[2]), entry.getValue());
+                        ret.put(ModuleId.newInstance(parts[1], parts[2]),
+                            extraInfoHolder.getContent());
                     }
                 }
             }
@@ -563,9 +569,8 @@ public class PomModuleDescriptorBuilder {
         if (md instanceof PomModuleDescriptor) {
             result.addAll(((PomModuleDescriptor) md).getDependencyManagementMap().values());
         } else {
-            for (Iterator iterator = md.getExtraInfo().entrySet().iterator(); iterator.hasNext();) {
-                Map.Entry entry = (Map.Entry) iterator.next();
-                String key = (String) entry.getKey();
+            for (ExtraInfoHolder extraInfoHolder : md.getExtraInfos()) {
+                String key = extraInfoHolder.getName();
                 if ((key).startsWith(DEPENDENCY_MANAGEMENT)) {
                     String[] parts = key.split(EXTRA_INFO_DELIMITER);
                     if (parts.length != DEPENDENCY_MANAGEMENT_KEY_PARTS_COUNT) {
@@ -578,8 +583,8 @@ public class PomModuleDescriptorBuilder {
                         String scopeKey = DEPENDENCY_MANAGEMENT + EXTRA_INFO_DELIMITER + parts[1]
                                 + EXTRA_INFO_DELIMITER + parts[2] + EXTRA_INFO_DELIMITER + "scope";
 
-                        String version = (String) md.getExtraInfo().get(versionKey);
-                        String scope = (String) md.getExtraInfo().get(scopeKey);
+                        String version = md.getExtraInfoContentByTagName(versionKey);
+                        String scope = md.getExtraInfoContentByTagName(scopeKey);
 
                         List /* <ModuleId> */exclusions = getDependencyMgtExclusions(md, parts[1],
                             parts[2]);
@@ -592,6 +597,7 @@ public class PomModuleDescriptorBuilder {
         return result;
     }
 
+    @Deprecated
     public void addExtraInfos(Map extraAttributes) {
         for (Iterator it = extraAttributes.entrySet().iterator(); it.hasNext();) {
             Map.Entry entry = (Entry) it.next();
@@ -602,11 +608,31 @@ public class PomModuleDescriptorBuilder {
     }
 
     private void addExtraInfo(String key, String value) {
-        if (!ivyModuleDescriptor.getExtraInfo().containsKey(key)) {
-            ivyModuleDescriptor.addExtraInfo(key, value);
+        if (ivyModuleDescriptor.getExtraInfoContentByTagName(key) == null) {
+            ivyModuleDescriptor.getExtraInfos().add(new ExtraInfoHolder(key, value));
         }
     }
 
+    private void overwriteExtraInfoIfExists(String key, String value) {
+        boolean found = false;
+        for (ExtraInfoHolder extraInfoHolder : ivyModuleDescriptor.getExtraInfos()) {
+            if (extraInfoHolder.getName().equals(key)) {
+                extraInfoHolder.setContent(value);
+                found = false;
+            }
+        }
+        if (!found) {
+            ivyModuleDescriptor.getExtraInfos().add(new ExtraInfoHolder(key, value));
+        }
+    }
+
+    public void addExtraInfos(List<ExtraInfoHolder> extraInfosHolder) {
+        for (ExtraInfoHolder extraInfoHolder : extraInfosHolder) {
+            addExtraInfo(extraInfoHolder.getName(), extraInfoHolder.getContent());
+        }
+    }
+
+    @Deprecated
     public static Map extractPomProperties(Map extraInfo) {
         Map r = new HashMap();
         for (Iterator it = extraInfo.entrySet().iterator(); it.hasNext();) {
@@ -620,6 +646,18 @@ public class PomModuleDescriptorBuilder {
         return r;
     }
 
+    public static Map extractPomProperties(List<ExtraInfoHolder> extraInfos) {
+        Map r = new HashMap();
+        for (ExtraInfoHolder extraInfoHolder : extraInfos) {
+            if ((extraInfoHolder.getName()).startsWith(PROPERTIES)) {
+                String prop = (extraInfoHolder.getName()).substring(PROPERTIES.length()
+                        + EXTRA_INFO_DELIMITER.length());
+                r.put(prop, extraInfoHolder.getContent());
+            }
+        }
+        return r;
+    }
+
     public void addProperty(String propertyName, String value) {
         addExtraInfo(getPropertyExtraInfoKey(propertyName), value);
     }

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/8d851390/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java b/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
index e1274a8..6017e3a 100644
--- a/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
+++ b/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
@@ -144,7 +144,7 @@ public final class PomModuleDescriptorParser implements ModuleDescriptorParser {
                 }
                 if (parentDescr != null) {
                     Map parentPomProps = PomModuleDescriptorBuilder
-                            .extractPomProperties(parentDescr.getExtraInfo());
+                            .extractPomProperties(parentDescr.getExtraInfos());
                     for (Iterator iter = parentPomProps.entrySet().iterator(); iter.hasNext();) {
                         Map.Entry prop = (Map.Entry) iter.next();
                         domReader.setProperty((String) prop.getKey(), (String) prop.getValue());
@@ -213,7 +213,7 @@ public final class PomModuleDescriptorParser implements ModuleDescriptorParser {
                 domReader.setProperty("version", version);
 
                 if (parentDescr != null) {
-                    mdBuilder.addExtraInfos(parentDescr.getExtraInfo());
+                    mdBuilder.addExtraInfos(parentDescr.getExtraInfos());
 
                     // add dependency management info from parent
                     List depMgt = PomModuleDescriptorBuilder.getDependencyManagements(parentDescr);

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/8d851390/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java b/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
index 800b963..b70f2a3 100644
--- a/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
+++ b/src/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParser.java
@@ -563,6 +563,7 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
             }
 
             descriptor.getExtraInfo().putAll(parent.getExtraInfo());
+            descriptor.getExtraInfos().addAll(parent.getExtraInfos());
         }
 
         private static String mergeRevisionValue(String inherited, String override) {

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/8d851390/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java b/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java
index 72112ee..d22d6ab 100644
--- a/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java
+++ b/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java
@@ -622,6 +622,7 @@ public class PomModuleDescriptorParserTest extends AbstractModuleDescriptorParse
             dds[0].getDependencyRevisionId());
         assertEquals("There is no special artifact when there is no classifier", 0,
             dds[0].getAllDependencyArtifacts().length);
+        assertEquals(4, md.getExtraInfos().size());
     }
 
     public void testDependencyManagmentWithScope() throws ParseException, IOException {

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/8d851390/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriterTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriterTest.java b/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriterTest.java
index 1382d8e..86d8407 100644
--- a/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriterTest.java
+++ b/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriterTest.java
@@ -34,6 +34,8 @@ import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
 import org.apache.ivy.core.module.id.ModuleId;
 import org.apache.ivy.core.module.id.ModuleRevisionId;
 import org.apache.ivy.core.settings.IvySettings;
+import org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser;
+import org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParserTest;
 import org.apache.ivy.util.FileUtil;
 
 public class XmlModuleDescriptorWriterTest extends TestCase {
@@ -138,6 +140,21 @@ public class XmlModuleDescriptorWriterTest extends TestCase {
         assertEquals(expected, wrote);
     }
 
+    public void testExtraInfosFromMaven() throws Exception {
+        ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(
+            new IvySettings(),
+            PomModuleDescriptorParserTest.class
+                    .getResource("test-versionPropertyDependencyMgt.pom"), false);
+        XmlModuleDescriptorWriter.write(md, LICENSE, dest);
+
+        assertTrue(dest.exists());
+        String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest)))
+                .replaceAll("\r\n", "\n").replace('\r', '\n');
+        String expected = readEntirely("test-write-extrainfo-from-maven.xml").replaceAll("\r\n",
+            "\n").replace('\r', '\n');
+        assertEquals(expected, wrote);
+    }
+
     public void testExtends() throws Exception {
         ModuleDescriptor md = XmlModuleDescriptorParser.getInstance().parseDescriptor(
             new IvySettings(),

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/8d851390/test/java/org/apache/ivy/plugins/parser/xml/test-write-extrainfo-from-maven.xml
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/parser/xml/test-write-extrainfo-from-maven.xml b/test/java/org/apache/ivy/plugins/parser/xml/test-write-extrainfo-from-maven.xml
new file mode 100644
index 0000000..1c18cd4
--- /dev/null
+++ b/test/java/org/apache/ivy/plugins/parser/xml/test-write-extrainfo-from-maven.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
+<ivy-module version="2.0" xmlns:m="http://ant.apache.org/ivy/maven">
+	<info organisation="org.apache"
+		module="test-depMgt"
+		revision="1.0"
+		status="release"
+		publication="20140429153143"
+	>
+		<description homepage="http://ivy.jayasoft.org/" />
+		<m:properties__commons.logging.version>1.0.4</m:properties__commons.logging.version>
+		<m:properties__commons.collections.version>1.0.5</m:properties__commons.collections.version>
+		<m:dependency.management__commons-logging__commons-logging__version>1.0.4</m:dependency.management__commons-logging__commons-logging__version>
+		<m:dependency.management__commons-collections__commons-collections__version>1.0.5</m:dependency.management__commons-collections__commons-collections__version>
+		<m:dependency.management__commons-collections__commons-collections__exclusion_0>javax.mail__mail</m:dependency.management__commons-collections__commons-collections__exclusion_0>
+		<m:dependency.management__commons-collections__commons-collections__exclusion_1>javax.jms__jms</m:dependency.management__commons-collections__commons-collections__exclusion_1>
+	</info>
+	<configurations>
+		<conf name="default" visibility="public" description="runtime dependencies and master artifact can be used with this conf" extends="runtime,master"/>
+		<conf name="master" visibility="public" description="contains only the artifact published by this module itself, with no transitive dependencies"/>
+		<conf name="compile" visibility="public" description="this is the default scope, used if none is specified. Compile dependencies are available in all classpaths."/>
+		<conf name="provided" visibility="public" description="this is much like compile, but indicates you expect the JDK or a container to provide it. It is only available on the compilation classpath, and is not transitive."/>
+		<conf name="runtime" visibility="public" description="this scope indicates that the dependency is not required for compilation, but is for execution. It is in the runtime and test classpaths, but not the compile classpath." extends="compile"/>
+		<conf name="test" visibility="private" description="this scope indicates that the dependency is not required for normal use of the application, and is only available for the test compilation and execution phases." extends="runtime"/>
+		<conf name="system" visibility="public" description="this scope is similar to provided except that you have to provide the JAR which contains it explicitly. The artifact is always available and is not looked up in a repository."/>
+		<conf name="sources" visibility="public" description="this configuration contains the source artifact of this module, if any."/>
+		<conf name="javadoc" visibility="public" description="this configuration contains the javadoc artifact of this module, if any."/>
+		<conf name="optional" visibility="public" description="contains all optional dependencies"/>
+	</configurations>
+	<publications>
+		<artifact name="test-depMgt" type="jar" ext="jar" conf="master"/>
+	</publications>
+	<dependencies>
+		<dependency org="commons-logging" name="commons-logging" rev="1.0.4" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
+		<override org="commons-logging" module="commons-logging" matcher="exact" rev="1.0.4"/>
+		<override org="commons-collections" module="commons-collections" matcher="exact" rev="1.0.5"/>
+	</dependencies>
+</ivy-module>


[02/35] git commit: updated CHANGES.txt

Posted by hi...@apache.org.
updated CHANGES.txt

git-svn-id: https://svn.apache.org/repos/asf/ant/ivy/core/trunk@1587305 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/4ed06b32
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/4ed06b32
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/4ed06b32

Branch: refs/heads/2.4.x
Commit: 4ed06b323df7785fa08c74fbc85283556c7057ab
Parents: 069d003
Author: Maarten Coene <ma...@apache.org>
Authored: Mon Apr 14 20:19:53 2014 +0000
Committer: Maarten Coene <ma...@apache.org>
Committed: Mon Apr 14 20:19:53 2014 +0000

----------------------------------------------------------------------
 CHANGES.txt | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/4ed06b32/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b73ae02..94b526b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -140,6 +140,10 @@ for detailed view of each issue, please consult http://issues.apache.org/jira/br
 	
    trunk
 =====================================
+- IMPROVEMENT: Add support for packed jar within an OSGi bundle
+
+   2.4.0-rc1
+=====================================
 - DOCUMENTATION: Broken link in <dependency> documentation (IVY-1405)
 - DOCUMENTATION: Explicitly document that threaded use is not supported.
 


[32/35] git commit: Ivy source is now in git

Posted by hi...@apache.org.
Ivy source is now in git

Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/9f5f0c09
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/9f5f0c09
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/9f5f0c09

Branch: refs/heads/2.4.x
Commit: 9f5f0c09886964b75a9804b08ec77ee5bf72e902
Parents: baa1e2b
Author: Nicolas Lalevée <ni...@hibnet.org>
Authored: Sun Oct 26 19:43:16 2014 +0100
Committer: Nicolas Lalevée <ni...@hibnet.org>
Committed: Sun Oct 26 19:43:16 2014 +0100

----------------------------------------------------------------------
 doc/ant.html                       | 4 ++--
 doc/config.js                      | 3 ++-
 doc/extend.html                    | 2 +-
 doc/index.html                     | 2 +-
 doc/install.html                   | 2 +-
 doc/settings/outputters.html       | 4 ++--
 doc/tutorial.html                  | 2 +-
 doc/tutorial/build-repository.html | 2 +-
 doc/tutorial/multiproject.html     | 6 +++---
 9 files changed, 14 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/9f5f0c09/doc/ant.html
----------------------------------------------------------------------
diff --git a/doc/ant.html b/doc/ant.html
index d790b8c..2162b78 100644
--- a/doc/ant.html
+++ b/doc/ant.html
@@ -47,7 +47,7 @@ If you use ant <b>1.5.1</b> or superior, you have to define the tasks you use in
   <taskdef name="ivy-deliver" classname="org.apache.ivy.ant.IvyDeliver"/> 
   <taskdef name="ivy-publish" classname="org.apache.ivy.ant.IvyPublish"/>
 </code>
-<em>Note: the tasks listed above are non exhaustive. For a complete list of tasks with the corresponding classes, see the [[svn:src/java/org/apache/ivy/ant/antlib.xml antlib.xml]] file in svn or the version you use.</em>
+<em>Note: the tasks listed above are non exhaustive. For a complete list of tasks with the corresponding classes, see the [[gitfile:src/java/org/apache/ivy/ant/antlib.xml antlib.xml]] file in git or the version you use.</em>
 
 Then you can use the tasks, but check their name, following samples assume you use the ivy namespace (ivy:xxx tasks), whereas with ant 1.5 you cannot use namespace, and should therefore use ivy-xxx tasks if you have followed the taskdefs above.
 
@@ -100,7 +100,7 @@ ivy.buildlist.ivyfilepath = ivy.xml
 
 ivy.checksums=sha1,md5
 </code>
-<em>For the latest version of these properties, you can check the [[svn:src/java/org/apache/ivy/core/settings/ivy.properties svn version]].</em>
+<em>For the latest version of these properties, you can check the [[gitfile:src/java/org/apache/ivy/core/settings/ivy.properties git version]].</em>
 
 <span class="since">since 2.0</span> After calling the first Ivy task, the property ivy.version will be available and contains the version of the used Ivy library. 
 

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/9f5f0c09/doc/config.js
----------------------------------------------------------------------
diff --git a/doc/config.js b/doc/config.js
index 2b8b39e..c9e32f8 100644
--- a/doc/config.js
+++ b/doc/config.js
@@ -1,7 +1,8 @@
 xooki.util.mix({debug:true, 
 	jira: {ids: ['IVY'], url: 'https://issues.apache.org/jira'}, 
 	shortcuts: {
-		svn: {pre: 'https://svn.apache.org/repos/asf/ant/ivy/core/trunk/'},
+		gitdir: {pre: 'https://git-wip-us.apache.org/repos/asf?p=ant-ivy.git;a=tree;f='},
+		gitfile: {pre: 'https://git-wip-us.apache.org/repos/asf?p=ant-ivy.git;a=blob;f='},
 		ant: {pre: xooki.c.relativeRoot+'use/', post:'.html'}
 	}
 }, xooki.c, false);

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/9f5f0c09/doc/extend.html
----------------------------------------------------------------------
diff --git a/doc/extend.html b/doc/extend.html
index c0de736..0b6bb75 100644
--- a/doc/extend.html
+++ b/doc/extend.html
@@ -46,7 +46,7 @@ If you still don't find what you need, then you'll have to develop your own plug
 
 All ivy plug-ins use the same code patterns as ant specific tasks for parameters. This means that if you want to have a "myattribute" of type String, you just have to declare a method called setMyattribute(String val) on your plug-in. The same applies to child tags, you just have to follow Ant specifications.
 
-All pluggable code in Ivy is located in the [[svn:src/java/org/apache/ivy/plugins org.apache.ivy.plugins]] package. In each package you will find an interface that you must implement to provide a new plugin. We usually also provide an abstract class easing the implementation and making your code more independent of interface changes. We heavily recommend using these abstract classes as a base class.
+All pluggable code in Ivy is located in the [[gitdir:src/java/org/apache/ivy/plugins org.apache.ivy.plugins]] package. In each package you will find an interface that you must implement to provide a new plugin. We usually also provide an abstract class easing the implementation and making your code more independent of interface changes. We heavily recommend using these abstract classes as a base class.
 
 To understand how your implementation can be done, we suggest looking at existing implementations we provide, it's the best way to get started.
 	</textarea>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/9f5f0c09/doc/index.html
----------------------------------------------------------------------
diff --git a/doc/index.html b/doc/index.html
index 851ccbc..791cfc2 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -48,7 +48,7 @@ This documentation has been migrated from the old Ivy web site hosted by Jayasof
 
 If you browse this documentation from your installation of Ivy, you can also check the <a href="http://ant.apache.org/ivy/">online version</a> for the latest updates.
 
-You can also browse this documentation offline either by downloading the documentation distribution, or by checking out the doc directory from svn. This documentation uses <a href="http://xooki.sourceforge.net/">xooki</a> as its documentation engine, so you can very easily [[get-involved edit it and submit patches]] when you browse it from source.
+You can also browse this documentation offline either by downloading the documentation distribution, or by checking out the doc directory from git. This documentation uses <a href="http://xooki.sourceforge.net/">xooki</a> as its documentation engine, so you can very easily [[get-involved edit it and submit patches]] when you browse it from source.
 
 A <a href="book.html">printer-friendly version</a> of this whole documentation is also provided for your convenience.
 

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/9f5f0c09/doc/install.html
----------------------------------------------------------------------
diff --git a/doc/install.html b/doc/install.html
index 864b71e..34f69e5 100644
--- a/doc/install.html
+++ b/doc/install.html
@@ -82,7 +82,7 @@ If you want to use Ivy only in your ant build scripts, and have an internet conn
     </target>
 </code>
 
-Then the only thing to do is to add the init-ivy target in the depends attribute of your targets using Ivy, and add the ivy namespace to your build script. See the self contained [[svn:src/example/go-ivy/build.xml go-ivy]] example for details about this.
+Then the only thing to do is to add the init-ivy target in the depends attribute of your targets using Ivy, and add the ivy namespace to your build script. See the self contained [[gitfile:src/example/go-ivy/build.xml go-ivy]] example for details about this.
 	</textarea>
 <script type="text/javascript">xooki.postProcess();</script>
 </body>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/9f5f0c09/doc/settings/outputters.html
----------------------------------------------------------------------
diff --git a/doc/settings/outputters.html b/doc/settings/outputters.html
index 8cb587f..3322b26 100644
--- a/doc/settings/outputters.html
+++ b/doc/settings/outputters.html
@@ -32,7 +32,7 @@ A report outputter is used at the end of the resolve process to generate a repor
 
 Two report outputters are registered by default:
 <ul>
-<li>a log report outputter ([[svn:src/java/org/apache/ivy/plugins/report/LogReportOutputter.java LogReportOutputter]])</li>which produces the output on the console at the end of the resolve, which looks like this:
+<li>a log report outputter ([[gitfile:src/java/org/apache/ivy/plugins/report/LogReportOutputter.java LogReportOutputter]])</li>which produces the output on the console at the end of the resolve, which looks like this:
 <code>
         ---------------------------------------------------------------------
         |                  |            modules            ||   artifacts   |
@@ -41,7 +41,7 @@ Two report outputters are registered by default:
         |      default     |   1   |   1   |   0   |   0   ||   1   |   1   |
         ---------------------------------------------------------------------
 </code>
-<li>an xml report outputter ([[svn:src/java/org/apache/ivy/plugins/report/XmlReportOutputter.java XmlReportOutputter]])</li>which produces an xml report in the cache, which is mandatory for correct Ivy behaviour, since it's that report which is used when you do a post resolve step in a separate build from the resolve itself. It's also this xml report which is processed to generate all the different reports available in the [[ant:report]] task.
+<li>an xml report outputter ([[gitfile:src/java/org/apache/ivy/plugins/report/XmlReportOutputter.java XmlReportOutputter]])</li>which produces an xml report in the cache, which is mandatory for correct Ivy behaviour, since it's that report which is used when you do a post resolve step in a separate build from the resolve itself. It's also this xml report which is processed to generate all the different reports available in the [[ant:report]] task.
 </ul>
 
 The child tag used for the parser must be equal to a name of a report outputter type (added with the typedef tag).

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/9f5f0c09/doc/tutorial.html
----------------------------------------------------------------------
diff --git a/doc/tutorial.html b/doc/tutorial.html
index ce4e4c3..caab0ed 100644
--- a/doc/tutorial.html
+++ b/doc/tutorial.html
@@ -37,7 +37,7 @@ For the first tutorial you won't even have to install Ivy (assuming you have Ant
 </ol>
 If you have any trouble, check the <a href="http://ant.apache.org/ivy/faq.html">FAQ</a>. It is most likely related to your internet connection (proxy anyone?).
 
-OK, you've just seen how easy it is to take your first step with Ivy. Go ahead with the other tutorials, but before you do, make sure you have properly <a href="install.html">installed</a> Ivy and downloaded the tutorials sources (included in all Ivy distributions, in the <tt>[[svn:src/example]]</tt> directory).
+OK, you've just seen how easy it is to take your first step with Ivy. Go ahead with the other tutorials, but before you do, make sure you have properly <a href="install.html">installed</a> Ivy and downloaded the tutorials sources (included in all Ivy distributions, in the <tt>[[gitdir:src/example]]</tt> directory).
 
 The following tutorials are available:
 <ul>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/9f5f0c09/doc/tutorial/build-repository.html
----------------------------------------------------------------------
diff --git a/doc/tutorial/build-repository.html b/doc/tutorial/build-repository.html
index b1ce713..cc617f0 100644
--- a/doc/tutorial/build-repository.html
+++ b/doc/tutorial/build-repository.html
@@ -50,7 +50,7 @@ Main targets:
 Default target: basic
 </pre></div>
 <br/><br/>
-This project is accessible in the [[svn:src/example/build-a-ivy-repository src/example/build-a-ivy-repository]]
+This project is accessible in the [[gitdir:src/example/build-a-ivy-repository src/example/build-a-ivy-repository]]
 
 Next steps:
 [[tutorial/build-repository/basic]]

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/9f5f0c09/doc/tutorial/multiproject.html
----------------------------------------------------------------------
diff --git a/doc/tutorial/multiproject.html b/doc/tutorial/multiproject.html
index 0a0038d..a7f3a10 100644
--- a/doc/tutorial/multiproject.html
+++ b/doc/tutorial/multiproject.html
@@ -53,11 +53,11 @@ As you can see, we have here a pretty interesting set of modules with dependenci
 <h1>The example files</h1>
 The sources for this tutorial can be found in <tt>src/example/multi-project</tt> in the Ivy distribution. In this directory, you will find the following files:
 <ul>
-<li>[[svn:src/example/multi-project/build.xml build.xml]]</li>This is a root build file which can be used to call targets on all modules, in the order of their dependencies (ensuring that a module is always built before any module depending on it, for instance)
+<li>[[gitfile:src/example/multi-project/build.xml build.xml]]</li>This is a root build file which can be used to call targets on all modules, in the order of their dependencies (ensuring that a module is always built before any module depending on it, for instance)
 <li>common
 <ul>
-<li>[[svn:src/example/multi-project/common/common.xml common.xml]]</li> the common build file imported by all build.xml files for each project. This build defines the targets which can be used in all projects.
-<li>[[svn:src/example/multi-project/common/build.properties build.properties]]</li>some properties common to all projects
+<li>[[gitfile:src/example/multi-project/common/common.xml common.xml]]</li> the common build file imported by all build.xml files for each project. This build defines the targets which can be used in all projects.
+<li>[[gitfile:src/example/multi-project/common/build.properties build.properties]]</li>some properties common to all projects
 </ul>
 </li>
 <li>projects</li>


[33/35] git commit: IVY-1452: NullPointerException when accessing charset to invalid URL (Thanks to Frédéric Riviere)

Posted by hi...@apache.org.
IVY-1452: NullPointerException when accessing charset to invalid URL (Thanks to Frédéric Riviere)

Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/902a6809
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/902a6809
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/902a6809

Branch: refs/heads/2.4.x
Commit: 902a680951f318488a4bbe0184a3a223c5709b01
Parents: 9f5f0c0
Author: Nicolas Lalevée <ni...@hibnet.org>
Authored: Tue Oct 28 00:36:39 2014 +0100
Committer: Nicolas Lalevée <ni...@hibnet.org>
Committed: Tue Oct 28 00:36:39 2014 +0100

----------------------------------------------------------------------
 CHANGES.txt                                           | 1 +
 src/java/org/apache/ivy/util/url/ApacheURLLister.java | 9 ++++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/902a6809/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 047cea0..4d18a9d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -153,6 +153,7 @@ for detailed view of each issue, please consult http://issues.apache.org/jira/br
 - FIX: The SSH resolvers fails if the un-required jsch jar is missing (IVY-1471)
 - FIX: failed to resolve dynamic revisions in some cases for URL repositories (IVY-1472)
 - FIX: ClassCastException in Eclipse 4.4.1 (IVY-1487) (Thanks to Carsten Pfeiffer)
+- FIX: NullPointerException when accessing charset to invalid URL (IVY-1452) (Thanks to Frédéric Riviere)
 
    2.4.0-rc1
 =====================================

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/902a6809/src/java/org/apache/ivy/util/url/ApacheURLLister.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/util/url/ApacheURLLister.java b/src/java/org/apache/ivy/util/url/ApacheURLLister.java
index 1b92fb8..2df69b0 100644
--- a/src/java/org/apache/ivy/util/url/ApacheURLLister.java
+++ b/src/java/org/apache/ivy/util/url/ApacheURLLister.java
@@ -29,6 +29,7 @@ import java.util.regex.Pattern;
 
 import org.apache.ivy.util.FileUtil;
 import org.apache.ivy.util.Message;
+import org.apache.ivy.util.url.URLHandler.URLInfo;
 
 /**
  * Utility class which helps to list urls under a given url. This has been tested with Apache 1.3.33
@@ -108,7 +109,13 @@ public class ApacheURLLister {
         }
 
         URLHandler urlHandler = URLHandlerRegistry.getDefault();
-        String charset = urlHandler.getURLInfo(url).getBodyCharset();
+        URLInfo urlInfo = urlHandler.getURLInfo(url);
+        if (urlInfo == URLHandler.UNAVAILABLE) {
+            return urlList; // not found => return empty list
+        }
+        // here, urlInfo is valid
+        String charset = urlInfo.getBodyCharset();
+
         InputStream contentStream = urlHandler.openStream(url);
         BufferedReader r = new BufferedReader(new InputStreamReader(contentStream, charset));
 


[16/35] git commit: FIX: failed to resolve dynamic revisions in some cases for URL repositories (IVY-1472)

Posted by hi...@apache.org.
FIX: failed to resolve dynamic revisions in some cases for URL repositories (IVY-1472)

git-svn-id: https://svn.apache.org/repos/asf/ant/ivy/core/trunk@1596968 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/3e5c9e3c
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/3e5c9e3c
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/3e5c9e3c

Branch: refs/heads/2.4.x
Commit: 3e5c9e3cfe8588f85ec8dcab879c1371901b94ba
Parents: fe487b3
Author: Maarten Coene <ma...@apache.org>
Authored: Thu May 22 21:12:24 2014 +0000
Committer: Maarten Coene <ma...@apache.org>
Committed: Thu May 22 21:12:24 2014 +0000

----------------------------------------------------------------------
 CHANGES.txt                                           |  1 +
 .../ivy/plugins/resolver/util/ResolverHelper.java     | 14 +++++---------
 2 files changed, 6 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/3e5c9e3c/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 75c262d..ddf8591 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -149,6 +149,7 @@ for detailed view of each issue, please consult http://issues.apache.org/jira/br
 - FIX: impossible to get artifacts when data has not been loaded. (IVY-1399) (Thanks to David Turner)
 - FIX: regression introduced by IVY-1457, dependency management wasn't properly handled introducing lots of resolution failures
 - FIX: The SSH resolvers fails if the un-required jsch jar is missing (IVY-1471)
+- FIX: failed to resolve dynamic revisions in some cases for URL repositories (IVY-1472)
 
    2.4.0-rc1
 =====================================

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/3e5c9e3c/src/java/org/apache/ivy/plugins/resolver/util/ResolverHelper.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/resolver/util/ResolverHelper.java b/src/java/org/apache/ivy/plugins/resolver/util/ResolverHelper.java
index 7505696..91411a9 100644
--- a/src/java/org/apache/ivy/plugins/resolver/util/ResolverHelper.java
+++ b/src/java/org/apache/ivy/plugins/resolver/util/ResolverHelper.java
@@ -61,10 +61,10 @@ public final class ResolverHelper {
 
             try {
                 Message.debug("\tusing " + rep + " to list all in " + root);
-                List all = rep.list(root);
+                String[] all = listAll(rep, root);
                 if (all != null) {
-                    Message.debug("\t\tfound " + all.size() + " urls");
-                    List ret = new ArrayList(all.size());
+                    Message.debug("\t\tfound " + all.length + " urls");
+                    List<String> ret = new ArrayList<String>(all.length);
                     int endNameIndex = pattern.indexOf(fileSep, slashIndex + 1);
                     String namePattern;
                     if (endNameIndex != -1) {
@@ -75,9 +75,8 @@ public final class ResolverHelper {
                     namePattern = namePattern.replaceAll("\\.", "\\\\.");
                     namePattern = IvyPatternHelper.substituteToken(namePattern, token, "(.+)");
                     Pattern p = Pattern.compile(namePattern);
-                    for (Iterator iter = all.iterator(); iter.hasNext();) {
-                        String path = (String) iter.next();
-                        Matcher m = p.matcher(path.substring(root.length() + 1));
+                    for (String path : all) {
+                        Matcher m = p.matcher(path);
                         if (m.matches()) {
                             String value = m.group(1);
                             ret.add(value);
@@ -88,9 +87,6 @@ public final class ResolverHelper {
                 } else {
                     return null;
                 }
-            } catch (IOException e) {
-                Message.verbose("problem while listing resources in " + root + " with " + rep, e);
-                return null;
             } catch (Exception e) {
                 Message.warn("problem while listing resources in " + root + " with " + rep, e);
                 return null;


[03/35] git commit: update trunk version

Posted by hi...@apache.org.
update trunk version

git-svn-id: https://svn.apache.org/repos/asf/ant/ivy/core/trunk@1587327 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/a3011ace
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/a3011ace
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/a3011ace

Branch: refs/heads/2.4.x
Commit: a3011aceedcc80ca891d9bc7df68e9a54a807ccc
Parents: 4ed06b3
Author: Maarten Coene <ma...@apache.org>
Authored: Mon Apr 14 21:30:45 2014 +0000
Committer: Maarten Coene <ma...@apache.org>
Committed: Mon Apr 14 21:30:45 2014 +0000

----------------------------------------------------------------------
 version.properties | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/a3011ace/version.properties
----------------------------------------------------------------------
diff --git a/version.properties b/version.properties
index 7cf301c..394de0f 100644
--- a/version.properties
+++ b/version.properties
@@ -16,9 +16,9 @@
 #	 * specific language governing permissions and limitations
 #	 * under the License.
 #	 ***************************************************************
-target.ivy.version=2.4.0
+target.ivy.version=2.5.0
 # Following OSGi spec: have to be 3 numbers separated by dots
-target.ivy.bundle.version=2.4.0
+target.ivy.bundle.version=2.5.0
 # in case we want to add a qualifier such as alpha, beta, etc...
 # if non empty, add a '_' at the end of the qualifier, so the version would look like 1.2.3.alpha_200901011200
 target.ivy.bundle.version.qualifier=alpha_


[21/35] git commit: update doap-file after git-migration

Posted by hi...@apache.org.
update doap-file after git-migration


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/eb1ee360
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/eb1ee360
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/eb1ee360

Branch: refs/heads/2.4.x
Commit: eb1ee360d81e6ed707e0de671c39b905ab53e82e
Parents: e16d344
Author: Jan Mat�rne <jh...@apache.org>
Authored: Wed Jun 4 09:53:25 2014 +0200
Committer: Jan Mat�rne <jh...@apache.org>
Committed: Wed Jun 4 09:53:25 2014 +0200

----------------------------------------------------------------------
 doap_Ivy.rdf | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/eb1ee360/doap_Ivy.rdf
----------------------------------------------------------------------
diff --git a/doap_Ivy.rdf b/doap_Ivy.rdf
index bc35c30..97e13ff 100644
--- a/doap_Ivy.rdf
+++ b/doap_Ivy.rdf
@@ -42,10 +42,10 @@
       </Version>
     </release>
     <repository>
-      <SVNRepository>
-        <location rdf:resource="https://svn.apache.org/repos/asf/ant/ivy/core/trunk/"/>
-        <browse rdf:resource="http://svn.apache.org/viewvc/ant/ivy/core/trunk/"/>
-      </SVNRepository>
+      <GitRepository>
+        <location rdf:resource="https://git-wip-us.apache.org/repos/asf/ant-ivy.git"/>
+        <browse rdf:resource="https://git-wip-us.apache.org/repos/asf?p=ant-ivy.git"/>
+      </GitRepository>
     </repository>
   </Project>
 </rdf:RDF>


[11/35] git commit: typo in comment

Posted by hi...@apache.org.
typo in comment

git-svn-id: https://svn.apache.org/repos/asf/ant/ivy/core/trunk@1592701 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/d9a6e77d
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/d9a6e77d
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/d9a6e77d

Branch: refs/heads/2.4.x
Commit: d9a6e77dc2973dafbbd5d6360240d2d7aebbb9d0
Parents: b7cdcc2
Author: Jan Materne <jh...@apache.org>
Authored: Tue May 6 10:07:23 2014 +0000
Committer: Jan Materne <jh...@apache.org>
Committed: Tue May 6 10:07:23 2014 +0000

----------------------------------------------------------------------
 src/etc/checkstyle/checkstyle-config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/d9a6e77d/src/etc/checkstyle/checkstyle-config
----------------------------------------------------------------------
diff --git a/src/etc/checkstyle/checkstyle-config b/src/etc/checkstyle/checkstyle-config
index 38476d1..ae186c8 100644
--- a/src/etc/checkstyle/checkstyle-config
+++ b/src/etc/checkstyle/checkstyle-config
@@ -20,7 +20,7 @@
 -->
 <module name="Checker">
 
-  <!-- required licence file -->
+  <!-- required license file -->
   <module name="Header">
     <property name="headerFile" value="${checkstyle.src.dir}/RequiredHeader.txt"/>
     <property name="ignoreLines" value="2"/>


[22/35] git commit: Add xooki as submodule

Posted by hi...@apache.org.
Add xooki as submodule


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/30df1007
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/30df1007
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/30df1007

Branch: refs/heads/2.4.x
Commit: 30df1007424921749d00ca922bfdecdac187918f
Parents: eb1ee36
Author: Jean-Louis Boudart <je...@gmail.com>
Authored: Thu Jun 12 18:46:35 2014 +0200
Committer: Jean-Louis Boudart <je...@gmail.com>
Committed: Thu Jun 12 18:46:35 2014 +0200

----------------------------------------------------------------------
 .gitmodules | 3 +++
 doc/xooki   | 1 +
 2 files changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/30df1007/.gitmodules
----------------------------------------------------------------------
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..d8b91df
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "doc/xooki"]
+	path = doc/xooki
+	url = git://git.apache.org/ant-xooki.git

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/30df1007/doc/xooki
----------------------------------------------------------------------
diff --git a/doc/xooki b/doc/xooki
new file mode 160000
index 0000000..38eff00
--- /dev/null
+++ b/doc/xooki
@@ -0,0 +1 @@
+Subproject commit 38eff00e65ec74803838b52a111cab542cb80bca


[20/35] git commit: Moved .idea and *.iml ignores right after .classpath ignore

Posted by hi...@apache.org.
Moved .idea and *.iml ignores right after .classpath ignore


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/e16d344f
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/e16d344f
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/e16d344f

Branch: refs/heads/2.4.x
Commit: e16d344f987cfca9a39adc929ad16102aa9bea87
Parents: a60969f 4cdcea4
Author: Maarten Coene <ma...@apache.org>
Authored: Thu May 22 23:29:06 2014 +0200
Committer: Maarten Coene <ma...@apache.org>
Committed: Tue May 27 00:52:26 2014 +0200

----------------------------------------------------------------------

----------------------------------------------------------------------



[28/35] git commit: Minor change in pomModuleDescriptor, we expect to set extraInfo if key doesn't exist

Posted by hi...@apache.org.
Minor change in pomModuleDescriptor, we expect to set extraInfo if key doesn't exist


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/a6b9ca3f
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/a6b9ca3f
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/a6b9ca3f

Branch: refs/heads/2.4.x
Commit: a6b9ca3f71d44dbe2562e13d63e4b30fcaccdf50
Parents: db5101c
Author: Jean-Louis Boudart <je...@gmail.com>
Authored: Mon Aug 18 19:12:44 2014 +0200
Committer: Jean-Louis Boudart <je...@gmail.com>
Committed: Mon Aug 18 19:12:44 2014 +0200

----------------------------------------------------------------------
 .../apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/a6b9ca3f/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java b/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
index 896c533..40a007a 100644
--- a/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
+++ b/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
@@ -608,7 +608,7 @@ public class PomModuleDescriptorBuilder {
     }
 
     private void addExtraInfo(String key, String value) {
-        if (ivyModuleDescriptor.getExtraInfoContentByTagName(key) == null) {
+        if (ivyModuleDescriptor.getExtraInfoByTagName(key) == null) {
             ivyModuleDescriptor.getExtraInfos().add(new ExtraInfoHolder(key, value));
         }
     }


[23/35] git commit: Fix IVY-1465 (performance issue from trunk)

Posted by hi...@apache.org.
Fix IVY-1465 (performance issue from trunk)


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/3076802a
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/3076802a
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/3076802a

Branch: refs/heads/2.4.x
Commit: 3076802a78f14eb1b4f23831d5a1ccec79b26554
Parents: 30df100
Author: Jean-Louis Boudart <je...@gmail.com>
Authored: Thu Jun 26 22:26:54 2014 +0200
Committer: Jean-Louis Boudart <je...@gmail.com>
Committed: Thu Jun 26 22:26:54 2014 +0200

----------------------------------------------------------------------
 .../apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/3076802a/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java b/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
index 3d18b02..199cd19 100644
--- a/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
+++ b/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java
@@ -618,7 +618,7 @@ public class PomModuleDescriptorBuilder {
         for (ExtraInfoHolder extraInfoHolder : ivyModuleDescriptor.getExtraInfos()) {
             if (extraInfoHolder.getName().equals(key)) {
                 extraInfoHolder.setContent(value);
-                found = false;
+                found = true;
             }
         }
         if (!found) {


[31/35] git commit: IMPROVEMENT: Generate POMs with /xsd/maven-4.0.0.xsd reference instead of old /maven-v4_0_0.xsd (IVY-1491) (thanks to Hervé Boutemy)

Posted by hi...@apache.org.
IMPROVEMENT: Generate POMs with /xsd/maven-4.0.0.xsd reference instead of old /maven-v4_0_0.xsd (IVY-1491) (thanks to Hervé Boutemy)


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/baa1e2b1
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/baa1e2b1
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/baa1e2b1

Branch: refs/heads/2.4.x
Commit: baa1e2b1399d22e0c29353cbade254a9646a93a1
Parents: 5f9c83b
Author: Maarten Coene <ma...@apache.org>
Authored: Tue Oct 21 00:01:20 2014 +0200
Committer: Maarten Coene <ma...@apache.org>
Committed: Tue Oct 21 00:01:20 2014 +0200

----------------------------------------------------------------------
 CHANGES.txt                                                     | 5 +++--
 doc/use/makepom.html                                            | 2 +-
 src/etc/makepom/pom.template                                    | 2 +-
 src/java/org/apache/ivy/plugins/parser/m2/pom.template          | 2 +-
 test/java/org/apache/ivy/plugins/parser/m2/mule-1.3.3.pom       | 2 +-
 .../apache/ivy/plugins/parser/m2/spring-hibernate3-2.0.2.pom    | 2 +-
 test/java/org/apache/ivy/plugins/parser/m2/test-large-pom.pom   | 2 +-
 test/java/org/apache/ivy/plugins/parser/m2/test-transitive.pom  | 2 +-
 .../ivy/plugins/parser/m2/test-write-compile-dependencies.xml   | 2 +-
 .../ivy/plugins/parser/m2/test-write-dependencies-optional.xml  | 2 +-
 .../parser/m2/test-write-dependencies-with-classifier.xml       | 2 +-
 .../plugins/parser/m2/test-write-dependencies-with-scope.xml    | 2 +-
 .../ivy/plugins/parser/m2/test-write-dependencies-with-type.xml | 2 +-
 .../org/apache/ivy/plugins/parser/m2/test-write-packaging.xml   | 2 +-
 .../ivy/plugins/parser/m2/test-write-simple-dependencies.xml    | 2 +-
 .../java/org/apache/ivy/plugins/parser/m2/test-write-simple.xml | 2 +-
 .../ivy/plugins/parser/m2/wicket-1.3-incubating-SNAPSHOT.pom    | 2 +-
 17 files changed, 19 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baa1e2b1/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 7fde7ff..047cea0 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -54,7 +54,7 @@ for detailed view of each issue, please consult http://issues.apache.org/jira/br
 	John Gibson
 	Mitch Gitman
 	Scott Goldstein
-	Pierre H�gnestrand
+	Pierre Hägnestrand
 	Scott Hebert
 	Tobias Himstedt
 	Aaron Hachez
@@ -143,6 +143,7 @@ for detailed view of each issue, please consult http://issues.apache.org/jira/br
 	
    trunk
 =====================================
+- IMPROVEMENT: Generate POMs with /xsd/maven-4.0.0.xsd reference instead of old /maven-v4_0_0.xsd (IVY-1491) (thanks to Hervé Boutemy)
 - IMPROVEMENT: Add support for packed jar within an OSGi bundle
 - IMPROVEMENT: ModuleRules.getRule is O(n) leading to resolution slowness (IVY-1465) (Thanks to Zhong Wang aka Kewpie)
 - IMPROVEMENT: ivy:makepom will generate an exclusion when transitive=false on a dependency (IVY-1470)
@@ -828,7 +829,7 @@ for detailed view of each issue, please consult http://issues.apache.org/jira/br
 - FIX: IOException during publish causes NullPointerException (IVY-371)
 - FIX: Comments in ivy.xml duplicated (IVY-336) (thanks to Gilles Scokart)
 - FIX: Ivy failure when the ivy.xml file contains non US-ASCII characters (IVY-346) (thanks to Gilles Scokart)
-- FIX: Urlresolver is not possible to use dynamic revisions on nonstandard repository structure (IVY-350) (thanks to Pierre H�gnestrand)
+- FIX: Urlresolver is not possible to use dynamic revisions on nonstandard repository structure (IVY-350) (thanks to Pierre Hägnestrand)
 
 
    version 1.4.1 - 2006-11-09

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baa1e2b1/doc/use/makepom.html
----------------------------------------------------------------------
diff --git a/doc/use/makepom.html b/doc/use/makepom.html
index 3a5ef2c..2585734 100644
--- a/doc/use/makepom.html
+++ b/doc/use/makepom.html
@@ -58,7 +58,7 @@ The default template that ships with Ivy looks like this:
 ${ivy.pom.license}
 ${ivy.pom.header}
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
   <modelVersion>4.0.0</modelVersion>
   <groupId>${ivy.pom.groupId}</groupId>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baa1e2b1/src/etc/makepom/pom.template
----------------------------------------------------------------------
diff --git a/src/etc/makepom/pom.template b/src/etc/makepom/pom.template
index 1d6ae3f..1fe333d 100644
--- a/src/etc/makepom/pom.template
+++ b/src/etc/makepom/pom.template
@@ -18,7 +18,7 @@
    under the License.    
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
   <modelVersion>4.0.0</modelVersion>
   <parent>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baa1e2b1/src/java/org/apache/ivy/plugins/parser/m2/pom.template
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/parser/m2/pom.template b/src/java/org/apache/ivy/plugins/parser/m2/pom.template
index 50f4e9b..d0d4bd9 100644
--- a/src/java/org/apache/ivy/plugins/parser/m2/pom.template
+++ b/src/java/org/apache/ivy/plugins/parser/m2/pom.template
@@ -20,7 +20,7 @@ SKIP_LINE  ***************************************************************
 ${ivy.pom.license}
 ${ivy.pom.header}
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
   <modelVersion>4.0.0</modelVersion>
   <groupId>${ivy.pom.groupId}</groupId>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baa1e2b1/test/java/org/apache/ivy/plugins/parser/m2/mule-1.3.3.pom
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/parser/m2/mule-1.3.3.pom b/test/java/org/apache/ivy/plugins/parser/m2/mule-1.3.3.pom
index a220183..141a03a 100644
--- a/test/java/org/apache/ivy/plugins/parser/m2/mule-1.3.3.pom
+++ b/test/java/org/apache/ivy/plugins/parser/m2/mule-1.3.3.pom
@@ -18,7 +18,7 @@
    under the License.    
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
     <!-- Version -->
     <modelVersion>4.0.0</modelVersion>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baa1e2b1/test/java/org/apache/ivy/plugins/parser/m2/spring-hibernate3-2.0.2.pom
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/parser/m2/spring-hibernate3-2.0.2.pom b/test/java/org/apache/ivy/plugins/parser/m2/spring-hibernate3-2.0.2.pom
index 5845c3c..5f4e5de 100644
--- a/test/java/org/apache/ivy/plugins/parser/m2/spring-hibernate3-2.0.2.pom
+++ b/test/java/org/apache/ivy/plugins/parser/m2/spring-hibernate3-2.0.2.pom
@@ -17,7 +17,7 @@
    specific language governing permissions and limitations
    under the License.    
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.springframework</groupId>
   <artifactId>spring-hibernate3</artifactId>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baa1e2b1/test/java/org/apache/ivy/plugins/parser/m2/test-large-pom.pom
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/parser/m2/test-large-pom.pom b/test/java/org/apache/ivy/plugins/parser/m2/test-large-pom.pom
index 20bcb0d..a705c97 100644
--- a/test/java/org/apache/ivy/plugins/parser/m2/test-large-pom.pom
+++ b/test/java/org/apache/ivy/plugins/parser/m2/test-large-pom.pom
@@ -24,7 +24,7 @@
 
 <project xmlns="http://maven.apache.org/POM/4.0.0"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
     <modelVersion>4.0.0</modelVersion>
 

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baa1e2b1/test/java/org/apache/ivy/plugins/parser/m2/test-transitive.pom
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/parser/m2/test-transitive.pom b/test/java/org/apache/ivy/plugins/parser/m2/test-transitive.pom
index f723715..53c160c 100644
--- a/test/java/org/apache/ivy/plugins/parser/m2/test-transitive.pom
+++ b/test/java/org/apache/ivy/plugins/parser/m2/test-transitive.pom
@@ -18,7 +18,7 @@
    under the License.    
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
   <modelVersion>4.0.0</modelVersion>
   <groupId>apache</groupId>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baa1e2b1/test/java/org/apache/ivy/plugins/parser/m2/test-write-compile-dependencies.xml
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/parser/m2/test-write-compile-dependencies.xml b/test/java/org/apache/ivy/plugins/parser/m2/test-write-compile-dependencies.xml
index 0e4406c..163e23b 100644
--- a/test/java/org/apache/ivy/plugins/parser/m2/test-write-compile-dependencies.xml
+++ b/test/java/org/apache/ivy/plugins/parser/m2/test-write-compile-dependencies.xml
@@ -18,7 +18,7 @@
    under the License.    
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache</groupId>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baa1e2b1/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-optional.xml
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-optional.xml b/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-optional.xml
index f458dd3..e3c574a 100644
--- a/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-optional.xml
+++ b/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-optional.xml
@@ -18,7 +18,7 @@
    under the License.    
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache</groupId>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baa1e2b1/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-classifier.xml
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-classifier.xml b/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-classifier.xml
index a616727..cf67277 100644
--- a/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-classifier.xml
+++ b/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-classifier.xml
@@ -18,7 +18,7 @@
    under the License.    
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache</groupId>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baa1e2b1/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-scope.xml
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-scope.xml b/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-scope.xml
index 37528c3..9fd6144 100644
--- a/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-scope.xml
+++ b/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-scope.xml
@@ -18,7 +18,7 @@
    under the License.    
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache</groupId>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baa1e2b1/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-type.xml
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-type.xml b/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-type.xml
index 0999a0f..125154c 100644
--- a/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-type.xml
+++ b/test/java/org/apache/ivy/plugins/parser/m2/test-write-dependencies-with-type.xml
@@ -18,7 +18,7 @@
    under the License.    
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache</groupId>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baa1e2b1/test/java/org/apache/ivy/plugins/parser/m2/test-write-packaging.xml
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/parser/m2/test-write-packaging.xml b/test/java/org/apache/ivy/plugins/parser/m2/test-write-packaging.xml
index b1ef8ff..5e5de5d 100644
--- a/test/java/org/apache/ivy/plugins/parser/m2/test-write-packaging.xml
+++ b/test/java/org/apache/ivy/plugins/parser/m2/test-write-packaging.xml
@@ -18,7 +18,7 @@
    under the License.    
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache</groupId>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baa1e2b1/test/java/org/apache/ivy/plugins/parser/m2/test-write-simple-dependencies.xml
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/parser/m2/test-write-simple-dependencies.xml b/test/java/org/apache/ivy/plugins/parser/m2/test-write-simple-dependencies.xml
index 0513571..e2a84e2 100644
--- a/test/java/org/apache/ivy/plugins/parser/m2/test-write-simple-dependencies.xml
+++ b/test/java/org/apache/ivy/plugins/parser/m2/test-write-simple-dependencies.xml
@@ -18,7 +18,7 @@
    under the License.    
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache</groupId>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baa1e2b1/test/java/org/apache/ivy/plugins/parser/m2/test-write-simple.xml
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/parser/m2/test-write-simple.xml b/test/java/org/apache/ivy/plugins/parser/m2/test-write-simple.xml
index 175c530..4d5e867 100644
--- a/test/java/org/apache/ivy/plugins/parser/m2/test-write-simple.xml
+++ b/test/java/org/apache/ivy/plugins/parser/m2/test-write-simple.xml
@@ -18,7 +18,7 @@
    under the License.    
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache</groupId>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/baa1e2b1/test/java/org/apache/ivy/plugins/parser/m2/wicket-1.3-incubating-SNAPSHOT.pom
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/parser/m2/wicket-1.3-incubating-SNAPSHOT.pom b/test/java/org/apache/ivy/plugins/parser/m2/wicket-1.3-incubating-SNAPSHOT.pom
index 044bd9b..b53079c 100644
--- a/test/java/org/apache/ivy/plugins/parser/m2/wicket-1.3-incubating-SNAPSHOT.pom
+++ b/test/java/org/apache/ivy/plugins/parser/m2/wicket-1.3-incubating-SNAPSHOT.pom
@@ -35,7 +35,7 @@
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0"
 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
 	<modelVersion>4.0.0</modelVersion>
 	<parent>


[10/35] git commit: Update Checkstyle, so the Ivy-Check build job could run. https://builds.apache.org/view/A-D/view/Ant/job/Ivy-check

Posted by hi...@apache.org.
Update Checkstyle, so the Ivy-Check build job could run.
https://builds.apache.org/view/A-D/view/Ant/job/Ivy-check

git-svn-id: https://svn.apache.org/repos/asf/ant/ivy/core/trunk@1592699 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/b7cdcc21
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/b7cdcc21
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/b7cdcc21

Branch: refs/heads/2.4.x
Commit: b7cdcc21fecdee61ab9b801848de5b2b18ec1d55
Parents: 2902a9a
Author: Jan Materne <jh...@apache.org>
Authored: Tue May 6 10:06:48 2014 +0000
Committer: Jan Materne <jh...@apache.org>
Committed: Tue May 6 10:06:48 2014 +0000

----------------------------------------------------------------------
 build.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/b7cdcc21/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index b077c48..a9b4c12 100644
--- a/build.xml
+++ b/build.xml
@@ -559,7 +559,7 @@
     
     <!-- Checks Ivy codebase according to ${checkstyle.src.dir}/checkstyle-config  -->
     <target name="checkstyle-internal" depends="jar">
-        <ivy:cachepath organisation="checkstyle" module="checkstyle" revision="4.3"
+        <ivy:cachepath organisation="checkstyle" module="checkstyle" revision="5.0"
                 inline="true" conf="default" pathid="checkstyle.classpath" transitive="true" 
         		log="download-only"/>
         <taskdef resource="checkstyletask.properties" classpathref="checkstyle.classpath" />


[04/35] git commit: FIX: impossible to get artifacts when data has not been loaded (IVY-1399) (thanks to David Turner)

Posted by hi...@apache.org.
FIX: impossible to get artifacts when data has not been loaded (IVY-1399) (thanks to David Turner)

git-svn-id: https://svn.apache.org/repos/asf/ant/ivy/core/trunk@1590442 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/c66b2374
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/c66b2374
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/c66b2374

Branch: refs/heads/2.4.x
Commit: c66b23747627a2b432e0068561d457cab9f97ead
Parents: a3011ac
Author: Antoine Levy-Lambert <an...@apache.org>
Authored: Sun Apr 27 18:19:50 2014 +0000
Committer: Antoine Levy-Lambert <an...@apache.org>
Committed: Sun Apr 27 18:19:50 2014 +0000

----------------------------------------------------------------------
 CHANGES.txt                                     |  3 ++
 .../plugins/conflict/LatestConflictManager.java | 10 ++++++
 .../conflict/LatestConflictManagerTest.java     | 31 ++++++++++++++++++
 .../plugins/conflict/ivysettings-evicted.xml    | 29 +++++++++++++++++
 .../repositories/IVY-1399/MyCompany/A/ivy-1.xml | 32 +++++++++++++++++++
 .../repositories/IVY-1399/MyCompany/B/ivy-1.xml | 33 ++++++++++++++++++++
 .../repositories/IVY-1399/MyCompany/C/ivy-1.xml | 31 ++++++++++++++++++
 .../IVY-1399/MyCompany/target/ivy-1.xml         | 32 +++++++++++++++++++
 .../OtherCompany/prefers-later/ivy-1.xml        | 31 ++++++++++++++++++
 .../conflicting-dependency/dep/ivy-1.xml        | 28 +++++++++++++++++
 .../conflicting-dependency/dep/ivy-2.xml        | 28 +++++++++++++++++
 11 files changed, 288 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/c66b2374/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 94b526b..26a4367 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -126,6 +126,7 @@ for detailed view of each issue, please consult http://issues.apache.org/jira/br
 	John Tinetti
 	Erwin Tratar
 	Jason Trump
+	David Turner
 	Tjeerd Verhagen
 	Richard Vowles
 	Sven Walter
@@ -142,6 +143,8 @@ for detailed view of each issue, please consult http://issues.apache.org/jira/br
 =====================================
 - IMPROVEMENT: Add support for packed jar within an OSGi bundle
 
+- FIX: impossible to get artifacts when data has not been loaded. (IVY-1399) (Thanks to David Turner)
+
    2.4.0-rc1
 =====================================
 - DOCUMENTATION: Broken link in <dependency> documentation (IVY-1405)

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/c66b2374/src/java/org/apache/ivy/plugins/conflict/LatestConflictManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/plugins/conflict/LatestConflictManager.java b/src/java/org/apache/ivy/plugins/conflict/LatestConflictManager.java
index 7c851ac..aafe069 100644
--- a/src/java/org/apache/ivy/plugins/conflict/LatestConflictManager.java
+++ b/src/java/org/apache/ivy/plugins/conflict/LatestConflictManager.java
@@ -103,6 +103,16 @@ public class LatestConflictManager extends AbstractConflictManager {
             }
         }
 
+        ArrayList unevicted = new ArrayList();
+        for (Iterator iter = conflicts.iterator(); iter.hasNext();) {
+            IvyNode node = (IvyNode) iter.next();
+            if (!node.isCompletelyEvicted())
+                unevicted.add(node);
+        }
+        if (unevicted.size() > 0) {
+            conflicts = unevicted;
+        }
+
         try {
             IvyNodeArtifactInfo latest = (IvyNodeArtifactInfo) getStrategy().findLatest(
                 toArtifactInfo(conflicts), null);

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/c66b2374/test/java/org/apache/ivy/plugins/conflict/LatestConflictManagerTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/conflict/LatestConflictManagerTest.java b/test/java/org/apache/ivy/plugins/conflict/LatestConflictManagerTest.java
index 0da1c6e..2596e0a 100644
--- a/test/java/org/apache/ivy/plugins/conflict/LatestConflictManagerTest.java
+++ b/test/java/org/apache/ivy/plugins/conflict/LatestConflictManagerTest.java
@@ -187,6 +187,37 @@ public class LatestConflictManagerTest extends TestCase {
         }
     }
 
+    /*
+     * Test case for issue IVY-1399:
+     * Dependency tree:
+     * Mycompany#target;1
+     *     MyCompany#A;1
+     *         conflicting-dependency#dep;1
+     *         OtherCompany#prefers-later;1
+     *             conflicting-dependency#dep;2
+     *     MyCompany#B;1
+     *         MyCompany#A;1
+     *             ...
+     *         OtherCompany#prefers-later;1
+     *             ...
+     *         MyCompany#C;1
+     *             conflicting-dependency#dep;1
+     */
+    public void testEvictedModules() throws Exception {
+        ivy.configure(LatestConflictManagerTest.class
+                .getResource("ivysettings-evicted.xml"));
+
+        ivy.getSettings().setVariable("ivy.log.conflict.resolution", "true", true);
+        try {
+            ResolveReport report = ivy.resolve(
+                new File("test/repositories/IVY-1399/MyCompany/target/ivy-1.xml"),
+                getResolveOptions());
+            report.getConfigurationReport("all");
+        } catch (IllegalStateException e) {
+            fail("Resolving target should not throw an exception");
+        }
+    }
+
     private ResolveOptions getResolveOptions() {
         return new ResolveOptions().setValidate(false);
     }

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/c66b2374/test/java/org/apache/ivy/plugins/conflict/ivysettings-evicted.xml
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/conflict/ivysettings-evicted.xml b/test/java/org/apache/ivy/plugins/conflict/ivysettings-evicted.xml
new file mode 100644
index 0000000..518c8bf
--- /dev/null
+++ b/test/java/org/apache/ivy/plugins/conflict/ivysettings-evicted.xml
@@ -0,0 +1,29 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
+<ivysettings>
+    <settings defaultCache="${ivy.basedir}/build/cache" defaultResolver="test" defaultConflictManager="latest-revision" />
+
+    <resolvers>
+       <filesystem name="test" latest="latest-revision" checkmodified="true">
+	<artifact pattern="${ivy.basedir}/test/repositories/IVY-1399/[organisation]/[module]/[type]/[artifact]-[revision].[ext]" />
+	<ivy pattern="${ivy.basedir}/test/repositories/IVY-1399/[organisation]/[module]/ivy-[revision].xml" />
+      </filesystem>
+   </resolvers>
+
+</ivysettings>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/c66b2374/test/repositories/IVY-1399/MyCompany/A/ivy-1.xml
----------------------------------------------------------------------
diff --git a/test/repositories/IVY-1399/MyCompany/A/ivy-1.xml b/test/repositories/IVY-1399/MyCompany/A/ivy-1.xml
new file mode 100644
index 0000000..8f9cd76
--- /dev/null
+++ b/test/repositories/IVY-1399/MyCompany/A/ivy-1.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
+<ivy-module version="1.0">
+  <info organisation="MyCompany" module="A" revision="1" status="integration" publication="20140426010101"/>
+  <configurations>
+   <conf name="all"/>
+  </configurations>
+  <publications>
+    <artifact name="A" ext="jar" type="lib" conf="all"/>
+  </publications>
+  <dependencies>
+    <dependency org="conflicting-dependency" name="dep" rev="1" force="true"/>
+    <dependency org="OtherCompany" name="prefers-later" rev="1" force="true"/>
+  </dependencies>
+</ivy-module>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/c66b2374/test/repositories/IVY-1399/MyCompany/B/ivy-1.xml
----------------------------------------------------------------------
diff --git a/test/repositories/IVY-1399/MyCompany/B/ivy-1.xml b/test/repositories/IVY-1399/MyCompany/B/ivy-1.xml
new file mode 100644
index 0000000..eeab6ae
--- /dev/null
+++ b/test/repositories/IVY-1399/MyCompany/B/ivy-1.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
+<ivy-module version="1.0">
+  <info organisation="MyCompany" module="B" revision="1" status="integration" publication="20140426010101"/>
+  <configurations>
+   <conf name="all"/>
+  </configurations>
+  <publications>
+    <artifact name="B" ext="jar" type="lib" conf="all"/>
+  </publications>
+  <dependencies>
+    <dependency org="MyCompany" name="A" rev="1" force="true"/>
+    <dependency org="OtherCompany" name="prefers-later" rev="1" force="true"/>
+    <dependency org="MyCompany" name="C" rev="1" force="true"/>
+  </dependencies>
+</ivy-module>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/c66b2374/test/repositories/IVY-1399/MyCompany/C/ivy-1.xml
----------------------------------------------------------------------
diff --git a/test/repositories/IVY-1399/MyCompany/C/ivy-1.xml b/test/repositories/IVY-1399/MyCompany/C/ivy-1.xml
new file mode 100644
index 0000000..8f09bb0
--- /dev/null
+++ b/test/repositories/IVY-1399/MyCompany/C/ivy-1.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
+<ivy-module version="1.0">
+  <info organisation="MyCompany" module="C" revision="1" status="integration" publication="20140426010101"/>
+  <configurations>
+   <conf name="all"/>
+  </configurations>
+  <publications>
+    <artifact name="C" ext="jar" type="lib" conf="all"/>
+  </publications>
+  <dependencies>
+    <dependency org="conflicting-dependency" name="dep" rev="1" force="true"/>
+  </dependencies>
+</ivy-module>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/c66b2374/test/repositories/IVY-1399/MyCompany/target/ivy-1.xml
----------------------------------------------------------------------
diff --git a/test/repositories/IVY-1399/MyCompany/target/ivy-1.xml b/test/repositories/IVY-1399/MyCompany/target/ivy-1.xml
new file mode 100644
index 0000000..3201088
--- /dev/null
+++ b/test/repositories/IVY-1399/MyCompany/target/ivy-1.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
+<ivy-module version="1.0">
+  <info organisation="MyCompany" module="target" revision="1" status="integration" publication="20140426010101"/>
+  <configurations>
+   <conf name="all"/>
+  </configurations>
+  <publications>
+    <artifact name="target" ext="jar" type="lib" conf="all"/>
+  </publications>
+  <dependencies>
+    <dependency org="MyCompany" name="A" rev="1" force="true"/>
+    <dependency org="MyCompany" name="B" rev="1" force="true"/>
+  </dependencies>
+</ivy-module>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/c66b2374/test/repositories/IVY-1399/OtherCompany/prefers-later/ivy-1.xml
----------------------------------------------------------------------
diff --git a/test/repositories/IVY-1399/OtherCompany/prefers-later/ivy-1.xml b/test/repositories/IVY-1399/OtherCompany/prefers-later/ivy-1.xml
new file mode 100644
index 0000000..200f5f7
--- /dev/null
+++ b/test/repositories/IVY-1399/OtherCompany/prefers-later/ivy-1.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
+<ivy-module version="1.0">
+  <info organisation="OtherCompany" module="prefers-later" revision="1" status="integration" publication="20140426010101"/>
+  <configurations>
+   <conf name="all"/>
+  </configurations>
+  <publications>
+    <artifact name="prefers-later" ext="jar" type="lib" conf="all"/>
+  </publications>
+  <dependencies>
+    <dependency org="conflicting-dependency" name="dep" rev="2" force="true" conf="all"/>
+  </dependencies>
+</ivy-module>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/c66b2374/test/repositories/IVY-1399/conflicting-dependency/dep/ivy-1.xml
----------------------------------------------------------------------
diff --git a/test/repositories/IVY-1399/conflicting-dependency/dep/ivy-1.xml b/test/repositories/IVY-1399/conflicting-dependency/dep/ivy-1.xml
new file mode 100644
index 0000000..80f2609
--- /dev/null
+++ b/test/repositories/IVY-1399/conflicting-dependency/dep/ivy-1.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
+<ivy-module version="1.0">
+  <info organisation="conflicting-dependency" module="dep" revision="1" status="integration" publication="20140423010101"/>
+  <configurations>
+   <conf name="all"/>
+  </configurations>
+  <publications>
+    <artifact name="dep" ext="jar" type="lib" conf="all"/>
+  </publications>
+</ivy-module>

http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/c66b2374/test/repositories/IVY-1399/conflicting-dependency/dep/ivy-2.xml
----------------------------------------------------------------------
diff --git a/test/repositories/IVY-1399/conflicting-dependency/dep/ivy-2.xml b/test/repositories/IVY-1399/conflicting-dependency/dep/ivy-2.xml
new file mode 100644
index 0000000..bfc7e3e
--- /dev/null
+++ b/test/repositories/IVY-1399/conflicting-dependency/dep/ivy-2.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you under the Apache License, Version 2.0 (the
+   "License"); you may not use this file except in compliance
+   with the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing,
+   software distributed under the License is distributed on an
+   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+   KIND, either express or implied.  See the License for the
+   specific language governing permissions and limitations
+   under the License.    
+-->
+<ivy-module version="1.0">
+  <info organisation="conflicting-dependency" module="dep" revision="2" status="integration" publication="20140426010101"/>
+  <configurations>
+   <conf name="all"/>
+  </configurations>
+  <publications>
+    <artifact name="dep" ext="jar" type="lib" conf="all"/>
+  </publications>
+</ivy-module>


[27/35] git commit: files get created during test run

Posted by hi...@apache.org.
files get created during test run


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/db5101c2
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/db5101c2
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/db5101c2

Branch: refs/heads/2.4.x
Commit: db5101c2334417462ece6bad55952f9964da79e6
Parents: 750dbb8
Author: Stefan Bodewig <bo...@apache.org>
Authored: Tue Aug 12 12:44:31 2014 +0200
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Tue Aug 12 12:44:31 2014 +0200

----------------------------------------------------------------------
 .gitignore | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/db5101c2/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 5299ec4..7427c17 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,7 @@ test/test-repo/ivyrepo/org.apache.ivy.osgi
 doc/samples/target-platform/bundles
 doc/samples/target-platform/cache
 *~
+/test/repositories/checkmodified/ivy-1.0.xml
+/test/repositories/checkmodified/mod1.1-1.0.jar
+/test/repositories/norevision/ivy-mod1.1.xml
+/test/repositories/norevision/mod1.1.jar


[35/35] git commit: Merge trunk into 2.4.x

Posted by hi...@apache.org.
Merge trunk into 2.4.x


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/a5bbbec5
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/a5bbbec5
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/a5bbbec5

Branch: refs/heads/2.4.x
Commit: a5bbbec5405c89dff6ae8bf1972a321d38d833f9
Parents: 0d55ab1 b84f786
Author: Nicolas Lalevée <ni...@hibnet.org>
Authored: Tue Oct 28 22:35:36 2014 +0100
Committer: Nicolas Lalevée <ni...@hibnet.org>
Committed: Tue Oct 28 22:35:36 2014 +0100

----------------------------------------------------------------------
 .gitignore                                      |   4 +-
 CHANGES.txt                                     |   3 +
 .../apache/ivy/osgi/core/BundleInfoAdapter.java |   6 +-
 .../ivy/osgi/repo/AbstractOSGiResolver.java     |   4 +-
 .../parser/m2/PomModuleDescriptorBuilder.java   |  86 +++++++++++----
 .../parser/m2/PomModuleDescriptorParser.java    |   4 +-
 .../apache/ivy/util/url/ApacheURLLister.java    |  16 ++-
 .../m2/PomModuleDescriptorParserTest.java       |   1 +
 .../ivy/plugins/parser/m2/test-transitive.pom   |  84 +++++++-------
 .../ivy/plugins/parser/m2/test-transitive.xml   |  48 ++++----
 .../xml/test-write-extrainfo-from-maven.xml     | 110 +++++++++----------
 11 files changed, 211 insertions(+), 155 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/a5bbbec5/CHANGES.txt
----------------------------------------------------------------------


[12/35] git commit: Add some pointer to new api

Posted by hi...@apache.org.
Add some pointer to new api


git-svn-id: https://svn.apache.org/repos/asf/ant/ivy/core/trunk@1593818 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/d37c384b
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/d37c384b
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/d37c384b

Branch: refs/heads/2.4.x
Commit: d37c384b5dd58cb1f9c62bbd9462a23484373ce9
Parents: d9a6e77
Author: Jean-Louis Boudart <jl...@apache.org>
Authored: Sun May 11 17:08:47 2014 +0000
Committer: Jean-Louis Boudart <jl...@apache.org>
Committed: Sun May 11 17:08:47 2014 +0000

----------------------------------------------------------------------
 .../org/apache/ivy/core/module/descriptor/ModuleDescriptor.java     | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/d37c384b/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java b/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java
index 2cc7049..1f85787 100644
--- a/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java
+++ b/src/java/org/apache/ivy/core/module/descriptor/ModuleDescriptor.java
@@ -260,6 +260,7 @@ public interface ModuleDescriptor extends ExtendableItem, ArtifactInfo,
      * Returns the custom info provided in the info tag. All the tags except the description are
      * given. The key is the name of the tag, the value is its content.
      * 
+     * @deprecated please use getExtraInfos() method instead
      * @return
      */
     @Deprecated


[19/35] git commit: Moved .idea and *.iml ignores right after .classpath ignore

Posted by hi...@apache.org.
Moved .idea and *.iml ignores right after .classpath ignore


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/a60969f6
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/a60969f6
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/a60969f6

Branch: refs/heads/2.4.x
Commit: a60969f61f301845d971174881b3be2fd3524644
Parents: f1d68f9
Author: Maarten Coene <ma...@apache.org>
Authored: Thu May 22 23:29:06 2014 +0200
Committer: Maarten Coene <ma...@apache.org>
Committed: Tue May 27 00:48:49 2014 +0200

----------------------------------------------------------------------
 .gitignore | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/a60969f6/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index e3a7943..bdf1753 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,6 @@
 .classpath
+.idea
+*.iml
 .ivy2
 bin
 build
@@ -10,4 +12,4 @@ test/test-repo/bundlerepo/*.jar
 test/test-repo/ivyrepo/org.apache.ivy.osgi
 .DS_Store
 doc/samples/target-platform/bundles
-doc/samples/target-platform/cache
+doc/samples/target-platform/cache
\ No newline at end of file


[09/35] git commit: Fix broken unit test, force publication date on testExtraInfosWithNestedElement as PomParsing can generate a publication date based on file modification date

Posted by hi...@apache.org.
Fix broken unit test, force publication date on testExtraInfosWithNestedElement as PomParsing can generate a publication date based on file modification date

git-svn-id: https://svn.apache.org/repos/asf/ant/ivy/core/trunk@1592662 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/ant-ivy/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant-ivy/commit/2902a9a3
Tree: http://git-wip-us.apache.org/repos/asf/ant-ivy/tree/2902a9a3
Diff: http://git-wip-us.apache.org/repos/asf/ant-ivy/diff/2902a9a3

Branch: refs/heads/2.4.x
Commit: 2902a9a3c07e881dd7aeae0a55189facfab1966c
Parents: e484646
Author: Jean-Louis Boudart <jl...@apache.org>
Authored: Tue May 6 06:16:30 2014 +0000
Committer: Jean-Louis Boudart <jl...@apache.org>
Committed: Tue May 6 06:16:30 2014 +0000

----------------------------------------------------------------------
 .../ivy/plugins/parser/xml/XmlModuleDescriptorWriterTest.java     | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant-ivy/blob/2902a9a3/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriterTest.java
----------------------------------------------------------------------
diff --git a/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriterTest.java b/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriterTest.java
index 86d8407..b2e56ae 100644
--- a/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriterTest.java
+++ b/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorWriterTest.java
@@ -150,6 +150,9 @@ public class XmlModuleDescriptorWriterTest extends TestCase {
         assertTrue(dest.exists());
         String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(dest)))
                 .replaceAll("\r\n", "\n").replace('\r', '\n');
+        wrote = wrote.replaceFirst("publication=\"([0-9])*\"", "publication=\"20140429153143\"");
+        System.out.println(wrote);
+
         String expected = readEntirely("test-write-extrainfo-from-maven.xml").replaceAll("\r\n",
             "\n").replace('\r', '\n');
         assertEquals(expected, wrote);