You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jd...@apache.org on 2008/01/22 21:50:18 UTC

svn commit: r614317 - /maven/components/trunk/maven-core/src/main/aspect/org/apache/maven/errors/LifecycleErrorReporterAspect.aj

Author: jdcasey
Date: Tue Jan 22 12:50:16 2008
New Revision: 614317

URL: http://svn.apache.org/viewvc?rev=614317&view=rev
Log:
Improve error reporting bindings for two exception cases, to get away from handler(..) pointcuts which are less versatile for later debugging aspects to manipulate.

Modified:
    maven/components/trunk/maven-core/src/main/aspect/org/apache/maven/errors/LifecycleErrorReporterAspect.aj

Modified: maven/components/trunk/maven-core/src/main/aspect/org/apache/maven/errors/LifecycleErrorReporterAspect.aj
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/main/aspect/org/apache/maven/errors/LifecycleErrorReporterAspect.aj?rev=614317&r1=614316&r2=614317&view=diff
==============================================================================
--- maven/components/trunk/maven-core/src/main/aspect/org/apache/maven/errors/LifecycleErrorReporterAspect.aj (original)
+++ maven/components/trunk/maven-core/src/main/aspect/org/apache/maven/errors/LifecycleErrorReporterAspect.aj Tue Jan 22 12:50:16 2008
@@ -2,6 +2,7 @@
 
 import org.codehaus.plexus.logging.console.ConsoleLogger;
 import org.codehaus.plexus.logging.Logger;
+import org.codehaus.plexus.util.introspection.ReflectionValueExtractor;
 import org.apache.maven.project.path.PathTranslator;
 import org.apache.maven.plugin.MojoExecution;
 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
@@ -29,6 +30,7 @@
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
 import org.codehaus.plexus.configuration.PlexusConfiguration;
 import org.codehaus.plexus.PlexusContainer;
+import org.codehaus.plexus.util.introspection.ReflectionValueExtractor;
 
 import java.util.List;
 
@@ -60,11 +62,10 @@
         getReporter().reportErrorLoadingPlugin( binding, project, cause );
     }
 
-    before( MojoBinding binding, MavenProject project, MojoExecutionException cause ):
+    after( MojoBinding binding, MavenProject project ) throwing ( MojoExecutionException cause ):
         cflow( le_executeGoalAndHandleFailures( binding ) )
         && cflow( pm_executeMojo( project ) )
-        && handler( MojoExecutionException )
-        && args( cause )
+        && call( void Mojo+.execute() )
     {
         // this will be covered by the reportErrorLoadingPlugin(..) method.
         if ( !StateManagementUtils.RESOLVE_LATE_BOUND_PLUGIN_GOAL.equals( binding.getGoal() ) )
@@ -179,14 +180,13 @@
                                                       err );
     }
 
-    before( MojoBinding binding, MavenProject project, String expression, Exception cause ):
+    after( MojoBinding binding, MavenProject project, String expression ) throwing ( Exception cause ):
         cflow( le_executeGoalAndHandleFailures( binding ) )
         && cflow( pm_executeMojo( project ) )
         && cflow( pm_checkRequiredParameters() )
         && cflow( ppee_evaluate( expression ) )
         && within( PluginParameterExpressionEvaluator )
-        && handler( Exception )
-        && args( cause )
+        && call( Object ReflectionValueExtractor.evaluate( String, Object ) )
     {
         getReporter().reportReflectionErrorWhileEvaluatingMojoParameter( currentParameter,
                                                       binding,