Maven dependency for self placed jars in project l

2020-03-03 06:15发布

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.

1条回答
Juvenile、少年°
2楼-- · 2020-03-03 06:46

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.

查看更多
登录 后发表回答