Reputation: 5870
I tried with dependency:get
or dependency:copy
, but those goals will also resolve from my local repo.
Next I tried to make a simple download from https://repo.company.com/repo/<path-to-group>/<artifactId>/<version>/<artifactId>-<version>.pom
, but that fails because of missing permissions. I guess that's why I tried to use a plugin, in order to use the existing maven credentials.
Context: Writing a deployment script that should avoid overwriting existing artifacts in our company repo.
Upvotes: 1
Views: 653
Reputation: 35853
A simple approach would be dependency:get
, but overriding the local repository on command line with an empty (temporary) directory.
But, as was already said, Artifactory and Nexus are usually configured in a way that they do not override existing artifacts.
local repo override: -Dmaven.repo.local=...
Upvotes: 1