You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ca...@apache.org on 2007/06/22 03:49:26 UTC
svn commit: r549666 - in
/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin:
eclipse/EclipsePlugin.java ide/IdeUtils.java
Author: carlos
Date: Thu Jun 21 18:49:25 2007
New Revision: 549666
URL: http://svn.apache.org/viewvc?view=rev&rev=549666
Log:
[MECLIPSE-251] Change the template format to avoid conflict with maven expressions
Modified:
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java
maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/IdeUtils.java
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java?view=diff&rev=549666&r1=549665&r2=549666
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java Thu Jun 21 18:49:25 2007
@@ -327,12 +327,12 @@
* Allows configuring the name of the eclipse projects. This property wins over
* addVersionToProjectName and addGroupIdToProjectName
*
- * You can use <code>${groupId}</code>, <code>${artifactId}</code> and
- * <code>${version}</code> variables.
+ * You can use <code>[groupId]</code>, <code>[artifactId]</code> and
+ * <code>[version]</code> variables.
*
- * eg. <code>${groupId}.${artifactId}-${version}</code>
+ * eg. <code>[groupId].[artifactId]-[version]</code>
*
- * @parameter expression="${eclipse.projectNameTemplate}" default-value="${artifactId}"
+ * @parameter expression="${eclipse.projectNameTemplate}" default-value="[artifactId]"
*/
private String projectNameTemplate;
@@ -1125,7 +1125,8 @@
* Calculate the project name template from the fields {@link #projectNameTemplate},
* {@link #addVersionToProjectName} and {@link #addGroupIdToProjectName}
*
- * @return
+ * @return the project name template that should be used after considering the plugin
+ * configuration
*/
private String calculateProjectNameTemplate()
{
@@ -1137,7 +1138,7 @@
"projectNameTemplate definition overrides "
+ "addVersionToProjectName or addGroupIdToProjectName" );
}
- return projectNameTemplate;
+ return getProjectNameTemplate();
}
else if ( isAddVersionToProjectName() && isAddGroupIdToProjectName() )
{
Modified: maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/IdeUtils.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/IdeUtils.java?view=diff&rev=549666&r1=549665&r2=549666
==============================================================================
--- maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/IdeUtils.java (original)
+++ maven/plugins/trunk/maven-eclipse-plugin/src/main/java/org/apache/maven/plugin/ide/IdeUtils.java Thu Jun 21 18:49:25 2007
@@ -57,13 +57,13 @@
public static final String JAVA_6_0 = "6.0";
- public static final String PROJECT_NAME_DEFAULT_TEMPLATE = "${artifactId}";
+ public static final String PROJECT_NAME_DEFAULT_TEMPLATE = "[artifactId]";
- public static final String PROJECT_NAME_WITH_VERSION_TEMPLATE = "${artifactId}-${version}";
+ public static final String PROJECT_NAME_WITH_VERSION_TEMPLATE = "[artifactId]-[version]";
- public static final String PROJECT_NAME_WITH_GROUP_TEMPLATE = "${groupId}.${artifactId}";
+ public static final String PROJECT_NAME_WITH_GROUP_TEMPLATE = "[groupId].[artifactId]";
- public static final String PROJECT_NAME_WITH_GROUP_AND_VERSION_TEMPLATE = "${groupId}.${artifactId}-${version}";
+ public static final String PROJECT_NAME_WITH_GROUP_AND_VERSION_TEMPLATE = "[groupId].[artifactId]-[version]";
/**
* compiler plugin id.
@@ -377,9 +377,9 @@
private static String getProjectName( String template, String groupId, String artifactId, String version )
{
String s = template;
- s = s.replaceAll( "\\$\\{groupId\\}", groupId );
- s = s.replaceAll( "\\$\\{artifactId\\}", artifactId );
- s = s.replaceAll( "\\$\\{version\\}", version );
+ s = s.replaceAll( "\\[groupId\\]", groupId );
+ s = s.replaceAll( "\\[artifactId\\]", artifactId );
+ s = s.replaceAll( "\\[version\\]", version );
return s;
}