Skip to content

Commit 0a8898a

Browse files
SteDev2enricovianello
authored andcommitted
Bump to Java 17, CANL 2.7.0 and BC 1.69
Upgrades to other dependencies such as maven plugins Unit tests fixes Maven Central Snapshots configuration Remove useless deps Add undeclared but used deps
1 parent 5852a6d commit 0a8898a

5 files changed

Lines changed: 112 additions & 124 deletions

File tree

pom.xml

Lines changed: 80 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,12 @@
99

1010
<name>voms-api-java</name>
1111
<description>Java APIs to validate and request VOMS attribute certificates</description>
12-
1312
<url>https://github.com/italiangrid/voms-api-java</url>
1413

1514
<licenses>
1615
<license>
1716
<name>The Apache Software License, Version 2.0</name>
1817
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
19-
<distribution>repo</distribution>
2018
</license>
2119
</licenses>
2220

@@ -28,25 +26,28 @@
2826

2927
<properties>
3028
<!-- versions -->
31-
<plugin.compiler.version>3.1</plugin.compiler.version>
29+
<plugin.enforcer.version>3.5.0</plugin.enforcer.version>
30+
<plugin.versions.version>2.16.1</plugin.versions.version>
31+
<plugin.compiler.version>3.13.0</plugin.compiler.version>
3232
<plugin.license.version>1.9.0</plugin.license.version>
33-
<plugin.release.version>2.2.2</plugin.release.version>
33+
<plugin.release.version>3.1.1</plugin.release.version>
3434
<plugin.source.version>2.2.1</plugin.source.version>
35-
<plugin.assembly.version>2.4.1</plugin.assembly.version>
36-
<plugin.deploy.version>2.8.2</plugin.deploy.version>
37-
<plugin.jar.version>2.5</plugin.jar.version>
35+
<plugin.assembly.version>3.7.1</plugin.assembly.version>
36+
<plugin.jar.version>3.4.2</plugin.jar.version>
3837
<plugin.javadoc.version>2.9.1</plugin.javadoc.version>
39-
<plugin.cobertura.version>2.5.2</plugin.cobertura.version>
40-
<plugin.gpg.version>1.5</plugin.gpg.version>
41-
<plugin.central-publishing.version>0.6.0</plugin.central-publishing.version>
38+
<plugin.cobertura.version>2.7</plugin.cobertura.version>
39+
<plugin.gpg.version>3.2.5</plugin.gpg.version>
40+
<plugin.central-publishing.version>0.7.0</plugin.central-publishing.version>
4241
<plugin.maven-gpg.version>3.2.7</plugin.maven-gpg.version>
4342

44-
<junit.version>4.11</junit.version>
43+
<junit.version>4.13.2</junit.version>
4544
<hamcrest.version>1.3</hamcrest.version>
46-
<canl.version>2.6.0</canl.version>
47-
<mockito.version>1.9.5</mockito.version>
45+
<canl.version>2.7.0</canl.version>
46+
<mockito.version>5.16.0</mockito.version>
4847
<jcip.version>1.0</jcip.version>
49-
<bc.version>1.58</bc.version>
48+
<bc.version>1.69</bc.version>
49+
50+
<maven.compiler.release>17</maven.compiler.release>
5051

5152
<!-- properties -->
5253
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -60,27 +61,27 @@
6061

6162
<developers>
6263
<developer>
63-
<id>andreac</id>
64-
<name>Andrea Ceccanti</name>
65-
<email>andrea.ceccanti@cnaf.infn.it</email>
64+
<id>vianello</id>
65+
<name>Enrico Vianello</name>
66+
<email>enrico.vianello@cnaf.infn.it</email>
6667
<organization>INFN CNAF</organization>
6768
<roles>
6869
<role>Developer</role>
6970
</roles>
7071
</developer>
7172
<developer>
72-
<id>vventuri</id>
73-
<name>Valerio Venturi</name>
74-
<email>valerio.venturi@cnaf.infn.it</email>
73+
<id>giaco</id>
74+
<name>Francesco Giacomini</name>
75+
<email>francesco.giacomini@cnaf.infn.it</email>
7576
<organization>INFN CNAF</organization>
7677
<roles>
7778
<role>Developer</role>
7879
</roles>
7980
</developer>
8081
<developer>
81-
<id>dandreotti</id>
82-
<name>Daniele Andreotti</name>
83-
<email>daniele.andreotti@cnaf.infn.it</email>
82+
<id>szotti</id>
83+
<name>Stefano Zotti</name>
84+
<email>stefano.zotti@cnaf.infn.it</email>
8485
<organization>INFN CNAF</organization>
8586
<roles>
8687
<role>Developer</role>
@@ -89,15 +90,41 @@
8990
</developers>
9091

