Skip to content

Commit cdaa0e0

Browse files
updated dependencies and refactored build configuration for multi-release jar
1 parent 41f3c4c commit cdaa0e0

File tree

5 files changed

+49
-47
lines changed

5 files changed

+49
-47
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ before_script:
1515
script:
1616
- mvn clean test jacoco:report verify -Pcoverage
1717
after_success:
18-
- curl -o ~/codacy-coverage-reporter.jar https://oss.sonatype.org/service/local/repositories/releases/content/com/codacy/codacy-coverage-reporter/4.0.2/codacy-coverage-reporter-4.0.2-assembly.jar
18+
- curl -o ~/codacy-coverage-reporter.jar https://oss.sonatype.org/service/local/repositories/releases/content/com/codacy/codacy-coverage-reporter/7.0.0/codacy-coverage-reporter-7.0.0-assembly.jar
1919
- $JAVA_HOME/bin/java -jar ~/codacy-coverage-reporter.jar report -l Java -r target/site/jacoco/jacoco.xml
2020
cache:
2121
directories:

pom.xml

Lines changed: 36 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<dependency>
4242
<groupId>org.bouncycastle</groupId>
4343
<artifactId>bcprov-jdk15on</artifactId>
44-
<version>1.61</version>
44+
<version>1.64</version>
4545
<!-- see maven-shade-plugin; we don't want this as a transitive dependency in other projects -->
4646
<optional>true</optional>
4747
</dependency>
@@ -50,37 +50,37 @@
5050
<dependency>
5151
<groupId>org.junit.jupiter</groupId>
5252
<artifactId>junit-jupiter</artifactId>
53-
<version>5.4.2</version>
53+
<version>5.6.0</version>
5454
<scope>test</scope>
5555
</dependency>
5656
<dependency>
5757
<groupId>org.mockito</groupId>
5858
<artifactId>mockito-core</artifactId>
59-
<version>2.27.0</version>
59+
<version>3.2.4</version>
6060
<scope>test</scope>
6161
</dependency>
6262
<dependency>
6363
<groupId>org.hamcrest</groupId>
6464
<artifactId>hamcrest</artifactId>
65-
<version>2.1</version>
65+
<version>2.2</version>
6666
<scope>test</scope>
6767
</dependency>
6868
<dependency>
6969
<groupId>com.google.guava</groupId>
7070
<artifactId>guava</artifactId>
71-
<version>27.1-jre</version>
71+
<version>28.2-jre</version>
7272
<scope>test</scope>
7373
</dependency>
7474
<dependency>
7575
<groupId>org.openjdk.jmh</groupId>
7676
<artifactId>jmh-core</artifactId>
77-
<version>1.21</version>
77+
<version>1.23</version>
7878
<scope>test</scope>
7979
</dependency>
8080
<dependency>
8181
<groupId>org.openjdk.jmh</groupId>
8282
<artifactId>jmh-generator-annprocess</artifactId>
83-
<version>1.21</version>
83+
<version>1.23</version>
8484
<scope>test</scope>
8585
</dependency>
8686
</dependencies>
@@ -90,7 +90,7 @@
9090
<plugin>
9191
<groupId>org.apache.maven.plugins</groupId>
9292
<artifactId>maven-enforcer-plugin</artifactId>
93-
<version>3.0.0-M2</version>
93+
<version>3.0.0-M3</version>
9494
<executions>
9595
<execution>
9696
<id>enforce-java</id>
@@ -100,8 +100,8 @@
100100
<configuration>
101101
<rules>
102102
<requireJavaVersion>
103-
<message>You need at least JDK 9 to build this project.</message>
104-
<version>[9,)</version>
103+
<message>You need at least JDK 11.0.3 to build this project.</message>
104+
<version>[11.0.3,)</version>
105105
</requireJavaVersion>
106106
</rules>
107107
</configuration>
@@ -113,32 +113,47 @@
113113
<version>3.8.1</version>
114114
<configuration>
115115
<release>7</release>
116-
<source>1.7</source> <!-- redundant to <release> but needed until https://bugs.openjdk.java.net/browse/JDK-8219474 is fixed (see javadoc config) -->
117-
<target>1.7</target>
118116
<testRelease>8</testRelease>
119117
<encoding>UTF-8</encoding>
120118
<showWarnings>true</showWarnings>
121119
</configuration>
120+
<executions>
121+
<execution>
122+
<id>java9</id>
123+
<phase>compile</phase>
124+
<goals>
125+
<goal>compile</goal>
126+
</goals>
127+
<configuration>
128+
<release>9</release>
129+
<compileSourceRoots>
130+
<compileSourceRoot>${project.basedir}/src/main/java9</compileSourceRoot>
131+
</compileSourceRoots>
132+
<multiReleaseOutput>true</multiReleaseOutput>
133+
</configuration>
134+
</execution>
135+
</executions>
122136
</plugin>
123137
<plugin>
124138
<groupId>org.apache.maven.plugins</groupId>
125139
<artifactId>maven-surefire-plugin</artifactId>
126-
<version>2.22.2</version>
140+
<version>3.0.0-M4</version>
127141
</plugin>
128142
<plugin>
129143
<artifactId>maven-jar-plugin</artifactId>
130-
<version>3.1.1</version>
144+
<version>3.2.0</version>
131145
<configuration>
132146
<archive>
133147
<manifestEntries>
148+
<Multi-Release>true</Multi-Release>
134149
<Sealed>true</Sealed>
135150
</manifestEntries>
136151
</archive>
137152
</configuration>
138153
</plugin>
139154
<plugin>
140155
<artifactId>maven-shade-plugin</artifactId>
141-
<version>3.2.1</version>
156+
<version>3.2.2</version>
142157
<executions>
143158
<execution>
144159
<phase>package</phase>
@@ -165,39 +180,18 @@
165180
<filter>
166181
<artifact>*:*</artifact>
167182
<excludes>
183+
<exclude>META-INF/MANIFEST.MF</exclude>
168184
<exclude>META-INF/*.SF</exclude>
169185
<exclude>META-INF/*.DSA</exclude>
170186
<exclude>META-INF/*.RSA</exclude>
187+
<exclude>META-INF/services/**</exclude>
171188
</excludes>
172189
</filter>
173190
</filters>
174191
</configuration>
175192
</execution>
176193
</executions>
177194
</plugin>
178-
<plugin>
179-
<groupId>org.moditect</groupId>
180-
<artifactId>moditect-maven-plugin</artifactId>
181-
<version>1.0.0.Beta2</version>
182-
<executions>
183-
<execution>
184-
<id>add-module-infos</id>
185-
<phase>package</phase>
186-
<goals>
187-
<goal>add-module-info</goal>
188-
</goals>
189-
<configuration>
190-
<module>
191-
<moduleInfoSource>
192-
module org.cryptomator.siv {
193-
exports org.cryptomator.siv;
194-
}
195-
</moduleInfoSource>
196-
</module>
197-
</configuration>
198-
</execution>
199-
</executions>
200-
</plugin>
201195
</plugins>
202196
</build>
203197

@@ -234,7 +228,7 @@
234228
<plugin>
235229
<groupId>org.owasp</groupId>
236230
<artifactId>dependency-check-maven</artifactId>
237-
<version>4.0.2</version>
231+
<version>5.3.0</version>
238232
<configuration>
239233
<cveValidForHours>24</cveValidForHours>
240234
<failBuildOnCVSS>0</failBuildOnCVSS>
@@ -258,7 +252,7 @@
258252
<plugin>
259253
<groupId>org.jacoco</groupId>
260254
<artifactId>jacoco-maven-plugin</artifactId>
261-
<version>0.8.3</version>
255+
<version>0.8.5</version>
262256
<executions>
263257
<execution>
264258
<id>prepare-agent</id>
@@ -284,7 +278,7 @@
284278
<plugins>
285279
<plugin>
286280
<artifactId>maven-source-plugin</artifactId>
287-
<version>3.0.1</version>
281+
<version>3.2.1</version>
288282
<executions>
289283
<execution>
290284
<id>attach-sources</id>
@@ -296,7 +290,7 @@
296290
</plugin>
297291
<plugin>
298292
<artifactId>maven-javadoc-plugin</artifactId>
299-
<version>3.1.0</version>
293+
<version>3.1.1</version>
300294
<executions>
301295
<execution>
302296
<id>attach-javadocs</id>
@@ -305,9 +299,6 @@
305299
</goals>
306300
</execution>
307301
</executions>
308-
<configuration>
309-
<source>1.7</source> <!-- workaround for https://bugs.openjdk.java.net/browse/JDK-8219474 -->
310-
</configuration>
311302
</plugin>
312303
</plugins>
313304
</build>

src/main/java/org/cryptomator/siv/SivMode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ protected BlockCipher initialValue() {
8989
/**
9090
* Creates {@link BlockCipher}s.
9191
*/
92-
public static interface BlockCipherFactory {
92+
public interface BlockCipherFactory {
9393
BlockCipher create();
9494
}
9595

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/**
2+
* Java implementation of RFC 5297 SIV Authenticated Encryption.
3+
* <p>
4+
* Use an instance of the {@link org.cryptomator.siv.SivMode} class to
5+
* {@link org.cryptomator.siv.SivMode#encrypt(javax.crypto.SecretKey, javax.crypto.SecretKey, byte[], byte[]...) encrypt} or
6+
* {@link org.cryptomator.siv.SivMode#decrypt(javax.crypto.SecretKey, javax.crypto.SecretKey, byte[], byte[]...) decrypt} data.
7+
*/
8+
package org.cryptomator.siv;

src/main/java9/module-info.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module org.cryptomator.siv {
2+
exports org.cryptomator.siv;
3+
}

0 commit comments

Comments
 (0)