Skip to content

Add support for Java 9 to Groovy-Eclipse Maven plugin (aka batch compiler) #265

@johnpoth

Description

@johnpoth

I'm using the following configuration with java 9 build 156

<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <compilerId>groovy-eclipse-compiler</compilerId>
          <source>8</source>
          <target>8</target>
          <fork>true</fork>-
          <compilerArgs>
            <arg>-J--add-modules</arg>  // add java.xml module!
            <arg>-Jjava.xml</arg>
          </compilerArgs>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-eclipse-compiler</artifactId>
            <version>2.9.2-01</version>
            <exclusions>
              <exclusion>
                <groupId>org.codehaus.groovy</groupId>
                <artifactId>groovy-eclipse-batch</artifactId>
              </exclusion>
            </exclusions>
          </dependency>
          <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-eclipse-batch</artifactId>
            <version>2.4.3-01</version>
          </dependency>
        </dependencies>
      </plugin>

But I still get the error

TransformerException cannot be resolved to a type

Where javax/xml/transform/TransformerException is a class present in the java 9 module called java.xml. The above works with the maven compiler plugin.

Am I doing something wrong or is java 9 not supported yet?

Thanks!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions