TODO clean up

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@219420 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-07-17 22:56:08 +00:00
parent f080089e0e
commit 9ec3433ab1
1 changed files with 45 additions and 44 deletions

View File

@ -67,7 +67,6 @@ import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.util.xml.Xpp3Dom;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
@ -75,6 +74,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.lang.reflect.Field;
public class DefaultPluginManager
extends AbstractLogEnabled
@ -247,7 +247,6 @@ public class DefaultPluginManager
throw new MojoExecutionException( "Error looking up plugin: ", e );
}
// !! This is ripe for refactoring to an aspect.
// Event monitoring.
String event = MavenEvents.MOJO_EXECUTION;
EventDispatcher dispatcher = session.getEventDispatcher();
@ -384,7 +383,7 @@ public class DefaultPluginManager
PlexusConfiguration mergedConfiguration = mergeConfiguration( pomConfiguration, mojoDescriptor
.getMojoConfiguration() );
// TODO: plexus
// TODO: plexus changes to make this more like the component descriptor so this can be used instead
// PlexusConfiguration mergedConfiguration = mergeConfiguration( pomConfiguration,
// mojoDescriptor.getConfiguration() );
@ -410,7 +409,6 @@ public class DefaultPluginManager
// otherwise, we have to finish resolving the plugin's classpath and start the container.
if ( pluginDescriptor.getArtifacts() != null && pluginDescriptor.getArtifacts().size() == 1 )
{
// TODO: this is a little shady...
Artifact pluginArtifact = (Artifact) pluginDescriptor.getArtifacts().get( 0 );
try
@ -505,6 +503,8 @@ public class DefaultPluginManager
{
// TODO: I defy anyone to find these messages in the '-X' output! Do we need a new log level?
// ideally, this would be elevated above the true debug output, but below the default INFO level...
// [BP] (2004-07-18): need to understand the context more but would prefer this could be either WARN or
// removed - shouldn't need DEBUG to diagnose a problem most of the time.
getLogger().debug(
"*** WARNING: Configuration \'" + child.getName() + "\' is not used in goal \'" +
mojoDescriptor.getFullGoalName() + "; this may indicate a typo... ***" );
@ -578,7 +578,8 @@ public class DefaultPluginManager
{
try
{
// TODO: remove in beta-1
// TODO: would like to remove in beta-1 as configurator should always be given, but it is
// currently causing problems with published plugins.
Field field = findPluginField( plugin.getClass(), parameter.getName() );
boolean accessible = field.isAccessible();
if ( !accessible )
@ -724,9 +725,8 @@ public class DefaultPluginManager
{
String configuratorId = mojoDescriptor.getComponentConfigurator();
// TODO: should this be known to the component factory instead? And if so, should configuration be part of lookup?
// [jc]: I don't think we can be that strict with the configurator. It makes some measure of sense that
// people may want different configurators for their java mojos...
// TODO: could the configuration be passed to lookup and the configurator known to plexus via the descriptor
// so that this meethod could entirely be handled by a plexus lookup?
if ( StringUtils.isNotEmpty( configuratorId ) )
{
configurator = (ComponentConfigurator) pluginContainer.lookup( ComponentConfigurator.ROLE,
@ -791,7 +791,8 @@ public class DefaultPluginManager
{
StringBuffer message = new StringBuffer();
message.append( "The '" + parameter.getName() );
message.append( "The '" );
message.append( parameter.getName() );
message.append( "' parameter is required for the execution of the " );
message.append( mojo.getFullGoalName() );
message.append( " mojo and cannot be null." );
@ -858,7 +859,6 @@ public class DefaultPluginManager
artifacts.add( "maven-plugin-descriptor" );
artifacts.add( "maven-project" );
artifacts.add( "maven-settings" );
artifacts.add( "oro" );
artifacts.add( "plexus-container-default" );
artifacts.add( "plexus-input-handler" );
artifacts.add( "plexus-utils" );
@ -869,6 +869,7 @@ public class DefaultPluginManager
// TODO: remove doxia
artifacts.add( "doxia-core" );
artifacts.add( "maven-reporting-api" );
artifacts.add( "oro" );
artifactFilter = new ExclusionSetFilter( artifacts );
}