Skip to content

Commit

Permalink
Dynamically calculate javadocDir/testJavadocDir
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-o committed Nov 16, 2023
1 parent 80e165a commit 85d3d26
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ public class JxrReport extends AbstractJxrReport {

/**
* Directory where Javadoc is generated for this project.
* <br>
* <strong>Default</strong>: {@link #getReportOutputDirectory()} + {@code /apidocs}
*/
@Parameter(defaultValue = "${project.reporting.outputDirectory}/apidocs")
@Parameter
private File javadocDir;

@Override
Expand Down Expand Up @@ -121,6 +123,6 @@ public String getOutputName() {

@Override
protected File getJavadocDir() {
return javadocDir;
return javadocDir != null ? javadocDir : new File(getReportOutputDirectory(), "apidocs");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ public class JxrTestReport extends AbstractJxrReport {

/**
* Directory where Test Javadoc is generated for this project.
* <br>
* <strong>Default</strong>: {@link #getReportOutputDirectory()} + {@code /testapidocs}
*/
@Parameter(defaultValue = "${project.reporting.outputDirectory}/testapidocs")
private File testJavadocDir;

@Override
Expand Down Expand Up @@ -103,6 +104,6 @@ public String getOutputName() {

@Override
protected File getJavadocDir() {
return testJavadocDir;
return testJavadocDir != null ? testJavadocDir : new File(getReportOutputDirectory(), "testapidocs");
}
}

0 comments on commit 85d3d26

Please sign in to comment.