[
https://issues.apache.org/jira/browse/PHOENIX-2908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15288118#comment-15288118
]
Josh Elser commented on PHOENIX-2908:
-------------------------------------
bq. Look ok to you, Josh Elser (the resident maven expert! )?
[~jamestaylor], that's almost as bad as telling people that I'm a "Kerberos
expert"!
But in all seriousness, I'm not sure if this is still an issue on {{master}}
{noformat}
[INFO] ------------------------------------------------------------------------
[INFO] Building Phoenix Core 4.8.0-HBase-1.2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ phoenix-core ---
[INFO] org.apache.phoenix:phoenix-core:jar:4.8.0-HBase-1.2-SNAPSHOT
[INFO] +- co.cask.tephra:tephra-api:jar:0.7.0:compile
[INFO] +- co.cask.tephra:tephra-core:jar:0.7.0:compile
[INFO] | +- com.google.code.gson:gson:jar:2.2.4:compile
[INFO] | +- com.google.inject:guice:jar:3.0:compile
[INFO] | | +- javax.inject:javax.inject:jar:1:compile
[INFO] | | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] | +- com.google.inject.extensions:guice-assistedinject:jar:3.0:compile
[INFO] | +- org.apache.thrift:libthrift:jar:0.9.0:compile
[INFO] | +- it.unimi.dsi:fastutil:jar:6.5.6:compile
[INFO] | +- org.apache.twill:twill-common:jar:0.6.0-incubating:compile
[INFO] | +- org.apache.twill:twill-core:jar:0.6.0-incubating:compile
[INFO] | | +- org.apache.twill:twill-api:jar:0.6.0-incubating:compile
[INFO] | | \- org.ow2.asm:asm-all:jar:5.0.2:compile
[INFO] | +- org.apache.twill:twill-discovery-api:jar:0.6.0-incubating:compile
[INFO] | +- org.apache.twill:twill-discovery-core:jar:0.6.0-incubating:compile
[INFO] | +- org.apache.twill:twill-zookeeper:jar:0.6.0-incubating:compile
[INFO] | \- io.dropwizard.metrics:metrics-core:jar:3.1.0:compile
[INFO] +- co.cask.tephra:tephra-core:test-jar:tests:0.7.0:test
[INFO] +- co.cask.tephra:tephra-hbase-compat-1.1:jar:0.7.0:compile
[INFO] +- org.antlr:antlr:jar:3.5.2:compile
[INFO] | \- org.antlr:ST4:jar:4.0.8:compile
[INFO] +- org.antlr:antlr-runtime:jar:3.5.2:compile
{noformat}
I'm not seeing org.antlr:stringtemplate:jar:3.2.1 or antlr:antlr:jar:2.7.7
locally. Can you please double-check this on the master branch, [~yhxx511]? (it
looks like you're using a 4.6.0 Phoenix build)
> phoenix-core depends on both antlr 3.5 and antlr 2.7.7
> ------------------------------------------------------
>
> Key: PHOENIX-2908
> URL: https://issues.apache.org/jira/browse/PHOENIX-2908
> Project: Phoenix
> Issue Type: Bug
> Reporter: William Yang
> Priority: Minor
> Labels: build
> Fix For: 4.8.0
>
> Attachments: PHOENIX-2908_removeBothAntlr.patch,
> PHOENIX-2908_removeOnlyAntlr2.7.7.patch
>
>
> when executing 'mvn dependency:tree -pl=phoenix-core'. It shows that we
> depends on both antlr-3.5.jar and antlr-2.7.7.jar.
> [INFO] org.apache.phoenix:phoenix-core:jar:4.6-adh6u-SNAPSHOT
> [INFO] +- org.antlr:antlr:jar:3.5:compile
> [INFO] | \- org.antlr:ST4:jar:4.0.7:compile
> [INFO] +- org.antlr:antlr-runtime:jar:3.5:compile
> [INFO] | \- org.antlr:stringtemplate:jar:3.2.1:compile
> [INFO] | \- antlr:antlr:jar:2.7.7:compile
> Moreover, in the final jar file phoenix-4.6.0-HBase-1.1-client.jar, it
> contains both antlr 3.5 and 2.7.7 too. Fortunately they have different
> package name and will not cause unexpected problems. So it does not have any
> negative effects, but it is a existed problem.
> https://github.com/antlr/stringtemplate4/issues/51
> https://github.com/antlr/antlr3/issues/75
> It seems that it is a known issue and has not been solved and never will be
> for antlr 3. I don't know whether it still exists in antlr 4.
> I searched the source code and generated source code and i cannot find
> explicit import for classes in antlr-*.jar, but only antlr-runtime instead.
> Is antlr 3.5 necessary for phoenix?
> I did the following things:
> 1. remove antlr 3.5 dependency from pom
> 2. add exclusion of stringtemplate for antlr-runtime (so it will not have
> the transit dependency of antlr 2.7.7)
>
> Then, both antlr 3.5 and antlr 2.7.7 disappeared. After that, all IT/UTs
> passed. Everything seems to be fine.
> Moreover, I added java parameter '-verbose:class' for sqlline.py and see
> which antlr class is loaded. The result shows that only classes in
> antlr-runtime had been loaded, not any in antlr 3.5/2.7.7.
> So, I think it might be safe to remove dependency of antlr 3.5 and exclude
> stringtemplate from antlr-runtime.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)