mirror of https://github.com/apache/ant-ivy
NEW: [orgPath] can now be used as token in ivy/artifact patterns
git-svn-id: https://svn.apache.org/repos/asf/ant/ivy/core/trunk@1325961 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2872e1e77b
commit
aac1bf1a25
|
|
@ -131,6 +131,7 @@ for detailed view of each issue, please consult http://issues.apache.org/jira/br
|
|||
- DOCUMENTATION: wrong default resolver documented on the 'How does it work' page (IVY-1265)
|
||||
- DOCUMENTATION: Correct outdated links to configuration pages (IVY-1266)
|
||||
|
||||
- NEW: [orgPath] can now be used as token in ivy/artifact patterns
|
||||
- NEW: New Ant datatype ivy:resources, an Ant resource collection like ivy:cachepath or ivy:cachefileset (IVY-334)
|
||||
- NEW: ivy:resolve and post resole task can now have inlined dependencies declaration.
|
||||
- NEW: Import Bushel into Ivy core (IVY-1241)
|
||||
|
|
|
|||
|
|
@ -94,6 +94,7 @@ The tokens available depends on where the pattern is used (will it be evaluated
|
|||
But here are all the tokens currently available:
|
||||
<ul>
|
||||
<li>[organisation]</li> the organisation name
|
||||
<li>[orgPath] <span class="since">(since 2.3)</span></li> the organisation name where '.' has been replaced by '/'. This can be used to configure maven2-like repositories.
|
||||
<li>[module]</li> the module name
|
||||
<li>[branch]</li> the branch name
|
||||
<li>[revision]</li> the revision name
|
||||
|
|
|
|||
|
|
@ -61,6 +61,8 @@ public final class IvyPatternHelper {
|
|||
|
||||
public static final String ORGANISATION_KEY2 = "organization";
|
||||
|
||||
public static final String ORGANISATION_PATH_KEY = "orgPath";
|
||||
|
||||
public static final String ORIGINAL_ARTIFACTNAME_KEY = "originalname";
|
||||
|
||||
private static final Pattern PARAM_PATTERN = Pattern.compile("\\@\\{(.*?)\\}");
|
||||
|
|
@ -148,6 +150,7 @@ public final class IvyPatternHelper {
|
|||
}
|
||||
tokens.put(ORGANISATION_KEY, org == null ? "" : org);
|
||||
tokens.put(ORGANISATION_KEY2, org == null ? "" : org);
|
||||
tokens.put(ORGANISATION_PATH_KEY, org == null ? "" : org.replace('.', '/'));
|
||||
tokens.put(MODULE_KEY, module == null ? "" : module);
|
||||
tokens.put(BRANCH_KEY, branch == null ? "" : branch);
|
||||
tokens.put(REVISION_KEY, revision == null ? "" : revision);
|
||||
|
|
@ -222,6 +225,10 @@ public final class IvyPatternHelper {
|
|||
if (tokensCopy.containsKey(ORGANISATION_KEY) && !tokensCopy.containsKey(ORGANISATION_KEY2)) {
|
||||
tokensCopy.put(ORGANISATION_KEY2, tokensCopy.get(ORGANISATION_KEY));
|
||||
}
|
||||
if (tokensCopy.containsKey(ORGANISATION_KEY) && !tokensCopy.containsKey(ORGANISATION_PATH_KEY)) {
|
||||
String org = (String) tokensCopy.get(ORGANISATION_KEY);
|
||||
tokensCopy.put(ORGANISATION_PATH_KEY, org == null ? "" : org.replace('.', '/'));
|
||||
}
|
||||
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue