Question

I want to migrate to Maven, but I've got a few jars without any POM that I want to use. When somebody else downloads the project he shouldn't need to fidget around with any maven commandline install commands.

Is there an easy way only with Ecplise and m2e to use jar files?

E.g the jars are already in /src/main/resources so maybe just a simple click on the pom.xml?

I'm totally new to Maven so maybe the question is stupid, but this is really preventing me from getting started and convincing anybody else to use Maven.

Was it helpful?

Solution

Since the main idea of maven is to provide anybody only with a pom.xml which contains all dependencies, the best would be (at least for the first step) to install your files in your local maven cache. (should be found in ~/.m2/)

How to do it is described here: http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html

After doing this you should modify your pom.xml and add the dependencies, with the values provided for calling the tool.

Your colleagues have to do install your jars in there local maven cache to.

A better solution would be to download artifactory (http://www.jfrog.com/products.php), a tool which stores all your maven jars and allows any build to download them from it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top