Skip to content

Commit 816ebc4

Browse files
committed
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
1 parent 32f122a commit 816ebc4

File tree

3 files changed

+50
-4
lines changed

3 files changed

+50
-4
lines changed

src/it/reproducible/parent-pom.xml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Licensed to the Apache Software Foundation (ASF) under one
4+
~ or more contributor license agreements. See the NOTICE file
5+
~ distributed with this work for additional information
6+
~ regarding copyright ownership. The ASF licenses this file
7+
~ to you under the Apache License, Version 2.0 (the
8+
~ "License"); you may not use this file except in compliance
9+
~ with the License. You may obtain a copy of the License at
10+
~
11+
~ http://www.apache.org/licenses/LICENSE-2.0
12+
~
13+
~ Unless required by applicable law or agreed to in writing,
14+
~ software distributed under the License is distributed on an
15+
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
~ KIND, either express or implied. See the License for the
17+
~ specific language governing permissions and limitations
18+
~ under the License.
19+
-->
20+
21+
<project xmlns="http://maven.apache.org/POM/4.0.0"
22+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
24+
<modelVersion>4.0.0</modelVersion>
25+
26+
<groupId>org.apache.maven.its</groupId>
27+
<artifactId>reproducible-parent</artifactId>
28+
<version>1.0</version>
29+
<packaging>pom</packaging>
30+
31+
<build>
32+
<pluginManagement>
33+
<plugins>
34+
<plugin>
35+
<groupId>org.apache.maven.plugins</groupId>
36+
<artifactId>maven-source-plugin</artifactId>
37+
<version>@project.version@</version>
38+
</plugin>
39+
</plugins>
40+
</pluginManagement>
41+
</build>
42+
43+
</project>

src/it/reproducible/pom.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,13 @@
2323
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2424
<modelVersion>4.0.0</modelVersion>
2525

26-
<groupId>org.apache.maven.its</groupId>
26+
<parent>
27+
<groupId>org.apache.maven.its</groupId>
28+
<artifactId>reproducible-parent</artifactId>
29+
<version>1.0</version>
30+
<relativePath>./parent-pom.xml</relativePath>
31+
</parent>
2732
<artifactId>reproducible</artifactId>
28-
<version>1.0</version>
2933

3034
<name>Test for reproducibility of jar</name>
3135

@@ -39,7 +43,6 @@
3943
<plugin>
4044
<groupId>org.apache.maven.plugins</groupId>
4145
<artifactId>maven-source-plugin</artifactId>
42-
<version>@project.version@</version>
4346
<configuration>
4447
<archive>
4548
<manifest>

src/it/reproducible/verify.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,6 @@ zipFile.close();
7272
String buf = r.toString()
7373
println buf
7474

75-
String expectedSha1 = System.properties['os.name'].toLowerCase().contains( 'windows' ) ? 'bb0a48a052defa69102e698aa18c60dea41a546a' : '246b4536d1a7df35b06cea54329077a35e6b07d8'
75+
String expectedSha1 = System.properties['os.name'].toLowerCase().contains( 'windows' ) ? '3fd3c6db6774db82e78bffc645930a186266e209' : 'bc56380204897bf99dea7849853a7d52f470e7d6'
7676

7777
assert buf.startsWith( "reproducible-1.0-sources.jar sha1 = $expectedSha1" )

0 commit comments

Comments
 (0)