[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.
git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@746382 13f79535-47bb-0310-9956-ffa450edef68master
parent
b38d62494f
commit
5c42776c50
|
|
@ -30,6 +30,7 @@ import org.apache.maven.tools.plugin.extractor.ExtractionException;
|
|||
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 @@ public abstract class AbstractGeneratorMojo
|
|||
|
||||
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() ) );
|
||||
|
|
|
|||
Loading…
Reference in New Issue