Hi,
As usual, you're right :-).
I will fix that this evening.
And yes a new paramater in the filtering component sounds good to me.

Thanks !
--
Olivier

2009/7/27 Benjamin Bentmann <benjamin.bentm...@udo.edu>:
> Hi Olivier,
>
>> Author: olamy
>> Date: Sun Jul 26 23:22:56 2009
>> New Revision: 798002
>>
>> URL: http://svn.apache.org/viewvc?rev=798002&view=rev
>> Log:
>> [MCHANGES-161] Add properties interpolation for changes.xml
>> null
>>
>> Modified:
>> maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesMojo.java
>> URL:
>> http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesMojo.java?rev=798002&r1=798001&r2=798002&view=diff
>>
>> ==============================================================================
>> ---
>> maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesMojo.java
>> (original)
>> +++
>> maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesMojo.java
>> Sun Jul 26 23:22:56 2009
>> +    /**
>> +     *
>> +     * Format to use for publishDate +     * The value will be available
>> with the following expression ${publishDate}
>> +     * +     * @see SimpleDateFormat
>> +     * +     * @parameter default-value="yyyy-MM-dd"
>> +     * +     * @since 2.2
>> +     * +     */
>> +    private String publishDateFormat;
>
> Keep in mind that the generated API/mojo docs (HTML) will loose any pretty
> printing likes the line breaks. So punctuation would improve readability.
>
>> +                // so we get encoding from the file itself
>> +                String encoding = ReaderFactory.newXmlReader( xmlPath
>> ).getEncoding();
>
> The created reader should be also be closed to ensure the file handle
> doesn't leak.
>
>> +                project.getProperties().put( "publishDate",
>> simpleDateFormat.format( now ) );
>> +                mavenFileFilter.copyFile( xmlPath, resultFile, true,
>> project, new ArrayList(), false, encoding, session );
>
> This looks dangerous, a plugin that injects a project property that the user
> did not request to be set. Just trying to imagine the effects on the overall
> build if n plugins come along and inject project properties just for the
> sake of filtering some resource files. For instance, the plugin parameter
> expression evaluator will consult the project properties for plugin
> configuration and now out of a sudden sees values that the user didn't put
> in the POM.
>
> So maybe there should be a new parameter in the filtering component that
> allows for other/private value sources such that plugins don't need to spoil
> the project properties?
>
>
> Benjamin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to