You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2023/11/12 21:03:35 UTC
(maven-plugin-tools) branch master updated (8c8d1140 -> 104b261d)
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/maven-plugin-tools.git
from 8c8d1140 [maven-release-plugin] prepare for next development iteration
new afd910c8 Consistently use MavenReport#getReportOutputDirectory()
new b8ba9ef8 Use consistent spelling
new 104b261d [MPLUGIN-493] Consistently evaluate skip parameter in MavenReport#canGenerateReport()
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../src/main/java/org/DummyReport.java | 13 +++++--------
.../src/main/java/org/DummyReport.java | 13 +++++--------
.../maven/plugin/plugin/report/PluginReport.java | 22 +++++++++++++---------
3 files changed, 23 insertions(+), 25 deletions(-)
(maven-plugin-tools) 02/03: Use consistent spelling
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-plugin-tools.git
commit b8ba9ef8d7ea136679885044d44af51e6398a2b8
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Nov 12 22:00:55 2023 +0100
Use consistent spelling
---
.../main/java/org/apache/maven/plugin/plugin/report/PluginReport.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/PluginReport.java b/maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/PluginReport.java
index 1ddf5111..641e75dd 100644
--- a/maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/PluginReport.java
+++ b/maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/PluginReport.java
@@ -222,7 +222,7 @@ public class PluginReport extends AbstractMavenReport {
disableInternalJavadocLinkValidation,
getLog());
} catch (IOException e) {
- throw new MavenReportException("Can not generate sink for mojo " + descriptor.getGoal(), e);
+ throw new MavenReportException("Cannot generate sink for mojo " + descriptor.getGoal(), e);
}
renderer.render();
}
(maven-plugin-tools) 01/03: Consistently use MavenReport#getReportOutputDirectory()
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-plugin-tools.git
commit afd910c81ab80d44e114ef46e028033272246ff4
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Nov 12 22:00:26 2023 +0100
Consistently use MavenReport#getReportOutputDirectory()
---
.../main/java/org/apache/maven/plugin/plugin/report/PluginReport.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/PluginReport.java b/maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/PluginReport.java
index 1e63aa29..1ddf5111 100644
--- a/maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/PluginReport.java
+++ b/maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/PluginReport.java
@@ -211,14 +211,14 @@ public class PluginReport extends AbstractMavenReport {
GoalRenderer renderer;
try {
String filename = descriptor.getGoal() + "-mojo.html";
- Sink sink = getSinkFactory().createSink(outputDirectory, filename);
+ Sink sink = getSinkFactory().createSink(getReportOutputDirectory(), filename);
renderer = new GoalRenderer(
sink,
i18n,
locale,
project,
descriptor,
- outputDirectory,
+ getReportOutputDirectory(),
disableInternalJavadocLinkValidation,
getLog());
} catch (IOException e) {
(maven-plugin-tools) 03/03: [MPLUGIN-493] Consistently evaluate skip parameter in MavenReport#canGenerateReport()
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-plugin-tools.git
commit 104b261d246136c9983bd229f5b625e64f9d4171
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Nov 12 22:02:55 2023 +0100
[MPLUGIN-493] Consistently evaluate skip parameter in MavenReport#canGenerateReport()
---
.../src/main/java/org/DummyReport.java | 13 +++++--------
.../it/plugin-report/src/main/java/org/DummyReport.java | 13 +++++--------
.../apache/maven/plugin/plugin/report/PluginReport.java | 16 ++++++++++------
3 files changed, 20 insertions(+), 22 deletions(-)
diff --git a/maven-plugin-report-plugin/src/it/plugin-report-annotations/src/main/java/org/DummyReport.java b/maven-plugin-report-plugin/src/it/plugin-report-annotations/src/main/java/org/DummyReport.java
index a962b54d..66315bcd 100644
--- a/maven-plugin-report-plugin/src/it/plugin-report-annotations/src/main/java/org/DummyReport.java
+++ b/maven-plugin-report-plugin/src/it/plugin-report-annotations/src/main/java/org/DummyReport.java
@@ -107,6 +107,11 @@ public class DummyReport extends AbstractMavenReport {
* {@inheritDoc}
*/
public boolean canGenerateReport() {
+ if (skip || skipReport) {
+ getLog().info("Maven Plugin Plugin Report generation skipped.");
+ return false;
+ }
+
return true;
}
@@ -114,14 +119,6 @@ public class DummyReport extends AbstractMavenReport {
* {@inheritDoc}
*/
protected void executeReport(Locale locale) throws MavenReportException {
- if (!canGenerateReport()) {
- return;
- }
- if (skip || skipReport) {
- getLog().info("Maven Plugin Plugin Report generation skipped.");
- return;
- }
-
// Generate the plugin's documentation
generatePluginDocumentation(locale);
}
diff --git a/maven-plugin-report-plugin/src/it/plugin-report/src/main/java/org/DummyReport.java b/maven-plugin-report-plugin/src/it/plugin-report/src/main/java/org/DummyReport.java
index 2b139ed3..c4018aee 100644
--- a/maven-plugin-report-plugin/src/it/plugin-report/src/main/java/org/DummyReport.java
+++ b/maven-plugin-report-plugin/src/it/plugin-report/src/main/java/org/DummyReport.java
@@ -101,19 +101,16 @@ public class DummyReport extends AbstractMavenReport {
/** {@inheritDoc} */
public boolean canGenerateReport() {
+ if (skip || skipReport) {
+ getLog().info("Maven Plugin Plugin Report generation skipped.");
+ return false;
+ }
+
return true;
}
/** {@inheritDoc} */
protected void executeReport(Locale locale) throws MavenReportException {
- if (!canGenerateReport()) {
- return;
- }
- if (skip || skipReport) {
- getLog().info("Maven Plugin Plugin Report generation skipped.");
- return;
- }
-
// Generate the plugin's documentation
generatePluginDocumentation(locale);
}
diff --git a/maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/PluginReport.java b/maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/PluginReport.java
index 641e75dd..954363c5 100644
--- a/maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/PluginReport.java
+++ b/maven-plugin-report-plugin/src/main/java/org/apache/maven/plugin/plugin/report/PluginReport.java
@@ -128,7 +128,16 @@ public class PluginReport extends AbstractMavenReport {
*/
@Override
public boolean canGenerateReport() {
- return enhancedPluginXmlFile != null && enhancedPluginXmlFile.isFile() && enhancedPluginXmlFile.canRead();
+ if (skip) {
+ getLog().info("Maven Plugin Plugin Report generation skipped.");
+ return false;
+ }
+
+ if (!(enhancedPluginXmlFile != null && enhancedPluginXmlFile.isFile() && enhancedPluginXmlFile.canRead())) {
+ return false;
+ }
+
+ return true;
}
/**
@@ -136,11 +145,6 @@ public class PluginReport extends AbstractMavenReport {
*/
@Override
protected void executeReport(Locale locale) throws MavenReportException {
- if (skip) {
- getLog().info("Maven Plugin Plugin Report generation skipped.");
- return;
- }
-
PluginDescriptor pluginDescriptor = extractPluginDescriptor();
// Generate the mojos' documentation