Le mercredi 26 mars 2008, Benjamin Bentmann a écrit :
> > 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.
+1
core plugins to be modified:
- compiler
- javadoc
- resources
- jxr
- pmd
do you see other ones?
TODO: same list for Mojo project plugins
>
> > 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.
+1, both for the prefix project.build and for the attribute name
sourceEncoding
just for the record, ${project.reporting.outputEncoding} for every report
plugins could be useful, but that's another story: we'll start another thread
on it later...
> 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.
+1: non-ISO-88596-1 builds will break, but the fix is easy now that a there is
a unified property, so I find it acceptable
> 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.
should we provide ${encoding} or ${sourceEncoding}?
> 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.
I'm not convinced here: just let null=platform encoding, as it has been the
case previously
or perhaps add a warning, throught a "checkSourceEncoding(String encoding)"
method to AbstractMojo for use in every plugin?
>
>
> Benjamin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]