From 4a046065c4d64ebbc0076d0403637c03a666f2ee Mon Sep 17 00:00:00 2001 From: Jason van Zyl Date: Mon, 11 May 2009 05:20:53 +0000 Subject: [PATCH] git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@773470 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/maven/plugin/DefaultPluginClassLoaderCache.java | 4 ++-- .../java/org/apache/maven/plugin/DefaultPluginManager.java | 6 +++--- .../org/apache/maven/plugin/PluginClassLoaderCache.java | 4 ++-- .../maven/plugin/PluginParameterExpressionEvaluator.java | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginClassLoaderCache.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginClassLoaderCache.java index f242dd4a57..518714abba 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginClassLoaderCache.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginClassLoaderCache.java @@ -12,12 +12,12 @@ public class DefaultPluginClassLoaderCache { private Map pluginClassLoaders = new HashMap(); - public void cachePluginClassLoader( String key, ClassRealm pluginClassLoader ) + public void put( String key, ClassRealm pluginClassLoader ) { pluginClassLoaders.put( key, pluginClassLoader ); } - public ClassRealm getPluginClassLoader( String key ) + public ClassRealm get( String key ) { return pluginClassLoaders.get( key ); } 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 571a25c0b9..d539252f03 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 @@ -198,7 +198,7 @@ public class DefaultPluginManager } } - //pluginRealm.display(); + pluginRealm.display(); try { @@ -215,7 +215,7 @@ public class DefaultPluginManager throw new PluginContainerException( plugin, pluginRealm, "Error scanning plugin realm for components.", e ); } - pluginClassLoaderCache.cachePluginClassLoader( constructPluginKey( plugin ), pluginRealm ); + pluginClassLoaderCache.put( constructPluginKey( plugin ), pluginRealm ); PluginDescriptor pluginDescriptor = getPluginDescriptor( plugin ); @@ -345,7 +345,7 @@ public class DefaultPluginManager mojo = getConfiguredMojo( session, mojoExecution, project, false, mojoExecution ); //pluginRealm = pluginDescriptor.getClassRealm(); - pluginRealm = pluginClassLoaderCache.getPluginClassLoader( constructPluginKey( mojoDescriptor.getPluginDescriptor() ) ); + pluginRealm = pluginClassLoaderCache.get( constructPluginKey( mojoDescriptor.getPluginDescriptor() ) ); Thread.currentThread().setContextClassLoader( pluginRealm ); diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginClassLoaderCache.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginClassLoaderCache.java index 05b78850c4..0f8e9a09c0 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/PluginClassLoaderCache.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginClassLoaderCache.java @@ -13,7 +13,7 @@ import org.codehaus.plexus.classworlds.realm.ClassRealm; */ public interface PluginClassLoaderCache { - void cachePluginClassLoader( String key, ClassRealm pluginClassLoader ); + void put( String key, ClassRealm pluginClassLoader ); - ClassRealm getPluginClassLoader( String key ); + ClassRealm get( String key ); } diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java index 9bac1c943c..8ff8cdee1c 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java @@ -166,7 +166,7 @@ public class PluginParameterExpressionEvaluator value = project.getExecutionProject(); } else if ( expression.startsWith( "project" ) || expression.startsWith( "pom" ) ) - { + { try { int pathSeparator = expression.indexOf( "/" ); @@ -187,7 +187,7 @@ public class PluginParameterExpressionEvaluator // TODO: don't catch exception throw new ExpressionEvaluationException( "Error evaluating plugin parameter expression: " + expression, e ); - } + } } else if ( expression.equals( "mojo" ) ) {