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/10/02 20:52:40 UTC
[maven-reporting-exec] branch MSHARED-1298 updated (320ea26 -> 21bb340)
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a change to branch MSHARED-1298
in repository https://gitbox.apache.org/repos/asf/maven-reporting-exec.git
discard 320ea26 [MSHARED-1298] Missing site report should be detected
new 21bb340 [MSHARED-1298] Missing site report should be detected
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (320ea26)
\
N -- N -- N refs/heads/MSHARED-1298 (21bb340)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 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:
.../reporting/exec/DefaultMavenReportExecutor.java | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
[maven-reporting-exec] 01/01: [MSHARED-1298] Missing site report should be detected
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch MSHARED-1298
in repository https://gitbox.apache.org/repos/asf/maven-reporting-exec.git
commit 21bb3407f108ec9f3d5b3cdbb35e42a17831b268
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Oct 1 21:10:18 2023 +0200
[MSHARED-1298] Missing site report should be detected
This closes #19
---
.../reporting/exec/DefaultMavenReportExecutor.java | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java b/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java
index ff56597..9bf5568 100644
--- a/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java
+++ b/src/main/java/org/apache/maven/reporting/exec/DefaultMavenReportExecutor.java
@@ -217,6 +217,10 @@ public class DefaultMavenReportExecutor implements MavenReportExecutor {
plugin.getArtifactId(),
plugin.getVersion(),
buff);
+ } else if (!hasUserDefinedReports) {
+ LOGGER.warn("Ignoring report plugin {}:{},"
+ + " it does not contain any report goals: should be removed from reporting configuration in POM",
+ plugin.getArtifactId(), plugin.getVersion());
}
return reports;
@@ -225,7 +229,7 @@ public class DefaultMavenReportExecutor implements MavenReportExecutor {
private boolean prepareGoals(
ReportPlugin reportPlugin, PluginDescriptor pluginDescriptor, List<GoalWithConf> goalsWithConfiguration) {
if (reportPlugin.getReportSets().isEmpty() && reportPlugin.getReports().isEmpty()) {
- // by default, use every goal, which will be filtered later to only keep reporting goals
+ // by default, use every goal which will be filtered later to only keep reporting goals
List<MojoDescriptor> mojoDescriptors = pluginDescriptor.getMojos();
for (MojoDescriptor mojoDescriptor : mojoDescriptors) {
goalsWithConfiguration.add(new GoalWithConf(
@@ -292,11 +296,12 @@ public class DefaultMavenReportExecutor implements MavenReportExecutor {
if (!isMavenReport(mojoExecution, pluginDescriptor)) {
if (hasUserDefinedReports) {
// reports were explicitly written in the POM
- LOGGER.warn(
- "Ignoring {}:{}"
+ LOGGER.warn("Ignoring {}:{}"
+ " goal since it is not a report: should be removed from reporting configuration in POM",
- mojoExecution.getPlugin().getId(),
- report.getGoal());
+ mojoExecution.getPlugin().getId(), report.getGoal());
+ } else {
+ LOGGER.debug("Ignoring {}:{} goal since it is not a report",
+ mojoExecution.getPlugin().getId(), report.getGoal());
}
return null;
}
@@ -411,15 +416,14 @@ public class DefaultMavenReportExecutor implements MavenReportExecutor {
if (LOGGER.isDebugEnabled()) {
if (mojoDescriptor != null && mojoDescriptor.getImplementationClass() != null) {
- LOGGER.debug(
- "Class {} is MavenReport: ",
+ LOGGER.debug("Class {} is {}a MavenReport",
mojoDescriptor.getImplementationClass().getName(),
- isMavenReport);
+ isMavenReport ? "" : "NOT ");
}
if (!isMavenReport) {
LOGGER.debug(
- "Skipping non MavenReport {}",
+ "Skipping non-MavenReport {}",
mojoExecution.getMojoDescriptor().getId());
}
}