Truffle as a Maven Dependency

Chris Seaton chris.seaton at oracle.com
Wed Aug 6 12:18:20 UTC 2014


If like me you use Truffle in your project via a Maven dependency, you may want to know that we’ve added a new mx command,

mx maven-install-truffle

That installs the Truffle and Truffle DSL processor JARs into your local repository. This should make it easier to use the development version of Truffle but still use Maven.

These JARs are versioned as snapshots, currently at 0.4-SNAPSHOT. To use this as a dependency you want to specify:

  <dependencies>
    <dependency>
      <groupId>com.oracle</groupId>
      <artifactId>truffle</artifactId>
      <version>0.4-SNAPSHOT</version>
    </dependency>
    <dependency>
      <groupId>com.oracle</groupId>
      <artifactId>truffle-dsl-processor</artifactId>
      <version>0.4-SNAPSHOT</version>
    </dependency>

To use the DSL processor you want:

      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <executions>
          <execution>
            <configuration>
              <annotationProcessors>
                <annotationProcessor>com.oracle.truffle.dsl.processor.TruffleProcessor</annotationProcessor>
              </annotationProcessors>

We’ve also changed the version that Graal reports in the system.graal property to be 0.4-dev. Previously it was 0.3.

Chris


More information about the graal-dev mailing list