From df944128643803f3d53e70d2d90c9622505989d6 Mon Sep 17 00:00:00 2001 From: Brett Leslie Porter Date: Thu, 6 Oct 2005 14:06:52 +0000 Subject: [PATCH] fix project reference git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@306649 13f79535-47bb-0310-9956-ffa450edef68 --- .../maven/plugin/DefaultPluginManager.java | 29 ++----------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java index 01134a43dc..07323e5999 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java @@ -269,7 +269,7 @@ public class DefaultPluginManager if ( ref.getArtifact().getDependencyConflictId().equals( pluginArtifact.getDependencyConflictId() ) ) { // if the project artifact doesn't exist, don't use it. We haven't built that far. - if ( project.getArtifact().getFile() != null && project.getArtifact().getFile().exists() ) + if ( ref.getArtifact().getFile() != null && ref.getArtifact().getFile().exists() ) { pluginArtifact = new ActiveProjectArtifact( ref, pluginArtifact ); } @@ -584,7 +584,7 @@ public class DefaultPluginManager PlexusConfiguration extractedMojoConfiguration = extractMojoConfiguration( mergedConfiguration, mojoDescriptor ); - checkRequiredParameters( mojoDescriptor, extractedMojoConfiguration, expressionEvaluator, plugin ); + checkRequiredParameters( mojoDescriptor, extractedMojoConfiguration, expressionEvaluator ); populatePluginFields( plugin, mojoDescriptor, extractedMojoConfiguration, pluginContainer, expressionEvaluator ); @@ -746,7 +746,7 @@ public class DefaultPluginManager } private void checkRequiredParameters( MojoDescriptor goal, PlexusConfiguration configuration, - ExpressionEvaluator expressionEvaluator, Mojo plugin ) + ExpressionEvaluator expressionEvaluator ) throws PluginConfigurationException { // TODO: this should be built in to the configurator, as we presently double process the expressions @@ -1084,29 +1084,6 @@ public class DefaultPluginManager } } - private Field findPluginField( Class clazz, String key ) - throws NoSuchFieldException - { - Field field = null; - - while ( field == null ) - { - try - { - field = clazz.getDeclaredField( key ); - } - catch ( NoSuchFieldException e ) - { - clazz = clazz.getSuperclass(); - if ( clazz.equals( Object.class ) ) - { - throw e; - } - } - } - return field; - } - public static String createPluginParameterRequiredMessage( MojoDescriptor mojo, Parameter parameter, String expression ) {