Skip to content

Commit

Permalink
JDK9 stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
beikov committed Oct 6, 2016
1 parent 862172b commit fd62ff9
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ matrix:
# - env: JPAPROVIDER=openjpa RDBMS=oracle
# sudo: true
# JDK 9 - Not going to work until javassist is fixed
# - env: JPAPROVIDER=hibernate-5.0 RDBMS=h2 JDK=9
# sudo: true
- env: JPAPROVIDER=hibernate-5.2 RDBMS=h2 JDK=9
sudo: true
allow_failures:
# - env: JPAPROVIDER=datanucleus-4 RDBMS=sqlite
# jdk: oraclejdk8
Expand All @@ -204,7 +204,7 @@ matrix:
# sudo: true
# - env: JPAPROVIDER=hibernate RDBMS=oracle
# sudo: true
# - env: JPAPROVIDER=hibernate-5.0 RDBMS=h2 JDK=9
# sudo: true
- env: JPAPROVIDER=hibernate-5.2 RDBMS=h2 JDK=9
sudo: true
# - env: JPAPROVIDER=hibernate-6.0 RDBMS=h2
# jdk: oraclejdk8
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

if [ "$JDK" = "9" ]; then
MVN_BIN=/tmp/apache-maven/bin/mvn
export MAVEN_OPTS="-Xmx1024m -XX:MaxMetaspaceSize=512m"
export MAVEN_OPTS="-Xmx1024m -XX:MaxMetaspaceSize=512m --add-modules=java.se.ee"
elif [ "$LATEST_MAVEN" = "true" ]; then
MVN_BIN=/tmp/apache-maven/bin/mvn
export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=512m"
Expand Down
1 change: 1 addition & 0 deletions core/testsuite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@
</goals>
<phase>generate-sources</phase>
<configuration>
<compilerArguments>${processor.plugin.compilerArguments}</compilerArguments>
<!-- source output directory -->
<outputDirectory>${project.build.directory}/test-metamodel</outputDirectory>
<processors>
Expand Down
7 changes: 7 additions & 0 deletions documentation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby-complete</artifactId>
<version>1.7.26</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
Expand Down
14 changes: 14 additions & 0 deletions integration/entity-view-cdi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,20 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<id>default-test</id>
<configuration>
<!-- Travis build workaround + JDK 9 support -->
<argLine>${surefire.jvm.params} ${surefire.openejb.jvm.params}</argLine>
<skipTests>${skipTests}</skipTests>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,8 @@ public <Y> Expression<Y> nullif(Class<Y> type, Expression<Y> exp1, Y exp2) {

@Override
public <C, R> SimpleCase<C, R> selectCase(Expression<? extends C> expression) {
return selectCase((Class<R>) null, expression);
// JDK 9 complains without the cast
return /*(SimpleCase<C, R>) */selectCase((Class<R>) null, expression);
}

public <C, R> SimpleCase<C, R> selectCase(Class<R> type, Expression<? extends C> expression) {
Expand Down
7 changes: 6 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@
<version.release.plugin>2.5.1</version.release.plugin>
<version.surefire.plugin>2.19.1</version.surefire.plugin>

<processor.plugin.compilerArguments></processor.plugin.compilerArguments>
<surefire.openejb.jvm.params></surefire.openejb.jvm.params>

<!-- JVM values for surefire plugin -->
<!-- Has a default value for Travis; MUST be set to smaller for 32-bit environment -->
<surefire.jvm.params>-Xms1024m -Xmx2048m</surefire.jvm.params>
Expand Down Expand Up @@ -495,7 +498,9 @@
<jdk>[1.9,)</jdk>
</activation>
<properties>
<version.javassist>3.21.0-SNAPSHOT</version.javassist>
<version.javassist>3.22.0-CR1</version.javassist>
<processor.plugin.compilerArguments>--add-modules=java.se.ee</processor.plugin.compilerArguments>
<surefire.openejb.jvm.params>--add-modules=java.xml.bind,java.corba</surefire.openejb.jvm.params>
</properties>
<repositories>
<repository>
Expand Down

0 comments on commit fd62ff9

Please sign in to comment.