I’d also like to see support for a more flexible way to specify the local maven repo. Mostly to be able to provide my own snapshot repository by simply exporting the directory via http(s). Is it possible to create a ticket for this at issues.gradle.org?
According to your fellow Core Dev Rene, this is not possible. I tried gradle install -Dmvn.repo.local=/tmp and it did not work, i.e. the artifacts where still installed on the default maven local repo (IIRC ~/.m2/repo or something like that).
This seems to be an issue with the ‘maven’ plugin. The system property works properly during artifact resolution using mavenLocal() or when publishing with the ‘maven-publish’ plugin. I’ve raised GRADLE-3272 to track this. In the mean time you might want to consider using the ‘maven-publish’ plugin instead.
I’d be happy to switch to the new ‘maven-publish’ plugin. What hinders me is a detailed migration guide, so I can migrate my project from the ‘maven’ to the ‘maven-publish’ plugin.