9192
<build>
92-
9393
<plugins>
94+
95+
<plugin>
96+
<groupId>org.apache.maven.plugins</groupId>
97+
<artifactId>maven-enforcer-plugin</artifactId>
98+
<version>${plugin.enforcer.version}</version>
99+
<executions>
100+
<execution>
101+
<id>enforce-maven</id>
102+
<goals>
103+
<goal>enforce</goal>
104+
</goals>
105+
<configuration>
106+
<rules>
107+
<requireMavenVersion>
108+
<version>3.6.3</version>
109+
</requireMavenVersion>
110+
</rules>
111+
</configuration>
112+
</execution>
113+
</executions>
114+
</plugin>
115+
116+
<plugin>
117+
<groupId>org.codehaus.mojo</groupId>
118+
<artifactId>versions-maven-plugin</artifactId>
119+
<version>${plugin.versions.version}</version>
120+
</plugin>
121+
94122
<plugin>
95123
<groupId>org.apache.maven.plugins</groupId>
96124
<artifactId>maven-compiler-plugin</artifactId>
97125
<version>${plugin.compiler.version}</version>
98126
<configuration>
99-
<source>1.8</source>
100-
<target>1.8</target>
127+
<release>17</release>
101128
<showDeprecation>true</showDeprecation>
102129
<showWarnings>true</showWarnings>
103130
</configuration>
@@ -134,39 +161,6 @@
134161
</configuration>
135162
</plugin>
136163

137-
<plugin>
138-
<groupId>org.apache.maven.plugins</groupId>
139-
<artifactId>maven-javadoc-plugin</artifactId>
140-
<version>${plugin.javadoc.version}</version>
141-
<configuration>
142-
<source>1.8</source>
143-
<outputDirectory>${project.build.directory}/javadoc</outputDirectory>
144-
<reportOutputDirectory>${project.reporting.outputDirectory}/javadoc</reportOutputDirectory>
145-
</configuration>
146-
<executions>
147-
<execution>
148-
<id>attach-javadocs</id>
149-
<goals>
150-
<goal>jar</goal>
151-
</goals>
152-
</execution>
153-
</executions>
154-
</plugin>
155-
156-
<plugin>
157-
<groupId>org.apache.maven.plugins</groupId>
158-
<artifactId>maven-source-plugin</artifactId>
159-
<version>${plugin.source.version}</version>
160-
<executions>
161-
<execution>
162-
<id>attach-sources</id>
163-
<goals>
164-
<goal>jar-no-fork</goal>
165-
</goals>
166-
</execution>
167-
</executions>
168-
</plugin>
169-
170164
<plugin>
171165
<groupId>com.mycila.maven-license-plugin</groupId>
172166
<artifactId>maven-license-plugin</artifactId>
@@ -177,13 +171,15 @@
177171
<exclude>Jenkinsfile</exclude>
178172
<exclude>.travis.yml</exclude>
179173
<exclude>*.md</exclude>
174+
<exclude>.vscode/**</exclude>
180175
<exclude>Makefile</exclude>
181176
<exclude>AUTHORS</exclude>
182177
<exclude>LICENSE</exclude>
183178
<exclude>.gitignore</exclude>
184179
<exclude>spec/**</exclude>
185180
<exclude>src/test/resources/**</exclude>
186181
<exclude>src/config/**</exclude>
182+
<exclude>src/test/resources/home/**</exclude>
187183
<exclude>src/main/java/org/glite/voms/FQAN.java</exclude>
188184
</excludes>
189185
<useDefaultExcludes>true</useDefaultExcludes>
@@ -209,12 +205,6 @@
209205
</configuration>
210206
</plugin>
211207

212-
<plugin>
213-
<groupId>org.apache.maven.plugins</groupId>
214-
<artifactId>maven-deploy-plugin</artifactId>
215-
<version>${plugin.deploy.version}</version>
216-
</plugin>
217-
218208
<plugin>
219209
<groupId>org.apache.maven.plugins</groupId>
220210
<artifactId>maven-jar-plugin</artifactId>
@@ -240,7 +230,7 @@
240230

241231
<dependency>
242232
<groupId>org.hamcrest</groupId>
243-
<artifactId>hamcrest-library</artifactId>
233+
<artifactId>hamcrest-core</artifactId>
244234
<version>${hamcrest.version}</version>
245235
<scope>test</scope>
246236
</dependency>
@@ -249,18 +239,28 @@
249239
<groupId>eu.eu-emi.security</groupId>
250240
<artifactId>canl</artifactId>
251241
<version>${canl.version}</version>
242+
<exclusions>
243+
<exclusion>
244+
<groupId>org.bouncycastle</groupId>
245+
<artifactId>bcpkix-jdk15on</artifactId>
246+
</exclusion>
247+
<exclusion>
248+
<groupId>org.bouncycastle</groupId>
249+
<artifactId>bcprov-jdk15on</artifactId>
250+
</exclusion>
251+
</exclusions>
252252
</dependency>
253253

254254
<dependency>
255-
<groupId>org.bouncycastle</groupId>
256-
<artifactId>bcpkix-jdk15on</artifactId>
257-
<version>${bc.version}</version>
255+
<groupId>org.bouncycastle</groupId>
256+
<artifactId>bcpkix-jdk15on</artifactId>
257+
<version>${bc.version}</version>
258258
</dependency>
259259

260260
<dependency>
261-
<groupId>org.bouncycastle</groupId>
262-
<artifactId>bcprov-jdk15on</artifactId>
263-
<version>${bc.version}</version>
261+
<groupId>org.bouncycastle</groupId>
262+
<artifactId>bcprov-jdk15on</artifactId>
263+
<version>${bc.version}</version>
264264
</dependency>
265265

266266
<dependency>
@@ -334,29 +334,15 @@
334334

335335
<profile>
336336
<id>central-staging</id>
337-
<distributionManagement>
338-
<snapshotRepository>
339-
<id>central</id>
340-
<name>Maven central snapshots</name>
341-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
342-
</snapshotRepository>
343-
344-
<repository>
345-
<id>central</id>
346-
<name>Maven central releases</name>
347-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
348-
</repository>
349-
</distributionManagement>
350-
351337
<build>
352338
<plugins>
353339
<plugin>
354340
<groupId>org.sonatype.central</groupId>
355341
<artifactId>central-publishing-maven-plugin</artifactId>
356342
<version>${plugin.central-publishing.version}</version>
357343
<extensions>true</extensions>
358-
<configuration>
359-
<publishingServerId>central</publishingServerId>
344+
<configuration>
345+
<publishingServerId>central</publishingServerId>
360346
</configuration>
361347
</plugin>
362348
<plugin>
@@ -370,6 +356,12 @@
370356
<goals>
371357
<goal>sign</goal>
372358
</goals>
359+
<configuration>
360+
<gpgArguments>
361+
<arg>--pinentry-mode</arg>
362+
<arg>loopback</arg>
363+
</gpgArguments>
364+
</configuration>
373365
</execution>
374366
</executions>
375367
</plugin>

src/test/java/org/italiangrid/voms/test/ac/TestACGenerationParams.java

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,11 @@
1515
*/
1616
package org.italiangrid.voms.test.ac;
1717

