I wasn't able to build the project. After ivy downloaded a bunch of stuff, it quit with:
[ivy:retrieve] :: problems summary ::
[ivy:retrieve] :::: WARNINGS
[ivy:retrieve] module not found: ${groupId}#org.restlet;2.0-M5
[ivy:retrieve] ==== libraries: tried
[ivy:retrieve] -- artifact ${groupId}#org.restlet;2.0-M5!org.restlet.jar:
[ivy:retrieve] /home/jon/Archives/bzr/ovrest/repository/org.restlet-2.0-M5.jar
[ivy:retrieve] ==== ibiblio: tried
[ivy:retrieve] http://repo1.maven.org/maven2/${groupId}/org.restlet/2.0-M5/org.restlet-2.0-M5.pom
[ivy:retrieve] -- artifact ${groupId}#org.restlet;2.0-M5!org.restlet.jar:
[ivy:retrieve] http://repo1.maven.org/maven2/${groupId}/org.restlet/2.0-M5/org.restlet-2.0-M5.jar
[ivy:retrieve] ==== java-net-maven1: tried
[ivy:retrieve] -- artifact ${groupId}#org.restlet;2.0-M5!org.restlet.jar:
[ivy:retrieve] http://download.java.net/maven/1/${java.net.maven.pattern}
[ivy:retrieve] ==== java-net-maven2: tried
[ivy:retrieve] http://download.java.net/maven/2/${groupId}/org.restlet/2.0-M5/org.restlet-2.0-M5.pom
[ivy:retrieve] -- artifact ${groupId}#org.restlet;2.0-M5!org.restlet.jar:
[ivy:retrieve] http://download.java.net/maven/2/${groupId}/org.restlet/2.0-M5/org.restlet-2.0-M5.jar
[ivy:retrieve] ==== maven.restlet.org: tried
[ivy:retrieve] http://maven.restlet.org/${groupId}/org.restlet/2.0-M5/org.restlet-2.0-M5.pom
[ivy:retrieve] -- artifact ${groupId}#org.restlet;2.0-M5!org.restlet.jar:
[ivy:retrieve] http://maven.restlet.org/${groupId}/org.restlet/2.0-M5/org.restlet-2.0-M5.jar
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] :: UNRESOLVED DEPENDENCIES ::
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] :: ${groupId}#org.restlet;2.0-M5: not found
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]
[ivy:retrieve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILSOdd, I tried it fresh and it worked. I'll look into it, but in the meantime try:
ant clean-cache
... and then try to build again...
ant
Let me know if that works. I'll assume that it won't though, but its simple to try.
Here's what I get when I try to clean the cache. I guess I should have mentioned in my original post that I also got the message about tools.jar the first time I ran ant with no arguments. Is that the problem?
$ ant clean-cache
Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-sun-1.6.0.15/lib/tools.jar
Buildfile: build.xml
clean-cache:
BUILD FAILED
/home/jon/Archives/bzr/ovrest/build.xml:129: Problem: failed to create task or type antlib:org.apache.ivy.ant:cleancache
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/jon/.ant/lib
-a directory added on the command line with the -lib argument
Total time: 0 seconds
$ java -version
java version "1.6.0_15"
Java(TM) SE Runtime Environment (build 1.6.0_15-b03)
Java HotSpot(TM) 64-Bit Server VM (build 14.1-b02, mixed mode)
I'm on a 64-bit Karmic install.
Maybe you're running with the JRE and not the JDK? You'll need the JDK installed. I'll update the instructions since they are vague.
You're right -- I didn't have the JDK installed. Doh. But I get the same errors (minus the part about tools.jar) when I run ant or ant clean-cache even after installing the JDK with sudo apt-get install sun-java6-jdk.
Not sure what's going on... First, you want to make sure that your $JAVA_HOME is correctly pointing to the JDK you installed. If so, try this when you get a chance:
From your project directory...
I an on the same quest... with essentially the same result:
$ant clean runs as expected, but
$ant clean-cache is not recognized as an ant option and gives me the same error as Jon.
I have java-6-openjdk installed (and added sun-java6-jdk this evening.
But I don't have $JAVA_HOME defined and when I set it to, say, /usr/lib/jvm/java-6-openjdk/ nothing happens.
org.restlet-2.0-M5 (whatever it is) remains AWOL
I can reproduce this now... I'll come up with a fix soon.
Thanks for the help and patience.
Andy
JohnLeo and Jon,
First, to get clean-cache to work, try the following: Create a directory structure (if it doesn't exist) under your home account named .ant/lib. If you are on linux and your home directory is /home/user then it would be /home/user/.ant/lib. Note, .ant is a hidden directory weith a preceding '.'. After creating that, from the directory you are trying to build ovrest from, copy ivy/ivy.jar to <home>/.ant/lib. After the ivy.jar is in .ant/lib, you should be able to execute ant clean-cache successfully. Let me know if this works for you and I'll update hte doc.
Next, to circumvent problems getting two restlet jars, I've made them static to the project instead. So, do a bzr merge from lp:ovrest (or grab a new branch, whichever you prefer) and try again.
Let me know how it goes.
Andy
Bingo!
Your cooking, Andy.
Following your instructions, apt clean-cache now works {BTW what does it do?}, bsr merge ran, and ant now runs to successful completion.
Thankyou,
GpZ
Now to figure out what I have done... :-)
the clean-cache target is an ivy-specific target that completely cleans (removes) anything that ivy has downloaded. It is seldom that you'd need to clean the ivy cache -- but in situations where things aren't downloading correctly, then cleaning the cache is worth a try.
As ivy downloads dependencies (jars) for you, it stores them all in one place within your home directory. This way, the next time you request the dependency, a file download is not required.
I can compile ovrest now, thanks.