Max Bowsher wrote: > Oh. I was caught out by the interpolation syntax change ${foo} to [foo]. > Adapting to that, it now seems to be working - thanks!
Seems I spoke too soon :-( -Declipse.addVersionToProjectName doesn't work. The problem is that calculateProjectNameTemplate() attempts to use: if ( getProjectNameTemplate() != null ) to determine if a projectNameTemplate was set, but the @parameter declares a default-value, so this is never true. The simplest fix would be to just drop the default-value from the @parameter declaration. A minor feature request whilst it occurs to me - after writing the project, the plugin emits (for example): [INFO] Wrote Eclipse project for "maven-script-beanshell" to /home/maxb/wc/maven/2.0.x/maven-script/maven-script-beanshell. The quoted word is currently just the project's artifactId, but with these added project name rewriting facilities, it would be useful to have confirmation in the output that a different eclipse project name was used - so I suggest putting the generated eclipse project name in that log line instead. Let me know if you'd like either/both of these issues taken to JIRA. Here is a two-line patch encompassing both of the above: Index: src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java =================================================================== --- src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java (revision 549790) +++ src/main/java/org/apache/maven/plugin/eclipse/EclipsePlugin.java (working copy) @@ -332,7 +332,7 @@ * * eg. <code>[groupId].[artifactId]-[version]</code> * - * @parameter expression="${eclipse.projectNameTemplate}" default-value="[artifactId]" + * @parameter expression="${eclipse.projectNameTemplate}" */ private String projectNameTemplate; @@ -836,7 +836,7 @@ } getLog().info( Messages.getString( "EclipsePlugin.wrote", new Object[] { //$NON-NLS-1$ - project.getArtifactId(), eclipseProjectDir.getAbsolutePath() } ) ); + config.getEclipseProjectName(), eclipseProjectDir.getAbsolutePath() } ) ); } protected EclipseWriterConfig createEclipseWriterConfig( IdeDependency[] deps ) Max.
signature.asc
Description: OpenPGP digital signature