maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdca...@apache.org
Subject svn commit: r610618 - in /maven/components/trunk: maven-core/src/main/aspect/org/apache/maven/errors/ maven-core/src/main/java/org/apache/maven/errors/ maven-core/src/main/java/org/apache/maven/extension/ maven-embedder/ maven-embedder/src/test/error-r...
Date Thu, 10 Jan 2008 00:07:58 GMT
Author: jdcasey
Date: Wed Jan  9 16:07:48 2008
New Revision: 610618

URL: http://svn.apache.org/viewvc?rev=610618&view=rev
Log:
Adding some unit tests (mostly stubbed out at the moment) to start testing the pointcuts used
to shunt build errors off to the appropriate error-reporter method.

Added:
    maven/components/trunk/maven-embedder/src/test/error-reporting-projects/
    maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportErrorParsingProjectModel_IOException/
    maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportErrorParsingProjectModel_IOException/pom.xml/
    maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportErrorParsingProjectModel_XmlPullParserException/
    maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportErrorParsingProjectModel_XmlPullParserException/pom.xml
  (with props)
    maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportInvalidPluginExecutionEnvironment/
    maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/
    maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/pom.xml
  (with props)
    maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/
    maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/main/
    maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/main/java/
    maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/main/java/org/
    maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/main/java/org/apache/
    maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/main/java/org/apache/maven/
    maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/main/java/org/apache/maven/test/
    maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/main/java/org/apache/maven/test/error/
    maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/main/java/org/apache/maven/test/error/mojoFailure/
    maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/main/java/org/apache/maven/test/error/mojoFailure/App.java
  (with props)
    maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/test/
    maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/test/java/
    maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/test/java/org/
    maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/test/java/org/apache/
    maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/test/java/org/apache/maven/
    maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/test/java/org/apache/maven/test/
    maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/test/java/org/apache/maven/test/error/
    maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/test/java/org/apache/maven/test/error/mojoFailure/
    maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/test/java/org/apache/maven/test/error/mojoFailure/AppTest.java
  (with props)
    maven/components/trunk/maven-embedder/src/test/java/org/apache/maven/error/
    maven/components/trunk/maven-embedder/src/test/java/org/apache/maven/error/ErrorReporterPointcutTest.java
  (with props)
    maven/components/trunk/maven-project/src/main/aspect/org/apache/maven/project/aspect/ProjectDebugAspect.aj
Modified:
    maven/components/trunk/maven-core/src/main/aspect/org/apache/maven/errors/ExtensionErrorReporterAspect.aj
    maven/components/trunk/maven-core/src/main/aspect/org/apache/maven/errors/MavenExecErrorReporterAspect.aj
    maven/components/trunk/maven-core/src/main/java/org/apache/maven/errors/CoreErrorReporter.java
    maven/components/trunk/maven-core/src/main/java/org/apache/maven/errors/DefaultCoreErrorReporter.java
    maven/components/trunk/maven-core/src/main/java/org/apache/maven/extension/DefaultBuildExtensionScanner.java
    maven/components/trunk/maven-embedder/pom.xml

Modified: maven/components/trunk/maven-core/src/main/aspect/org/apache/maven/errors/ExtensionErrorReporterAspect.aj
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/main/aspect/org/apache/maven/errors/ExtensionErrorReporterAspect.aj?rev=610618&r1=610617&r2=610618&view=diff
==============================================================================
--- maven/components/trunk/maven-core/src/main/aspect/org/apache/maven/errors/ExtensionErrorReporterAspect.aj
(original)
+++ maven/components/trunk/maven-core/src/main/aspect/org/apache/maven/errors/ExtensionErrorReporterAspect.aj
Wed Jan  9 16:07:48 2008
@@ -21,7 +21,6 @@
 import org.apache.maven.extension.ExtensionScanningException;
 import org.apache.maven.extension.DefaultBuildExtensionScanner;
 import org.apache.maven.project.artifact.InvalidDependencyVersionException;
-import org.apache.maven.project.build.model.ModelLineage;
 import org.apache.maven.project.interpolation.ModelInterpolator;
 import org.apache.maven.project.interpolation.ModelInterpolationException;
 import org.apache.maven.extension.ExtensionManagerException;
