Skip to content

Commit 6ec5f74

Browse files
committed
exclude META-INF/versions from shaded jar to prevent build failure on Linux CI
1 parent 5a902a2 commit 6ec5f74

4 files changed

Lines changed: 11 additions & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ jobs:
1616
with:
1717
java-version: '17'
1818
distribution: zulu
19+
- name: Print Java and Maven versions
20+
run: mvn --version
1921
- name: Cache Maven dependencies
2022
uses: actions/cache@v4
2123
with:

.github/workflows/deploy-snapshot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ jobs:
3030
with:
3131
java-version: ${{ env.java_version }}
3232
distribution: ${{ env.java_distribution }}
33+
- name: Print Java and Maven versions
34+
run: mvn --version
3335
- name: Cache Maven dependencies
3436
uses: actions/cache@v4
3537
with:

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ jobs:
3434
with:
3535
java-version: ${{ env.java_version }}
3636
distribution: ${{ env.java_distribution }}
37+
- name: Print Java and Maven versions
38+
run: mvn --version
3739
- name: Cache Maven dependencies
3840
uses: actions/cache@v4
3941
with:

gbfs-validator-java-cli/pom.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@
118118
<plugin>
119119
<groupId>org.apache.maven.plugins</groupId>
120120
<artifactId>maven-shade-plugin</artifactId>
121-
<!-- Use older version: 3.6.0 and 3.6.1 have a bug: "Collections sizes are not equals" -->
122-
<version>3.5.3</version>
121+
<version>3.6.1</version>
123122
<executions>
124123
<execution>
125124
<phase>package</phase>
@@ -135,12 +134,15 @@
135134
<finalName>gbfs-validator-cli</finalName>
136135
<filters>
137136
<filter>
138-
<!-- Exclude signature files -->
137+
<!-- Exclude signature files and multi-release JAR version entries.
138+
META-INF/versions/** exclusion prevents "Collections sizes are not equals"
139+
error on Linux CI when shading multi-release JARs. -->
139140
<artifact>*:*</artifact>
140141
<excludes>
141142
<exclude>META-INF/*.SF</exclude>
142143
<exclude>META-INF/*.DSA</exclude>
143144
<exclude>META-INF/*.RSA</exclude>
145+
<exclude>META-INF/versions/**</exclude>
144146
</excludes>
145147
</filter>
146148
</filters>

0 commit comments

Comments
 (0)