From 360954e6bcb0999433c82dd68e6e243f2cb2e898 Mon Sep 17 00:00:00 2001 From: Britton Isbell Date: Thu, 16 Oct 2008 09:16:15 +0000 Subject: [PATCH] Fix: IT0141 git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@705183 13f79535-47bb-0310-9956-ffa450edef68 --- .../builder/PomClassicTransformer.java | 28 +++++++++++++++---- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/maven-project/src/main/java/org/apache/maven/project/builder/PomClassicTransformer.java b/maven-project/src/main/java/org/apache/maven/project/builder/PomClassicTransformer.java index 29baf5d609..122a5ebfce 100644 --- a/maven-project/src/main/java/org/apache/maven/project/builder/PomClassicTransformer.java +++ b/maven-project/src/main/java/org/apache/maven/project/builder/PomClassicTransformer.java @@ -573,17 +573,33 @@ public final class PomClassicTransformer return false; } + private static void putProjectAliasIn(Map map, String s) + { + map.put( "\\$\\{project." + s + "\\}", "\\$\\{" + s + "\\}"); + } + + private static Map aliases = new HashMap(); + + static + { + aliases.put( "project.", "pom."); + aliases.put( "\\$\\{project.build.", "\\$\\{build."); + + List 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 modelProperties, List interpolatorProperties, PomClassicDomainModel domainModel) throws IOException { - - Map aliases = new HashMap(); - aliases.put( "project.", "pom."); - aliases.put( "\\$\\{project.build.", "\\$\\{build."); - aliases.put( "\\$\\{project.parent.", "\\$\\{parent."); - if(!containsProjectVersion(interpolatorProperties)) { aliases.put("\\$\\{project.version\\}", "\\$\\{version\\}");