Mark Lalor Mark Lalor - 5 months ago 18
Bash Question

Copying jar from local Maven repository

I'm working on a sort of deployment script for a Java project using Python/shell. The script currently can copy jars either from a Sonatype Nexus repository or from the project's target folder. The remote/Nexus setup seems all good, but I'm interested in instead copying from the local maven repository because allows me to always know the location of the jar regardless of where the project is installed.

I guess my question is: Am I overlooking anything by just copying the first jar from the folder

? Or is this totally a good way to go about this?


If the groupId consists of more than one part, for example org.apache.httpcomponents , then the folder structure reflects this: org/apache/httpcomponents/...

enter image description here

There may exist more than one jar file inside the version directory.