You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Daniel Sun (JIRA)" <ji...@apache.org> on 2017/09/29 03:12:01 UTC
[jira] [Commented] (GROOVY-8332) Packaging issue for Antlr4-related
jars
[ https://issues.apache.org/jira/browse/GROOVY-8332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16185290#comment-16185290 ]
Daniel Sun commented on GROOVY-8332:
------------------------------------
Is it possible to replace org.antlr.v4.runtime.misc.RuleDependencyProcessor with groovyjarjarantlr4.v4.runtime.misc.RuleDependencyProcessor in the jarjar task?
> Packaging issue for Antlr4-related jars
> ---------------------------------------
>
> Key: GROOVY-8332
> URL: https://issues.apache.org/jira/browse/GROOVY-8332
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 2.6.0-alpha-1
> Reporter: Paul King
>
> The 2.6.0-alpha-1 jars have some incorrect service metadata.
> To reproduce, create a gradle project containing the following files:
> {code:title=Calc.java}
> public class Calc {
> public static int sum(int a, int b) { return a + b; }
> }
> {code}
> {code:title=CalcTest.groovy}
> class CalcTest extends GroovyTestCase {
> void testSum() { assert 3 == Calc.sum(1, 2) }
> }
> {code}
> {code:title=build.gradle}
> group 'calc'
> version '1.0-SNAPSHOT'
> apply plugin: 'groovy'
> sourceCompatibility = 1.8
> repositories {
> mavenCentral()
> }
> dependencies {
> compile 'org.codehaus.groovy:groovy-all:2.6.0-alpha-1'
> testCompile 'junit:junit:4.12'
> }
> {code}
> When invoking the {{test}} task via gradle, the following error is observed:
> {noformat}
> :compileJava
> error: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider org.antlr.v4.runtime.misc.RuleDependencyProcessor not found
> :compileJava FAILED
> {noformat}
> I believe we need to reference:
> {{groovyjarjarantlr4.v4.runtime.misc.RuleDependencyProcessor}}
> instead of:
> {{org.antlr.v4.runtime.misc.RuleDependencyProcessor}}
> in our jarjar'd jar files within this file:
> {{META-INF/services/javax.annotation.processing.Processor}}
> We might need to roll this by hand since I suspect we won't be able to configure the antlr gradle plugin to do such a change.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)