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 2019/10/28 23:05:20 UTC
[maven-source-plugin] 01/01: MSOURCES-120 fix reproducible IT:
remove plugin version from pom.xml
This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to branch MSOURCES-120-3
in repository https://gitbox.apache.org/repos/asf/maven-source-plugin.git
commit d12836487d7dc8b68673d0dc4fef3067297f00f2
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Tue Oct 29 00:05:11 2019 +0100
MSOURCES-120 fix reproducible IT: remove plugin version from pom.xml
given that pom.xml is copied into output source jar that must not change
over time
---
src/it/reproducible/{pom.xml => parent-pom.xml} | 43 +++++++------------------
src/it/reproducible/pom.xml | 9 ++++--
src/it/reproducible/verify.groovy | 2 +-
3 files changed, 18 insertions(+), 36 deletions(-)
diff --git a/src/it/reproducible/pom.xml b/src/it/reproducible/parent-pom.xml
similarity index 50%
copy from src/it/reproducible/pom.xml
copy to src/it/reproducible/parent-pom.xml
index 7a42e57..4616e50 100644
--- a/src/it/reproducible/pom.xml
+++ b/src/it/reproducible/parent-pom.xml
@@ -24,41 +24,20 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.its</groupId>
- <artifactId>reproducible</artifactId>
+ <artifactId>reproducible-parent</artifactId>
<version>1.0</version>
-
- <name>Test for reproducibility of jar</name>
-
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <project.build.outputTimestamp>2019-08-21T18:28:52Z</project.build.outputTimestamp>
- </properties>
+ <packaging>pom</packaging>
<build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <version>@project.version@</version>
- <configuration>
- <archive>
- <manifest>
- <!-- remove default entries since it contains "Created-By: Maven Source Plugin <current plugin version>"
- which varies over time in this IT -->
- <addDefaultEntries>false</addDefaultEntries>
- </manifest>
- </archive>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-deploy-plugin</artifactId>
- <version>2.8.2</version>
- <configuration>
- <!-- Deployments will be written to ${basedir}/target -->
- <altDeploymentRepository>mine::default::file://${basedir}/target/repo</altDeploymentRepository>
- </configuration>
- </plugin>
- </plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>@project.version@</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
</build>
</project>
diff --git a/src/it/reproducible/pom.xml b/src/it/reproducible/pom.xml
index 7a42e57..e080fd5 100644
--- a/src/it/reproducible/pom.xml
+++ b/src/it/reproducible/pom.xml
@@ -23,9 +23,13 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>org.apache.maven.its</groupId>
+ <parent>
+ <groupId>org.apache.maven.its</groupId>
+ <artifactId>reproducible-parent</artifactId>
+ <version>1.0</version>
+ <relativePath>./parent-pom.xml</relativePath>
+ </parent>
<artifactId>reproducible</artifactId>
- <version>1.0</version>
<name>Test for reproducibility of jar</name>
@@ -39,7 +43,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
- <version>@project.version@</version>
<configuration>
<archive>
<manifest>
diff --git a/src/it/reproducible/verify.groovy b/src/it/reproducible/verify.groovy
index 648d05a..bc7b1c3 100644
--- a/src/it/reproducible/verify.groovy
+++ b/src/it/reproducible/verify.groovy
@@ -72,6 +72,6 @@ zipFile.close();
String buf = r.toString()
println buf
-String expectedSha1 = System.properties['os.name'].toLowerCase().contains( 'windows' ) ? 'bb0a48a052defa69102e698aa18c60dea41a546a' : '246b4536d1a7df35b06cea54329077a35e6b07d8'
+String expectedSha1 = System.properties['os.name'].toLowerCase().contains( 'windows' ) ? 'bb0a48a052defa69102e698aa18c60dea41a546a' : 'bc56380204897bf99dea7849853a7d52f470e7d6'
assert buf.startsWith( "reproducible-1.0-sources.jar sha1 = $expectedSha1" )