How to install a compiled by Gradle jar into the local Gradle Repository files-2.1 instead of the Maven repository?

Alex :

In my build.gradle, I added the plugin:

apply plugin: 'maven'

Then using “gradle install” I can copy the resulted jar into the maven repository : ~/.m2/repository

However, my Gradle repository resides in ~/.gradle/caches/modules-2/files-2.1. How can I install the jar into this repository?

ddarellis :

What worked for me is gradle install -Dmaven.repo.local=the/path/of/the/folder.

I don't know which IDE you are using but in eclipse you can add a new Run Configuration, in Gradle taks add install and in program arguments -Dmaven.repo.local=the/path/of/the/folder.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=433863&siteId=1