What about just unifying the expressions that refer to encoding in plugins?

As an intermediate solution until Maven 2.1 provides an extended POM, this seems like a good approach.

javadoc-plugin has ${encoding}
compiler-plugin has ${maven.compiler.encoding}
resources-plugin has no expression defined.

My suggestion: ${project.build.sourceEncoding} or similar, i.e. have the expression match the yet to introduce new POM element for the encoding. This way, plugins using the expression would be forward-compatible with the extended POM and automatically use the new POM element once introduced.

We could also consider to add

 <properties>
   <project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
 </properties>

to the super POM for everyone to inherit. This in place, plugin parameters could be written like

 /**
  * @parameter expression="${encoding}"
  *            default-value="${project.build.sourceEncoding}"
  */
 private String encoding;

i.e. still provide some short expression name for overrides from the cli. Of course, this would require the plugin to add a manual check whether the default-value expression actually was existent or whether an older Maven version is running.


Benjamin

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to