Skip to content

Commit 7b1e077

Browse files
committed
Added javax.activation dependency for Java 9+ support and added maven enforcer plugin (#327).
1 parent ed81013 commit 7b1e077

File tree

1 file changed

+49
-5
lines changed

1 file changed

+49
-5
lines changed

pom.xml

Lines changed: 49 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
</scm>
6161

6262
<build>
63-
<defaultGoal>package</defaultGoal>
63+
<defaultGoal>package</defaultGoal>
6464
<plugins>
6565
<plugin>
6666
<groupId>org.apache.maven.plugins</groupId>
@@ -99,7 +99,7 @@
9999
</executions>
100100
</plugin>
101101

102-
<plugin>
102+
<plugin>
103103
<groupId>org.apache.maven.plugins</groupId>
104104
<artifactId>maven-gpg-plugin</artifactId>
105105
<version>1.6</version>
@@ -132,6 +132,9 @@
132132
<groupId>org.apache.maven.plugins</groupId>
133133
<artifactId>maven-javadoc-plugin</artifactId>
134134
<version>3.0.0</version>
135+
<configuration>
136+
<source>8</source>
137+
</configuration>
135138
<executions>
136139
<execution>
137140
<id>attach-javadocs</id>
@@ -145,7 +148,7 @@
145148
<plugin>
146149
<groupId>org.jacoco</groupId>
147150
<artifactId>jacoco-maven-plugin</artifactId>
148-
<version>0.8.0</version>
151+
<version>0.8.3</version>
149152
<executions>
150153
<execution>
151154
<id>default-prepare-agent</id>
@@ -188,17 +191,49 @@
188191
<plugin>
189192
<groupId>org.apache.maven.plugins</groupId>
190193
<artifactId>maven-surefire-plugin</artifactId>
191-
<version>2.19.1</version>
194+
<version>2.22.0</version>
192195
<configuration>
193196
<systemPropertyVariables>
194197
<jacoco-agent.destfile>target/jacoco.exec</jacoco-agent.destfile>
195198
</systemPropertyVariables>
196199
</configuration>
197200
</plugin>
201+
202+
<plugin>
203+
<groupId>org.apache.maven.plugins</groupId>
204+
<artifactId>maven-enforcer-plugin</artifactId>
205+
<version>3.0.0-M2</version>
206+
<configuration>
207+
<rules>
208+
<enforceBytecodeVersion>
209+
<maxJdkVersion>1.8</maxJdkVersion>
210+
<ignoreClasses>
211+
<ignoreClass>module-info</ignoreClass>
212+
</ignoreClasses>
213+
</enforceBytecodeVersion>
214+
</rules>
215+
</configuration>
216+
<executions>
217+
<execution>
218+
<id>enforce-bytecode-version</id>
219+
<goals>
220+
<goal>enforce</goal>
221+
</goals>
222+
</execution>
223+
</executions>
224+
<dependencies>
225+
<dependency>
226+
<groupId>org.codehaus.mojo</groupId>
227+
<artifactId>extra-enforcer-rules</artifactId>
228+
<version>1.2</version>
229+
</dependency>
230+
</dependencies>
231+
</plugin>
232+
198233
</plugins>
199234

200235
<pluginManagement>
201-
<plugins>
236+
<plugins>
202237
<plugin>
203238
<groupId>se.bjurr.gitchangelog</groupId>
204239
<artifactId>git-changelog-maven-plugin</artifactId>
@@ -217,10 +252,18 @@
217252
</plugin>
218253
</plugins>
219254
</pluginManagement>
255+
220256
</build>
221257

222258
<dependencies>
223259

260+
<!-- javax.activation is present for Java 9+ compatibility -->
261+
<dependency>
262+
<groupId>com.sun.activation</groupId>
263+
<artifactId>javax.activation</artifactId>
264+
<version>1.2.0</version>
265+
</dependency>
266+
224267
<dependency>
225268
<groupId>com.fasterxml.jackson.jaxrs</groupId>
226269
<artifactId>jackson-jaxrs-json-provider</artifactId>
@@ -276,6 +319,7 @@
276319
<version>${systemRules.version}</version>
277320
<scope>test</scope>
278321
</dependency>
322+
279323
</dependencies>
280324

281325
</project>

0 commit comments

Comments
 (0)