Build under Java 1.8

+ Enforcer setup to JDK 1.8+
+ Java7 profiles removed (for now)
+ Main compile phase source/test is 1.7
+ Test compile phase source/test is 1.8
This commit is contained in:
Joakim Erdfelt 2015-04-10 13:21:12 -07:00
parent 645ee9223c
commit dc2221a152
3 changed files with 5 additions and 79 deletions

View File

@ -14,15 +14,6 @@
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!-- this SHOULD be 1.8 (for test cases) -->
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
@ -63,39 +54,6 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>java7-only-jetty-server</id>
<activation>
<activeByDefault>false</activeByDefault>
<jdk>1.7</jdk>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<testExcludes>
<testExclude>org/eclipse/jetty/server/ssl/SslConnectionFactoryTest.java</testExclude>
</testExcludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>org/eclipse/jetty/server/ssl/SslConnectionFactoryTest.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty.toolchain</groupId>

View File

@ -14,15 +14,6 @@
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!-- this SHOULD be 1.8 -->
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
@ -49,31 +40,6 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>java7-only-jetty-util</id>
<activation>
<activeByDefault>false</activeByDefault>
<jdk>1.7</jdk>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<excludes>
<exclude>org/eclipse/jetty/util/ssl/ExtendedSslContextFactory.java</exclude>
<exclude>org/eclipse/jetty/util/ssl/SniX509ExtendedKeyManager.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>

View File

@ -32,10 +32,12 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<version>3.3</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<testSource>1.8</testSource>
<testTarget>1.8</testTarget>
<verbose>false</verbose>
</configuration>
</plugin>
@ -135,8 +137,8 @@
<message>[ERROR] OLD MAVEN [${maven.version}] in use, Jetty ${project.version} requires Maven 3.0.0 or newer</message>
</requireMavenVersion>
<requireJavaVersion>
<version>[1.7.0-40,)</version>
<message>[ERROR] OLD JDK [${java.version}] in use. Jetty ${project.version} requires JDK 1.7.0_40 or newer</message>
<version>[1.8.0,)</version>
<message>[ERROR] OLD JDK [${java.version}] in use. Jetty ${project.version} requires JDK 1.8.0 or newer</message>
</requireJavaVersion>
<versionTxtRule implementation="org.eclipse.jetty.toolchain.enforcer.rules.VersionTxtRule" />
<versionOsgiRule implementation="org.eclipse.jetty.toolchain.enforcer.rules.RequireOsgiCompatibleVersionRule" />