DATAKV-280 - Enable building with Java 11.
Rely on inherited enforcer plugin configuration. Disable Querydsl tests that cannot be executed with Java9+.
This commit is contained in:
committed by
Greg Turnquist
parent
c0b4dda728
commit
0e92913e8e
16
.travis.yml
16
.travis.yml
@@ -1,23 +1,9 @@
|
||||
language: java
|
||||
|
||||
jdk:
|
||||
- oraclejdk8
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- oracle-java8-installer
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.m2
|
||||
|
||||
sudo: false
|
||||
|
||||
install: true
|
||||
|
||||
script: mvn clean dependency:list test -Dsort
|
||||
|
||||
notifications:
|
||||
slack:
|
||||
secure: e9Mgff6nnlx6KEnQalzKmqviOUGdnrwgdIFxoFzNZLsVomBZtp7UhxP4zBPnVjwPPH30d3oT8qirB4xraQtZBn5esj1fdav2yrtlfYEQnoYvKRiZE9ZfNWcOaqoaPz3uBSNPcxbS3mkLr3pTTpQ20eSQGlnG36PvWLRQkD89gjk=
|
||||
script: "./mvnw clean dependency:list test -Pjava11,${PROFILE} -Dsort -B"
|
||||
|
||||
45
Jenkinsfile
vendored
45
Jenkinsfile
vendored
@@ -12,7 +12,28 @@ pipeline {
|
||||
}
|
||||
|
||||
stages {
|
||||
stage("Test") {
|
||||
stage("test: baseline (jdk8)") {
|
||||
when {
|
||||
anyOf {
|
||||
branch 'master'
|
||||
not { triggeredBy 'UpstreamCause' }
|
||||
}
|
||||
}
|
||||
agent {
|
||||
docker {
|
||||
image 'adoptopenjdk/openjdk8:latest'
|
||||
label 'data'
|
||||
args '-v $HOME:/tmp/jenkins-home'
|
||||
}
|
||||
}
|
||||
options { timeout(time: 30, unit: 'MINUTES') }
|
||||
steps {
|
||||
sh 'rm -rf ?'
|
||||
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw clean dependency:list test -Dsort -U -B'
|
||||
}
|
||||
}
|
||||
|
||||
stage("Test other configurations") {
|
||||
when {
|
||||
anyOf {
|
||||
branch 'master'
|
||||
@@ -20,10 +41,10 @@ pipeline {
|
||||
}
|
||||
}
|
||||
parallel {
|
||||
stage("test: baseline") {
|
||||
stage("test: baseline (jdk11)") {
|
||||
agent {
|
||||
docker {
|
||||
image 'adoptopenjdk/openjdk8:latest'
|
||||
image 'adoptopenjdk/openjdk11:latest'
|
||||
label 'data'
|
||||
args '-v $HOME:/tmp/jenkins-home'
|
||||
}
|
||||
@@ -31,11 +52,27 @@ pipeline {
|
||||
options { timeout(time: 30, unit: 'MINUTES') }
|
||||
steps {
|
||||
sh 'rm -rf ?'
|
||||
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw clean dependency:list test -Dsort -U -B'
|
||||
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pjava11 clean dependency:list test -Dsort -U -B'
|
||||
}
|
||||
}
|
||||
|
||||
stage("test: baseline (jdk13)") {
|
||||
agent {
|
||||
docker {
|
||||
image 'adoptopenjdk/openjdk13:latest'
|
||||
label 'data'
|
||||
args '-v $HOME:/tmp/jenkins-home'
|
||||
}
|
||||
}
|
||||
options { timeout(time: 30, unit: 'MINUTES') }
|
||||
steps {
|
||||
sh 'rm -rf ?'
|
||||
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pjava11 clean dependency:list test -Dsort -U -B'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Release to artifactory') {
|
||||
when {
|
||||
anyOf {
|
||||
|
||||
21
pom.xml
21
pom.xml
@@ -76,27 +76,6 @@
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<version>1.3.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>enforce-rules</id>
|
||||
<goals>
|
||||
<goal>enforce</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<rules>
|
||||
<requireJavaVersion>
|
||||
<version>[1.8,1.9)</version>
|
||||
</requireJavaVersion>
|
||||
</rules>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
|
||||
@@ -21,6 +21,7 @@ import static org.mockito.Mockito.*;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.Before;
|
||||
@@ -70,8 +71,9 @@ public class SpelQueryEngineUnitTests {
|
||||
|
||||
doReturn(people).when(adapter).getAllOf(anyString());
|
||||
|
||||
assertThat(engine.execute(createQueryForMethodWithArgs("findByFirstname", "bob"), null, -1, -1, anyString()))
|
||||
.containsExactly(BOB_WITH_FIRSTNAME);
|
||||
Collection result = engine.execute(createQueryForMethodWithArgs("findByFirstname", "bob"), null, -1, -1,
|
||||
anyString());
|
||||
assertThat(result).containsExactly(BOB_WITH_FIRSTNAME);
|
||||
}
|
||||
|
||||
@Test // DATAKV-114
|
||||
|
||||
@@ -16,10 +16,12 @@
|
||||
package org.springframework.data.map;
|
||||
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
import static org.assertj.core.api.Assumptions.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.dao.IncorrectResultSizeDataAccessException;
|
||||
@@ -34,6 +36,7 @@ import org.springframework.data.keyvalue.repository.support.QuerydslKeyValueRepo
|
||||
import org.springframework.data.map.QuerydslKeyValueRepositoryUnitTests.QPersonRepository;
|
||||
import org.springframework.data.querydsl.QSort;
|
||||
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
|
||||
import org.springframework.data.util.Version;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
@@ -47,6 +50,11 @@ import com.google.common.collect.Lists;
|
||||
*/
|
||||
public class QuerydslKeyValueRepositoryUnitTests extends AbstractRepositoryUnitTests<QPersonRepository> {
|
||||
|
||||
@Before
|
||||
public void before() {
|
||||
assumeThat(Version.javaVersion().toString()).startsWith("1.8");
|
||||
}
|
||||
|
||||
@Test // DATACMNS-525
|
||||
public void findOneIsExecutedCorrectly() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user