English 中文(简体)
Apache camel without maven
原标题:

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 ?:)

问题回答

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.

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/

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.

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

If you are willing to at least START with ant (and although I cannot guarantee it works) but try using:

http://maven.apache.org/plugins/maven-ant-plugin/ant-mojo.html

This has an ant:ant task that will generate your build.xml from the maven project. It s not perfect but will give you an easy way to feed your ant addiction.

Also, as Claus Ibsen already pointed out (and of course he should know ;)) there are already build.xmls for most of the examples.





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签