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 2022/04/02 21:39:57 UTC
[maven-artifact-plugin] branch master updated: [MARTIFACT-31] ignore remote buildinfo for compare
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 4baa2a8 [MARTIFACT-31] ignore remote buildinfo for compare
4baa2a8 is described below
commit 4baa2a8ab0a83391511f573ab98c21b6b5905b7f
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Sat Apr 2 23:39:55 2022 +0200
[MARTIFACT-31] ignore remote buildinfo for compare
it may have been generated with other plugin version, then would require
much harder comparison algorithm
---
.../plugins/artifact/buildinfo/ReferenceBuildinfoUtil.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/maven/plugins/artifact/buildinfo/ReferenceBuildinfoUtil.java b/src/main/java/org/apache/maven/plugins/artifact/buildinfo/ReferenceBuildinfoUtil.java
index 1203922..00516af 100644
--- a/src/main/java/org/apache/maven/plugins/artifact/buildinfo/ReferenceBuildinfoUtil.java
+++ b/src/main/java/org/apache/maven/plugins/artifact/buildinfo/ReferenceBuildinfoUtil.java
@@ -56,7 +56,7 @@ import java.util.jar.Manifest;
import java.util.zip.ZipEntry;
/**
- * Utility to download or generate reference buildinfo.
+ * Utility to download reference artifacts and download or generate reference buildinfo.
*/
class ReferenceBuildinfoUtil
{
@@ -111,6 +111,14 @@ class ReferenceBuildinfoUtil
{
File referenceBuildinfo = downloadReferenceBuildinfo( repo, project );
+ if ( referenceBuildinfo != null )
+ {
+ log.warn( "dropping downloaded reference buildinfo because it may be generated"
+ + " from different maven-artifact-plugin release..." );
+ // TODO keep a save?
+ referenceBuildinfo = null;
+ }
+
if ( referenceBuildinfo == null )
{
// download reference artifacts and guess Java version and OS