This module provides an example on how to use jabsc (ABS Compiler to Java) and jabsc-maven-plugin (Maven Plugin for jabsc).
- Java 8
- Apache Maven 3.3.x
Simply fork this repository and start developing!
The jabsc-maven-plugin can be configured as:
<plugin>
<groupId>com.github.crisposs</groupId>
<artifactId>jabsc-maven-plugin</artifactId>
<version>${version.jabsc-maven-plugin}</version>
<executions>
<execution>
<id>abs-compile</id>
<phase>generate-sources</phase>
<goals>
<goal>jabsc</goal>
</goals>
</execution>
</executions>
</plugin>where latest ${version.jabsc-maven-plugin} is .
You can define the following dependencies explicitly in pom.xml which would override the dependencies coming from the plugin itself:
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>abs-api</artifactId>
<version>${version.abs-api}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jabsc</artifactId>
<version>${version.jabsc}</version>
</dependency>where latest ${version.abs-api} is and latest
${version.jabsc} is .
By default jabsc-maven-plugin compiles all ABS sources from src/main/abs. An example can be found at TestInterface.abs.
The jabsc-maven-plugin hooks into standard Maven life cycle at generate-sources phases. Consequently, all the generated Java files from your ABS sources will be compiled by Maven in any phase/goal that would require compiling sources.
To integrate with eclipse, simply run:
$ mvn eclipse:eclipse -DdownloadSources=trueYou will see a new "source folder" appearing on your eclipse project with name target/generated-sources/jabsc.