You are viewing a plain text version of this content. The canonical link for it is here.
Posted to surefire-commits@maven.apache.org by hb...@apache.org on 2008/03/08 22:28:17 UTC

svn commit: r635090 - in /maven/surefire/trunk/maven-surefire-report-plugin/src: main/java/org/apache/maven/plugins/surefire/report/SurefireReportMojo.java test/java/org/apache/maven/plugins/surefire/report/SurefireReportMojoTest.java

Author: hboutemy
Date: Sat Mar  8 13:28:16 2008
New Revision: 635090

URL: http://svn.apache.org/viewvc?rev=635090&view=rev
Log:
[SUREFIRE-264] change outputDirectory property type to File instead of String

Modified:
    maven/surefire/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportMojo.java
    maven/surefire/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportMojoTest.java

Modified: maven/surefire/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportMojo.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportMojo.java?rev=635090&r1=635089&r2=635090&view=diff
==============================================================================
--- maven/surefire/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportMojo.java (original)
+++ maven/surefire/trunk/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportMojo.java Sat Mar  8 13:28:16 2008
@@ -51,7 +51,7 @@
      *
      * @parameter expression="${project.reporting.outputDirectory}"
      */
-    private String outputDirectory;
+    private File outputDirectory;
 
     /**
      * Doxia Site Renderer
@@ -186,7 +186,7 @@
 
         if ( linkXRef )
         {
-            String relativePath = PathTool.getRelativePath( outputDirectory, xrefLocation.getAbsolutePath() );
+            String relativePath = PathTool.getRelativePath( getOutputDirectory(), xrefLocation.getAbsolutePath() );
             if ( StringUtils.isEmpty( relativePath ) )
             {
                 relativePath = ".";
@@ -247,7 +247,7 @@
 
     protected String getOutputDirectory()
     {
-        return outputDirectory;
+        return outputDirectory.getAbsolutePath();
     }
 
     private ResourceBundle getBundle( Locale locale )

Modified: maven/surefire/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportMojoTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportMojoTest.java?rev=635090&r1=635089&r2=635090&view=diff
==============================================================================
--- maven/surefire/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportMojoTest.java (original)
+++ maven/surefire/trunk/maven-surefire-report-plugin/src/test/java/org/apache/maven/plugins/surefire/report/SurefireReportMojoTest.java Sat Mar  8 13:28:16 2008
@@ -40,7 +40,7 @@
 
         assertNotNull( mojo );
 
-        String outputDir = (String) getVariableValueFromObject( mojo, "outputDirectory" );
+        File outputDir = (File) getVariableValueFromObject( mojo, "outputDirectory" );
 
         boolean showSuccess = ( (Boolean) getVariableValueFromObject( mojo, "showSuccess" ) ).booleanValue();
 
@@ -52,7 +52,7 @@
 
         boolean linkXRef = ( (Boolean) getVariableValueFromObject( mojo, "linkXRef" ) ).booleanValue();
 
-        assertEquals( getBasedir() + "/target/site/unit/basic-surefire-report-test", outputDir );
+        assertEquals( new File( getBasedir() + "/target/site/unit/basic-surefire-report-test" ), outputDir );
 
         assertTrue( showSuccess );