@@ -46,18 +45,6 @@
         && args( *, cause )
     {
         getReporter().handleSuperPomBuildingError( cause );
-    }
-
-    private pointcut within_dbes_buildModelLineage( MavenExecutionRequest request ):
-        withincode( ModelLineage DefaultBuildExtensionScanner.buildModelLineage( File, MavenExecutionRequest,
List ) )
-        && args( *, request, * );
-
-    before( MavenExecutionRequest request, File pomFile, ProjectBuildingException cause ):
-        within_dbes_buildModelLineage( request )
-        && call( ExtensionScanningException.new( String, File, ProjectBuildingException
) )
-        && args( .., pomFile, cause )
-    {
-        getReporter().handleProjectBuildingError( request, pomFile, cause );
     }
 
     private pointcut within_dbes_checkModulesForExtensions():

Modified: maven/components/trunk/maven-core/src/main/aspect/org/apache/maven/errors/MavenExecErrorReporterAspect.aj
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/main/aspect/org/apache/maven/errors/MavenExecErrorReporterAspect.aj?rev=610618&r1=610617&r2=610618&view=diff
==============================================================================
--- maven/components/trunk/maven-core/src/main/aspect/org/apache/maven/errors/MavenExecErrorReporterAspect.aj
(original)
+++ maven/components/trunk/maven-core/src/main/aspect/org/apache/maven/errors/MavenExecErrorReporterAspect.aj
Wed Jan  9 16:07:48 2008
@@ -49,24 +49,6 @@
         return currentProject;
     }
 
-    before( MavenExecutionRequest request, File pomFile, ProjectBuildingException exception
):
-        cflow( dm_getProjects( request ) )
-        && cflow( dm_collectProjects( ArtifactRepository, ProfileManager ) )
-        && call( MavenExecutionException.new( .., File, ProjectBuildingException
) )
-        && args( .., pomFile, exception )
-    {
-        getReporter().handleProjectBuildingError( request, pomFile, exception );
-    }
-
-    before( ProfileManager globalProfileManager, ProjectBuildingException exception ):
-        cflow( dm_getProjects( MavenExecutionRequest ) )
-        && cflow( dm_collectProjects( ArtifactRepository, globalProfileManager )
)
-        && call( MavenExecutionException.new( String, ProjectBuildingException )
)
-        && args( .., exception )
-    {
-        getReporter().handleSuperPomBuildingError( globalProfileManager, exception );
-    }
-
     before( MavenExecutionException err ):
         cflow( dm_getProjects( MavenExecutionRequest ) )
         && cflow( dm_collectProjects( ArtifactRepository, ProfileManager ) )

Modified: maven/components/trunk/maven-core/src/main/java/org/apache/maven/errors/CoreErrorReporter.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/main/java/org/apache/maven/errors/CoreErrorReporter.java?rev=610618&r1=610617&r2=610618&view=diff
==============================================================================
--- maven/components/trunk/maven-core/src/main/java/org/apache/maven/errors/CoreErrorReporter.java
(original)
+++ maven/components/trunk/maven-core/src/main/java/org/apache/maven/errors/CoreErrorReporter.java
Wed Jan  9 16:07:48 2008
@@ -99,8 +99,6 @@
 
     void reportErrorFormulatingBuildPlan( List tasks, MavenProject configuringProject, String
targetDescription, LifecycleException cause );
 
-    void handleProjectBuildingError( MavenExecutionRequest request, File pomFile, ProjectBuildingException
exception );
-
     void reportInvalidMavenVersion( MavenProject project, ArtifactVersion mavenVersion, MavenExecutionException
err );
 
     void reportPomFileScanningError( File basedir, String includes, String excludes, IOException
cause );

Modified: maven/components/trunk/maven-core/src/main/java/org/apache/maven/errors/DefaultCoreErrorReporter.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/main/java/org/apache/maven/errors/DefaultCoreErrorReporter.java?rev=610618&r1=610617&r2=610618&view=diff
==============================================================================
--- maven/components/trunk/maven-core/src/main/java/org/apache/maven/errors/DefaultCoreErrorReporter.java
(original)
+++ maven/components/trunk/maven-core/src/main/java/org/apache/maven/errors/DefaultCoreErrorReporter.java
Wed Jan  9 16:07:48 2008
@@ -870,17 +870,6 @@
         registerBuildError( cause, writer.toString(), cause.getCause() );
     }
 
