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?
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
.