[ 
http://jira.codehaus.org/browse/MSUREFIREREP-29?page=comments#action_81093 ] 
            
Maarten Winkels commented on MSUREFIREREP-29:
---------------------------------------------

I think changing the outputDirectory to a java.io.File is a good solution. 
Dropping it in favour of the reportOutputDirectory that already exists in the 
parent class is (in my opinion) even better.

The main problem with it being a string is that it becomes os dependant: The 
default value is ${project.build.directory}/site which on windows should be 
${project.build.directory}\site.

With the use of:

 PathTool.getRelativePath( reportOutputDirectory.getAbsolutePath(), 
xrefLocation.getAbsolutePath() );

I see no real problems, it also used in the CheckStyle plugin.

> Calculation of relative path to xref is wrong
> ---------------------------------------------
>
>                 Key: MSUREFIREREP-29
>                 URL: http://jira.codehaus.org/browse/MSUREFIREREP-29
>             Project: Maven 2.x Surefire report Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0
>         Environment: WinXp, Java5
>            Reporter: Martin Zeltner
>         Attachments: 
> patch_maven-surefire-report-plugin_relative-path-to-xref.patch, 
> patch_maven-surefire-report-plugin_relative-path-to-xref_2.patch
>
>   Original Estimate: 15 minutes
>  Remaining Estimate: 15 minutes
>
> The calculation of the relative path to xref is wrong! I.e. it fails with the 
> current config:
> <plugin>
>     <groupId>org.apache.maven.plugins</groupId>
>     <artifactId>maven-surefire-report-plugin</artifactId>
>     <version>2.1-SNAPSHOT</version>
>     <configuration>
>         <linkXRef>true</linkXRef>
>         <xrefLocation>target/site/framework-tests/xref</xrefLocation>
>         <outputDirectory>target/site</outputDirectory>
>     </configuration>
> </plugin>
> In appended patch I've changed the following:
>    * Parameter outputDirectory is now a java.io.File so there is even a 
> chance to find out the relavtive path for the config above.
>    * I've replaced the code where the relative path is calculated with the 
> static method invocation of my new util class (tests for util class included).
> Cheers,
> Martin

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to