mirror of https://github.com/apache/ant-ivy
FIX: ivy:resolve ignores branch in "dynamic" resolve mode (IVY-1087) (thanks to Aleksey Zhukov)
git-svn-id: https://svn.apache.org/repos/asf/ant/ivy/core/trunk@788538 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7bedb79cd6
commit
d1e97bc853
|
|
@ -85,6 +85,7 @@ for detailed view of each issue, please consult http://issues.apache.org/jira/br
|
|||
Chris Wood
|
||||
Patrick Woodworth
|
||||
Jaroslaw Wypychowski
|
||||
Aleksey Zhukov
|
||||
|
||||
trunk
|
||||
=====================================
|
||||
|
|
@ -94,6 +95,7 @@ for detailed view of each issue, please consult http://issues.apache.org/jira/br
|
|||
- IMPROVEMENT: Standalone runner should accept all the same parameters as ant tasks (IVY-1090)
|
||||
- IMPROVEMENT: Pre and post retrieve artifact events (IVY-1084)
|
||||
|
||||
- FIX: ivy:resolve ignores branch in "dynamic" resolve mode (IVY-1087) (thanks to Aleksey Zhukov)
|
||||
- FIX: [originalname] not expanded during retrieve when module descriptor contains extra attributes (IVY-1096)
|
||||
- FIX: The Ant output wasn't always prefixed by the name of the task
|
||||
- FIX: Ivy buildnumber task does not find artifact in Sonatype Nexus repo (IVY-1069)
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import java.util.Map;
|
|||
import java.util.Map.Entry;
|
||||
|
||||
import org.apache.ivy.core.RelativeUrlResolver;
|
||||
import org.apache.ivy.core.module.id.ModuleId;
|
||||
import org.apache.ivy.core.module.id.ModuleRevisionId;
|
||||
import org.apache.ivy.core.module.status.StatusManager;
|
||||
import org.apache.ivy.plugins.conflict.ConflictManager;
|
||||
|
|
@ -129,6 +130,10 @@ class ParserSettingsMonitor {
|
|||
public File resolveFile(String filename) {
|
||||
return delegatedSettings.resolveFile(filename);
|
||||
}
|
||||
|
||||
public String getDefaultBranch(ModuleId moduleId) {
|
||||
return delegatedSettings.getDefaultBranch(moduleId);
|
||||
}
|
||||
|
||||
public Map substitute(Map strings) {
|
||||
Map substituted = new LinkedHashMap();
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import java.util.Map;
|
|||
|
||||
import org.apache.ivy.core.RelativeUrlResolver;
|
||||
import org.apache.ivy.core.cache.ResolutionCacheManager;
|
||||
import org.apache.ivy.core.module.id.ModuleId;
|
||||
import org.apache.ivy.core.module.id.ModuleRevisionId;
|
||||
import org.apache.ivy.core.module.status.StatusManager;
|
||||
import org.apache.ivy.plugins.conflict.ConflictManager;
|
||||
|
|
@ -52,5 +53,7 @@ public interface ParserSettings {
|
|||
File resolveFile(String filename);
|
||||
|
||||
File getBaseDir();
|
||||
|
||||
String getDefaultBranch(ModuleId moduleId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ import org.apache.ivy.core.module.descriptor.OverrideDependencyDescriptorMediato
|
|||
import org.apache.ivy.core.module.id.ArtifactId;
|
||||
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.conflict.ConflictManager;
|
||||
import org.apache.ivy.plugins.conflict.FixedConflictManager;
|
||||
import org.apache.ivy.plugins.matcher.PatternMatcher;
|
||||
|
|
@ -521,6 +522,12 @@ public class XmlModuleDescriptorParser extends AbstractModuleDescriptorParser {
|
|||
String name = settings.substitute(attributes.getValue("name"));
|
||||
String branch = settings.substitute(attributes.getValue("branch"));
|
||||
String branchConstraint = settings.substitute(attributes.getValue("branchConstraint"));
|
||||
if (branchConstraint == null) {
|
||||
// there was no branch constraint before, so we should
|
||||
// set the branchConstraint to the current default branch
|
||||
branchConstraint = settings.getDefaultBranch(ModuleId.newInstance(org, name));
|
||||
}
|
||||
|
||||
String rev = settings.substitute(attributes.getValue("rev"));
|
||||
String revConstraint = settings.substitute(attributes.getValue("revConstraint"));
|
||||
revConstraint = revConstraint == null ? rev : revConstraint;
|
||||
|
|
|
|||
Loading…
Reference in New Issue