maven-m2-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdca...@apache.org
Subject cvs commit: maven-components/maven-mboot2/src/main/java MBoot.java
Date Tue, 15 Mar 2005 21:35:06 GMT
jdcasey     2005/03/15 13:35:06

  Modified:    maven-mboot2/src/main/java/test SurefirePlugin.java
                        SurefireBooter.java
               maven-mboot2/src/main/java MBoot.java
  Log:
  o Added file-based test reporting to mboot process, since console reporter doesn't do a
good job with test failures/errors.
  
  Revision  Changes    Path
  1.2       +6 -1      maven-components/maven-mboot2/src/main/java/test/SurefirePlugin.java
  
  Index: SurefirePlugin.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-mboot2/src/main/java/test/SurefirePlugin.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SurefirePlugin.java	5 Dec 2004 04:12:25 -0000	1.1
  +++ SurefirePlugin.java	15 Mar 2005 21:35:06 -0000	1.2
  @@ -11,7 +11,8 @@
                               String testClassesDirectory,
                               List includes,
                               List excludes,
  -                            String[] classpathElements )
  +                            String[] classpathElements,
  +                            String reportsDirectory )
           throws Exception
       {
           System.setProperty( "basedir", basedir );
  @@ -32,9 +33,13 @@
           {
               surefireBooter.addClassPathUrl( classpathElements[i] );
           }
  +        
  +        surefireBooter.setReportsDirectory( reportsDirectory );
   
           surefireBooter.addReport( "org.codehaus.surefire.report.ConsoleReporter" );
   
  +        surefireBooter.addReport( "org.codehaus.surefire.report.FileReporter" );
  +
           return surefireBooter.run();
       }
   }
  
  
  
  1.2       +8 -1      maven-components/maven-mboot2/src/main/java/test/SurefireBooter.java
  
  Index: SurefireBooter.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-mboot2/src/main/java/test/SurefireBooter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SurefireBooter.java	5 Dec 2004 04:12:25 -0000	1.1
  +++ SurefireBooter.java	15 Mar 2005 21:35:06 -0000	1.2
  @@ -19,10 +19,17 @@
       private List reports = new ArrayList();
   
       private List classpathUrls = new ArrayList();
  +    
  +    private String reportsDir;
   
       public SurefireBooter()
       {
       }
  +    
  +    public void setReportsDirectory( String reportsDirectory )
  +    {
  +        this.reportsDir = reportsDirectory;
  +    }
   
       public void addBattery( String battery, Object[] params )
       {
  @@ -72,7 +79,7 @@
   
           Thread.currentThread().setContextClassLoader( surefireClassLoader );
   
  -        Boolean result = (Boolean) run.invoke( batteryExecutor, new Object[]{ reports,
batteries, surefireClassLoader, "dummy" } );
  +        Boolean result = (Boolean) run.invoke( batteryExecutor, new Object[]{ reports,
batteries, surefireClassLoader, reportsDir } );
   
           Thread.currentThread().setContextClassLoader( oldContextClassLoader );
   
  
  
  
  1.65      +9 -3      maven-components/maven-mboot2/src/main/java/MBoot.java
  
  Index: MBoot.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-mboot2/src/main/java/MBoot.java,v
  retrieving revision 1.64
  retrieving revision 1.65
  diff -u -r1.64 -r1.65
  --- MBoot.java	10 Mar 2005 17:14:39 -0000	1.64
  +++ MBoot.java	15 Mar 2005 21:35:06 -0000	1.65
  @@ -78,7 +78,8 @@
                                      "maven-archiver", "maven-plugin-tools/maven-plugin-tools-api",
                                      "maven-plugin-tools/maven-plugin-tools-java",
                                      "maven-plugin-tools/maven-plugin-tools-pluggy",
  -                                   "maven-plugin-tools/maven-plugin-tools-marmalade", "maven-core-it-verifier"};
  +                                   "maven-plugin-tools/maven-plugin-tools-marmalade", "maven-core-it-support",

  +                                   "maven-core-it-verifier"};
   
       String[] pluginBuilds = new String[]{"maven-plugins/maven-clean-plugin", "maven-plugins/maven-compiler-plugin",
                                            "maven-plugins/maven-deploy-plugin", "maven-plugins/maven-ejb-plugin",
  @@ -300,6 +301,9 @@
           // Install maven-script-parent POM
           installPomFile( repoLocal, new File( basedir, "maven-script/pom.xml" ) );
   
  +        // Install it-support POM
  +        installPomFile( repoLocal, new File( basedir, "maven-core-it-support/pom.xml" )
);
  +
           createToolsClassLoader();
   
           for ( int i = 0; i < builds.length; i++ )
  @@ -871,9 +875,11 @@
           excludes = new ArrayList();
   
           excludes.add( "**/*Abstract*.java" );
  -
  +        
  +        String reportsDir = new File(basedir, "target/test-reports").getAbsolutePath();
  +        
           boolean success = testRunner.execute( repoLocal, basedir, classes, testClasses,
includes, excludes,
  -                                              classpath( reader.getDependencies(), null
) );
  +                                              classpath( reader.getDependencies(), null
), reportsDir );
   
           if ( !success )
           {
  
  
  

Mime
View raw message