Return-Path: X-Original-To: apmail-maven-commits-archive@www.apache.org Delivered-To: apmail-maven-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 995FE972D for ; Tue, 8 May 2012 13:12:18 +0000 (UTC) Received: (qmail 86279 invoked by uid 500); 8 May 2012 13:12:18 -0000 Delivered-To: apmail-maven-commits-archive@maven.apache.org Received: (qmail 86228 invoked by uid 500); 8 May 2012 13:12:18 -0000 Mailing-List: contact commits-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list commits@maven.apache.org Received: (qmail 86221 invoked by uid 99); 8 May 2012 13:12:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 May 2012 13:12:18 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 May 2012 13:08:51 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id F05FD2388C7B for ; Tue, 8 May 2012 13:08:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r816617 [4/10] - in /websites/production/maventest/content/plugins/maven-compiler-plugin-latest: ./ apidocs/ apidocs/org/apache/maven/plugin/ apidocs/org/apache/maven/plugin/class-use/ cobertura/ examples/ testapidocs/ testapidocs/org/apach... Date: Tue, 08 May 2012 13:08:02 -0000 To: commits@maven.apache.org From: hboutemy@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120508130807.F05FD2388C7B@eris.apache.org> Modified: websites/production/maventest/content/plugins/maven-compiler-plugin-latest/cobertura/org.apache.maven.plugin.AbstractCompilerMojo.html ============================================================================== --- websites/production/maventest/content/plugins/maven-compiler-plugin-latest/cobertura/org.apache.maven.plugin.AbstractCompilerMojo.html (original) +++ websites/production/maventest/content/plugins/maven-compiler-plugin-latest/cobertura/org.apache.maven.plugin.AbstractCompilerMojo.html Tue May 8 13:07:59 2012 @@ -12,7 +12,7 @@
 
- +
Classes in this File Line Coverage Branch Coverage Complexity
AbstractCompilerMojo
78%
145/187
58%
69/118
0
AbstractCompilerMojo
0%
0/187
0%
0/118
0
 
@@ -133,7 +133,7 @@
  * @since 2.0
 58  
  */
-  59  15
 public abstract class AbstractCompilerMojo
+  59  0
 public abstract class AbstractCompilerMojo
 60  
     extends AbstractMojo
 61   @@ -158,7 +158,7 @@
      * @since 2.0.2
 71  
      */
-  72  15
     private boolean failOnError = true;
+  72  0
     private boolean failOnError = true;
 73  
 
 74   @@ -171,7 +171,7 @@
      * @parameter expression="${maven.compiler.debug}" default-value="true"
 78  
      */
-  79  15
     private boolean debug = true;
+  79  0
     private boolean debug = true;
 80  
 
 81   @@ -674,29 +674,29 @@
         Compiler compiler;
 330  
 
-  331  15
         getLog().debug( "Using compiler '" + compilerId + "'." );
+  331  0
         getLog().debug( "Using compiler '" + compilerId + "'." );
 332  
 
 333  
         try
 334  
         {
-  335  15
             compiler = compilerManager.getCompiler( compilerId );
+  335  0
             compiler = compilerManager.getCompiler( compilerId );
 336  
         }
 337  0
         catch ( NoSuchCompilerException e )
 338  
         {
 339  0
             throw new MojoExecutionException( "No such compiler '" + e.getCompilerId() + "'." );
-  340  15
         }
+  340  0
         }
 341  
         
 342  
         //-----------toolchains start here ----------------------------------
 343  
         //use the compilerId as identifier for toolchains as well.
-  344  15
         Toolchain tc = getToolchain();
-  345  15
         if ( tc != null ) 
+  344  0
         Toolchain tc = getToolchain();
