diff --git a/CHANGES.txt b/CHANGES.txt
index 9232390..3b4fec3 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -31,6 +31,7 @@ for detailed view of each issue, please consult http://issues.apache.org/jira/br
 	Matthieu Brouillard
 	Carlton Brown
 	Mirko Bulovic
+	Ed Burcher
 	Jamie Burns
 	Chris Chilvers
 	Kristian Cibulskis
@@ -67,6 +68,7 @@ for detailed view of each issue, please consult http://issues.apache.org/jira/br
 	Stepan Koltsov
 	Heschi Kreinick
     Sebastian Krueger
+	Thomas Kurpick
 	Tat Leung
 	Costin Leau
 	Antoine Levy-Lambert
@@ -122,6 +124,12 @@ for detailed view of each issue, please consult http://issues.apache.org/jira/br
 	Sven Zethelius
 	Aleksey Zhukov
 	
+   trunk
+=====================================
+- FIX: NullPointerExeption in AbstractOSGiResolver (IVY-1343) (thanks to Thomas Kurpick)
+- FIX: Delivered ivy descriptor inconsistent with resolve report / retrieve and other post-resolve actions (IVY-1300) (thanks to Ed Burcher)
+- FIX: The Updatesite resolver is downloading Eclipse features instead of Eclipse bundle/plugin
+
    2.3.0-rc1
 =====================================
 - DOCUMENTATION: Bad example in Project dependencies Tutorial (IVY-1263)
diff --git a/src/java/org/apache/ivy/ant/IvyAntSettings.java b/src/java/org/apache/ivy/ant/IvyAntSettings.java
index 25852a0..fd79f36 100644
--- a/src/java/org/apache/ivy/ant/IvyAntSettings.java
+++ b/src/java/org/apache/ivy/ant/IvyAntSettings.java
@@ -36,6 +36,7 @@ import org.apache.ivy.util.url.URLHandlerRegistry;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.ProjectComponent;
+import org.apache.tools.ant.Task;
 import org.apache.tools.ant.taskdefs.Property;
 import org.apache.tools.ant.types.DataType;
 
@@ -136,6 +137,13 @@ public class IvyAntSettings extends DataType {
             return (IvyAntSettings) defaultInstanceObj;
         }
     }