-    public void handleProjectBuildingError( MavenExecutionRequest request,
-                                            File pomFile,
-                                            ProjectBuildingException exception )
-    {
-        ProjectErrorReporter projectReporter = ProjectReporterManager.getReporter();
-        Throwable reportedException = projectReporter.findReportedException( exception );
-        String formattedMessage = projectReporter.getFormattedMessage( reportedException
);
-
-        registerBuildError( exception, formattedMessage, reportedException );
-    }
-
     public void reportInvalidMavenVersion( MavenProject project,
                                            ArtifactVersion mavenVersion,
                                            MavenExecutionException err )

Modified: maven/components/trunk/maven-core/src/main/java/org/apache/maven/extension/DefaultBuildExtensionScanner.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/main/java/org/apache/maven/extension/DefaultBuildExtensionScanner.java?rev=610618&r1=610617&r2=610618&view=diff
==============================================================================
--- maven/components/trunk/maven-core/src/main/java/org/apache/maven/extension/DefaultBuildExtensionScanner.java
(original)
+++ maven/components/trunk/maven-core/src/main/java/org/apache/maven/extension/DefaultBuildExtensionScanner.java
Wed Jan  9 16:07:48 2008
@@ -407,6 +407,7 @@
         }
         catch ( ProjectBuildingException e )
         {
+            System.out.println( "blah" );
             throw new ExtensionScanningException( "Error building model lineage in order
to pre-scan for extensions: "
                 + e.getMessage(), pom, e );
         }

Modified: maven/components/trunk/maven-embedder/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-embedder/pom.xml?rev=610618&r1=610617&r2=610618&view=diff
==============================================================================
--- maven/components/trunk/maven-embedder/pom.xml (original)
+++ maven/components/trunk/maven-embedder/pom.xml Wed Jan  9 16:07:48 2008
@@ -80,6 +80,11 @@
       <artifactId>aspectjrt</artifactId>
       <version>1.5.3</version>
     </dependency>
+    
+    <dependency>
+      <groupId>easymock</groupId>
+      <artifactId>easymock</artifactId>
+    </dependency>
   </dependencies>
   <distributionManagement>
     <site>

Added: maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportErrorParsingProjectModel_XmlPullParserException/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportErrorParsingProjectModel_XmlPullParserException/pom.xml?rev=610618&view=auto
==============================================================================
--- maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportErrorParsingProjectModel_XmlPullParserException/pom.xml
(added)
+++ maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportErrorParsingProjectModel_XmlPullParserException/pom.xml
Wed Jan  9 16:07:48 2008
@@ -0,0 +1,25 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven</groupId>
+  <artifactId>testReportErrorParsingProjectModel_XmlPullParserException</artifactId>
+  <version>1</ver>
+</project>

Propchange: maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportErrorParsingProjectModel_XmlPullParserException/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportErrorParsingProjectModel_XmlPullParserException/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/pom.xml?rev=610618&view=auto
==============================================================================
--- maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/pom.xml
(added)
+++ maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/pom.xml
Wed Jan  9 16:07:48 2008
@@ -0,0 +1,18 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.test.error</groupId>
+  <artifactId>test-mojo-failure</artifactId>
+  <packaging>jar</packaging>
+  <version>1</version>
+  <name>test-mojo-failure</name>
+  <url>http://maven.apache.org</url>
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>

Propchange: maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/main/java/org/apache/maven/test/error/mojoFailure/App.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/main/java/org/apache/maven/test/error/mojoFailure/App.java?rev=610618&view=auto
==============================================================================
--- maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/main/java/org/apache/maven/test/error/mojoFailure/App.java
(added)
+++ maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/main/java/org/apache/maven/test/error/mojoFailure/App.java
Wed Jan  9 16:07:48 2008
@@ -0,0 +1,14 @@
+package org.apache.maven.test.error.mojoFailure;
+
+/**
+ * Hello world!
+ *
+ */
+public class App
+{
+    public static void main( String[] args )
+    {
+        System.out.println( "Hello World!" );
+        StringUtils utils;
+    }
+}

