elharo commented on code in PR #214:
URL:
https://github.com/apache/maven-reporting-impl/pull/214#discussion_r2614200074
##########
src/main/java/org/apache/maven/reporting/AbstractMavenReport.java:
##########
@@ -215,14 +215,18 @@ public final void execute() throws MojoExecutionException
{
}
private void reportToMarkup() throws MojoExecutionException {
- getLog().info("Rendering to " + outputFormat + " markup");
-
- if (!isExternalReport()) {
- File outputDirectory = new File(getOutputDirectory());
+ String relativeOutput =
+
PathTool.getRelativeFilePath(String.valueOf(getProject().getBasedir()),
getOutputDirectory());
Review Comment:
Can you just use Path.relativize/Path.resolve instead?
##########
src/main/java/org/apache/maven/reporting/AbstractMavenReport.java:
##########
@@ -245,10 +249,18 @@ private void reportToMarkup() throws
MojoExecutionException {
}
private void reportToSite() throws MojoExecutionException {
- File outputDirectory = new File(getOutputDirectory());
-
String filename = getOutputName() + ".html";
+ String relativeOutput =
+
PathTool.getRelativeFilePath(String.valueOf(getProject().getBasedir()),
getOutputDirectory());
Review Comment:
Trying to get away from PathTool. No longer needed in Java 1.7+
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]