Given a Maven project generated by :
mvn archetype:generate -B -DarchetypeGroupId=org.antlr \
-DarchetypeArtifactId=antlr3-maven-archetype \
-DarchetypeVersion=3.2 \
-DgroupId=com.yourcompany \
-DartifactId=yourproject \
-Dversion=yourversion \
-Dpackage=com.yourcompany.package.path
cf : http://www.antlr.org/wiki/display/ANTLR3/Building+ANTLR+Projects+with+Maven
which have such architecture :
.
|-- pom.xml
`-- src
`-- main
|-- antlr3
| |-- com
| | `-- yourcompany
| | `-- package
| | `-- path
| | |-- TLexer.g
| | |-- TParser.g
| | `-- TTree.g
| `-- imports
| `-- Ruleb.g
`-- java
`-- com
`-- yourcompany
`-- package
`-- path
|-- AbstractTLexer.java
|-- AbstractTParser.java
`-- Main.java
by adding maven-gunit-plugin to the pom :
<plugin>
<groupId>org.antlr</groupId>
<artifactId>maven-gunit-plugin</artifactId>
<version>3.2</version>
<executions>
<execution>
<id>maven-gunit-plugin</id>
<phase>test</phase>
<goals>
<goal>gunit</goal>
</goals>
</execution>
</executions>
</plugin>
Where should be GUNIT files ?
update (already) :
I am not talking about Junit integration (but, if it's the only way, i will sure go for this one).
Relevant pieces from the source tell me it uses ${basedir}/src/test/gunit. For the files it either uses the private variable includes or */.testsuite if includes is undefined. It seems that maven-gunit-plugin is unable to handle JUnit integration with 3.2.