Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding a jar to TestRigTask's classpath? #30

Open
yshavit opened this issue Mar 18, 2014 · 0 comments
Open

adding a jar to TestRigTask's classpath? #30

yshavit opened this issue Mar 18, 2014 · 0 comments

Comments

@yshavit
Copy link

yshavit commented Mar 18, 2014

I have a project (antlr-denter) that provides a helper class to be used in the lexer/parser that antlr generates. It works fine for the actual project, but antlrworks2 can't run the test rig on it, because it can't compile the generated lexer/parser classes:

/tmp/TestRigTask-1395122781850/EffesLexer.java:3: error: package com.yuvalshavit.antlr4 does not exist
import com.yuvalshavit.antlr4.DenterHelper;
^
/tmp/TestRigTask-1395122781850/EffesLexer.java:4: error: package com.yuvalshavit.antlr4 does not exist
import com.yuvalshavit.antlr4.DenterOptions;
etc....

My project is maven'ized, meaning it comes as a convenient jar. If I symlink this jar into antlrworks2/platform/lib (on Linux), the java.class.path property includes the jar. But the TestRigTask still can't find it during compilation.

Digging into the code a bit, it looks like TestRigTask sets the classpath explicitly, and CodeGenerator doesn't look at any system properties (CLASSPATH, etc) when building its classpath.

Do I have any options that don't require code changes? And if a code change is required, would you be amenable to it? Maybe a system property that TestRigTask looks for?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants