Showing posts with label maven local repo from Gradle. Show all posts
Showing posts with label maven local repo from Gradle. Show all posts

Thursday, 12 January 2017

Creating maven repository from Gradle dependencies (upload on local artifactory)

1)      Take back-up of $USER_HOME/.m2/repository  folder and perform 'gradle install'
>> gradle install

2)      ‘gradle install’ will build file ‘build/poms/pom-default.xml’ 
        Note: Skip the gradle install step, if you already have 'pom' file.

3)      To download the all the dependencies with the following  Maven command using ‘pom-default.xml’.  (Internet proxy settings must be correctly set in $USER_HOME/.m2/settings.xml )
>> mvn dependency:copy-dependencies -Dmdep.copyPom=true -Dmdep.useRepositoryLayout=true -Dmdep.addParentPoms=true
Note: Need maven-dependency-plugin:2.9 or above for “addParentPoms” to work.

4)      The entire dependency files will be downloaded in $USER_HOME/.m2/repository, which can be directly uploaded into the artifactory.


    

Total Pageviews

Popular Posts