Hello
I have Maven with M2_HOME defined to:
- /Users/manuelj/apache/maven/3.2.5
I have the settings.xml
file, located on:
- /Users/manuelj/apache/maven/3.2.5/conf/settings.xml
where I have the following declared:
<localRepository>/Users/manuelj/apache/maven/repository</localRepository>
Until here with Maven all works fine. Any new dependency goes there.
I have a project based with Gradle, among many things in my build.gradle, exists the following:
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'eclipse'
apply plugin: 'application'
version = '1.0.0'
sourceCompatibility = '1.8'
repositories {
mavenLocal()
mavenCentral()
}
… more
Until here, all works fine too. Code compile, executes well.
My confusion is the following.
According with my understanding is that Gradle’s mavenLocal() should use the same path than <localRepository>
defined on Maven’s settings.xml file.
Now confirming that in the Maven local repository exists some dependencies already downloaded.
When I execute for example gradle build
, I did realize that
- If a dependency already exists from the Maven Local Repository, it is used from there.
- If a dependency does not exists from the Maven Local Repository Gradle download the new dependency to:
/Users/manuelj/.gradle/caches/modules-2/files-2.1
I want that the new dependency go directly to the same Maven Local Repository
.
Therefore, what extra configuration is need it?
Thanks in advanced