mirror of https://github.com/apache/maven.git
Fix: IT0141
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@705183 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bedc1d7a2b
commit
360954e6bc
|
@ -573,17 +573,33 @@ public final class PomClassicTransformer
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void putProjectAliasIn(Map<String, String> map, String s)
|
||||||
|
{
|
||||||
|
map.put( "\\$\\{project." + s + "\\}", "\\$\\{" + s + "\\}");
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Map<String, String> aliases = new HashMap<String, String>();
|
||||||
|
|
||||||
|
static
|
||||||
|
{
|
||||||
|
aliases.put( "project.", "pom.");
|
||||||
|
aliases.put( "\\$\\{project.build.", "\\$\\{build.");
|
||||||
|
|
||||||
|
List<String> aliasList = Arrays.asList("artifactId", "groupId", "version", "packaging", "name", "description",
|
||||||
|
"url", "inceptionYear", "scm.url", "ciManagement.url", "distributionManagement.repository.name",
|
||||||
|
"reporting.outputDirectory", "parent.groupId", "parent.artifactId",
|
||||||
|
"parent.version", "prerequisites.maven", "issueManagement.url", "organization.name");
|
||||||
|
for(String alias : aliasList) {
|
||||||
|
putProjectAliasIn(aliases, alias);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
private static void interpolateModelProperties(List<ModelProperty> modelProperties,
|
private static void interpolateModelProperties(List<ModelProperty> modelProperties,
|
||||||
List<InterpolatorProperty> interpolatorProperties,
|
List<InterpolatorProperty> interpolatorProperties,
|
||||||
PomClassicDomainModel domainModel)
|
PomClassicDomainModel domainModel)
|
||||||
throws IOException
|
throws IOException
|
||||||
{
|
{
|
||||||
|
|
||||||
Map<String, String> aliases = new HashMap<String, String>();
|
|
||||||
aliases.put( "project.", "pom.");
|
|
||||||
aliases.put( "\\$\\{project.build.", "\\$\\{build.");
|
|
||||||
aliases.put( "\\$\\{project.parent.", "\\$\\{parent.");
|
|
||||||
|
|
||||||
if(!containsProjectVersion(interpolatorProperties))
|
if(!containsProjectVersion(interpolatorProperties))
|
||||||
{
|
{
|
||||||
aliases.put("\\$\\{project.version\\}", "\\$\\{version\\}");
|
aliases.put("\\$\\{project.version\\}", "\\$\\{version\\}");
|
||||||
|
|
Loading…
Reference in New Issue