Skip to content

Commit a166634

Browse files
kriegaexmichael-o
authored andcommitted
[MSHARED-1327] Change output directory default in AbstractMavenReport
The output directory now defaults to ${project.build.directory}/reports instead of ${project.reporting.outputDirectory}. This represents a clear separatation between standalone invocation compared to site generation. This closes #26
1 parent 59579de commit a166634

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/it/use-as-direct-mojo-markup/verify.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* under the License.
1818
*/
1919

20-
File site = new File( basedir, 'target/site/' )
20+
File site = new File( basedir, 'target/reports/' )
2121

2222
File f = new File( site, 'custom-report.xdoc' );
2323
assert f.exists();
@@ -31,4 +31,4 @@ f = new File( site, 'external/report.html' );
3131
assert f.exists();
3232
assert f.text.contains( '<h1>External Report</h1>' );
3333

34-
return true;
34+
return true;

src/it/use-as-direct-mojo/verify.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* under the License.
1818
*/
1919

20-
File site = new File( basedir, 'target/site/' )
20+
File site = new File( basedir, 'target/reports/' )
2121

2222
File f = new File( site, 'custom-report.html' );
2323
assert f.exists();

src/main/java/org/apache/maven/reporting/AbstractMavenReport.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public abstract class AbstractMavenReport extends AbstractMojo implements MavenM
8484
* user-defined mojo parameter with a default value) to generate multi-page reports or external reports with the
8585
* main output file (entry point) denoted by {@link #getOutputName()}.
8686
*/
87-
@Parameter(defaultValue = "${project.reporting.outputDirectory}", readonly = true, required = true)
87+
@Parameter(defaultValue = "${project.build.directory}/reports", readonly = true, required = true)
8888
protected File outputDirectory;
8989

9090
/**

0 commit comments

Comments
 (0)