Mark Lalor Mark Lalor - 1 year ago 89
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?

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download