Skip to content

Commit

Permalink
Merge pull request #647 from EsotericSoftware/java8
Browse files Browse the repository at this point in the history
Update objenesis, push source/target version to 1.8
  • Loading branch information
NathanSweet committed Apr 6, 2019
2 parents 7ebea85 + 01a583f commit b3bd802
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 56 deletions.
7 changes: 2 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,9 @@ install:
- mvn -B -V clean test

script:
# compile tests with java 8, but with testSource/testTarget 1.7 (disabled java8 profile), so that we can run tests with java 7
# compile tests with java 8
- jdk_switcher use oraclejdk8
- mvn -B -P!java8 clean install
# test java 7
- jdk_switcher use openjdk7
- mvn -v && mvn -B test
- mvn -B clean install
# test java 9 (only available via oraclejdk9)
- jdk_switcher use oraclejdk9
- mvn -v && mvn -B test
Expand Down
2 changes: 1 addition & 1 deletion pom-main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<dependency>
<groupId>org.objenesis</groupId>
<artifactId>objenesis</artifactId>
<version>2.6</version>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>com.esotericsoftware</groupId>
Expand Down
42 changes: 1 addition & 41 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@
</developers>

<properties>
<javac.target>1.7</javac.target>
<javac.target>1.8</javac.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<test.exclude>**/Java8*Test.java</test.exclude>
</properties>

<modules>
Expand Down Expand Up @@ -79,9 +78,6 @@
<source>${javac.target}</source>
<target>${javac.target}</target>
<encoding>utf-8</encoding>
<testExcludes>
<testExclude>${test.exclude}</testExclude>
</testExcludes>
</configuration>
</plugin>

Expand Down Expand Up @@ -156,42 +152,6 @@
</build>
</profile>

<profile>
<id>until-java8</id>
<activation>
<!-- Use exclusive 1.8 range instead of inclusive 1.7, because an upper bound ",1.7]" is likely not to include most releases of 1.7,
since they will have an additional "patch" release such as _05 that is not taken into consideration in the above range.
See also: http://maven.apache.org/guides/introduction/introduction-to-profiles.html#Details_on_profile_activation -->
<jdk>[1.5,1.8)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<configuration>
<excludes>
<exclude>**/Java8*Test.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>java8</id>
<!-- To disable this profile run mvn with '-P !java8' (maybe escape the exclamation mark). -->
<activation><jdk>[1.8,)</jdk></activation>
<!-- Use properties to change compiler configuration because overriding build/plugin config just did not work. -->
<properties>
<!-- Setting an empty values does not override/set the property. -->
<test.exclude>someValueWhichDoesNotExist</test.exclude>
<maven.compiler.testSource>1.8</maven.compiler.testSource>
<maven.compiler.testTarget>1.8</maven.compiler.testTarget>
</properties>
</profile>
</profiles>

<repositories>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@
import org.junit.Before;
import org.junit.Test;

/** Test for java 8 closures. For JDK < 1.8 exclude from the surefire tests via the "until-java8" profile in pom.xml (which
* excludes "Java8*Tests"). */
public class Java8ClosureSerializerTest extends KryoTestCase {
/** Test for java 8 closures. */
public class ClosureSerializerTest extends KryoTestCase {
@Before
public void setUp () throws Exception {
super.setUp();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@
import org.junit.Before;
import org.junit.Test;

/** Test for java 8 Optional* serializers. Excluded from surefire tests via the "until-java8" profile in pom.xml which excludes
* "Java8*Tests". */
public class Java8OptionalSerializersTest extends KryoTestCase {
/** Test for java 8 Optional* serializers. */
public class OptionalSerializersTest extends KryoTestCase {

{
supportsCopy = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@
import org.junit.Before;
import org.junit.Test;

/** Test for java 8 java.time.* serializers. Excluded from surefire tests via the "until-java8" profile in pom.xml which excludes
* "Java8*Tests". */
public class Java8TimeSerializersTest extends KryoTestCase {
/** Test for java 8 java.time.* serializers. */
public class TimeSerializersTest extends KryoTestCase {

@Before
public void setUp () throws Exception {
Expand Down

0 comments on commit b3bd802

Please sign in to comment.