Created
May 8, 2016 20:45
-
-
Save fikovnik/974eeb0283c43e94e6873dd40a8b1536 to your computer and use it in GitHub Desktop.
Synchronize maven repository from gradle module dependencies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task syncMavenRepository(type: JavaExec) { | |
classpath = configurations.mavenEmbedder | |
main = 'org.apache.maven.cli.MavenCli' | |
systemProperties['maven.multiModuleProjectDirectory'] = projectDir | |
args = [ | |
'--errors', | |
'--batch-mode', | |
'--settings', '../config/repo-settings.xml', | |
'--file', "${buildDir}/pom.xml", | |
"org.apache.maven.plugins:maven-dependency-plugin:2.10:go-offline" | |
] | |
} | |
project.test.dependsOn(syncMavenRepository) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment