isapir
isapir

Reputation: 23503

ANTLR4 Runtime Jars

When I add the following dependency to my Maven project in IntelliJ IDEA:

<!-- https://mvnrepository.com/artifact/org.antlr/antlr4 -->
<dependency>
    <groupId>org.antlr</groupId>
    <artifactId>antlr4</artifactId>
    <version>4.7</version>
</dependency>

I get 7 dependencies in my module:

enter image description here

But how can I tell which jars are required at runtime? Is it enough to distribute org.antlr.antlr4-runtime:4.7 or do I need the other antlr dependencies?

Also, I have antlr4-runtime:4.7 as well as antlr-runtime:3.5.2, which seems "wrong" but I don't know if both versions should be there or not.

Any ideas? Thanks.

Upvotes: 2

Views: 1263

Answers (1)

Mark Rotteveel
Mark Rotteveel

Reputation: 108994

Your current dependency is on ANTLR 4 itself. If you want only the ANTLR 4 runtime, then you need to depend on artifact antlr4-runtime, not antlr4.

If this is sufficient depends on what your application does, but for normal applications that use an ANTLR 4 compiled grammar it should.

Upvotes: 4

Related Questions