Gradle Maven Plugin: Difference between revisions
Jump to navigation
Jump to search
Line 14: | Line 14: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
The Maven plugin define an "install" task of type "Upload". It installs the associated artifacts to the local Maven cache, including the Maven metadata. By default, the task is associated with the [[Gradle_Java_Plugin#archives|archives]] configuration. | The Maven plugin define an "install" task of type "Upload". It installs the associated artifacts to the local Maven cache, including the Maven metadata. By default, the task is associated with the "[[Gradle_Java_Plugin#archives|archives]]" configuration. | ||
=Publishing to a Maven Repository= | =Publishing to a Maven Repository= |
Revision as of 19:28, 15 May 2018
External
Internal
Overview
apply plugin: 'maven'
The Maven plugin define an "install" task of type "Upload". It installs the associated artifacts to the local Maven cache, including the Maven metadata. By default, the task is associated with the "archives" configuration.
Publishing to a Maven Repository
Gradle can be configured to publish artifacts to a Maven repository by configuring Maven plugin's uploadArchive task In build.gradle:
uploadArchives {
repositories {
mavenDeployer {
repository(url: "file://localhost/tmp/myRepo/")
}
}
}