Skip to content

Instantly share code, notes, and snippets.

@headius
Last active October 24, 2017 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save headius/259bdf9493ac1f03596d517898391b66 to your computer and use it in GitHub Desktop.
Save headius/259bdf9493ac1f03596d517898391b66 to your computer and use it in GitHub Desktop.
Java 9 module support for InvokeBinder
diff --git a/.travis.yml b/.travis.yml
index c4da8f5..bf222bb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,12 +2,8 @@ language: java
matrix:
include:
- os: linux
- jdk: oraclejdk8
+ jdk: oraclejdk9
+addons:
+ apt:
+ packages:
+ - oracle-java9-installer
[INFO] --- maven-bundle-plugin:3.3.0:bundle (default-bundle) @ invokebinder ---
[ERROR] Bundle com.headius:invokebinder:bundle:1.10-SNAPSHOT : Exception: java.lang.ArrayIndexOutOfBoundsException: 19
[ERROR] Bundle com.headius:invokebinder:bundle:1.10-SNAPSHOT : Invalid class file module-info.class (java.lang.ArrayIndexOutOfBoundsException: 19)
[ERROR] Error(s) found in bundle configuration
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>com.headius.invokebinder</Bundle-SymbolicName>
<Export-Package>com.headius.invokebinder.*</Export-Package>
</instructions>
</configuration>
<!-- https://issues.apache.org/jira/browse/FELIX-5698 -->
<dependencies>
<dependency>
<groupId>biz.aQute.bnd</groupId>
<artifactId>biz.aQute.bndlib</artifactId>
<version>3.5.0</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<executions>
<execution>
<id>default-compile</id>
<configuration>
<includes>
<include>module-info.java</include>
</includes>
<release>9</release>
</configuration>
</execution>
<execution>
<id>base-compile</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<excludes>
<exclude>module-info.java</exclude>
</excludes>
</configuration>
</execution>
</executions>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
module com.headius.invokebinder {
requires java.base;
requires java.logging;
exports com.headius.invokebinder;
}
[INFO] --- maven-compiler-plugin:3.7.0:compile (base-compile) @ invokebinder ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 21 source files to /Users/headius/projects/invokebinder/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/headius/projects/invokebinder/src/main/java/module-info.java:[1,1] modules are not supported in -source 1.7
(use -source 9 or higher to enable modules)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment