我是 ANTLR4 的新手,似乎 v4 没有 Eclipse-Plug-In。因此,最好从 .g4 语法自动构建 Java 源代码。我有一个简单的空 Maven 项目,带有 src/main/java、src/test/java。在哪里放置 .g4 文件?如何使用 Maven 自动构建语法?
我自己的 POM 测试失败:
<repository>
<id>mvn-public</id>
<name>MVNRepository</name>
<url>http://mvnrepository.com</url>
</repository>
...
<build>
<plugins>
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr4-maven-plugin</artifactId>
<version>4.0.0</version>
<executions>
<execution>
<goals>
<goal>antlr</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
日食 说:
Failure to find org.antlr:antlr4-maven-plugin:pom:4.0.0 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of
central has elapsed or updates are forced