Author: maartenc Date: Tue Nov 25 13:31:51 2008 New Revision: 720603 URL: http://svn.apache.org/viewvc?rev=720603&view=rev Log: FIX: listing possible token values doesn't work properly for the ibiblio resolver
Modified: ant/ivy/core/trunk/CHANGES.txt ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/AbstractPatternsBasedResolver.java ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java Modified: ant/ivy/core/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/CHANGES.txt?rev=720603&r1=720602&r2=720603&view=diff ============================================================================== --- ant/ivy/core/trunk/CHANGES.txt (original) +++ ant/ivy/core/trunk/CHANGES.txt Tue Nov 25 13:31:51 2008 @@ -92,6 +92,7 @@ - FIX: <ivy:buildnumber> returns wrong result when resolve fails (IVY-970) - FIX: IO problem while parsing ivy file (Resetting to invalid mark) (IVY-975) - FIX: Cannot parse maven2 poms containing an UTF-8 BOM +- FIX: listing possible token values doesn't work properly for the ibiblio resolver 2.0.0-rc2 ===================================== Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/AbstractPatternsBasedResolver.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/AbstractPatternsBasedResolver.java?rev=720603&r1=720602&r2=720603&view=diff ============================================================================== --- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/AbstractPatternsBasedResolver.java (original) +++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/AbstractPatternsBasedResolver.java Tue Nov 25 13:31:51 2008 @@ -55,13 +55,6 @@ */ public abstract class AbstractPatternsBasedResolver extends BasicResolver { - private static final Map IVY_ARTIFACT_ATTRIBUTES = new HashMap(); - static { - IVY_ARTIFACT_ATTRIBUTES.put(IvyPatternHelper.ARTIFACT_KEY, "ivy"); - IVY_ARTIFACT_ATTRIBUTES.put(IvyPatternHelper.TYPE_KEY, "ivy"); - IVY_ARTIFACT_ATTRIBUTES.put(IvyPatternHelper.EXT_KEY, "xml"); - } - private List ivyPatterns = new ArrayList(); // List (String pattern) private List artifactPatterns = new ArrayList(); // List (String pattern) @@ -256,7 +249,7 @@ List ivyPatterns = getIvyPatterns(); Map tokenValues = new HashMap(criteria); tokenValues.put(IvyPatternHelper.TYPE_KEY, "ivy"); - tokenValues.put(IvyPatternHelper.EXT_KEY, "xml"); + tokenValues.put(IvyPatternHelper.EXT_KEY, getModuleDescriptorExtension()); if (isM2compatible()) { convertM2TokenValuesForResourceSearch(tokenValues); } @@ -282,6 +275,10 @@ return (Map[]) result.toArray(new Map[result.size()]); } + protected String getModuleDescriptorExtension() { + return "xml"; + } + private Set resolveTokenValues(String[] tokens, String pattern, Map criteria, boolean noMd) { Set result = new LinkedHashSet(); Set tokenSet = new HashSet(Arrays.asList(tokens)); Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java?rev=720603&r1=720602&r2=720603&view=diff ============================================================================== --- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java (original) +++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/IBiblioResolver.java Tue Nov 25 13:31:51 2008 @@ -252,6 +252,10 @@ } } + protected String getModuleDescriptorExtension() { + return "pom"; + } + private String getWholePattern() { return root + pattern; } @@ -339,7 +343,7 @@ */ String partiallyResolvedM2PerModulePattern = IvyPatternHelper.substituteTokens( M2_PER_MODULE_PATTERN, - Collections.singletonMap(IvyPatternHelper.EXT_KEY, "xml")); + Collections.singletonMap(IvyPatternHelper.EXT_KEY, "pom")); if (pattern.endsWith(partiallyResolvedM2PerModulePattern)) { /* * the given pattern already contain resolved org and module, we just have to