fixed inconsistency between source file location and package name used when ant mojo
git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1405262 13f79535-47bb-0310-9956-ffa450edef68master
parent
92df3b3987
commit
62dca6fbd5
|
|
@ -207,13 +207,12 @@ public class PluginHelpGenerator
|
||||||
*/
|
*/
|
||||||
private String getImplementation( PluginDescriptor pluginDescriptor )
|
private String getImplementation( PluginDescriptor pluginDescriptor )
|
||||||
{
|
{
|
||||||
String packageName = helpPackageName;
|
if ( StringUtils.isEmpty( helpPackageName ) )
|
||||||
if ( StringUtils.isEmpty( packageName ) )
|
|
||||||
{
|
{
|
||||||
packageName = GeneratorUtils.discoverPackageName( pluginDescriptor );
|
helpPackageName = GeneratorUtils.discoverPackageName( pluginDescriptor );
|
||||||
}
|
}
|
||||||
|
|
||||||
return StringUtils.isEmpty( packageName ) ? HELP_MOJO_CLASS_NAME : packageName + '.' + HELP_MOJO_CLASS_NAME;
|
return StringUtils.isEmpty( helpPackageName ) ? HELP_MOJO_CLASS_NAME : helpPackageName + '.' + HELP_MOJO_CLASS_NAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -318,8 +317,6 @@ public class PluginHelpGenerator
|
||||||
|
|
||||||
// rewrite help mojo source
|
// rewrite help mojo source
|
||||||
File helpSourceFile = new File( destinationDirectory, HELP_MOJO_CLASS_NAME + ".java" );
|
File helpSourceFile = new File( destinationDirectory, HELP_MOJO_CLASS_NAME + ".java" );
|
||||||
if ( helpSourceFile.exists() )
|
|
||||||
{
|
|
||||||
File helpSourceFileNew = new File( destinationDirectory, packageAsDirectory + '/' + HELP_MOJO_CLASS_NAME + ".java" );
|
File helpSourceFileNew = new File( destinationDirectory, packageAsDirectory + '/' + HELP_MOJO_CLASS_NAME + ".java" );
|
||||||
if ( !helpSourceFileNew.getParentFile().exists() )
|
if ( !helpSourceFileNew.getParentFile().exists() )
|
||||||
{
|
{
|
||||||
|
|
@ -346,7 +343,6 @@ public class PluginHelpGenerator
|
||||||
}
|
}
|
||||||
helpSourceFileNew.setLastModified( helpSourceFile.lastModified() );
|
helpSourceFileNew.setLastModified( helpSourceFile.lastModified() );
|
||||||
helpSourceFile.delete();
|
helpSourceFile.delete();
|
||||||
}
|
|
||||||
|
|
||||||
// rewrite help mojo .class
|
// rewrite help mojo .class
|
||||||
File rewriteHelpClassFile =
|
File rewriteHelpClassFile =
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue