Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
maven-reporting-impl-4.0.0-M11
-
None
Description
The output directory should default to ${project.build.directory} instead of ${project.reporting.outputDirectory}. Quoting my reasoning from https://github.com/apache/maven-jxr/commit/ae81a34ac616bf7e4ea4fa9d4eb09f0979eaccb1#commitcomment-130639906:
(...) because the latter is simply wrong IMO. For stand-alone mojo execution, a plugin should not mess with Maven Site's default directory. Imagine a situation in which each module should get its own, self-consistent report when called stand-alone, but the site should contain an aggregate with a different structure or maybe no report from that plugin at all. The default would then pollute the site directory. This is why on the ML I asked you (michaelo), if overriding a @Parameter annotation on a base class field by another @Parameter annotation on a setter in a subclass it is the right or canonical way to implement such a default override.
BTW, like I also said before, Maven Javadoc Plugin, even though it does not use the abstract base class, implements the default correctly: build dir for stand-alone, report dir in site generation context.
The javadoc is, BTW, still correct and does not need to be changed: In a site generation context, the reporting base directory will be set here automatically without any further changes due to:
@Override public void setReportOutputDirectory(File reportOutputDirectory) { this.reportOutputDirectory = reportOutputDirectory; this.outputDirectory = reportOutputDirectory; }
Attachments
Issue Links
- causes
-
MSITE-998 MavenReport#setReportOutputDirectory(File) is called too late
- Closed
-
JXR-189 Dynamically calculate javadocLocation/testJavadocLocation
- Closed
-
MCHECKSTYLE-446 Dynamically calculate xrefLocation/xrefTestLocation
- Closed
-
MPMD-390 Dynamically calculate xrefLocation/xrefTestLocation
- Closed
-
SUREFIRE-2227 Dynamically calculate xrefTestLocation
- Closed
-
MJAVADOC-785 Align plugin implementation with AbstractMavenReport (maven-reporting-impl)
- Closed
- is depended upon by
-
MSHARED-1343 Make parameter outputDirectory read/write in AbstractMavenReport
- Closed
- relates to
-
MSHARED-1326 Improve MavenReport interface/AbstractMavenReport class API
- Closed
- links to