+  345  0
         if ( tc != null ) 
 346  
         {
 347  0
             getLog().info( "Toolchain in compiler-plugin: " + tc );
@@ -726,26 +726,26 @@
         // ----------------------------------------------------------------------
 362  
 
-  363  15
         List<String> compileSourceRoots = removeEmptyCompileSourceRoots( getCompileSourceRoots() );
+  363  0
         List<String> compileSourceRoots = removeEmptyCompileSourceRoots( getCompileSourceRoots() );
 364  
 
-  365  15
         if ( compileSourceRoots.isEmpty() )
+  365  0
         if ( compileSourceRoots.isEmpty() )
 366  
         {
-  367  2
             getLog().info( "No sources to compile" );
+  367  0
             getLog().info( "No sources to compile" );
 368  
 
-  369  2
             return;
+  369  0
             return;
 370  
         }
 371  
 
-  372  13
         if ( getLog().isDebugEnabled() )
+  372  0
         if ( getLog().isDebugEnabled() )
 373  
         {
-  374  13
             getLog().debug( "Source directories: " + compileSourceRoots.toString().replace( ',', '\n' ) );
-  375  13
             getLog().debug( "Classpath: " + getClasspathElements().toString().replace( ',', '\n' ) );
-  376  13
             getLog().debug( "Output directory: " + getOutputDirectory() );
+  374  0
             getLog().debug( "Source directories: " + compileSourceRoots.toString().replace( ',', '\n' ) );
+  375  0
             getLog().debug( "Classpath: " + getClasspathElements().toString().replace( ',', '\n' ) );
+  376  0
             getLog().debug( "Output directory: " + getOutputDirectory() );
 377  
         }
 378   @@ -758,25 +758,25 @@
         // ----------------------------------------------------------------------
 382  
 
-  383  13
         CompilerConfiguration compilerConfiguration = new CompilerConfiguration();
+  383  0
         CompilerConfiguration compilerConfiguration = new CompilerConfiguration();
 384  
 
-  385  13
         compilerConfiguration.setOutputLocation( getOutputDirectory().getAbsolutePath() );
+  385  0
         compilerConfiguration.setOutputLocation( getOutputDirectory().getAbsolutePath() );
 386  
 
-  387  13
         compilerConfiguration.setClasspathEntries( getClasspathElements() );
+  387  0
         compilerConfiguration.setClasspathEntries( getClasspathElements() );
 388  
 
-  389  13
         compilerConfiguration.setSourceLocations( compileSourceRoots );
+  389  0
         compilerConfiguration.setSourceLocations( compileSourceRoots );
 390  
 
-  391  13
         compilerConfiguration.setOptimize( optimize );
+  391  0
         compilerConfiguration.setOptimize( optimize );
 392  
 
-  393  13
         compilerConfiguration.setDebug( debug );
+  393  0
         compilerConfiguration.setDebug( debug );
 394  
 
-  395  13
         if ( debug && StringUtils.isNotEmpty( debuglevel ) )
+  395  0
         if ( debug && StringUtils.isNotEmpty( debuglevel ) )
 396  
         {
 397  0
             String[] split = StringUtils.split( debuglevel, "," );
@@ -800,88 +800,88 @@
         }        
 409  
         
-  410  13
         compilerConfiguration.setVerbose( verbose );
+  410  0
         compilerConfiguration.setVerbose( verbose );
 411  
 
-  412  13
         compilerConfiguration.setShowWarnings( showWarnings );
+  412  0
         compilerConfiguration.setShowWarnings( showWarnings );
 413  
 
-  414  13
         compilerConfiguration.setShowDeprecation( showDeprecation );
+  414  0
         compilerConfiguration.setShowDeprecation( showDeprecation );
 415  
 
-  416  13
         compilerConfiguration.setSourceVersion( getSource() );
+  416  0
         compilerConfiguration.setSourceVersion( getSource() );
 417  
 
-  418  13
         compilerConfiguration.setTargetVersion( getTarget() );
+  418  0
         compilerConfiguration.setTargetVersion( getTarget() );
 419  
 
-  420  13
         compilerConfiguration.setProc( proc );
+  420  0
         compilerConfiguration.setProc( proc );
 421  
 
-  422  13
         compilerConfiguration.setGeneratedSourcesDirectory( getGeneratedSourcesDirectory() );
+  422  0
         compilerConfiguration.setGeneratedSourcesDirectory( getGeneratedSourcesDirectory() );
 423  
 
-  424  13
         compilerConfiguration.setAnnotationProcessors( annotationProcessors );
+  424  0
         compilerConfiguration.setAnnotationProcessors( annotationProcessors );
 425  
 
-  426  13
         compilerConfiguration.setSourceEncoding( encoding );
+  426  0
         compilerConfiguration.setSourceEncoding( encoding );
 427  
         
-  428  13
         Map<String, String> effectiveCompilerArguments = getCompilerArguments();
+  428  0
         Map<String, String> effectiveCompilerArguments = getCompilerArguments();
 429  
 
-  430  13
         String effectiveCompilerArgument = getCompilerArgument();
+  430  0
         String effectiveCompilerArgument = getCompilerArgument();
 431  
 
-  432  13
         if ( ( effectiveCompilerArguments != null ) || ( effectiveCompilerArgument != null ) )
+  432  0
         if ( ( effectiveCompilerArguments != null ) || ( effectiveCompilerArgument != null ) )
 433  
         {
-  434  1
             LinkedHashMap<String, String> cplrArgsCopy = new LinkedHashMap<String, String>();
-  435  1
             if ( effectiveCompilerArguments != null )
+  434  0
             LinkedHashMap<String, String> cplrArgsCopy = new LinkedHashMap<String, String>();
+  435  0
             if ( effectiveCompilerArguments != null )
 436  
             {
-  437  1
                 for ( Map.Entry<String, String> me : effectiveCompilerArguments.entrySet() )
+  437  0
                 for ( Map.Entry<String, String> me : effectiveCompilerArguments.entrySet() )
 438  
                 {
-  439  1
                     String key = (String) me.getKey();
-  440  1
                     String value = (String) me.getValue();
-  441  1
                     if ( !key.startsWith( "-" ) )
+  439  0
                     String key = (String) me.getKey();
+  440  0
                     String value = (String) me.getValue();
+  441  0
                     if ( !key.startsWith( "-" ) )
 442  
                     {
-  443  1
                         key = "-" + key;
+  443  0
                         key = "-" + key;
 444  
                     }
-  445  1
                     cplrArgsCopy.put( key, value );
-  446  1
                 }
+  445  0
                     cplrArgsCopy.put( key, value );
+  446  0
                 }
 447  
             }
-  448  1
             if ( !StringUtils.isEmpty( effectiveCompilerArgument ) )
+  448  0
             if ( !StringUtils.isEmpty( effectiveCompilerArgument ) )
 449  
             {
-  450  1
                 cplrArgsCopy.put( effectiveCompilerArgument, null );
+  450  0
                 cplrArgsCopy.put( effectiveCompilerArgument, null );
 451  
             }
-  452  1
             compilerConfiguration.setCustomCompilerArguments( cplrArgsCopy );
+  452  0
             compilerConfiguration.setCustomCompilerArguments( cplrArgsCopy );
 453  
         }
 454  
 
