DATACMNS-990 - Enable builds on JDK 11+.
This commit is contained in:
10
.travis.yml
10
.travis.yml
@@ -1,13 +1,9 @@
|
||||
language: java
|
||||
|
||||
jdk:
|
||||
- oraclejdk8
|
||||
|
||||
env:
|
||||
matrix:
|
||||
- PROFILE=ci
|
||||
- PROFILE=spring52-next
|
||||
- PROFILE=querydsl-next
|
||||
|
||||
cache:
|
||||
directories:
|
||||
@@ -15,8 +11,4 @@ cache:
|
||||
|
||||
install: true
|
||||
|
||||
script: "mvn clean dependency:list test -P${PROFILE} -Dsort -U"
|
||||
|
||||
notifications:
|
||||
slack:
|
||||
secure: PWyr3+7uTnHzZSrJY2DrowwdYODlIeFZB6tzuq+i/vYqMlX2GGXGQN9YmqbKPeaVZBdSI7YrI1UDa5cPAAXoTjn/JewkL0RbdTeIS6PGCpcpAb5rFMYtOhEDBrFB/SRiMH4tw86bRNKq/SrUWmpkzDtTzLrw7JceumgyqnrT6GY=
|
||||
script: "./mvnw clean dependency:list test -Pjava11,${PROFILE} -Dsort -U"
|
||||
|
||||
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 verify -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 verify -Dsort -U -B'
|
||||
sh 'MAVEN_OPTS="-Duser.name=jenkins -Duser.home=/tmp/jenkins-home" ./mvnw -Pjava11 clean dependency:list verify -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 verify -Dsort -U -B'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Release to artifactory') {
|
||||
when {
|
||||
anyOf {
|
||||
|
||||
47
pom.xml
47
pom.xml
@@ -318,45 +318,24 @@
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
<plugin>
|
||||
<groupId>com.mysema.maven</groupId>
|
||||
<artifactId>apt-maven-plugin</artifactId>
|
||||
<version>${apt}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>generate-test-sources</phase>
|
||||
<goals>
|
||||
<goal>test-process</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<outputDirectory>${project.build.directory}/generated-test-sources/test-annotations</outputDirectory>
|
||||
<processor>com.querydsl.apt.QuerydslAnnotationProcessor</processor>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>enforce-rules</id>
|
||||
<goals>
|
||||
<goal>enforce</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<rules>
|
||||
<requireJavaVersion>
|
||||
<version>[1.8,1.9)</version>
|
||||
</requireJavaVersion>
|
||||
</rules>
|
||||
<annotationProcessors>
|
||||
<annotationProcessor>
|
||||
lombok.launch.AnnotationProcessorHider$AnnotationProcessor
|
||||
</annotationProcessor>
|
||||
<annotationProcessor>
|
||||
lombok.launch.AnnotationProcessorHider$ClaimingProcessor
|
||||
</annotationProcessor>
|
||||
<annotationProcessor>
|
||||
com.querydsl.apt.QuerydslAnnotationProcessor
|
||||
</annotationProcessor>
|
||||
</annotationProcessors>
|
||||
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
|
||||
@@ -62,7 +62,7 @@ import org.springframework.util.StringUtils;
|
||||
@RequiredArgsConstructor
|
||||
class PersistentPropertyPathFactory<E extends PersistentEntity<?, P>, P extends PersistentProperty<P>> {
|
||||
|
||||
private static final Predicate<PersistentProperty<?>> IS_ENTITY = it -> it.isEntity();
|
||||
private static final Predicate<PersistentProperty<? extends PersistentProperty<?>>> IS_ENTITY = it -> it.isEntity();
|
||||
|
||||
private final Map<TypeAndPath, PersistentPropertyPath<P>> propertyPaths = new ConcurrentReferenceHashMap<>();
|
||||
private final MappingContext<E, P> context;
|
||||
@@ -289,7 +289,7 @@ class PersistentPropertyPathFactory<E extends PersistentEntity<?, P>, P extends
|
||||
static class DefaultPersistentPropertyPaths<T, P extends PersistentProperty<P>>
|
||||
implements PersistentPropertyPaths<T, P> {
|
||||
|
||||
private static final Comparator<PersistentPropertyPath<?>> SHORTEST_PATH = Comparator
|
||||
private static final Comparator<PersistentPropertyPath<? extends PersistentProperty<?>>> SHORTEST_PATH = Comparator
|
||||
.comparingInt(PersistentPropertyPath::getLength);
|
||||
|
||||
private final TypeInformation<T> type;
|
||||
|
||||
@@ -30,7 +30,6 @@ import org.aopalliance.intercept.MethodInvocation;
|
||||
import org.springframework.beans.factory.ListableBeanFactory;
|
||||
import org.springframework.data.spel.ExtensionAwareEvaluationContextProvider;
|
||||
import org.springframework.data.spel.spi.EvaluationContextExtension;
|
||||
import org.springframework.data.util.Streamable;
|
||||
import org.springframework.expression.EvaluationContext;
|
||||
import org.springframework.expression.spel.support.StandardEvaluationContext;
|
||||
import org.springframework.lang.Nullable;
|
||||
@@ -101,7 +100,7 @@ public class ExtensionAwareQueryMethodEvaluationContextProvider implements Query
|
||||
* @param arguments must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
private static Map<String, Object> collectVariables(Streamable<? extends Parameter> parameters, Object[] arguments) {
|
||||
private static Map<String, Object> collectVariables(Parameters<?, ?> parameters, Object[] arguments) {
|
||||
|
||||
Map<String, Object> variables = new HashMap<>();
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
package org.springframework.data.querydsl.binding;
|
||||
|
||||
import static org.assertj.core.api.Assertions.*;
|
||||
import static org.assertj.core.api.Assumptions.*;
|
||||
import static org.springframework.test.util.ReflectionTestUtils.*;
|
||||
|
||||
import java.text.ParseException;
|
||||
@@ -33,6 +34,7 @@ import org.springframework.data.querydsl.SimpleEntityPathResolver;
|
||||
import org.springframework.data.querydsl.User;
|
||||
import org.springframework.data.querydsl.Users;
|
||||
import org.springframework.data.util.ClassTypeInformation;
|
||||
import org.springframework.data.util.Version;
|
||||
import org.springframework.format.support.DefaultFormattingConversionService;
|
||||
import org.springframework.util.LinkedMultiValueMap;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
@@ -46,6 +48,7 @@ import com.querydsl.core.types.Predicate;
|
||||
*
|
||||
* @author Christoph Strobl
|
||||
* @author Oliver Gierke
|
||||
* @author Mark Paluch
|
||||
*/
|
||||
public class QuerydslPredicateBuilderUnitTests {
|
||||
|
||||
@@ -81,6 +84,9 @@ public class QuerydslPredicateBuilderUnitTests {
|
||||
@Test // DATACMNS-669
|
||||
public void resolveArgumentShouldCreateSingleStringParameterPredicateCorrectly() throws Exception {
|
||||
|
||||
assumeThat(Version.javaVersion().toString())
|
||||
.as("QueryDSL isn't Java 11 ready https://github.com/querydsl/querydsl/issues/2151").startsWith("1.8");
|
||||
|
||||
values.add("firstname", "Oliver");
|
||||
|
||||
Predicate predicate = builder.getPredicate(USER_TYPE, values, DEFAULT_BINDINGS);
|
||||
@@ -95,6 +101,9 @@ public class QuerydslPredicateBuilderUnitTests {
|
||||
@Test // DATACMNS-669
|
||||
public void resolveArgumentShouldCreateNestedStringParameterPredicateCorrectly() throws Exception {
|
||||
|
||||
assumeThat(Version.javaVersion().toString())
|
||||
.as("QueryDSL isn't Java 11 ready https://github.com/querydsl/querydsl/issues/2151").startsWith("1.8");
|
||||
|
||||
values.add("address.city", "Linz");
|
||||
|
||||
Predicate predicate = builder.getPredicate(USER_TYPE, values, DEFAULT_BINDINGS);
|
||||
|
||||
Reference in New Issue
Block a user