Skip to content

Commit

Permalink
MSOURCES-120 fix reproducible IT: remove plugin version from pom.xml
Browse files Browse the repository at this point in the history
given that pom.xml is copied into output source jar that must not change
over time
  • Loading branch information
hboutemy committed Oct 28, 2019
1 parent 32f122a commit 816ebc4
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 4 deletions.
43 changes: 43 additions & 0 deletions src/it/reproducible/parent-pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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>
<artifactId>reproducible-parent</artifactId>
<version>1.0</version>
<packaging>pom</packaging>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>@project.version@</version>
</plugin>
</plugins>
</pluginManagement>
</build>

</project>
9 changes: 6 additions & 3 deletions src/it/reproducible/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand All @@ -39,7 +43,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>@project.version@</version>
<configuration>
<archive>
<manifest>
Expand Down
2 changes: 1 addition & 1 deletion src/it/reproducible/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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' ) ? '3fd3c6db6774db82e78bffc645930a186266e209' : 'bc56380204897bf99dea7849853a7d52f470e7d6'

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

0 comments on commit 816ebc4

Please sign in to comment.