Propchange: maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/main/java/org/apache/maven/test/error/mojoFailure/App.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/main/java/org/apache/maven/test/error/mojoFailure/App.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/test/java/org/apache/maven/test/error/mojoFailure/AppTest.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/test/java/org/apache/maven/test/error/mojoFailure/AppTest.java?rev=610618&view=auto
==============================================================================
--- maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/test/java/org/apache/maven/test/error/mojoFailure/AppTest.java
(added)
+++ maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/test/java/org/apache/maven/test/error/mojoFailure/AppTest.java
Wed Jan  9 16:07:48 2008
@@ -0,0 +1,38 @@
+package org.apache.maven.test.error.mojoFailure;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Unit test for simple App.
+ */
+public class AppTest 
+    extends TestCase
+{
+    /**
+     * Create the test case
+     *
+     * @param testName name of the test case
+     */
+    public AppTest( String testName )
+    {
+        super( testName );
+    }
+
+    /**
+     * @return the suite of tests being tested
+     */
+    public static Test suite()
+    {
+        return new TestSuite( AppTest.class );
+    }
+
+    /**
+     * Rigourous Test :-)
+     */
+    public void testApp()
+    {
+        assertTrue( true );
+    }
+}

Propchange: maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/test/java/org/apache/maven/test/error/mojoFailure/AppTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-embedder/src/test/error-reporting-projects/testReportProjectMojoFailureException/src/test/java/org/apache/maven/test/error/mojoFailure/AppTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/components/trunk/maven-embedder/src/test/java/org/apache/maven/error/ErrorReporterPointcutTest.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-embedder/src/test/java/org/apache/maven/error/ErrorReporterPointcutTest.java?rev=610618&view=auto
==============================================================================
--- maven/components/trunk/maven-embedder/src/test/java/org/apache/maven/error/ErrorReporterPointcutTest.java
(added)
+++ maven/components/trunk/maven-embedder/src/test/java/org/apache/maven/error/ErrorReporterPointcutTest.java
Wed Jan  9 16:07:48 2008
@@ -0,0 +1,565 @@
+package org.apache.maven.error;
+
+import org.apache.maven.embedder.Configuration;
+import org.apache.maven.embedder.DefaultConfiguration;
+import org.apache.maven.embedder.MavenEmbedder;
+import org.apache.maven.embedder.MavenEmbedderConsoleLogger;
+import org.apache.maven.errors.CoreErrorReporter;
+import org.apache.maven.execution.DefaultMavenExecutionRequest;
+import org.apache.maven.execution.MavenExecutionRequest;
+import org.codehaus.plexus.logging.Logger;
+import org.codehaus.plexus.util.FileUtils;
+import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
+import org.easymock.MockControl;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.util.Arrays;
+
+import junit.framework.TestCase;
+
+public class ErrorReporterPointcutTest
+    extends TestCase
+{
+
+    private MockControl reporterCtl;
+
+    private CoreErrorReporter reporter;
+
+    private MavenEmbedder maven;
+
+    private String basedir;
+
+    public void setUp()
+        throws Exception
+    {
+        super.setUp();
+
+        reporterCtl = MockControl.createStrictControl( CoreErrorReporter.class );
+        reporter = (CoreErrorReporter) reporterCtl.getMock();
+
+        reporter.clearErrors();
+        reporterCtl.setVoidCallable( MockControl.ONE_OR_MORE );
+
+        basedir = System.getProperty( "basedir" );
+
+        if ( basedir == null )
+        {
+            basedir = new File( "." ).getCanonicalPath();
+        }
+
+        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+
+        Configuration configuration = new DefaultConfiguration().setClassLoader( classLoader
)
+                                                                .setMavenEmbedderLogger(
new MavenEmbedderConsoleLogger() );
+
+        maven = new MavenEmbedder( configuration );
+    }
+
+    private File prepareProjectDir()
+        throws URISyntaxException, IOException
+    {
+        String method = new Throwable().getStackTrace()[1].getMethodName();
+
+        String resource = "error-reporting-projects/" + method;
+
+        File testDirectory = new File( basedir, "src/test/" + resource );
+
+        File targetDirectory = new File( basedir, "target/" + resource );
+
+        if ( targetDirectory.exists() )
+        {
+            try
+            {
+                FileUtils.deleteDirectory( targetDirectory );
+            }
+            catch( IOException e )
+            {}
+        }
+
+        FileUtils.copyDirectoryStructure( testDirectory, targetDirectory );
+
+        return targetDirectory;
+    }
+
+    public void testHandleErrorBuildingExtensionPluginPOM()
+        throws URISyntaxException
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testHandleProjectBuildingError()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testHandleSuperPomBuildingError_XmlPullParserException()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testHandleSuperPomBuildingError_IOException()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportAggregatedMojoFailureException()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportAttemptToOverrideUneditableMojoParameter()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportErrorApplyingMojoConfiguration()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportErrorConfiguringExtensionPluginRealm()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportErrorFormulatingBuildPlan()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportErrorInterpolatingModel_UsingProjectInstance()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportErrorLoadingPlugin()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportErrorManagingRealmForExtension()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportErrorManagingRealmForExtensionPlugin()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportErrorResolvingExtensionDependencies()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportErrorResolvingExtensionDirectDependencies()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportErrorSearchingforCompatibleExtensionPluginVersion()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportExtensionPluginArtifactNotFound()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportExtensionPluginVersionNotFound()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportIncompatibleMavenVersionForExtensionPlugin()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportInvalidDependencyVersionInExtensionPluginPOM()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportInvalidMavenVersion()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportInvalidPluginExecutionEnvironment()
+        throws URISyntaxException, IOException
+    {
+        File projectDir = prepareProjectDir();
+
+        reporter.reportInvalidPluginExecutionEnvironment( null, null, null );
+        reporterCtl.setMatcher( MockControl.ALWAYS_MATCHER );
+        reporterCtl.setVoidCallable();
+
+        reporterCtl.replay();
+
+        MavenExecutionRequest request = new DefaultMavenExecutionRequest().setBaseDirectory(
projectDir )
+                                                                          .setShowErrors(
true )
+                                                                          .setErrorReporter(
reporter )
+                                                                          .setGoals( Arrays.asList(
new String[] {
+                                                                              "compiler:compile"
+                                                                          } ) );
+
+        maven.execute( request );
+
+        reporterCtl.verify();
+    }
+
+    public void testReportLifecycleLoaderErrorWhileValidatingTask()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportLifecycleSpecErrorWhileValidatingTask()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportMissingArtifactWhileAddingExtensionPlugin()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportMissingPluginDescriptor()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportMissingRequiredMojoParameter()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportMojoExecutionException()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportMojoLookupError()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportNoGoalsSpecifiedException()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportPluginErrorWhileValidatingTask()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportPomFileCanonicalizationError()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportPomFileScanningError()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportProjectCycle()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportProjectDependenciesNotFound()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportProjectDependenciesUnresolvable()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportProjectDependencyArtifactNotFound()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportProjectDependencyArtifactUnresolvable()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportProjectMojoFailureException()
+        throws URISyntaxException, IOException
+    {
+        File projectDir = prepareProjectDir();
+
+        reporter.reportProjectMojoFailureException( null, null, null );
+        reporterCtl.setMatcher( MockControl.ALWAYS_MATCHER );
+        reporterCtl.setVoidCallable();
+
+        reporterCtl.replay();
+
+        MavenExecutionRequest request = new DefaultMavenExecutionRequest().setBaseDirectory(
projectDir )
+                                                                          .setShowErrors(
true )
+                                                                          .setErrorReporter(
reporter )
+                                                                          .setGoals( Arrays.asList(
new String[] {
+                                                                              "clean",
+                                                                              "package"
+                                                                          } ) );
+
+        maven.execute( request );
+
+        reporterCtl.verify();
+    }
+
+    public void testReportReflectionErrorWhileEvaluatingMojoParameter()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportUnresolvableArtifactWhileAddingExtensionPlugin()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportUnresolvableExtensionPluginPOM()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportUseOfBannedMojoParameter()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void clearErrors()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public Throwable findReportedException( Throwable error )
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public String getFormattedMessage( Throwable error )
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public Throwable getRealCause( Throwable error )
+    {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public void testReportActivatorErrorWhileApplyingProfiles()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportActivatorErrorWhileGettingRepositoriesFromProfiles()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportActivatorLookupErrorWhileApplyingProfiles()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportActivatorLookupErrorWhileGettingRepositoriesFromProfiles()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportBadDependencyVersion()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportBadManagedDependencyVersion()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportBadNonDependencyProjectArtifactVersion()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportErrorCreatingArtifactRepository()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportErrorCreatingDeploymentArtifactRepository()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportErrorInterpolatingModel_UsingModelInstance()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportErrorLoadingExternalProfilesFromFile_XmlPullParserException()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportErrorLoadingExternalProfilesFromFile_IOException()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportErrorParsingParentProjectModel_XmlPullParserException()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportErrorParsingParentProjectModel_IOException()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportErrorParsingProjectModel_XmlPullParserException()
+        throws URISyntaxException, IOException
+    {
+        File projectDir = prepareProjectDir();
+
+        reporter.reportErrorParsingProjectModel( null, null, (XmlPullParserException) null
);
+        reporterCtl.setMatcher( MockControl.ALWAYS_MATCHER );
+        reporterCtl.setVoidCallable();
+
+        reporterCtl.replay();
+
+        MavenExecutionRequest request = new DefaultMavenExecutionRequest().setBaseDirectory(
projectDir )
+                                                                          .setLoggingLevel(
Logger.LEVEL_DEBUG )
+                                                                          .setShowErrors(
true )
+                                                                          .setErrorReporter(
reporter )
+                                                                          .setGoals( Arrays.asList(
new String[] {
+                                                                              "initialize"
+                                                                          } ) );
+
+        maven.execute( request );
+
+        reporterCtl.verify();
+    }
+
+    public void testReportErrorParsingProjectModel_IOException()
+        throws URISyntaxException, IOException
+    {
+        File projectDir = prepareProjectDir();
+
+        reporter.reportErrorParsingProjectModel( null, null, (IOException) null );
+        reporterCtl.setMatcher( MockControl.ALWAYS_MATCHER );
+        reporterCtl.setVoidCallable();
+
+        reporterCtl.replay();
+
+        MavenExecutionRequest request = new DefaultMavenExecutionRequest().setPom( new File(
projectDir, "pom.xml" ) )
+                                                                          .setShowErrors(
true )
+                                                                          .setErrorReporter(
reporter )
+                                                                          .setGoals( Arrays.asList(
new String[] {
+                                                                              "initialize"
+                                                                          } ) );
+
+        maven.execute( request );
+
+        reporterCtl.verify();
+    }
+
+    public void testReportInvalidRepositoryWhileGettingRepositoriesFromProfiles()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportParentPomArtifactNotFound()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportParentPomArtifactUnresolvable()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportProjectCollision()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+    public void testReportProjectValidationFailure()
+    {
+        // TODO Auto-generated method stub
+
+    }
+
+}

Propchange: maven/components/trunk/maven-embedder/src/test/java/org/apache/maven/error/ErrorReporterPointcutTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-embedder/src/test/java/org/apache/maven/error/ErrorReporterPointcutTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/components/trunk/maven-project/src/main/aspect/org/apache/maven/project/aspect/ProjectDebugAspect.aj
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/main/aspect/org/apache/maven/project/aspect/ProjectDebugAspect.aj?rev=610618&view=auto
==============================================================================
--- maven/components/trunk/maven-project/src/main/aspect/org/apache/maven/project/aspect/ProjectDebugAspect.aj
(added)
+++ maven/components/trunk/maven-project/src/main/aspect/org/apache/maven/project/aspect/ProjectDebugAspect.aj
Wed Jan  9 16:07:48 2008
@@ -0,0 +1,28 @@
+package org.apache.maven.project.aspect;
+
+import org.apache.maven.project.MavenProject;
+import org.apache.maven.project.DefaultMavenProjectBuilder;
+import org.codehaus.plexus.util.StringUtils;
+
+import java.util.List;
+
+public privileged aspect ProjectDebugAspect
+{
+
+//    before( String dir, MavenProject project ):
+//        cflow( execution( * DefaultMavenProjectBuilder.buildInternal( .. ) ) )
+//        && call( void MavenProject.addScriptSourceRoot( String ) )
+//        && args( dir )
+//        && target( project )
+//    {
+//        System.out.println( "Setting script-source-root from POM to: " + dir + " in project:
" + project.getId() );
+//    }
+//
+//    after( MavenProject project ) returning( List scriptSourceRoots ):
+//        execution( List MavenProject.getScriptSourceRoots() )
+//        && this( project )
+//    {
+//        System.out.println( "Using script-source-roots:\n\n" + StringUtils.join( scriptSourceRoots.iterator(),
"\nfrom project: " + project.getId() ) );
+//    }
+
+}



Mime
View raw message