Gradle Maven Publish Plugin: Difference between revisions
Line 30: | Line 30: | ||
=Procedure= | =Procedure= | ||
Activate the plugin | Activate the plugin: | ||
<syntaxhighlight lang='groovy'> | |||
apply plugin: 'maven-publish' | |||
</syntaxhighlight> | |||
Declared the target repositories. | Declared the target repositories. |
Revision as of 21:40, 15 May 2018
External
Internal
Overview
"maven-publish" is an newer alternative to publishing with Maven Plugin, using "publish" tasks instead of Maven Plugin "Upload" tasks. The plugin generates Maven metadata and publishes the generated metadata and the associated artifacts to Maven repositories. The concepts behind publishing with "maven-publish", and the plugin mechanics, are described in the Concepts and Plugin Mechanics below. A step by step procedure is available under the Procedure section.
The plugin is activated with:
apply plugin: 'maven-publish'
Concepts and Plugin Mechanics
Publications
Repositories
Publishing Tasks
The plugin creates publishing tasks, based on available publications and repositories, and makes them available for use. All publishing tasks are triggered by the overarching "publish" tasks, which publishes all publications produced by the project.
Procedure
Activate the plugin:
apply plugin: 'maven-publish'
Declared the target repositories.
Declare the publications.
Publish.
gradle publish