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

org.apache.tools.ant.taskdefs.optional.ANTLR was not found when building #3502

Closed
diogoleal opened this issue Jul 26, 2015 · 6 comments
Closed

Comments

@diogoleal
Copy link

I'm compiling version 3.0a11, but is experiencing an error when I run "ant run."

BUILD FAILED
/home/diogo/Downloads/processing-processing-0238-3.0a11/build/build.xml:286: The following error occurred while executing this line:
/home/diogo/Downloads/processing-processing-0238-3.0a11/build/build.xml:336: The following error occurred while executing this line:
/home/diogo/Downloads/processing-processing-0238-3.0a11/java/build.xml:37: Problem: failed to create task or type antlr
Cause: the class org.apache.tools.ant.taskdefs.optional.ANTLR was not found.
        This looks like one of Ant's optional components.
Action: Check the optional que JAR Appropriate exists in
        - / Usr / share / apache-ant / lib
        - / Home / diogo / .ant / lib
        -a directory added on the command line with the argument -LIB
 
Do not panic, this is a common problem.
The commonest cause is a missing JAR.
 
This is not a bug; it is a configuration problem

The full error message is here -> http://pastebin.com/rQ9ZQXzv

From the little I have understanding of the message, it seems to lack the antlr, did his installation, yet the error message is displayed.

I did the tests running antlr via command line and appeared to function properly.

Downloads % antlr   
ANTLR Parser Generator  Version 4.5
 -o ___              specify output directory where all output is generated
 -lib ___            specify location of grammars, tokens files

Yet the error message does not change.

I downloaded antlr-4.5-complete.jar and antlr-runtime-4.5.1.jar and copy to the /usr/share/apache-ant/lib/ rename these files by removing the version(ex. antlr-runtime.jar), and also tried to leave only antlr.jar, yet the
compilation does not work.

The reason I'm compiling this is what I'm packing the processing for the Void Linux

@benfry
Copy link
Contributor

benfry commented Jul 27, 2015

That looks like you have an alternate version of antlr somewhere in your CLASSPATH. The build instructions are correct as they are: there's no need to install antlr; you need the exact version that's included in the repo. Other versions are not compatible, which is what you're seeing here.

@benfry benfry changed the title Build version 3.0a11 org.apache.tools.ant.taskdefs.optional.ANTLR was not found Aug 6, 2015
@benfry benfry changed the title org.apache.tools.ant.taskdefs.optional.ANTLR was not found org.apache.tools.ant.taskdefs.optional.ANTLR was not found when building Aug 6, 2015
@benfry
Copy link
Contributor

benfry commented Aug 6, 2015

No response; closing.

@benfry benfry closed this as completed Aug 6, 2015
@thaolt
Copy link

thaolt commented Jun 18, 2016

Hello,

I have just encountered the same issue when trying to compile processing from source (branch master ,cloned on June 19 2016).

My system specs:
Debian 8 x86_64
java-8-oracle
ant-1.9.7

At first I tried to manipulate env. CLASSPATH variable. No success. Then tried to edit build/shared/tools/MovieMaker/build.xml (task javac) to include path to $ANT_HOME/lib, because I thought it's need ant-antlr.jar, still no luck. Google took me here.

Finally, I downloaded ant-optional-1.5.4.jar from http://mvnrepository.com/artifact/ant/optional/1.5.4 and put it in $ANT_HOME/lib. Everything works. Processing was built and run. Hope this would help anyone having the same issue.

@0181532686cf4a31163be0bf3e6bb6732bf

Same bug here, running Gentoo amd64. Oracle Java 1.8.92, ant 1.9.2. System-wide installed antlr did not work.

@0181532686cf4a31163be0bf3e6bb6732bf

Finally did as @spthaolt advised, but moved jar to /usr/share/ant-core/lib/

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants