rework javadoc

This commit is contained in:
Hervé Boutemy 2022-01-08 17:27:28 +01:00
parent f30a0ab4dd
commit c229278477
6 changed files with 19 additions and 16 deletions

View File

@ -25,7 +25,7 @@ import java.util.Map;
import org.apache.maven.lifecycle.mapping.LifecyclePhase;
/**
* Class Lifecycle.
* Lifecycle definition, with eventual plugin bindings (when they are not packaging-specific).
*/
public class Lifecycle
{

View File

@ -77,7 +77,7 @@ public class DefaultLifecycleExecutionPlanCalculator
private final BuildPluginManager pluginManager;
private final DefaultLifecycles defaultLifeCycles;
private final DefaultLifecycles defaultLifecycles;
private final MojoDescriptorCreator mojoDescriptorCreator;
@ -92,7 +92,7 @@ public class DefaultLifecycleExecutionPlanCalculator
@Inject
public DefaultLifecycleExecutionPlanCalculator(
BuildPluginManager pluginManager,
DefaultLifecycles defaultLifeCycles,
DefaultLifecycles defaultLifecycles,
MojoDescriptorCreator mojoDescriptorCreator,
LifecyclePluginResolver lifecyclePluginResolver,
@Named( DefaultLifecycleMappingDelegate.HINT ) LifecycleMappingDelegate standardDelegate,
@ -100,7 +100,7 @@ public class DefaultLifecycleExecutionPlanCalculator
Map<String, MojoExecutionConfigurator> mojoExecutionConfigurators )
{
this.pluginManager = pluginManager;
this.defaultLifeCycles = defaultLifeCycles;
this.defaultLifecycles = defaultLifecycles;
this.mojoDescriptorCreator = mojoDescriptorCreator;
this.lifecyclePluginResolver = lifecyclePluginResolver;
this.standardDelegate = standardDelegate;
@ -110,12 +110,12 @@ public class DefaultLifecycleExecutionPlanCalculator
// Only used for testing
public DefaultLifecycleExecutionPlanCalculator( BuildPluginManager pluginManager,
DefaultLifecycles defaultLifeCycles,
DefaultLifecycles defaultLifecycles,
MojoDescriptorCreator mojoDescriptorCreator,
LifecyclePluginResolver lifecyclePluginResolver )
{
this.pluginManager = pluginManager;
this.defaultLifeCycles = defaultLifeCycles;
this.defaultLifecycles = defaultLifecycles;
this.mojoDescriptorCreator = mojoDescriptorCreator;
this.lifecyclePluginResolver = lifecyclePluginResolver;
this.standardDelegate = null;
@ -142,7 +142,7 @@ public class DefaultLifecycleExecutionPlanCalculator
final List<ExecutionPlanItem> planItem = ExecutionPlanItem.createExecutionPlanItems( project, executions );
return new MavenExecutionPlan( planItem, defaultLifeCycles );
return new MavenExecutionPlan( planItem, defaultLifecycles );
}
@Override
@ -276,14 +276,14 @@ public class DefaultLifecycleExecutionPlanCalculator
* Determine the lifecycle that corresponds to the given phase.
*/
Lifecycle lifecycle = defaultLifeCycles.get( lifecyclePhase );
Lifecycle lifecycle = defaultLifecycles.get( lifecyclePhase );
if ( lifecycle == null )
{
throw new LifecyclePhaseNotFoundException( "Unknown lifecycle phase \"" + lifecyclePhase
+ "\". You must specify a valid lifecycle phase" + " or a goal in the format <plugin-prefix>:<goal> or"
+ " <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: "
+ defaultLifeCycles.getLifecyclePhaseList() + ".", lifecyclePhase );
+ defaultLifecycles.getLifecyclePhaseList() + ".", lifecyclePhase );
}
LifecycleMappingDelegate delegate;

View File

@ -23,9 +23,8 @@ import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* Class Lifecycle.
* Lifecycle definition for a packaging (multiple packagings share the same lifecycle id = usually "default").
*/
public class Lifecycle
{

View File

@ -25,7 +25,9 @@ import org.apache.maven.model.Dependency;
import org.codehaus.plexus.util.xml.Xpp3Dom;
/**
* LifecycleMojo
* Mojo (plugin goal) binding to a lifecycle phase.
*
* @see LifecyclePhase
*/
public class LifecycleMojo
{

View File

@ -28,7 +28,9 @@ import java.util.Map;
import org.codehaus.plexus.util.StringUtils;
/**
* LifecyclePhase
* Mojo (goals) bindings to a lifecycle phase.
*
* @see LifecycleMojo
*/
public class LifecyclePhase
{

View File

@ -48,15 +48,15 @@ public abstract class AbstractLifecycleMappingProvider
throw new IllegalArgumentException( "Plugin bindings must have more than 0, even count of elements" );
}
HashMap<String, LifecyclePhase> lifecyclePhases = new HashMap<>( len / 2 );
HashMap<String, LifecyclePhase> lifecyclePhaseBindings = new HashMap<>( len / 2 );
for ( int i = 0; i < len; i = i + 2 )
{
lifecyclePhases.put( pluginBindings[i], new LifecyclePhase( pluginBindings[i + 1] ) );
lifecyclePhaseBindings.put( pluginBindings[i], new LifecyclePhase( pluginBindings[i + 1] ) );
}
Lifecycle lifecycle = new Lifecycle();
lifecycle.setId( "default" );
lifecycle.setLifecyclePhases( Collections.unmodifiableMap( lifecyclePhases ) );
lifecycle.setLifecyclePhases( Collections.unmodifiableMap( lifecyclePhaseBindings ) );
this.lifecycleMapping = new DefaultLifecycleMapping( Collections.singletonList( lifecycle ) );
}