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 2020/03/06 21:53:16 UTC
[maven-studies] branch maven-buildinfo-plugin updated: add a little
bit of color
This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to branch maven-buildinfo-plugin
in repository https://gitbox.apache.org/repos/asf/maven-studies.git
The following commit(s) were added to refs/heads/maven-buildinfo-plugin by this push:
new e9129d1 add a little bit of color
e9129d1 is described below
commit e9129d1dac782581654c1a87d8abc2151aed24bf
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Fri Mar 6 22:53:12 2020 +0100
add a little bit of color
---
pom.xml | 5 +++++
src/main/java/org/apache/maven/plugins/buildinfo/SaveMojo.java | 9 ++++++---
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/pom.xml b/pom.xml
index d22ff26..ad1ca72 100644
--- a/pom.xml
+++ b/pom.xml
@@ -104,6 +104,11 @@
<version>3.3.0</version>
</dependency>
<dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-shared-utils</artifactId>
+ <version>3.2.1</version>
+ </dependency>
+ <dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.13</version>
diff --git a/src/main/java/org/apache/maven/plugins/buildinfo/SaveMojo.java b/src/main/java/org/apache/maven/plugins/buildinfo/SaveMojo.java
index 4859318..beb1bfe 100644
--- a/src/main/java/org/apache/maven/plugins/buildinfo/SaveMojo.java
+++ b/src/main/java/org/apache/maven/plugins/buildinfo/SaveMojo.java
@@ -32,6 +32,7 @@ import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.MavenProjectHelper;
+import org.apache.maven.shared.utils.logging.MessageUtils;
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.PropertyUtils;
import org.eclipse.aether.AbstractForwardingRepositorySystemSession;
@@ -289,6 +290,7 @@ public class SaveMojo
{
getLog().warn( "Reproducible Build output summary: " + ok + " files ok, " + ko + " different, " + missing
+ " missing" );
+ getLog().warn( "diff " + relative( referenceBuildinfo ) + " " + relative( buildinfoFile ) );
}
else
{
@@ -308,12 +310,13 @@ public class SaveMojo
if ( !actualLength.equals( referenceLength ) )
{
- getLog().warn( "size mismatch " + actualFilename + diffoscope( artifact ) );
+ getLog().warn( "size mismatch " + MessageUtils.buffer().strong( actualFilename ) + diffoscope( artifact ) );
return false;
}
else if ( !actualSha512.equals( referenceSha512 ) )
{
- getLog().warn( "sha512 mismatch " + actualFilename + diffoscope( artifact ) );
+ getLog().warn( "sha512 mismatch " + MessageUtils.buffer().strong( actualFilename )
+ + diffoscope( artifact ) );
return false;
}
return true;
@@ -323,7 +326,7 @@ public class SaveMojo
{
File actual = a.getFile();
File reference = getReference( actual );
- return ", run diffoscope " + relative( reference ) + " " + relative( actual );
+ return ": diffoscope " + relative( reference ) + " " + relative( actual );
}
private String relative( File file )