MPLUGIN-28: Error of goal value in Plugin documentation generation
o added a goal prefix parameter o updated warn msg git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@630181 13f79535-47bb-0310-9956-ffa450edef68master
parent
6ccdf06649
commit
a1b75b7ad8
|
|
@ -109,7 +109,8 @@ public abstract class AbstractGeneratorMojo
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
getLog().warn(
|
getLog().warn(
|
||||||
"Goal prefix is: " + goalPrefix + "; Maven currently expects it to be " + defaultGoalPrefix );
|
"\n\nGoal prefix is specified as: '" + goalPrefix + "'. "
|
||||||
|
+ "Maven currently expects it to be '" + defaultGoalPrefix + "'.\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
mojoScanner.setActiveExtractors( extractors );
|
mojoScanner.setActiveExtractors( extractors );
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,14 @@ public class PluginReport
|
||||||
*/
|
*/
|
||||||
private Requirements requirements;
|
private Requirements requirements;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The goal prefix that will appear before the ":".
|
||||||
|
*
|
||||||
|
* @parameter expression="${goalPrefix}"
|
||||||
|
* @since 2.4
|
||||||
|
*/
|
||||||
|
protected String goalPrefix;
|
||||||
|
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
protected Renderer getSiteRenderer()
|
protected Renderer getSiteRenderer()
|
||||||
{
|
{
|
||||||
|
|
@ -135,7 +143,18 @@ public class PluginReport
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String goalPrefix = PluginDescriptor.getGoalPrefixFromArtifactId( project.getArtifactId() );
|
// Copy from AbstractGeneratorMojo#execute()
|
||||||
|
String defaultGoalPrefix = PluginDescriptor.getGoalPrefixFromArtifactId( project.getArtifactId() );
|
||||||
|
if ( goalPrefix == null )
|
||||||
|
{
|
||||||
|
goalPrefix = defaultGoalPrefix;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
getLog().warn(
|
||||||
|
"\n\nGoal prefix is specified as: '" + goalPrefix + "'. Maven currently expects it to be '"
|
||||||
|
+ defaultGoalPrefix + "'.\n" );
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: could use this more, eg in the writing of the plugin descriptor!
|
// TODO: could use this more, eg in the writing of the plugin descriptor!
|
||||||
PluginDescriptor pluginDescriptor = new PluginDescriptor();
|
PluginDescriptor pluginDescriptor = new PluginDescriptor();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue