Is it possible to run mvn commands if there is no maven installed on the target machine? I know this is a strange one.
Is this possible using some wrapper tool/utility which has maven/etc tools inbuilt in the wrapper tool/utility?
This is what I'm trying to achieve. Using Ansible (and Maven) to get an artifact to a given folder from a remote Artifactory server.
- I want to download an artifact from Artifactory.
- The target machine doesn't have maven(mvn) installed.
If I create a small one liner shell script then I have to deal with all the repositories one by one i.e. in some order (i.e. look into release repo first, then way down to snapshot etc or vice versa).
(wget http://myArtifactoryServer:somePort/artifactory/libs-snapshot-local/com/company/product/artifactName/version/artifactNameVersion.extension || wget http://myArtifactoryServer:somePort/artifactory/libs-stage-local/com/company/product/artifactName/version/artifactNameVersion.extension || wget http://myArtifactoryServer:somePort/artifactory/libs-alpha-local/com/company/product/artifactName/version/artifactNameVersion.extension || wget http://myArtifactoryServer:somePort/artifactory/libs-beta-local/com/company/product/artifactName/version/artifactNameVersion.extension || wget http://myArtifactoryServer:somePort/artifactory/libs-gamma-local/com/company/product/artifactName/version/artifactNameVersion.extension || wget http://myArtifactoryServer:somePort/artifactory/libs-release-local/comcompany/product/artifactName/version/artifactNameVersion.extension )
I was wondering if there's any other easiest way I can grab an artifact by just giving "virtual repo name" i.e. libs-release (which I have created and looks into all physical release repos or just use company-repos virtual so that I don't have to name each repo name one by one using || or with wget).
I don't have to use wget either if there's any other way around. Maven automatically finds the artifact and search in all the repos (what you define in settings.xml or pom.xml or at command line maven-dependency-plugin:get/copy)
I can also write code in groovy but then groovy has to be there on the target server.