Skip to content

Commit 0481609

Browse files
committed
Adding maven enforcer and travis java 8 config
1 parent 1bd3c7f commit 0481609

2 files changed

Lines changed: 26 additions & 1 deletion

File tree

‎.travis.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
language: java
2+
jdk:
3+
- oraclejdk8
24
sudo: false
5+

‎pom.xml‎

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<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/maven-v4_0_0.xsd">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
34

45
<!-- for releasing to Maven Central / OSS Sonatype -->
56
<parent>
@@ -33,6 +34,7 @@
3334
</licenses>
3435
<properties>
3536
<jdk.version>1.8</jdk.version>
37+
<maven.enforcer.jdk-version>1.8</maven.enforcer.jdk-version>
3638
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3739
<project.build.targetEncoding>UTF-8</project.build.targetEncoding>
3840
<maxmem>512M</maxmem>
@@ -265,6 +267,26 @@
265267
<version>2.7</version>
266268
</plugin>
267269

270+
<plugin>
271+
<artifactId>maven-enforcer-plugin</artifactId>
272+
<version>1.4.1</version>
273+
<executions>
274+
<execution>
275+
<id>enforce-java</id>
276+
<goals>
277+
<goal>enforce</goal>
278+
</goals>
279+
<configuration>
280+
<rules>
281+
<requireJavaVersion>
282+
<version>${maven.enforcer.jdk-version}</version>
283+
</requireJavaVersion>
284+
</rules>
285+
</configuration>
286+
</execution>
287+
</executions>
288+
</plugin>
289+
268290
</plugins>
269291
</pluginManagement>
270292

0 commit comments

Comments
 (0)