You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2024/10/13 18:49:22 UTC
(maven-artifact-plugin) branch master updated: [MARTIFACT-71] warn => info
This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-artifact-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new 310f43a [MARTIFACT-71] warn => info
310f43a is described below
commit 310f43ad0ffdd3af4b1f0773e7256fb6997699d7
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Sun Oct 13 19:16:29 2024 +0200
[MARTIFACT-71] warn => info
---
.../invoker.properties | 2 +-
src/it/{check-buildplan-warn => check-buildplan-info}/pom.xml | 0
src/it/{check-buildplan-warn => check-buildplan-info}/verify.groovy | 4 ++--
.../maven/plugins/artifact/buildinfo/AbstractBuildinfoMojo.java | 6 +++---
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/it/check-buildplan-warn/invoker.properties b/src/it/check-buildplan-info/invoker.properties
similarity index 94%
rename from src/it/check-buildplan-warn/invoker.properties
rename to src/it/check-buildplan-info/invoker.properties
index f2191ac..e3de0b3 100644
--- a/src/it/check-buildplan-warn/invoker.properties
+++ b/src/it/check-buildplan-info/invoker.properties
@@ -15,4 +15,4 @@
# specific language governing permissions and limitations
# under the License.
-invoker.goals=artifact:check-buildplan
+invoker.goals=artifact:check-buildplan -Ddiagnose
diff --git a/src/it/check-buildplan-warn/pom.xml b/src/it/check-buildplan-info/pom.xml
similarity index 100%
rename from src/it/check-buildplan-warn/pom.xml
rename to src/it/check-buildplan-info/pom.xml
diff --git a/src/it/check-buildplan-warn/verify.groovy b/src/it/check-buildplan-info/verify.groovy
similarity index 85%
rename from src/it/check-buildplan-warn/verify.groovy
rename to src/it/check-buildplan-info/verify.groovy
index 504e2ec..9fca08d 100644
--- a/src/it/check-buildplan-warn/verify.groovy
+++ b/src/it/check-buildplan-info/verify.groovy
@@ -20,5 +20,5 @@
def buildLog = new File(basedir, 'build.log').text
-// https://issues.apache.org/jira/browse/MARTIFACT-24 & MARTIFACT-53
-assert buildLog.contains('[WARNING] <project.build.outputTimestamp> property is inherited, it should be defined in pom.xml')
+// https://issues.apache.org/jira/browse/MARTIFACT-24 & MARTIFACT-53 & MARTIFACT-71
+assert buildLog.contains('[INFO] <project.build.outputTimestamp> property (= 2022-12-11T20:07:23Z) is inherited, you can override in pom.xml')
diff --git a/src/main/java/org/apache/maven/plugins/artifact/buildinfo/AbstractBuildinfoMojo.java b/src/main/java/org/apache/maven/plugins/artifact/buildinfo/AbstractBuildinfoMojo.java
index cf450dd..2a4224b 100644
--- a/src/main/java/org/apache/maven/plugins/artifact/buildinfo/AbstractBuildinfoMojo.java
+++ b/src/main/java/org/apache/maven/plugins/artifact/buildinfo/AbstractBuildinfoMojo.java
@@ -231,7 +231,7 @@ public abstract class AbstractBuildinfoMojo extends AbstractMojo {
+ (effective.equals(outputTimestamp) ? "" : (" => " + effective)));
}
- // check if timestamp defined in a project from reactor: warn if it is not the case
+ // check if timestamp defined in a project from reactor: info if it is not the case
boolean parentInReactor = false;
MavenProject reactorParent = project;
while (reactorProjects.contains(reactorParent.getParent())) {
@@ -240,8 +240,8 @@ public abstract class AbstractBuildinfoMojo extends AbstractMojo {
}
String prop = reactorParent.getOriginalModel().getProperties().getProperty("project.build.outputTimestamp");
if (prop == null) {
- log.warn("<project.build.outputTimestamp> property is inherited"
- + (parentInReactor ? " from outside the reactor" : "") + ", it should be defined in "
+ log.info("<project.build.outputTimestamp> property (= " + outputTimestamp + ") is inherited"
+ + (parentInReactor ? " from outside the reactor" : "") + ", you can override in "
+ (parentInReactor ? "parent POM from reactor " + reactorParent.getFile() : "pom.xml"));
return false;
}