[英]How to use GUNIT with MAVEN?
Given a Maven project generated by : 给定一个由以下人员生成的Maven项目:
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 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 : 通过将maven-gunit-plugin添加到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 ? GUNIT文件应该在哪里?
update (already) : 更新(已经) :
I am not talking about Junit integration (but, if it's the only way, i will sure go for this one). 我并不是在谈论Junit集成(但是,如果这是唯一的方法,那么我一定会推荐)。
Relevant pieces from the source tell me it uses ${basedir}/src/test/gunit. 消息来源的相关文章告诉我,它使用$ {basedir} / src / test / gunit。 For the files it either uses the private variable includes or * / .testsuite if includes is undefined.
对于文件,它使用私有变量include或* / .testsuite(如果include未定义)。 It seems that maven-gunit-plugin is unable to handle JUnit integration with 3.2.
看来maven-gunit-plugin无法处理与3.2的JUnit集成。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.