Maven dependency for self placed jars in project level

Krishna Barri :

I created the java class and converted into jar files. So, I want to use those jar files which I have placed in project level in some folder like "External Jar". So I need to write a dependency in maven that when someone imports my project they should be able to run the program.

Opster Elasticsearch Ninja :

Basically you created your own jar and you want to publish this jar, so that when somebody else clone/use your project, this jar comes with (assuming that you have a maven project and dependency of your jar is included in pom.xml).

To achieve this, you need to publish your jar to maven , you can follow many of the online docs like http://kirang89.github.io/blog/2013/01/20/uploading-your-jar-to-maven-central/ on how to publish jar to maven central.

Edit:- As suggested by khmarbaise, please use official reference http://central.sonatype.org/ for central repository.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=473519&siteId=1