views:

227

answers:

5

I have a hard time finding documentation/tutorials or just getting a dependency overview without going into some spiralling maven-nightmare.

I even have trouble getting the examples to work, as its an endless compile,run,search,repeat routine. Can anyone recommend some information resources for someone not succombing to the maven-pressure ?:)

A: 

Rather than downloading each missing resource, try to add repositories to your settings.xml that contain many of the resources you need.

This tool can help you locate repositories that have a given resource.

Specifically, the JavaNet repository has many of the previously "Restricted Sun" resources not available in the default global repository.

Chris Nava
He doesn't want additional repositories, he wants to not use maven at all.
Jherico
Thank you! This was exactly what i was looking for!
neheh
The alternative to my answer is to create your own ant script and download all the dependencies manually... I gave him the simpler solution. It accomplished his *goal* of compiling the project if not answers his question directly. It's not what you want but what you need. ;-)
Chris Nava
A: 

What's wrong with the Camel distribution archive, which includes all the camel jars and all the dependent libraries as well?

Jherico
Its not a big problem getting hold of the jars, but for a small task I assume I don't need all 76 of them:)
neheh
@neheh: no, but now it sounds like you're trying to solve the problem maven was designed to solve without having to use maven. Why not determine your camel requirements, make a POM with those requirements and then use the mvn dependency:tree command to determine what the full set of jars you need is. Better yet, use ant in combination with Maven to create a tgz file with exactly those jars.
Jherico
+4  A: 

I have a hard time finding documentation/tutorials or just getting a dependency overview without going into some spiralling maven-nightmare.

Whatever your opinions on Maven are, the fact is that having some understanding of Maven would help you a lot, especially since many projects are using it and and even more especially in the particular case of Apache Camel which has a myriad of modules.

I even have trouble getting the examples to work, as its an endless compile, run, search, repeat routine. Can anyone recommend some information resources for someone not succombing to the maven-pressure

The fun part is that this would be extremely easy with Maven but never mind. Go to the maven generated website, look at the Camel :: Examples modules, click on any of the sample and check the Dependencies (under Project Information). And good luck with the manual setup of the classpath because each project has a decent bunch of dependencies if you take the transitive one into account :)

Update: As pointed out in another answer, the samples actually come with an Ant build.xml. Or you could use MOP to spit the class path for you or even directly run executable classes like this:

mop run org.apache.camel:camel-example-pojo-messaging org.apache.camel.spring.Main

Any of these options would be a lot easier than setting up the class path manually.

Pascal Thivent
+1  A: 

Nearly all examples have an ANT build.xml file as well, and there is a README.txt file telling you how to run the examples.

And if are not into learning how to Maven you could consider James Strachans newest tool called mop which is a command line launcher to run Java stuff. It can transparently download and use maven and its deps. So its just a matter of installing mop and using it to run the examples.

http://mop.fusesource.org/

Claus Ibsen
+1 for MOP, I wonder why I didn't think about it.
Pascal Thivent
A: 

I think the real answer is that you either choose to become a disciple of the maven cult because apache is their church or you continue with the compile, run, search, repeat routine and then publish your results for the rest of us who are in the same boat and don't want to drink the kool-aid.

Ron Smith