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

How to add coffeeshop library to classpath? #4

Open
freak2 opened this issue Jul 3, 2017 · 8 comments
Open

How to add coffeeshop library to classpath? #4

freak2 opened this issue Jul 3, 2017 · 8 comments

Comments

@freak2
Copy link

freak2 commented Jul 3, 2017

Hello, I am able to build the coffeeshop library, but when I add it to my classpath and do an ant command from my aibu folder (to create deploy/aibu.jar ), it gives me an error saying:

ivy: BUILD FAILED /home/freak/aibu/build.xml:13: /home/freak/.ant does not exist.

I think the problem is with CLASSPATH because I am able to build coffeeshop easily but not aibu. For your reference, I am adding CLASSPATH like this:

export CLASSPATH=$CLASSPATH:/home/freak/deploy/coffeeshop.animation.jar:/home/freak/deploy/coffeeshop.application.jar:/home/freak/deploy/coffeeshop.core.jar:/home/freak/deploy/coffeeshop.figure.jar:/home/freak/deploy/coffeeshop.gui.jar:/home/freak/deploy/coffeeshop.net.jar

Please help. Thank You.

@lukacu
Copy link
Contributor

lukacu commented Jul 3, 2017

There was a pending pull request regarding this, I have merged it, can you try to build it now?

@freak2
Copy link
Author

freak2 commented Jul 3, 2017

Tried it again. No longer the same error but a new one:

`Buildfile: /home/freak/aibu/build.xml

ivy:
[taskdef] Could not load definitions from resource org/apache/ivy/ant/antlib.xml. It could not be found.

init:
[mkdir] Created dir: /home/freak/aibu/bin
[mkdir] Created dir: /home/freak/aibu/deploy

resolve:

BUILD FAILED
/home/freak/aibu/build.xml:47: Problem: failed to create task or type antlib:org.apache.ivy.ant:retrieve
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any / declarations have taken place.
No types or tasks have been defined in this namespace yet

This appears to be an antlib declaration.
Action: Check that the implementing library exists in one of:
-/usr/share/ant/lib
-/home/freak/.ant/lib
-a directory added on the command line with the -lib argument`

This might be a simple error to fix but I don't have much experience with JAVA in general. That's why it's not apparent to me. Any help will be highly appreciated.
Thanks.

@lukacu
Copy link
Contributor

lukacu commented Jul 3, 2017

Yeah, I am not that familiar with ant either, usually I had both projects in Eclipse workspace and built a monolithic jar when needed a standalone version.

@freak2
Copy link
Author

freak2 commented Jul 3, 2017

Okay, no problem. Will try figuring it out. If I find something, will post it here.
Thanks for the help.

@xiaozai
Copy link

xiaozai commented Sep 21, 2020

Hi, I met the same problem and solved it by downgrading the Java version to 1.16, and then re-build the coffeeshoplib.

@lukacu
Copy link
Contributor

lukacu commented Sep 21, 2020

Ok, so the problem is Java version, we have to upgrade the code for more recent Java.

For the other problem please open a separate ticket.

@lawpdas
Copy link

lawpdas commented Mar 15, 2022

Same problem

Buildfile: /home/space/Public/vot-aibu/aibu/build.xml

ivy:
  [taskdef] Could not load definitions from resource org/apache/ivy/ant/antlib.xml. It could not be found.

init:

resolve:

BUILD FAILED
/home/space/Public/vot-aibu/aibu/build.xml:47: Problem: failed to create task or type antlib:org.apache.ivy.ant:retrieve
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
No types or tasks have been defined in this namespace yet

This appears to be an antlib declaration. 
Action: Check that the implementing library exists in one of:
        -/usr/share/ant/lib
        -/home/space/.ant/lib
        -a directory added on the command line with the -lib argument


Total time: 0 seconds
space@z390:~/Public/vot-aibu/aibu$ java -version
openjdk version "11.0.14" 2022-01-18
OpenJDK Runtime Environment (build 11.0.14+9-Ubuntu-0ubuntu2.20.04)
OpenJDK 64-Bit Server VM (build 11.0.14+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)

Which java version should be used?

@lawpdas
Copy link

lawpdas commented Mar 15, 2022

I have solved it by downloading ivy-2.5.0.jar and copying it to /usr/share/ant/lib

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

No branches or pull requests

4 participants