18-
import static org.hamcrest.Matchers.equalTo;
19-
import static org.hamcrest.Matchers.hasSize;
20-
import static org.hamcrest.Matchers.is;
18+
import static org.hamcrest.CoreMatchers.equalTo;
19+
import static org.hamcrest.MatcherAssert.assertThat;
2120
import static org.italiangrid.voms.request.impl.FakeVOMSACServiceProperties.GAS;
2221
import static org.italiangrid.voms.request.impl.FakeVOMSACServiceProperties.NOT_AFTER;
2322
import static org.italiangrid.voms.request.impl.FakeVOMSACServiceProperties.NOT_BEFORE;
24-
import static org.junit.Assert.assertThat;
2523

2624
import java.time.LocalDateTime;
2725
import java.time.ZoneOffset;
@@ -105,18 +103,18 @@ public void testDateParsing() {
105103
public void testGaParsing() {
106104
System.setProperty(GAS.getPropertyName(), "one = uno, two = due, three = tre");
107105
ACGenerationParams params = ACGenerationParams.fromSystemProperties();
108-
assertThat(params.getGas(), hasSize(3));
109-
assertThat(params.getGas().get(0).getName(), is("one"));
110-
assertThat(params.getGas().get(0).getValue(), is("uno"));
111-
assertThat(params.getGas().get(0).getContext(), is("test"));
106+
assertThat(params.getGas().size(), equalTo(3));
107+
assertThat(params.getGas().get(0).getName(), equalTo("one"));
108+
assertThat(params.getGas().get(0).getValue(), equalTo("uno"));
109+
assertThat(params.getGas().get(0).getContext(), equalTo("test"));
112110

113-
assertThat(params.getGas().get(1).getName(), is("two"));
114-
assertThat(params.getGas().get(1).getValue(), is("due"));
115-
assertThat(params.getGas().get(1).getContext(), is("test"));
111+
assertThat(params.getGas().get(1).getName(), equalTo("two"));
112+
assertThat(params.getGas().get(1).getValue(), equalTo("due"));
113+
assertThat(params.getGas().get(1).getContext(), equalTo("test"));
116114

117-
assertThat(params.getGas().get(2).getName(), is("three"));
118-
assertThat(params.getGas().get(2).getValue(), is("tre"));
119-
assertThat(params.getGas().get(2).getContext(), is("test"));
115+
assertThat(params.getGas().get(2).getName(), equalTo("three"));
116+
assertThat(params.getGas().get(2).getValue(), equalTo("tre"));
117+
assertThat(params.getGas().get(2).getContext(), equalTo("test"));
120118
}
121119

122120

src/test/java/org/italiangrid/voms/test/ac/TestFakeVOMSACService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
*/
1616
package org.italiangrid.voms.test.ac;
1717

18-
import static org.hamcrest.Matchers.equalTo;
19-
import static org.junit.Assert.assertThat;
18+
import static org.hamcrest.CoreMatchers.equalTo;
19+
import static org.hamcrest.MatcherAssert.assertThat;
2020

2121
import java.io.FileNotFoundException;
2222
import java.io.IOException;

0 commit comments

Comments
 (0)