IMPROVEMENT: ivy:resolve ant task does not support "branch" attribute (IVY-1035)
authorMaarten Coene <maartenc@apache.org>
Thu, 26 Feb 2009 22:48:20 +0000 (22:48 +0000)
committerMaarten Coene <maartenc@apache.org>
Thu, 26 Feb 2009 22:48:20 +0000 (22:48 +0000)
git-svn-id: https://svn.apache.org/repos/asf/ant/ivy/core/trunk@748341 13f79535-47bb-0310-9956-ffa450edef68

CHANGES.txt
src/java/org/apache/ivy/ant/IvyPostResolveTask.java
src/java/org/apache/ivy/ant/IvyResolve.java

index b73e0b0..5ce1f00 100644 (file)
@@ -85,6 +85,7 @@ for detailed view of each issue, please consult http://issues.apache.org/jira/br
        
    trunk
 =====================================
+- IMPROVEMENT: ivy:resolve ant task does not support "branch" attribute (IVY-1035)
 - IMPROVEMENT: Ability to strip revConstraint attribute from delivered Ivy files (IVY-989)
 - IMPROVEMENT: enhanced error message when defining an artifact for an unknown configuration.
 - IMPROVEMENT: display the revision of the resolved module in ivy-report.xsl (IVY-1024) (thanks to Carlton Brown)
index acc57f2..8a2d378 100644 (file)
@@ -49,6 +49,8 @@ public abstract class IvyPostResolveTask extends IvyTask {
     private boolean inline = false;
 
     private String organisation;
+    
+    private String branch = null;
 
     private String module;
 
@@ -131,6 +133,7 @@ public abstract class IvyPostResolveTask extends IvyTask {
                 IvyResolve resolve = createResolve(isHaltonfailure(), isUseOrigin());
                 resolve.setOrganisation(getOrganisation());
                 resolve.setModule(getModule());
+                resolve.setBranch(getBranch());
                 resolve.setRevision(getRevision());
                 resolve.setInline(true);
                 resolve.setConf(conf);
@@ -343,6 +346,14 @@ public abstract class IvyPostResolveTask extends IvyTask {
         this.organisation = organisation;
     }
 
+    public String getBranch() {
+        return branch;
+    }
+
+    public void setBranch(String branch) {
+        this.branch = branch;
+    }
+
     public boolean isHaltonfailure() {
         return haltOnFailure;
     }
index 52caf6b..79af866 100644 (file)
@@ -47,6 +47,8 @@ public class IvyResolve extends IvyTask {
     private String organisation = null;
 
     private String module = null;
+    
+    private String branch = null;
 
     private String revision = null;
 
@@ -103,6 +105,14 @@ public class IvyResolve extends IvyTask {
     public void setRevision(String revision) {
         this.revision = revision;
     }
+    
+    public String getBranch() {
+        return branch;
+    }
+
+    public void setBranch(String branch) {
+        this.branch = branch;
+    }
 
     public void setCache(File cache) {
         cacheAttributeNotSupported();
@@ -217,7 +227,7 @@ public class IvyResolve extends IvyTask {
                     revision = "latest.integration";
                 }
                 report = ivy.resolve(ModuleRevisionId
-                        .newInstance(organisation, module, revision), 
+                        .newInstance(organisation, module, branch, revision), 
                         getResolveOptions(ivy, confs, settings), changing);
 
             } else {