-  455  13
         compilerConfiguration.setFork( fork );
+  455  0
         compilerConfiguration.setFork( fork );
 456  
 
-  457  13
         if ( fork )
+  457  0
         if ( fork )
 458  
         {
-  459  2
             if ( !StringUtils.isEmpty( meminitial ) )
+  459  0
             if ( !StringUtils.isEmpty( meminitial ) )
 460  
             {
-  461  2
                 String value = getMemoryValue( meminitial );
+  461  0
                 String value = getMemoryValue( meminitial );
 462  
 
-  463  2
                 if ( value != null )
+  463  0
                 if ( value != null )
 464  
                 {
-  465  2
                     compilerConfiguration.setMeminitial( value );
+  465  0
                     compilerConfiguration.setMeminitial( value );
 466  
                 }
 467   @@ -895,16 +895,16 @@
             }
 472  
 
-  473  2
             if ( !StringUtils.isEmpty( maxmem ) )
+  473  0
             if ( !StringUtils.isEmpty( maxmem ) )
 474  
             {
-  475  2
                 String value = getMemoryValue( maxmem );
+  475  0
                 String value = getMemoryValue( maxmem );
 476  
 
-  477  2
                 if ( value != null )
+  477  0
                 if ( value != null )
 478  
                 {
-  479  2
                     compilerConfiguration.setMaxmem( value );
+  479  0
                     compilerConfiguration.setMaxmem( value );
 480  
                 }
 481   @@ -920,19 +920,19 @@
         }
 487  
 
-  488  13
         compilerConfiguration.setExecutable( executable );
+  488  0
         compilerConfiguration.setExecutable( executable );
 489  
 
-  490  13
         compilerConfiguration.setWorkingDirectory( basedir );
+  490  0
         compilerConfiguration.setWorkingDirectory( basedir );
 491  
 
-  492  13
         compilerConfiguration.setCompilerVersion( compilerVersion );
+  492  0
         compilerConfiguration.setCompilerVersion( compilerVersion );
 493  
 
-  494  13
         compilerConfiguration.setBuildDirectory( buildDirectory );
+  494  0
         compilerConfiguration.setBuildDirectory( buildDirectory );
 495  
 
-  496  13
         compilerConfiguration.setOutputFileName( outputFileName );
+  496  0
         compilerConfiguration.setOutputFileName( outputFileName );
 497  
 
 498   @@ -949,37 +949,37 @@
         try
 504  
         {
-  505  13
             staleSources =
+  505  0
             staleSources =
 506  
                 computeStaleSources( compilerConfiguration, compiler, getSourceInclusionScanner( staleMillis ) );
 507  
 
-  508  13
             canUpdateTarget = compiler.canUpdateTarget( compilerConfiguration );
+  508  0
             canUpdateTarget = compiler.canUpdateTarget( compilerConfiguration );
 509  
 
-  510  13
             if ( compiler.getCompilerOutputStyle().equals( CompilerOutputStyle.ONE_OUTPUT_FILE_FOR_ALL_INPUT_FILES ) &&
+  510  0
             if ( compiler.getCompilerOutputStyle().equals( CompilerOutputStyle.ONE_OUTPUT_FILE_FOR_ALL_INPUT_FILES ) &&
 511  
                 !canUpdateTarget )
 512  
             {
-  513  7
                 getLog().info( "RESCANNING!" );
+  513  0
                 getLog().info( "RESCANNING!" );
 514  
                 // TODO: This second scan for source files is sub-optimal
-  515  7
                 String inputFileEnding = compiler.getInputFileEnding( compilerConfiguration );
+  515  0
                 String inputFileEnding = compiler.getInputFileEnding( compilerConfiguration );
 516  
 
-  517  7
                 Set<File> sources = computeStaleSources( compilerConfiguration, compiler,
+  517  0
                 Set<File> sources = computeStaleSources( compilerConfiguration, compiler,
 518  
                                                    getSourceInclusionScanner( inputFileEnding ) );
 519  
 
-  520  7
                 compilerConfiguration.setSourceFiles( sources );
-  521  7
             }
+  520  0
                 compilerConfiguration.setSourceFiles( sources );
+  521  0
             }
 522  
             else
 523  
             {
-  524  6
                 compilerConfiguration.setSourceFiles( staleSources );
+  524  0
                 compilerConfiguration.setSourceFiles( staleSources );
 525  
             }
 526   @@ -988,16 +988,16 @@  528  
         {
 529  0
             throw new MojoExecutionException( "Error while computing stale sources.", e );
-  530  13
         }
+  530  0
         }
 531  
 
-  532  13
         if ( staleSources.isEmpty() )
+  532  0
         if ( staleSources.isEmpty() )
 533  
         {
-  534  6
             getLog().info( "Nothing to compile - all classes are up to date" );
+  534  0
             getLog().info( "Nothing to compile - all classes are up to date" );
 535  
 
-  536  6
             return;
+  536  0
             return;
 537  
         }
 538   @@ -1010,27 +1010,27 @@
         // ----------------------------------------------------------------------
 542  
 
-  543  7
         if ( getLog().isDebugEnabled() )
+  543  0
         if ( getLog().isDebugEnabled() )
 544  
         {
-  545  7
             getLog().debug( "Classpath:" );
+  545  0
             getLog().debug( "Classpath:" );
 546  
 
-  547  7
             for ( String s : getClasspathElements() )
+  547  0
             for ( String s : getClasspathElements() )
 548  
             {
-  549  4
                 getLog().debug( " " + s );
+  549  0
                 getLog().debug( " " + s );
 550  
             }
 551  
 
-  552  7
             getLog().debug( "Source roots:" );
+  552  0
             getLog().debug( "Source roots:" );
 553  
 
-  554  7
             for ( String root : getCompileSourceRoots() )
+  554  0
             for ( String root : getCompileSourceRoots() )
 555  
             {
-  556  7
                 getLog().debug( " " + root );
+  556  0
                 getLog().debug( " " + root );
 557  
             }
 558   @@ -1039,7 +1039,7 @@
             try
 560  
             {
-  561  7
                 if ( fork )
+  561  0
                 if ( fork )
 562  
                 {
 563  0
                     if ( compilerConfiguration.getExecutable() != null )
@@ -1053,8 +1053,8 @@
                 }
 569  
 
-  570  7
                 String[] cl = compiler.createCommandLine( compilerConfiguration );
-  571  7
                 if ( cl != null && cl.length > 0 )
+  570  0
                 String[] cl = compiler.createCommandLine( compilerConfiguration );
+  571  0
                 if ( cl != null && cl.length > 0 )
 572  
                 {
 573  0
                     StringBuffer sb = new StringBuffer();
@@ -1076,7 +1076,7 @@  585  
             {
 586  0
                 getLog().debug( ce );
-  587  7
             }
+  587  0
             }
 588  
         }
 589   @@ -1089,10 +1089,10 @@
         // ----------------------------------------------------------------------
 593  
 
-  594  7
         if ( StringUtils.isEmpty( compilerConfiguration.getSourceEncoding() ) )
+  594  0
         if ( StringUtils.isEmpty( compilerConfiguration.getSourceEncoding() ) )
 595  
         {
-  596  7
             getLog().warn(
+  596  0
             getLog().warn(
 597  
                            "File encoding has not been set, using platform encoding " + ReaderFactory.FILE_ENCODING
 598   @@ -1109,7 +1109,7 @@
         try
 604  
         {
-  605  7
             messages = compiler.compile( compilerConfiguration );
+  605  0
             messages = compiler.compile( compilerConfiguration );
 606  
         }
 607  0
         catch ( Exception e )
@@ -1118,28 +1118,28 @@  609  
             // TODO: don't catch Exception
 610  0
             throw new MojoExecutionException( "Fatal error compiling", e );
-  611  7
         }
+  611  0
         }
 612  
 
-  613  7
         List<CompilerError> warnings = new ArrayList<CompilerError>();
-  614  7
         List<CompilerError> errors = new ArrayList<CompilerError>();
-  615  7
         if ( messages != null )
+  613  0
         List<CompilerError> warnings = new ArrayList<CompilerError>();
+  614  0
         List<CompilerError> errors = new ArrayList<CompilerError>();
+  615  0
         if ( messages != null )
 616  
         {
-  617  7
             for ( CompilerError message : messages )
+  617  0
             for ( CompilerError message : messages )
 618  
             {
-  619  7
                 if ( message.isError() )
+  619  0
                 if ( message.isError() )
 620  
                 {
-  621  2
                     errors.add( message );
+  621  0
                     errors.add( message );
 622  
                 }
 623  
                 else
 624  
                 {
-  625  5
                     warnings.add( message );
+  625  0
                     warnings.add( message );
 626  
                 }
 627   @@ -1148,10 +1148,10 @@
         }
 629  
 
-  630  7
         if ( failOnError && !errors.isEmpty() )
+  630  0
         if ( failOnError && !errors.isEmpty() )
 631  
         {
-  632  1
             if ( !warnings.isEmpty() )
+  632  0
             if ( !warnings.isEmpty() )
 633  
             {
 634  0
                 getLog().info( "-------------------------------------------------------------" );
@@ -1163,55 +1163,55 @@  639  0
                     getLog().warn( warning.toString() );
 640  
                 }
-  641  0
                 getLog().info( warnings.size() + ( ( warnings.size() > 1 ) ? " warnings " : "warning" ) );
+  641  0
                 getLog().info( warnings.size() + ( ( warnings.size() > 1 ) ? " warnings " : " warning" ) );
 642  0
                 getLog().info( "-------------------------------------------------------------" );
 643  
             }
 644  
             
-  645  1
             getLog().info( "-------------------------------------------------------------" );
-  646  1
             getLog().error( "COMPILATION ERROR : " );
-  647  1
             getLog().info( "-------------------------------------------------------------" );
+  645  0
             getLog().info( "-------------------------------------------------------------" );
+  646  0
             getLog().error( "COMPILATION ERROR : " );
+  647  0
             getLog().info( "-------------------------------------------------------------" );
 648  
             
-  649  1
             for ( CompilerError error : errors )
+  649  0
             for ( CompilerError error : errors )
 650  
             {
-  651  1
                     getLog().error( error.toString() );
+  651  0
                     getLog().error( error.toString() );
 652  
             }
-  653  1
             getLog().info( errors.size() + ( ( errors.size() > 1 ) ? " errors " : "error" ) );
-  654  1
             getLog().info( "-------------------------------------------------------------" );
+  653  0
             getLog().info( errors.size() + ( ( errors.size() > 1 ) ? " errors " : " error" ) );
+  654  0
             getLog().info( "-------------------------------------------------------------" );
 655  
             
-  656  1
             throw new CompilationFailureException( errors );
+  656  0
             throw new CompilationFailureException( errors );
 657  
         }
 658  
         else
 659  
         {
-  660  6
             for ( CompilerError message : messages )
[... 224 lines stripped ...]