+
+    /*
+     * Keep this for backwards compatibility!
+     */
+    public static IvyAntSettings getDefaultInstance(Task task) {
+        return getDefaultInstance((ProjectComponent) task);
+    }
     
     public File getFile() {
         return file;
@@ -239,6 +247,13 @@ public class IvyAntSettings extends DataType {
         return ivyEngine;
     }
 
+    /*
+     * Keep this for backwards compatibility!
+     */
+    public Ivy getConfiguredIvyInstance(Task task) {
+        return getConfiguredIvyInstance((ProjectComponent) task);
+    }
+
     void createIvyEngine(final ProjectComponent task) {
         Project project = task.getProject();
         Property prop = new Property() {
diff --git a/src/java/org/apache/ivy/core/deliver/DeliverEngine.java b/src/java/org/apache/ivy/core/deliver/DeliverEngine.java
index 2844ce8..5e5799f 100644
--- a/src/java/org/apache/ivy/core/deliver/DeliverEngine.java
+++ b/src/java/org/apache/ivy/core/deliver/DeliverEngine.java
@@ -131,6 +131,7 @@ public class DeliverEngine {
 
         // 2) parse resolvedRevisions From properties file
         Map resolvedRevisions = new HashMap(); // Map (ModuleId -> String revision)
+        Map resolvedBranches = new HashMap(); // Map (ModuleId -> String branch)
         Map dependenciesStatus = new HashMap(); // Map (ModuleId -> String status)
         File ivyProperties = getCache().getResolvedIvyPropertiesInCache(mrid);
         if (!ivyProperties.exists()) {
@@ -148,6 +149,11 @@ public class DeliverEngine {
             ModuleRevisionId decodedMrid = ModuleRevisionId.decode(depMridStr);
             if (options.isResolveDynamicRevisions()) {
                 resolvedRevisions.put(decodedMrid, parts[0]);
+                if (parts.length >= 4) {
+                    if (parts[3] != null && !"null".equals(parts[3])) {
+                        resolvedBranches.put(decodedMrid, parts[3]);
+                    }
+                }
             }
             dependenciesStatus.put(decodedMrid, parts[1]);
             
@@ -171,14 +177,24 @@ public class DeliverEngine {
             if (rev == null) {
                 rev = dependencies[i].getDependencyRevisionId().getRevision();
             }
+            String bra = (String) resolvedBranches.get(dependencies[i].getDependencyRevisionId());
+            if (bra == null || "null".equals(bra)) {
+                bra = dependencies[i].getDependencyRevisionId().getBranch();
+            }
             String depStatus = (String) dependenciesStatus.get(dependencies[i]
                     .getDependencyRevisionId());
+            ModuleRevisionId mrid2 = null;
+            if (bra == null) {
+                mrid2 = ModuleRevisionId.newInstance(dependencies[i].getDependencyRevisionId(), rev);
+            }
+            else {
+                mrid2 = ModuleRevisionId.newInstance(dependencies[i].getDependencyRevisionId(), bra, rev);
+            }
             resolvedDependencies.put(dependencies[i].getDependencyRevisionId(), options
                     .getPdrResolver().resolve(
                         md,
                         options.getStatus(),
-                        ModuleRevisionId
-                                .newInstance(dependencies[i].getDependencyRevisionId(), rev),
+                        mrid2,
                         depStatus));
         }
 
@@ -194,19 +210,22 @@ public class DeliverEngine {
         confsToRemove.removeAll(Arrays.asList(confs));
 
         try {
-            XmlModuleDescriptorUpdater.update(ivyFileURL, publishedIvy,
-                    new UpdateOptions()
-                        .setSettings(settings)
-                        .setResolvedRevisions(resolvedDependencies)
-                        .setStatus(options.getStatus())
-                        .setRevision(revision)
-                        .setBranch(options.getPubBranch())
-                        .setPubdate(options.getPubdate())
-                        .setGenerateRevConstraint(options.isGenerateRevConstraint())
-                        .setMerge(options.isMerge())
-                        .setMergedDescriptor(md)
-                        .setConfsToExclude((String[]) confsToRemove
-                            .toArray(new String[confsToRemove.size()])));
+            UpdateOptions opts = new UpdateOptions()
+            .setSettings(settings)
+            .setResolvedRevisions(resolvedDependencies)
+            .setStatus(options.getStatus())
+            .setRevision(revision)
+            .setBranch(options.getPubBranch())
+            .setPubdate(options.getPubdate())
+            .setGenerateRevConstraint(options.isGenerateRevConstraint())
+            .setMerge(options.isMerge())
+            .setMergedDescriptor(md)
+            .setConfsToExclude((String[]) confsToRemove
+                .toArray(new String[confsToRemove.size()]));
+            if (!resolvedBranches.isEmpty()) {
+                opts = opts.setResolvedBranches(resolvedBranches);
+            }
+            XmlModuleDescriptorUpdater.update(ivyFileURL, publishedIvy, opts);
         } catch (SAXException ex) {
             throw new RuntimeException("bad ivy file in cache for " + mrid
                     + ": please clean '" + ivyFile + "' and resolve again", ex);
diff --git a/src/java/org/apache/ivy/core/resolve/ResolveEngine.java b/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
index 1ce8949..c10ddae 100644
--- a/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
+++ b/src/java/org/apache/ivy/core/resolve/ResolveEngine.java
@@ -52,6 +52,7 @@ import org.apache.ivy.core.module.descriptor.DefaultDependencyDescriptor;
 import org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor;
 import org.apache.ivy.core.module.descriptor.DependencyDescriptor;
 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.report.ArtifactDownloadReport;
 import org.apache.ivy.core.report.ConfigurationResolveReport;
@@ -258,12 +259,32 @@ public class ResolveEngine {
                         forcedRevisions.put(dependencies[i].getModuleId(), dependencies[i].getResolvedId());
                     }
                 }
-
+                
                 IvyNode root = dependencies[0].getRoot();
+
+                //                <ModuleId,IvyNode>();
+                Map topLevelDeps = new HashMap(); //
                 for (int i = 0; i < dependencies.length; i++) {
                     if (!dependencies[i].hasProblem()) {
                         DependencyDescriptor dd = dependencies[i].getDependencyDescriptor(root);
                         if (dd != null) {
+                            ModuleId orgMod = dependencies[i].getModuleId();
+                            topLevelDeps.put(orgMod, dependencies[i]);
+                        }
+                    }
+                }
+
+                for (int i = 0; i < dependencies.length; i++) {
+                    if (!dependencies[i].hasProblem() && !dependencies[i].isCompletelyEvicted()) {
+                        DependencyDescriptor dd = dependencies[i].getDependencyDescriptor(root);
+                        if (dd == null) {
+                            ModuleId mid = dependencies[i].getModuleId();
+                            IvyNode tlDep = (IvyNode)topLevelDeps.get(mid);
+                            if (tlDep != null) {
+                                dd = tlDep.getDependencyDescriptor(root);
+                            }
+                        }
+                        if (dd != null) {
                             ModuleRevisionId depResolvedId = dependencies[i].getResolvedId();
                             ModuleDescriptor depDescriptor = dependencies[i].getDescriptor();
                             ModuleRevisionId depRevisionId = dd.getDependencyRevisionId();
@@ -294,7 +315,8 @@ public class ResolveEngine {
                             
                             // The evicted modules have no description, so we can't put the status
                             String status = depDescriptor == null ? "?" : depDescriptor.getStatus();
-                            props.put(depRevisionId.encodeToString(), rev + " " + status + " " + forcedRev);
+                            Message.debug("storing dependency " + depResolvedId + " in props");
+                            props.put(depRevisionId.encodeToString(), rev + " " + status + " " + forcedRev + " " + depResolvedId.getBranch());
                         }
                     }
                 }
diff --git a/src/java/org/apache/ivy/core/settings/typedef.properties b/src/java/org/apache/ivy/core/settings/typedef.properties
index b486b38..7305c55 100644
--- a/src/java/org/apache/ivy/core/settings/typedef.properties
+++ b/src/java/org/apache/ivy/core/settings/typedef.properties
@@ -63,3 +63,4 @@ cache			= org.apache.ivy.core.cache.DefaultRepositoryCacheManager
 pgp             = org.apache.ivy.plugins.signer.bouncycastle.OpenPGPSignatureGenerator
 
 osgi-manifest-parser = org.apache.ivy.osgi.core.OSGiManifestParser
+cudf-parser     = org.apache.ivy.plugins.parser.cudf.CUDFModuleDescriptorParser
diff --git a/src/java/org/apache/ivy/osgi/p2/P2ArtifactParser.java b/src/java/org/apache/ivy/osgi/p2/P2ArtifactParser.java
index e2d6ab1..0019c3a 100644
--- a/src/java/org/apache/ivy/osgi/p2/P2ArtifactParser.java
+++ b/src/java/org/apache/ivy/osgi/p2/P2ArtifactParser.java
@@ -163,7 +163,7 @@ public class P2ArtifactParser implements XMLInputParser {
                     P2Artifact a = ((ArtifactHandler) child).p2Artifact;
                     String url = (String) patternsByClassifier.get(a.getClassifier());
                     url = url.replaceAll("\\$\\{repoUrl\\}", repoUrl);
-                    p2Descriptor.addArtifactUrl(a.getId(), a.getVersion(), url);
+                    p2Descriptor.addArtifactUrl(a.getClassifier(), a.getId(), a.getVersion(), url);
                 }
             });
         }
diff --git a/src/java/org/apache/ivy/osgi/p2/P2Descriptor.java b/src/java/org/apache/ivy/osgi/p2/P2Descriptor.java
index 810e0c7..95d177c 100644
--- a/src/java/org/apache/ivy/osgi/p2/P2Descriptor.java
+++ b/src/java/org/apache/ivy/osgi/p2/P2Descriptor.java
@@ -71,7 +71,11 @@ public class P2Descriptor extends RepoDescriptor {
         }
     }
 
-    public void addArtifactUrl(String id, Version version, String url) {
+    public void addArtifactUrl(String classifier, String id, Version version, String url) {
+        if (!classifier.equals("osgi.bundle")) {
+            // we only support OSGi bundle, no Eclipse feature or anything else
+            return;
+        }
         Map/* <Version, String> */byVersion = (Map) artifactUrlPatterns.get(id);
         if (byVersion == null) {
             byVersion = new HashMap();
diff --git a/src/java/org/apache/ivy/osgi/p2/P2MetadataParser.java b/src/java/org/apache/ivy/osgi/p2/P2MetadataParser.java
index 2c5d80f..9c5768f 100644
--- a/src/java/org/apache/ivy/osgi/p2/P2MetadataParser.java
+++ b/src/java/org/apache/ivy/osgi/p2/P2MetadataParser.java
@@ -37,6 +37,7 @@ import org.apache.ivy.osgi.p2.PropertiesParser.PropertiesHandler;
 import org.apache.ivy.osgi.util.DelegetingHandler;
 import org.apache.ivy.osgi.util.Version;
 import org.apache.ivy.osgi.util.VersionRange;
+import org.apache.ivy.util.Message;
 import org.apache.ivy.util.XMLHelper;
 import org.xml.sax.Attributes;
 import org.xml.sax.SAXException;
@@ -359,6 +360,8 @@ public class P2MetadataParser implements XMLInputParser {
                     Version version = ((ProvidedHandler) child).version;
                     String type = namespace2Type(((ProvidedHandler) child).namespace);
                     if (type == null) {
+                        Message.debug("Unsupported provided capability "
+                                + ((ProvidedHandler) child).namespace + " " + name + " " + version);
                         return;
                     }
                     BundleCapability capability;
@@ -425,7 +428,12 @@ public class P2MetadataParser implements XMLInputParser {
                     String name = ((RequiredHandler) child).name;
                     VersionRange range = ((RequiredHandler) child).range;
                     String type = namespace2Type(((RequiredHandler) child).namespace);
-                    requirements.add(new BundleRequirement(type, name, range, null));
+                    if (type == null) {
+                        Message.debug("Unsupported required capability "
+                                + ((RequiredHandler) child).namespace + " " + name + " " + range);
+                    } else {
+                        requirements.add(new BundleRequirement(type, name, range, null));
+                    }
                 }
             });
         }
diff --git a/src/java/org/apache/ivy/osgi/repo/AbstractOSGiResolver.java b/src/java/org/apache/ivy/osgi/repo/AbstractOSGiResolver.java
index 72aa51f..1dc943c 100644
--- a/src/java/org/apache/ivy/osgi/repo/AbstractOSGiResolver.java
+++ b/src/java/org/apache/ivy/osgi/repo/AbstractOSGiResolver.java
@@ -181,7 +181,7 @@ public abstract class AbstractOSGiResolver extends BasicResolver {
         while (itMd.hasNext()) {
             ModuleDescriptor md = (ModuleDescriptor) itMd.next();
             IvyNode node = data.getNode(md.getModuleRevisionId());
-            if (node != null) {
+            if (node != null && node.getDescriptor() != null) {
                 // already resolved import, no need to go further
                 return new ResolvedResource[] {buildResolvedCapabilityMd(dd, node.getDescriptor())};
             }
@@ -294,6 +294,10 @@ public abstract class AbstractOSGiResolver extends BasicResolver {
 
     public ResolvedResource findArtifactRef(Artifact artifact, Date date) {
         URL url = artifact.getUrl();
+        if (url == null) {
+            // not an artifact resolved by this resolver
+            return null;
+        }
         Message.verbose("\tusing url for " + artifact + ": " + url);
         logArtifactAttempt(artifact, url.toExternalForm());
         Resource resource = new URLResource(url);
diff --git a/src/java/org/apache/ivy/plugins/parser/ModuleDescriptorParserRegistry.java b/src/java/org/apache/ivy/plugins/parser/ModuleDescriptorParserRegistry.java
index 24f162e..1e5f113 100644
--- a/src/java/org/apache/ivy/plugins/parser/ModuleDescriptorParserRegistry.java
+++ b/src/java/org/apache/ivy/plugins/parser/ModuleDescriptorParserRegistry.java
@@ -28,6 +28,7 @@ import java.util.List;
 
 import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
 import org.apache.ivy.osgi.core.OSGiManifestParser;
+import org.apache.ivy.plugins.parser.cudf.CUDFModuleDescriptorParser;
 import org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser;
 import org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser;
 import org.apache.ivy.plugins.repository.Resource;
diff --git a/src/java/org/apache/ivy/plugins/parser/cudf/CUDFModuleDescriptorParser.java b/src/java/org/apache/ivy/plugins/parser/cudf/CUDFModuleDescriptorParser.java
new file mode 100644
index 0000000..6c703c7
--- /dev/null
+++ b/src/java/org/apache/ivy/plugins/parser/cudf/CUDFModuleDescriptorParser.java
@@ -0,0 +1,152 @@
+/*
+ *      Copyright 2012 Zenika
+ *
+ *  Licensed 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.plugins.parser.cudf;
+
+import org.apache.ivy.core.IvyContext;
+import org.apache.ivy.core.module.descriptor.Artifact;
+import org.apache.ivy.core.module.descriptor.Configuration;
+import org.apache.ivy.core.module.descriptor.DefaultArtifact;
+import org.apache.ivy.core.module.descriptor.DefaultDependencyArtifactDescriptor;
+import org.apache.ivy.core.module.descriptor.DefaultDependencyDescriptor;
+import org.apache.ivy.core.module.descriptor.DefaultModuleDescriptor;
+import org.apache.ivy.core.module.descriptor.DependencyArtifactDescriptor;
+import org.apache.ivy.core.module.descriptor.ModuleDescriptor;
+import org.apache.ivy.core.module.id.ModuleRevisionId;
+import org.apache.ivy.core.resolve.ResolveData;
+import org.apache.ivy.plugins.parser.ModuleDescriptorParser;
+import org.apache.ivy.plugins.parser.ParserSettings;
+import org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorWriter;
+import org.apache.ivy.plugins.repository.Resource;
+import org.apache.ivy.plugins.repository.url.URLResource;
+import org.apache.ivy.util.Message;
+import org.apache.ivy.util.url.URLHandlerRegistry;
+
+import java.io.*;
+import java.net.URL;
+import java.text.ParseException;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * CUDFModuleDescriptorParser
+ *
+ * @author Antoine ROUAZE <antoine.rouaze AT zenika.com>
+ */
+public class CUDFModuleDescriptorParser implements ModuleDescriptorParser {
+
+    private static final CUDFModuleDescriptorParser INSTANCE = new CUDFModuleDescriptorParser();
+
+    public static CUDFModuleDescriptorParser getInstance() {
+        return INSTANCE;
+    }
+
+    public CUDFModuleDescriptorParser() {
+    }
+
+    public ModuleDescriptor parseDescriptor(ParserSettings ivySettings, URL descriptorURL, boolean validate)
+            throws ParseException, IOException {
+        URLResource resource = new URLResource(descriptorURL);
+        return parseDescriptor(ivySettings, descriptorURL, resource, validate);
+    }
+
+    public ModuleDescriptor parseDescriptor(ParserSettings ivySettings, URL descriptorURL, Resource res,
+                                            boolean validate) throws ParseException, IOException {
+        IvyContext context = IvyContext.getContext();
+        ResolveData resolveData = context.getResolveData();
+
+        CUDFParser parser = new CUDFParser("");
+        List artifacts = parser.parse(URLHandlerRegistry.getDefault().openStream(descriptorURL));
+        Artifact rootArtifact = (Artifact) artifacts.get(0);
+        DefaultModuleDescriptor moduleDescriptor = new DefaultModuleDescriptor(this, res);
+        moduleDescriptor.setResolvedPublicationDate(new Date(res.getLastModified()));
+        addConfigurations(resolveData.getCurrentVisitNode().getConfsToFetch(), moduleDescriptor);
+        moduleDescriptor.addArtifact("master", rootArtifact);
+        ModuleRevisionId moduleRevisionId = rootArtifact.getModuleRevisionId();
+        for (int i = 1; i < artifacts.size(); i++) {
+            Artifact dep = (Artifact) artifacts.get(i);
+            DefaultDependencyDescriptor dependencyDescriptor =
+                    new DefaultDependencyDescriptor(moduleDescriptor, dep.getModuleRevisionId(), true, false, true);
+            dependencyDescriptor.addDependencyConfiguration("master", "master(*)");
+            DependencyArtifactDescriptor dependencyArtifactDescriptor =
+                    new DefaultDependencyArtifactDescriptor(dependencyDescriptor,
+                                                            dependencyDescriptor.getDependencyId().getName(),
+                                                            dep.getType(), dep.getExt(), dep.getUrl(),
+                                                            dep.getExtraAttributes()
+                    );
+            // TODO: verified scope name
+            dependencyDescriptor.addDependencyArtifact("master", dependencyArtifactDescriptor);
+            moduleDescriptor.addDependency(dependencyDescriptor);
+            // TODO found the current configuration name!!!
+        }
+        moduleDescriptor.setModuleRevisionId(moduleRevisionId);
+        return moduleDescriptor;
+    }
+
+    private void addConfigurations(String[] cheatConfs, DefaultModuleDescriptor moduleDescriptor) {
+        moduleDescriptor.addConfiguration(new Configuration("master"));
+        for (int i = 0, cheatConfsLength = cheatConfs.length; i < cheatConfsLength; i++) {
+            String cheatConf = cheatConfs[i];
+            moduleDescriptor.addConfiguration(
+                    new Configuration(cheatConf, Configuration.Visibility.PUBLIC, "Parents conf",
+                                      new String[]{"master"}, false, null
+                    )
+                                             );
+//            moduleDescriptor.addConfiguration(new Configuration(cheatConf));
+        }
+    }
+
+    public void toIvyFile(InputStream is, Resource res, File destFile, ModuleDescriptor md)
+            throws ParseException, IOException {
+        try {
+            XmlModuleDescriptorWriter.write(md, destFile);
+        } finally {
+            if (is != null) {
+                is.close();
+            }
+        }
+    }
+
+    public boolean accept(Resource res) {
+        BufferedReader reader = null;
+        try {
+            reader = new BufferedReader(new InputStreamReader(res.openStream()));
+            String preamble = reader.readLine();
+            return preamble.startsWith("preamble:");
+        } catch (IOException e) {
+            throw new RuntimeException("Unable to read resource named " + res.getName(), e);
+        } finally {
+            if (reader != null) {
+                try {
+                    reader.close();
+                } catch (IOException e) {
+                    Message.warn("Unable to close stream resource");
+                }
+            }
+        }
+    }
+
+    public String getType() {
+        return "cudf";
+    }
+
+    public Artifact getMetadataArtifact(ModuleRevisionId mrid, Resource res) {
+        return new DefaultArtifact(mrid, new Date(res.getLastModified()), mrid.getName(), "cudf", "cudf", true);
+    }
+
+    public String toString() {
+        return "CUDF parser";
+    }
+}
diff --git a/src/java/org/apache/ivy/plugins/parser/cudf/CUDFParser.java b/src/java/org/apache/ivy/plugins/parser/cudf/CUDFParser.java
new file mode 100644
index 0000000..be217dd
--- /dev/null
+++ b/src/java/org/apache/ivy/plugins/parser/cudf/CUDFParser.java
@@ -0,0 +1,146 @@
+/*
+ *      Copyright 2012 Zenika
+ *
+ *  Licensed 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.plugins.parser.cudf;
+
+import org.apache.ivy.core.module.descriptor.Artifact;
+import org.apache.ivy.core.module.descriptor.DefaultArtifact;
+import org.apache.ivy.core.module.id.ModuleRevisionId;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author Adrien Lecharpentier <adrien.lecharpentier@zenika.com>
+ */
+public class CUDFParser {
+    private static final String PACKAGE_START_LINE = "package: ";
+
+    private static final String NUMBER_START_LINE = "number: ";
+
+    private static final String SEPARATOR = "%3a";
+
+    private static final String TYPE_START_LINE = "type: ";
+
+    private static final String VERSION_START_LINE = "version: ";
+
+    private final String baseURL;
+
+    public CUDFParser(String baseServerURL) {
+        this.baseURL = baseServerURL;
+    }
+
+    /**
+     * Returns a list of Artifacts fetch from a CUDF formatted InputStream.
+     * <p/>
+     * The List returned will never be null but at worst it will be empty (contract).
+     *
+     * @param inputStream
+     *         the stream to parse
+     * @return a list of Artifact that are all needed. The list will never be null but at worst an empty list.
+     * @throws MalformedURLException
+     *         if the url in the cudf output is not correct.
+     */
+    public List/*<Artifact>*/ parse(InputStream inputStream)
+            throws MalformedURLException {
+        if (inputStream == null) {
+            throw new IllegalStateException();
+        }
+        List artifacts = new ArrayList();
+        BufferedReader reader = null;
+        try {
+            reader = new BufferedReader(new InputStreamReader(inputStream, "UTF-8"));
+            String next = reader.readLine();
+            String packageLine = null;
+            String versionLine = null;
+            String typeLine = null;
+            String cudfVersion = null;
+            while (true) {
+                String line = next;
+                for (next = reader.readLine(); next != null && next.length() > 1 && next.charAt(0) == ' ';
+                     next = reader.readLine()) {
+                    line = line + next.substring(1);
+                }
+
+                if (line == null || (line != null && line.length() == 0)) {
+                    if (cudfVersion != null && !"0".equals(
+                            versionLine.substring(VERSION_START_LINE.length()).trim()
+                                                          )) {
+                        validateArtifact(packageLine, versionLine, typeLine, artifacts);
+                    }
+                    packageLine = versionLine = typeLine = cudfVersion = null;
+                    if (line == null) {
+                        break;
+                    }
+                }
+
+                if (line.startsWith("#") || line.startsWith("preamble:") || line.startsWith("property: ")
+                    || line.startsWith("univ-checksum: ") || (line.length() > 0 && line.charAt(0) == ' ')) {
+                    continue;
+                }
+
+                line = line.trim();
+                if (line.startsWith(PACKAGE_START_LINE)) {
+                    packageLine = line;
+                } else if (line.startsWith(NUMBER_START_LINE)) {
+                    versionLine = line;
+                } else if (line.startsWith(TYPE_START_LINE)) {
+                    typeLine = line;
+                } else if (line.startsWith(VERSION_START_LINE)) {
+                    cudfVersion = line;
+                }
+            }
+        } catch (MalformedURLException e) {
+            throw e;
+        } catch (IOException e) {
+            return Collections.emptyList();
+        } finally {
+            if (reader != null) {
+                try {
+                    reader.close();
+                } catch (IOException e) {
+                    return Collections.emptyList();
+                }
+            }
+        }
+        return artifacts;
+    }
+
+    private void validateArtifact(String packageLine, String versionLine, String typeLine, List artifacts)
+            throws MalformedURLException {
+        if (packageLine == null || versionLine == null) {
+            return;
+        }
+        String strPackage = packageLine.substring(PACKAGE_START_LINE.length()).trim();
+        if (!strPackage.contains(SEPARATOR)) {
+            throw new IllegalArgumentException("The line \"package\" must have a colon separator to " +
+                                               "differentiate the organization and the name");
+        }
+        String[] info = packageLine.substring(PACKAGE_START_LINE.length()).trim().split(SEPARATOR);
+        String version = versionLine.substring(NUMBER_START_LINE.length()).trim();
+        String type = typeLine == null ? "" : typeLine.substring(TYPE_START_LINE.length()).trim();
+        Artifact artifact =
+                    new DefaultArtifact(ModuleRevisionId.newInstance(info[0], info[1], version), new Date(), info[1],
+                                        type, type);
+        artifacts.add(artifact);
+    }
+}
diff --git a/test/java/org/apache/ivy/ant/IvyDeliverTest.java b/test/java/org/apache/ivy/ant/IvyDeliverTest.java
index 2cbe378..aeb8995 100644
--- a/test/java/org/apache/ivy/ant/IvyDeliverTest.java
+++ b/test/java/org/apache/ivy/ant/IvyDeliverTest.java
@@ -23,7 +23,9 @@ import java.io.FileReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.text.ParseException;
+import java.util.Arrays;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.Map;
 
 import junit.framework.TestCase;
@@ -46,6 +48,7 @@ public class IvyDeliverTest extends TestCase {
 
     protected void setUp() throws Exception {
         cleanTestDir();
+        cleanRetrieveDir();
         cleanRep();
         createCache();
         project = new Project();
@@ -66,6 +69,7 @@ public class IvyDeliverTest extends TestCase {
     protected void tearDown() throws Exception {
         cleanCache();
         cleanTestDir();
+        cleanRetrieveDir();
         cleanRep();
     }
 
@@ -83,6 +87,13 @@ public class IvyDeliverTest extends TestCase {
         del.execute();
     }
 
+    private void cleanRetrieveDir() {
+        Delete del = new Delete();
+        del.setProject(new Project());
+        del.setDir(new File("build/test/retrieve"));
+        del.execute();
+    }
+    
     private void cleanRep() {
         Delete del = new Delete();
         del.setProject(new Project());
@@ -394,8 +405,28 @@ public class IvyDeliverTest extends TestCase {
             md.getModuleRevisionId());
         DependencyDescriptor[] dds = md.getDependencies();
         assertEquals(2, dds.length);
-        assertEquals(ModuleRevisionId.newInstance("org1", "mod1.2", "1.1"), 
+        assertEquals(ModuleRevisionId.newInstance("org1", "mod1.2", "2.2"), 
             dds[0].getDependencyRevisionId());
+
+        IvyRetrieve ret = new IvyRetrieve();
+        ret.setProject(project);
+        ret.setPattern("build/test/retrieve/[artifact]-[revision].[ext]");
+        ret.execute();
+
+        File list = new File("build/test/retrieve");
+        String[] files = list.list();
+        HashSet actualFileSet = new HashSet(Arrays.asList(files));
+        HashSet expectedFileSet = new HashSet();
+        for (int i = 0; i < dds.length; i++) {
+            DependencyDescriptor dd = dds[i];
+            String name = dd.getDependencyId().getName();
+            String rev = dd.getDependencyRevisionId().getRevision();
+            String ext = "jar";
+            String artifact = name + "-" + rev + "." + ext;
+            expectedFileSet.add(artifact);
+        }
+        assertEquals("Delivered Ivy descriptor inconsistent with retrieved artifacts",
+            expectedFileSet, actualFileSet);
     }
 
     public void testWithDynEvicted2() throws Exception {
@@ -421,10 +452,31 @@ public class IvyDeliverTest extends TestCase {
             md.getModuleRevisionId());
         DependencyDescriptor[] dds = md.getDependencies();
         assertEquals(2, dds.length);
-        assertEquals(ModuleRevisionId.newInstance("org1", "mod1.2", "1.1"), 
+        assertEquals(ModuleRevisionId.newInstance("org1", "mod1.2", "2.2"), 
             dds[1].getDependencyRevisionId());
-    }
 
+        IvyRetrieve ret = new IvyRetrieve();
+        ret.setProject(project);
+        ret.setPattern("build/test/retrieve/[artifact]-[revision].[ext]");
+        ret.execute();
+
+        File list = new File("build/test/retrieve");
+        String[] files = list.list();
+        HashSet actualFileSet = new HashSet(Arrays.asList(files));
+        HashSet expectedFileSet = new HashSet();
+        for (int i = 0; i < dds.length; i++) {
+            DependencyDescriptor dd = dds[i];
+            String name = dd.getDependencyId().getName();
+            String rev = dd.getDependencyRevisionId().getRevision();
+            String ext = "jar";
+            String artifact = name + "-" + rev + "." + ext;
+            expectedFileSet.add(artifact);
+        }
+        assertEquals("Delivered Ivy descriptor inconsistent with retrieved artifacts",
+            expectedFileSet, actualFileSet);
+        list.delete();
+    }
+    
     public void testReplaceImportedConfigurations() throws Exception {
         project.setProperty("ivy.dep.file", "test/java/org/apache/ivy/ant/ivy-import-confs.xml");
         IvyResolve res = new IvyResolve();
diff --git a/test/java/org/apache/ivy/core/resolve/ResolveTest.java b/test/java/org/apache/ivy/core/resolve/ResolveTest.java
index d13a7ab..e22ff3b 100644
--- a/test/java/org/apache/ivy/core/resolve/ResolveTest.java
+++ b/test/java/org/apache/ivy/core/resolve/ResolveTest.java
@@ -17,25 +17,7 @@
  */
 package org.apache.ivy.core.resolve;
 
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-
 import junit.framework.TestCase;
-
 import org.apache.ivy.Ivy;
 import org.apache.ivy.TestHelper;
 import org.apache.ivy.core.cache.ArtifactOrigin;
@@ -66,12 +48,30 @@ import org.apache.ivy.plugins.resolver.DependencyResolver;
 import org.apache.ivy.plugins.resolver.DualResolver;
 import org.apache.ivy.plugins.resolver.FileSystemResolver;
 import org.apache.ivy.util.CacheCleaner;
+import org.apache.ivy.util.DefaultMessageLogger;
 import org.apache.ivy.util.FileUtil;
+import org.apache.ivy.util.Message;
 import org.apache.ivy.util.MockMessageLogger;
 import org.apache.ivy.util.StringUtils;
 import org.xml.sax.SAXException;
 import org.xml.sax.helpers.DefaultHandler;
 
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
 /**
  *
  */
@@ -4330,7 +4330,7 @@ public class ResolveTest extends TestCase {
         assertTrue(getArchiveFileInCache(ivy, "org.apache", "test-classifier",
             "1.0", "test-classifier", "jar", "jar").exists());
     }
-    
+
     public void testResolveMaven2ParentPomChainResolver() throws Exception {
         // test has a dependency on test2 but there is no version listed. test has a parent of parent(2.0) 
         // then parent2. Both parents have a dependencyManagement element for test2, and each list the version as
@@ -5285,6 +5285,56 @@ public class ResolveTest extends TestCase {
         ivy.deliver(pubrev, deliveryPattern, dopts);
     }
 
+    public void testIVY1300() throws Exception {
+        ivy = Ivy.newInstance();
+        ivy.configure(new File("test/repositories/IVY-1300/ivysettings.xml"));
+
+        ResolveOptions opts = new ResolveOptions();
+        opts.setConfs(new String[] {"*"});
+        opts.setResolveId("resolveid");
+        opts.setTransitive(true);
+
+        ResolveReport report = ivy.resolve(
+            new File("test/repositories/IVY-1300/assembly-ivy.xml").toURL(), opts);
+        assertFalse(report.hasError());
+        
+        ModuleRevisionId modAExpectedRevId = ModuleRevisionId.newInstance("myorg", "modA", "trunk", "5");
+        ModuleRevisionId modBExpectedRevId = ModuleRevisionId.newInstance("myorg", "modB", "releasebranch", "1");
+
+        // check that the resolve report has the expected results, namely that trunk/5 is considered later than branch/1 
+        // purely because 5>1. Of course it is more likely that we would want to consider this a 'bad comparison', but 
+        // this Unit Test is not about that. It is about inconsistency of results between the resolve report and the 
+        // delivered descriptor. In fact the delivered descriptor is out of step, because retrieve and the report both 
+        // agree that trunk/5 is selected. Deliver begs to differ.
+
+        Set reportMrids = report.getConfigurationReport("default").getModuleRevisionIds();
+        assertEquals(
+            new HashSet(Arrays.asList(new ModuleRevisionId[] { modAExpectedRevId, modBExpectedRevId })),
+            reportMrids);
+        
+        DeliverOptions dopts = new DeliverOptions();
+        dopts.setGenerateRevConstraint(true);
+        dopts.setConfs(new String[] { "*" });
+        dopts.setStatus("release");
+        dopts.setPubdate(new Date());
+        dopts.setResolveId("resolveid");
+        String pubrev = "1";
+        String deliveryPattern = "build/test/deliver/assembly-[revision].xml";
+        
+        ivy.deliver(pubrev, deliveryPattern, dopts);
+
+        // now check that the resolve report has the same info as the delivered descriptor
+
+        File deliveredIvyFile = new File("build/test/deliver/assembly-1.xml");
+        assertTrue(deliveredIvyFile.exists());
+        ModuleDescriptor md = XmlModuleDescriptorParser.getInstance().parseDescriptor(
+            ivy.getSettings(), deliveredIvyFile.toURL(), false);
+        DependencyDescriptor[] dds = md.getDependencies();
+        assertEquals(2, dds.length);
+        assertEquals(ModuleRevisionId.newInstance("myorg", "modB", "releasebranch", "1"), dds[1].getDependencyRevisionId());
+        assertEquals(ModuleRevisionId.newInstance("myorg", "modA", "trunk", "5"), dds[0].getDependencyRevisionId());
+    }
+
     public void testUseCacheOnly() throws Exception {
         ResolveOptions option = getResolveOptions(new String[] {"*"}).setValidate(false);
         URL url = new File("test/repositories/1/usecacheonly/mod1/ivys/ivy-1.0.xml").toURI()
diff --git a/test/java/org/apache/ivy/osgi/updatesite/UpdateSiteAndIbiblioResolverTest.java b/test/java/org/apache/ivy/osgi/updatesite/UpdateSiteAndIbiblioResolverTest.java
new file mode 100644
index 0000000..d84c775
--- /dev/null
+++ b/test/java/org/apache/ivy/osgi/updatesite/UpdateSiteAndIbiblioResolverTest.java
@@ -0,0 +1,121 @@
+/*
+ *  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.osgi.updatesite;
+
+import java.io.File;
+import java.text.ParseException;
+
+import junit.framework.TestCase;
+
+import org.apache.ivy.Ivy;
+import org.apache.ivy.core.cache.RepositoryCacheManager;
+import org.apache.ivy.core.module.descriptor.Artifact;
+import org.apache.ivy.core.module.descriptor.DefaultDependencyDescriptor;
+import org.apache.ivy.core.module.id.ModuleRevisionId;
+import org.apache.ivy.core.resolve.ResolveData;
+import org.apache.ivy.core.resolve.ResolveOptions;
+import org.apache.ivy.core.resolve.ResolvedModuleRevision;
+import org.apache.ivy.core.settings.IvySettings;
+import org.apache.ivy.osgi.core.BundleInfo;
+import org.apache.ivy.plugins.resolver.ChainResolver;
+import org.apache.ivy.plugins.resolver.IBiblioResolver;
+
+public class UpdateSiteAndIbiblioResolverTest extends TestCase {
+
+    private IvySettings settings;
+
+    private UpdateSiteResolver resolver;
+    IBiblioResolver resolver2;
+
+    private File cache;
+
+    private Ivy ivy;
+
+    private ResolveData data;
+
+    ChainResolver chain;
+
+    public void setUp() throws Exception {
+        settings = new IvySettings();
+
+        chain = new ChainResolver();
+        chain.setName("chain");
+        chain.setSettings(settings);
+
+        resolver = new UpdateSiteResolver();
+        resolver.setName("ivyde-repo");
+        resolver.setUrl(new File("test/test-p2/ivyde-repo").toURL().toExternalForm());
+        resolver.setSettings(settings);
+
+        resolver2 = new IBiblioResolver();
+        resolver2.setName("maven2");
+        settings.setVariable("ivy.ibiblio.default.artifact.root",
+            "http://repo1.maven.org/maven2/");
+        settings.setVariable("ivy.ibiblio.default.artifact.pattern",
+            "[organisation]/[module]/[revision]/[artifact]-[revision].[ext]");
+        resolver2.setSettings(settings);
+
+        chain.add(resolver);
+        chain.add(resolver2);
+
+        settings.addResolver(chain);
+
+        settings.setDefaultResolver("chain");
+
+        cache = new File("build/cache");
+        cache.mkdirs();
+        settings.setDefaultCache(cache);
+
+        ivy = new Ivy();
+        ivy.setSettings(settings);
+        ivy.bind();
+
+        ivy.getResolutionCacheManager().clean();
+        RepositoryCacheManager[] caches = settings.getRepositoryCacheManagers();
+        for (int i = 0; i < caches.length; i++) {
+            caches[i].clean();
+        }
+
+        data = new ResolveData(ivy.getResolveEngine(), new ResolveOptions());
+    }
+
+    public void testArtifactRef() throws ParseException {
+
+        // Simple Dependency for ibiblio
+        ModuleRevisionId mrid1 = ModuleRevisionId.newInstance("log4j", "log4j", "1.2.16");
+        ResolvedModuleRevision rmr1 = chain.getDependency(new DefaultDependencyDescriptor(mrid1,
+            false), data);
+
+        // Simple Dependency for updatesite
+        ModuleRevisionId mrid2 = ModuleRevisionId.newInstance(BundleInfo.BUNDLE_TYPE,
+            "org.apache.ivy", "2.0.0.final_20090108225011");
+        ResolvedModuleRevision rmr2 = chain.getDependency(new DefaultDependencyDescriptor(mrid2,
+            false), data);
+
+        assertNotNull(rmr1);
+        assertNotNull(rmr2);
+
+
+        Artifact[] artifacts1 = rmr1.getDescriptor().getArtifacts("default");
+        Artifact[] artifacts2 = rmr2.getDescriptor().getArtifacts("default");
+
+        chain.exists(artifacts2[0]);
+        chain.exists(artifacts1[0]);
+    }
+
+}
diff --git a/test/java/org/apache/ivy/plugins/parser/cudf/CUDFParserTest.java b/test/java/org/apache/ivy/plugins/parser/cudf/CUDFParserTest.java
new file mode 100644
index 0000000..5a76ac1
--- /dev/null
+++ b/test/java/org/apache/ivy/plugins/parser/cudf/CUDFParserTest.java
@@ -0,0 +1,73 @@
+/*
+ *      Copyright 2012 Zenika
+ *
+ *  Licensed 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.plugins.parser.cudf;
+
+import junit.framework.TestCase;
+import org.apache.ivy.core.module.descriptor.Artifact;
+import org.apache.ivy.core.module.id.ModuleRevisionId;
+
+import java.net.MalformedURLException;
+import java.util.List;
+
+/**
+ * @author Adrien Lecharpentier <adrien.lecharpentier@zenika.com>
+ * @since 2012-04-23 15:21
+ */
+public class CUDFParserTest extends TestCase {
+
+    private CUDFParser parser;
+
+    public void setUp() throws Exception {
+        parser = new CUDFParser("");
+    }
+
+    public void testParser() throws MalformedURLException {
+        List artifacts = parser.parse(
+                this.getClass().getResourceAsStream("/org/apache/ivy/plugins/resolver/util/testdownload.cudf"));
+        assertEquals(3, artifacts.size());
+        for (int i = 0; i < artifacts.size(); i++) {
+            assertNotNull("Error: an null artifact is in the list.", artifacts.get(i));
+            Artifact artifact = (Artifact) artifacts.get(i);
+            assertArtifactIsValid(artifact);
+        }
+    }
+
+    private void assertArtifactIsValid(Artifact artifact) {
+        assertNotNull("Error: the name of the artifact is null", artifact.getName());
+        assertNotNull("Error: the type of the artifact is null", artifact.getType());
+        assertNotNull("Error: the module revision id of the artifact is null", artifact.getModuleRevisionId());
+        ModuleRevisionId moduleRevisionId = artifact.getModuleRevisionId();
+        assertNotNull("Error: the organisation name of the module revision id is null",
+                      moduleRevisionId.getOrganisation());
+        assertNotNull("Error: the name of the module revision id is null", moduleRevisionId.getName());
+        assertNotNull("Error: the version of the module revision id null", moduleRevisionId.getRevision());
+    }
+
+    public void testEmptyCUFDParsing() throws MalformedURLException {
+        List artifacts =
+                parser.parse(this.getClass().getResourceAsStream("/org/apache/ivy/plugins/resolver/util/empty.cudf"));
+        assertTrue(artifacts.isEmpty());
+    }
+
+    public void testNullResourceParsing() throws MalformedURLException {
+        try {
+            parser.parse(null);
+            fail("Give a null parameter should've thrown an exception");
+        } catch (IllegalStateException e) {
+
+        }
+    }
+}
diff --git a/test/java/org/apache/ivy/plugins/resolver/CUDFIntegrationTest.java b/test/java/org/apache/ivy/plugins/resolver/CUDFIntegrationTest.java
new file mode 100644
index 0000000..a0b615f
--- /dev/null
+++ b/test/java/org/apache/ivy/plugins/resolver/CUDFIntegrationTest.java
@@ -0,0 +1,82 @@
+/*
+ *      Copyright 2012 Zenika
+ *
+ *  Licensed 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.plugins.resolver;
+
+import junit.framework.TestCase;
+import org.apache.ivy.Ivy;
+import org.apache.ivy.core.report.ResolveReport;
+import org.apache.ivy.core.settings.IvySettings;
+import org.apache.ivy.util.CacheCleaner;
+import org.apache.ivy.util.DefaultMessageLogger;
+import org.apache.ivy.util.FileUtil;
+import org.apache.ivy.util.Message;
+
+import java.io.File;
+
+/**
+ * @author Antoine ROUAZE <antoine.rouaze AT zenika.com>
+ */
+public class CUDFIntegrationTest extends TestCase {
+
+    private Ivy ivy;
+
+    private File cache;
+
+    protected void setUp() throws Exception {
+        cache = new File("build/cache");
+        System.setProperty("ivy.cache.dir", cache.getAbsolutePath());
+        createCache();
+
+        ivy = Ivy.newInstance();
+    }
+
+    private void createCache() {
+        cache.mkdirs();
+    }
+
+    protected void tearDown() throws Exception {
+        CacheCleaner.deleteDir(cache);
+    }
+
+    public void testCUDFIntegration() throws Exception{
+        ivy.configure(new File("test/test-cudf/ivysettings.xml"));
+        ivy.getLoggerEngine().pushLogger(new DefaultMessageLogger(Message.MSG_DEBUG));
+        ResolveReport report = ivy.resolve(new File("test/test-cudf/ivy.xml"));
+        assertEquals(4, report.getArtifacts().size());
+    }
+
+    public void testCUDFIntegrationWithoutUrl() throws Exception {
+        ivy.configure(new File("test/test-cudf/ivysettings-without-url.xml"));
+        ivy.getLoggerEngine().pushLogger(new DefaultMessageLogger(Message.MSG_DEBUG));
+        ResolveReport report = ivy.resolve(new File("test/test-cudf/ivy.xml"));
+        assertEquals(report.getArtifacts().size(), 4);
+    }
+
+    public void testCUDFCacheIntegration() throws Exception{
+        ivy.configure(new File("test/test-cudf/ivysettings.xml"));
+        ivy.getLoggerEngine().pushLogger(new DefaultMessageLogger(Message.MSG_DEBUG));
+        ResolveReport report = ivy.resolve(new File("test/test-cudf/ivy.xml"));
+        assertTrue(report.getDownloadSize() > 0);
+        ResolveReport report1 = ivy.resolve(new File("test/test-cudf/ivy.xml"));
+        assertEquals(report1.getDownloadSize(), 0);
+    }
+
+    public void testCUDFIntegration1() throws Exception{
+        ivy.configure(new File("test/test-cudf/ivysettings.xml"));
+        ivy.getLoggerEngine().pushLogger(new DefaultMessageLogger(Message.MSG_DEBUG));
+        ivy.resolve(new File("src/example/configurations/multi-projects/filter-framework/ivy.xml"));
+    }
+}
diff --git a/test/java/org/apache/ivy/plugins/resolver/util/bad-url.cudf b/test/java/org/apache/ivy/plugins/resolver/util/bad-url.cudf
new file mode 100644
index 0000000..82d13f3
--- /dev/null
+++ b/test/java/org/apache/ivy/plugins/resolver/util/bad-url.cudf
@@ -0,0 +1,16 @@
+preamble:
+property: number: string, recommends: vpkgformula = [true!], suggests: vpkglist = [],
+          url: string = [""]
+
+package: org.springframework%3aspring-core
+number: 3.1.1.RELEASE
+version: 5
+depends: org.springframework%3aspring-asm = 3, commons-logging%3acommons-logging = 5
+
+package: org.springframework%3aspring-asm
+number: 3.1.1.RELEASE
+version: 3
+
+package: commons-logging%3acommons-logging
+number: 1.1.1
+version: 5
diff --git a/test/java/org/apache/ivy/plugins/resolver/util/bad.cudf b/test/java/org/apache/ivy/plugins/resolver/util/bad.cudf
new file mode 100644
index 0000000..caa9e13
--- /dev/null
+++ b/test/java/org/apache/ivy/plugins/resolver/util/bad.cudf
@@ -0,0 +1,19 @@
+preamble:
+property: number: string, recommends: vpkgformula = [true!], suggests: vpkglist = [],
+          url: string = [""]
+
+package: org.springframework%3aspring-core
+nmber: 3.1.1.RELEASE
+version: 5
+url: http%3a//localhost%3a9091/archiva/repository/toto/org/springframework/spring-core/3.1.1.RELEASE/spring-core-3.1.1.RELEASE.jar
+depends: org.springframework%3aspring-asm = 3, commons-logging%3acommons-logging = 5
+
+pacage: org.springframework%3aspring-asm
+number: 3.1.1.RELEASE
+version: 3
+url: http%3a//localhost%3a9091/archiva/repository/toto/org/springframework/spring-asm/3.1.1.RELEASE/spring-asm-3.1.1.RELEASE.jar
+
+package: commons-logging%3acommons-logging
+number: 1.1.1
+vesion: 5
+url: http%3a//localhost%3a9091/archiva/repository/toto/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
diff --git a/test/java/org/apache/ivy/plugins/resolver/util/bad2.cudf b/test/java/org/apache/ivy/plugins/resolver/util/bad2.cudf
new file mode 100644
index 0000000..73e88ea
--- /dev/null
+++ b/test/java/org/apache/ivy/plugins/resolver/util/bad2.cudf
@@ -0,0 +1,18 @@
+preamble:
+property: number: string, recommends: vpkgformula = [true!], suggests: vpkglist = [],
+          url: string = [""]
+
+package: org.springframework%3aspring-core
+version: 5
+url: http%3a//localhost%3a9091/archiva/repository/toto/org/springframework/spring-core/3.1.1.RELEASE/spring-core-3.1.1.RELEASE.jar
+depends: org.springframework%3aspring-asm = 3, commons-logging%3acommons-logging = 5
+
+package: org.springframework%3aspring-asm
+number: 3.1.1.RELEASE
+version: 3
+url: http%3a//localhost%3a9091/archiva/repository/toto/org/springframework/spring-asm/3.1.1.RELEASE/spring-asm-3.1.1.RELEASE.jar
+
+package: commons-logging%3acommons-logging
+number: 1.1.1
+version: 5
+url: http%3a//localhost%3a9091/archiva/repository/toto/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
diff --git a/test/java/org/apache/ivy/plugins/resolver/util/empty.cudf b/test/java/org/apache/ivy/plugins/resolver/util/empty.cudf
new file mode 100644
index 0000000..5bd3196
--- /dev/null
+++ b/test/java/org/apache/ivy/plugins/resolver/util/empty.cudf
@@ -0,0 +1,3 @@
+preamble:
+property: number: string, recommends: vpkgformula = [true!], suggests: vpkglist = [],
+          url: string = [""]
diff --git a/test/java/org/apache/ivy/plugins/resolver/util/testdownload.cudf b/test/java/org/apache/ivy/plugins/resolver/util/testdownload.cudf
new file mode 100644
index 0000000..7f43aef
--- /dev/null
+++ b/test/java/org/apache/ivy/plugins/resolver/util/testdownload.cudf
@@ -0,0 +1,16 @@
+preamble:
+property: number: string, recommends: vpkgformula = [true!], suggests: vpkglist = [],
+          url: string = [""]
+
+package: org.springframework%3aspring-core
+number: 3.1.1.RELEASE
+version: 5
+depends: org.springframework%3aspring-asm = 3, commons-logging%3acommons-logging = 5
+
+package: org.springframework%3aspring-asm
+number: 3.1.1.RELEASE
+version: 3
+
+package: commons-logging%3acommons-logging
+number: 1.1.1
+version: 5
\ No newline at end of file
diff --git a/test/repositories/IVY-1300/assembly-ivy.xml b/test/repositories/IVY-1300/assembly-ivy.xml
new file mode 100644
index 0000000..3fa835d
--- /dev/null
+++ b/test/repositories/IVY-1300/assembly-ivy.xml
@@ -0,0 +1,30 @@
+<!--
+   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">
+  <info organisation="myorg" module="projectassembly" branch="releasebranch" revision="1"/>
+  <configurations>
+    <conf name="default"/>
+  </configurations>
+  <publications>
+  </publications>
+  <dependencies>
+    <dependency name="modA" rev="latest.integration" branch="releasebranch" conf="default->default"/>
+    <dependency name="modB" rev="latest.integration" branch="releasebranch" conf="default->default"/>
+  </dependencies>
+</ivy-module> 
diff --git a/test/repositories/IVY-1300/ivysettings.xml b/test/repositories/IVY-1300/ivysettings.xml
new file mode 100644
index 0000000..efeb892
--- /dev/null
+++ b/test/repositories/IVY-1300/ivysettings.xml
@@ -0,0 +1,27 @@
+<!--
+   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 defaultResolver="local" />
+   <resolvers>
+        <filesystem name="local" checkmodified="true" local="true">
+            <ivy pattern="${ivy.settings.dir}/[organisation]/[module]/[branch]/[revision]/ivy.xml"/>
+            <artifact pattern="${ivy.settings.dir}/[organisation]/[module]/[branch]/[revision]/[artifact].[ext]"/>
+        </filesystem>
+    </resolvers>
+</ivysettings>
diff --git a/test/repositories/IVY-1300/myorg/modA/releasebranch/1/ivy.xml b/test/repositories/IVY-1300/myorg/modA/releasebranch/1/ivy.xml
new file mode 100644
index 0000000..77642b7
--- /dev/null
+++ b/test/repositories/IVY-1300/myorg/modA/releasebranch/1/ivy.xml
@@ -0,0 +1,26 @@
+<!--
+   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">
+    <info organisation="myorg" module="modA" branch="releasebranch" revision="1" />
+    <configurations>
+      <conf name="default"/>
+    </configurations>
+    <publications>
+    </publications>
+</ivy-module>
diff --git a/test/repositories/IVY-1300/myorg/modA/trunk/5/ivy.xml b/test/repositories/IVY-1300/myorg/modA/trunk/5/ivy.xml
new file mode 100644
index 0000000..8de91ff
--- /dev/null
+++ b/test/repositories/IVY-1300/myorg/modA/trunk/5/ivy.xml
@@ -0,0 +1,26 @@
+<!--
+   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">
+    <info organisation="myorg" module="modA" branch="trunk" revision="5" />
+    <configurations>
+      <conf name="default"/>
+    </configurations>
+    <publications>
+    </publications>
+</ivy-module>
diff --git a/test/repositories/IVY-1300/myorg/modB/releasebranch/1/ivy.xml b/test/repositories/IVY-1300/myorg/modB/releasebranch/1/ivy.xml
new file mode 100644
index 0000000..d0f3d81
--- /dev/null
+++ b/test/repositories/IVY-1300/myorg/modB/releasebranch/1/ivy.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.    
+-->
+<ivy-module version="2.0">
+    <info organisation="myorg" module="modB" branch="releasebranch" revision="1" />
+    <configurations>
+      <conf name="default"/>
+    </configurations>
+    <publications>
+    </publications>
+    <dependencies>
+      <dependency org="myorg" name="modA" branch="trunk" rev="latest.integration" conf="default->default"/>
+    </dependencies>
+</ivy-module>
diff --git a/test/repositories/IVY-1300/myorg/modB/trunk/5/ivy.xml b/test/repositories/IVY-1300/myorg/modB/trunk/5/ivy.xml
new file mode 100644
index 0000000..a10dd58
--- /dev/null
+++ b/test/repositories/IVY-1300/myorg/modB/trunk/5/ivy.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.    
+-->
+<ivy-module version="2.0">
+    <info organisation="myorg" module="modB" branch="trunk" revision="5" />
+    <configurations>
+      <conf name="default"/>
+    </configurations>
+    <publications>
+    </publications>
+    <dependencies>
+      <dependency org="myorg" name="modA" branch="trunk" rev="latest.integration" conf="default->default"/>
+    </dependencies>
+</ivy-module>
diff --git a/test/test-cudf/build.xml b/test/test-cudf/build.xml
new file mode 100644
index 0000000..a78c330
--- /dev/null
+++ b/test/test-cudf/build.xml
@@ -0,0 +1,26 @@
+<project name="Ivy Test" default="resolve" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
+  <description>
+    a simple project to test ivy
+  </description>
+
+  <property name="target" value="target" />
+  <property name="lib" value="lib" />
+  
+  <target name="init">
+    <tstamp>
+      <format pattern="yyyyMMddhhmmss" locale="fr,FR" property="DSTAMP" />
+    </tstamp>
+    <property name="dl" value="${target}/${lib}-${DSTAMP}" />
+    <mkdir dir="${dl}" />
+    <mkdir dir="${dl}/cache" />
+    <property name="ivy.lib.dir.ivy.instance" value="${dl}" />
+  </target>
+  
+  <target name="resolve" depends="init">
+    <ivy:resolve />
+  </target>
+
+  <target name="clean">
+    <delete dir="${target}" />
+  </target>
+</project>
diff --git a/test/test-cudf/ivy.xml b/test/test-cudf/ivy.xml
new file mode 100644
index 0000000..6200c4f
--- /dev/null
+++ b/test/test-cudf/ivy.xml
@@ -0,0 +1,11 @@
+<ivy-module version="2.0">
+    <info organisation="org.apache" module="hello-ivy"/>
+    <configurations>
+        <conf name="A"/>
+        <conf name="B"/>
+    </configurations>
+    <dependencies>
+        <dependency org="commons-httpclient" name="commons-httpclient" rev="3.1" conf="A->default"/>
+        <dependency org="org.springframework" name="spring-core" rev="3.1.1.RELEASE" conf="B->test"/>
+    </dependencies>
+</ivy-module>
diff --git a/test/test-cudf/ivysettings-without-url.xml b/test/test-cudf/ivysettings-without-url.xml
new file mode 100644
index 0000000..b1aeb65
--- /dev/null
+++ b/test/test-cudf/ivysettings-without-url.xml
@@ -0,0 +1,12 @@
+<ivysettings>
+    <settings defaultResolver="cudf"/>
+    <parsers>
+        <cudf-parser/>
+    </parsers>
+    <resolvers>
+        <url name="cudf" m2compatible="true">
+            <ivy pattern="file:test/test-cudf/repositories/cudf-without-url/[organisation]/[module]/[revision]/[module]-[revision].cudf"/>
+            <artifact pattern="http://repo.maven.apache.org/maven2/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/>
+        </url>
+    </resolvers>
+</ivysettings>
\ No newline at end of file
diff --git a/test/test-cudf/ivysettings.xml b/test/test-cudf/ivysettings.xml
new file mode 100644
index 0000000..b4789d9
--- /dev/null
+++ b/test/test-cudf/ivysettings.xml
@@ -0,0 +1,12 @@
+<ivysettings>
+    <settings defaultResolver="cudf"/>
+    <parsers>
+        <cudf-parser/>
+    </parsers>
+    <resolvers>
+        <url name="cudf" m2compatible="true">
+            <ivy pattern="file:test/test-cudf/repositories/cudf-with-url/[organisation]/[module]/[revision]/[module]-[revision].cudf"/>
+            <artifact pattern="http://repo.maven.apache.org/maven2/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/>
+        </url>
+    </resolvers>
+</ivysettings>
diff --git a/test/test-cudf/repositories/cudf-with-url/commons-collections/commons-collections/3.1/commons-collections-3.1.cudf b/test/test-cudf/repositories/cudf-with-url/commons-collections/commons-collections/3.1/commons-collections-3.1.cudf
new file mode 100644
index 0000000..49873dd
--- /dev/null
+++ b/test/test-cudf/repositories/cudf-with-url/commons-collections/commons-collections/3.1/commons-collections-3.1.cudf
@@ -0,0 +1,8 @@
+preamble:
+property: number: string, recommends: vpkgformula = [true!], suggests: vpkglist = [],
+          url: string = [""]
+
+package: commons-collections%3acommons-collections
+number: 3.1
+version: 5
+type: jar
\ No newline at end of file
diff --git a/test/test-cudf/repositories/cudf-with-url/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.cudf b/test/test-cudf/repositories/cudf-with-url/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.cudf
new file mode 100644
index 0000000..73d22e1
--- /dev/null
+++ b/test/test-cudf/repositories/cudf-with-url/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.cudf
@@ -0,0 +1,8 @@
+preamble:
+property: number: string, recommends: vpkgformula = [true!], suggests: vpkglist = [],
+          url: string = [""]
+
+package: commons-httpclient%3acommons-httpclient
+number: 3.1
+version: 5
+type: jar
\ No newline at end of file
diff --git a/test/test-cudf/repositories/cudf-with-url/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.cudf b/test/test-cudf/repositories/cudf-with-url/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.cudf
new file mode 100644
index 0000000..51ff6a0
--- /dev/null
+++ b/test/test-cudf/repositories/cudf-with-url/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.cudf
@@ -0,0 +1,8 @@
+preamble:
+property: number: string, recommends: vpkgformula = [true!], suggests: vpkglist = [],
+          url: string = [""]
+
+package: commons-logging%3acommons-logging
+number: 1.1.1
+version: 5
+type: jar
\ No newline at end of file
diff --git a/test/test-cudf/repositories/cudf-with-url/junit/junit/3.8/junit-3.8.cudf b/test/test-cudf/repositories/cudf-with-url/junit/junit/3.8/junit-3.8.cudf
new file mode 100644
index 0000000..2dcd3cd
--- /dev/null
+++ b/test/test-cudf/repositories/cudf-with-url/junit/junit/3.8/junit-3.8.cudf
@@ -0,0 +1,9 @@
+preamble:
+property: number: string, recommends: vpkgformula = [true!], suggests: vpkglist = [],
+          url: string = [""]
+
+package: junit%3ajunit
+number: 3.8
+version: 5
+type: jar
+url: http%3a//repo1.maven.org/maven2/junit/junit/3.8/junit-3.1.jar
\ No newline at end of file
diff --git a/test/test-cudf/repositories/cudf-with-url/org/apache/test/1.0 b/test/test-cudf/repositories/cudf-with-url/org/apache/test/1.0
new file mode 100644
index 0000000..25f0007
--- /dev/null
+++ b/test/test-cudf/repositories/cudf-with-url/org/apache/test/1.0
@@ -0,0 +1,19 @@
+preamble:
+property: number: string, recommends: vpkgformula = [true!], suggests: vpkglist = [],
+          url: string = [""]
+
+package: org.apache%3atest
+number: 1.0
+version: 5
+url: http%3a//localhost%3a9091/archiva/repository/toto/org/springframework/spring-core/3.1.1.RELEASE/spring-core-3.1.1.RELEASE.jar
+depends: org.springframework%3aspring-asm = 3, commons-logging%3acommons-logging = 5
+
+package: org.springframework%3aspring-asm
+number: 3.1.1.RELEASE
+version: 3
+url: http%3a//localhost%3a9091/archiva/repository/toto/org/springframework/spring-asm/3.1.1.RELEASE/spring-asm-3.1.1.RELEASE.jar
+
+package: commons-logging%3acommons-logging
+number: 1.1.1
+version: 5
+url: http%3a//localhost%a39091/archiva/repository/toto/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
diff --git a/test/test-cudf/repositories/cudf-with-url/org/springframework/spring-asm/3.1.1.RELEASE/spring-asm-3.1.1.RELEASE.cudf b/test/test-cudf/repositories/cudf-with-url/org/springframework/spring-asm/3.1.1.RELEASE/spring-asm-3.1.1.RELEASE.cudf
new file mode 100644
index 0000000..3abbf62
--- /dev/null
+++ b/test/test-cudf/repositories/cudf-with-url/org/springframework/spring-asm/3.1.1.RELEASE/spring-asm-3.1.1.RELEASE.cudf
@@ -0,0 +1,9 @@
+preamble:
+property: number: string, recommends: vpkgformula = [true!], suggests: vpkglist = [],
+          url: string = [""]
+
+package: org.springframework%3aspring-asm
+number: 3.1.1.RELEASE
+version: 5
+type: jar
+url: http%3a//repo1.maven.org/maven2/org/springframework/spring-core/3.1.1.RELEASE/spring-core-3.1.1.RELEASE.jar
diff --git a/test/test-cudf/repositories/cudf-with-url/org/springframework/spring-core/3.1.1.RELEASE/spring-core-3.1.1.RELEASE.cudf b/test/test-cudf/repositories/cudf-with-url/org/springframework/spring-core/3.1.1.RELEASE/spring-core-3.1.1.RELEASE.cudf
new file mode 100644
index 0000000..5f10ad6
--- /dev/null
+++ b/test/test-cudf/repositories/cudf-with-url/org/springframework/spring-core/3.1.1.RELEASE/spring-core-3.1.1.RELEASE.cudf
@@ -0,0 +1,22 @@
+preamble:
+property: number: string, recommends: vpkgformula = [true!], suggests: vpkglist = [],
+          url: string = [""]
+
+package: org.springframework%3aspring-core
+number: 3.1.1.RELEASE
+version: 5
+type: jar
+url: http%3a//repo1.maven.org/maven2/org/springframework/spring-core/3.1.1.RELEASE/spring-core-3.1.1.RELEASE.jar
+depends: org.springframework%3aspring-asm = 3, commons-logging%3acommons-logging = 5
+
+package: org.springframework%3aspring-asm
+number: 3.1.1.RELEASE
+version: 3
+type: jar
+url: http%3a//repo1.maven.org/maven2/org/springframework/spring-asm/3.1.1.RELEASE/spring-asm-3.1.1.RELEASE.jar
+
+package: commons-logging%3acommons-logging
+number: 1.1.1
+version: 5
+type: jar
+url: http%3a//repo1.maven.org/maven2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
diff --git a/test/test-cudf/repositories/cudf-without-url/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.cudf b/test/test-cudf/repositories/cudf-without-url/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.cudf
new file mode 100644
index 0000000..73d22e1
--- /dev/null
+++ b/test/test-cudf/repositories/cudf-without-url/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.cudf
@@ -0,0 +1,8 @@
+preamble:
+property: number: string, recommends: vpkgformula = [true!], suggests: vpkglist = [],
+          url: string = [""]
+
+package: commons-httpclient%3acommons-httpclient
+number: 3.1
+version: 5
+type: jar
\ No newline at end of file
diff --git a/test/test-cudf/repositories/cudf-without-url/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.cudf b/test/test-cudf/repositories/cudf-without-url/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.cudf
new file mode 100644
index 0000000..51ff6a0
--- /dev/null
+++ b/test/test-cudf/repositories/cudf-without-url/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.cudf
@@ -0,0 +1,8 @@
+preamble:
+property: number: string, recommends: vpkgformula = [true!], suggests: vpkglist = [],
+          url: string = [""]
+
+package: commons-logging%3acommons-logging
+number: 1.1.1
+version: 5
+type: jar
\ No newline at end of file
diff --git a/test/test-cudf/repositories/cudf-without-url/org/apache/test/1.0 b/test/test-cudf/repositories/cudf-without-url/org/apache/test/1.0
new file mode 100644
index 0000000..163cc1c
--- /dev/null
+++ b/test/test-cudf/repositories/cudf-without-url/org/apache/test/1.0
@@ -0,0 +1,16 @@
+preamble:
+property: number: string, recommends: vpkgformula = [true!], suggests: vpkglist = [],
+          url: string = [""]
+
+package: org.apache%3atest
+number: 1.0
+version: 5
+depends: org.springframework%3aspring-asm = 3, commons-logging%3acommons-logging = 5
+
+package: org.springframework%3aspring-asm
+number: 3.1.1.RELEASE
+version: 3
+
+package: commons-logging%3acommons-logging
+number: 1.1.1
+version: 5
diff --git a/test/test-cudf/repositories/cudf-without-url/org/springframework/spring-asm/3.1.1.RELEASE/spring-asm-3.1.1.RELEASE.cudf b/test/test-cudf/repositories/cudf-without-url/org/springframework/spring-asm/3.1.1.RELEASE/spring-asm-3.1.1.RELEASE.cudf
new file mode 100644
index 0000000..3abbf62
--- /dev/null
+++ b/test/test-cudf/repositories/cudf-without-url/org/springframework/spring-asm/3.1.1.RELEASE/spring-asm-3.1.1.RELEASE.cudf
@@ -0,0 +1,9 @@
+preamble:
+property: number: string, recommends: vpkgformula = [true!], suggests: vpkglist = [],
+          url: string = [""]
+
+package: org.springframework%3aspring-asm
+number: 3.1.1.RELEASE
+version: 5
+type: jar
+url: http%3a//repo1.maven.org/maven2/org/springframework/spring-core/3.1.1.RELEASE/spring-core-3.1.1.RELEASE.jar
diff --git a/test/test-cudf/repositories/cudf-without-url/org/springframework/spring-core/3.1.1.RELEASE/spring-core-3.1.1.RELEASE.cudf b/test/test-cudf/repositories/cudf-without-url/org/springframework/spring-core/3.1.1.RELEASE/spring-core-3.1.1.RELEASE.cudf
new file mode 100644
index 0000000..5f10ad6
--- /dev/null
+++ b/test/test-cudf/repositories/cudf-without-url/org/springframework/spring-core/3.1.1.RELEASE/spring-core-3.1.1.RELEASE.cudf
@@ -0,0 +1,22 @@
+preamble:
+property: number: string, recommends: vpkgformula = [true!], suggests: vpkglist = [],
+          url: string = [""]
+
+package: org.springframework%3aspring-core
+number: 3.1.1.RELEASE
+version: 5
+type: jar
+url: http%3a//repo1.maven.org/maven2/org/springframework/spring-core/3.1.1.RELEASE/spring-core-3.1.1.RELEASE.jar
+depends: org.springframework%3aspring-asm = 3, commons-logging%3acommons-logging = 5
+
+package: org.springframework%3aspring-asm
+number: 3.1.1.RELEASE
+version: 3
+type: jar
+url: http%3a//repo1.maven.org/maven2/org/springframework/spring-asm/3.1.1.RELEASE/spring-asm-3.1.1.RELEASE.jar
+
+package: commons-logging%3acommons-logging
+number: 1.1.1
+version: 5
+type: jar
+url: http%3a//repo1.maven.org/maven2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
