You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jd...@apache.org on 2009/02/20 22:58:20 UTC
svn commit: r746382 -
/maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
Author: jdcasey
Date: Fri Feb 20 21:58:19 2009
New Revision: 746382
URL: http://svn.apache.org/viewvc?rev=746382&view=rev
Log:
[MPLUGIN-111] Warn about the use of platform encoding for extracting mojo metadata. This warning is adapted from that used in the resources plugin, from maven-filtering.
Modified:
maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java?rev=746382&r1=746381&r2=746382&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java Fri Feb 20 21:58:19 2009
@@ -30,6 +30,7 @@
import org.apache.maven.tools.plugin.generator.Generator;
import org.apache.maven.tools.plugin.scanner.MojoScanner;
import org.apache.maven.tools.plugin.util.PluginUtils;
+import org.codehaus.plexus.util.ReaderFactory;
import java.io.File;
import java.io.IOException;
@@ -151,6 +152,16 @@
pluginDescriptor.setDescription( project.getDescription() );
+ if ( encoding == null || encoding.length() < 1 )
+ {
+ getLog().warn( "Using platform encoding (" + ReaderFactory.FILE_ENCODING
+ + " actually) to read mojo metadata, i.e. build is platform dependent!" );
+ }
+ else
+ {
+ getLog().info( "Using '" + encoding + "' encoding to read mojo metadata." );
+ }
+
try
{
pluginDescriptor.setDependencies( PluginUtils.toComponentDependencies( project.getRuntimeDependencies() ) );