newbie
newbie

Reputation: 24635

How can I create local Maven repository for my own libraries?

I need to have my own libraries in Maven repository, and I only need these my own libraries (about 2-7 libs). Is it possible to copy these jars to some local folder and then use that as repository in Maven?

Upvotes: 3

Views: 2272

Answers (1)

rhinds
rhinds

Reputation: 10043

Assuming these libraries only need to be available for your local build, you can just install them in to your repo from the cmd line:

mvn install:install-file -DgroupId=<your_group_name> -DartifactId=<your_artifact_name> -Dversion=<snapshot> -Dfile=<path_to_your_jar_file> -Dpackaging=jar -DgeneratePom=true

You can use any artefact/group/version you likr - but these then need to be used in your pom when listing the dependency

Upvotes: 4

Related Questions