Gradle Maven Plugin: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 13: Line 13:
=Publishing to a Maven Repository=
=Publishing to a Maven Repository=


In [[build.gradle]]:
Gradle can be configured to [[Gradle_Concepts#Artifact_Publishing|publish artifacts]] to a Maven repository by configuring Maven plugin's uploadArchive task In [[build.gradle]]:


<syntaxhighlight lang='groovy'>
<syntaxhighlight lang='groovy'>

Revision as of 00:26, 2 May 2018

External

Internal

Overview

apply plugin: 'maven'

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/")
        }
    }
}