build tools - Maven: how to check if artifact already installen to local repository -


i'm writing shell script, should install artifact if isn't installed.

does exist mvn install:check artifact-name?


i'm using: apache maven 3.3.9

you can try dependenct:get in offline mode , specify repository, command has following structure:

mvn dependency:get -dartifact={groupid}:{artifactid}:{version} -o -drepourl=file://your/repo/path 

for example:

mvn dependency:get -dartifact=junit:junit:4.10 -o -drepourl=file://~/.m2/repository 

if finds dependency, get:

[info] build success 

Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -