All Projects → bmuschko → Gradle Nexus Plugin

bmuschko / Gradle Nexus Plugin

Licence: apache-2.0
Gradle plugin for configuring and uploading artifacts to Sonatype Nexus

Programming Languages

groovy
2714 projects

Projects that are alternatives of or similar to Gradle Nexus Plugin

sonatype-publish-plugin
Gradle Plugin for publishing artifacts to Sonatype and Nexus
Stars: ✭ 17 (-94.01%)
Mutual labels:  maven, gradle-plugin, publish
Jitpack.io
Documentation and issues of https://jitpack.io
Stars: ✭ 2,156 (+659.15%)
Mutual labels:  publish, maven
Javapackager
📦 Gradle/Maven plugin to package Java applications as native Windows, Mac OS X, or GNU/Linux executables and create installers for them.
Stars: ✭ 285 (+0.35%)
Mutual labels:  gradle-plugin, maven
Maven Git Versioning Extension
This extension will virtually set project versions, based on current git branch or tag.
Stars: ✭ 178 (-37.32%)
Mutual labels:  gradle-plugin, maven
Aliyungradleconfig
自用的安卓开源项目工程模板。阿里云远程仓库加速,发布到maven仓库、上传到jcenter,代码混淆、资源混淆,持续集成(CI),多渠道自动打包。在天朝使用jcenter、mavenCentral及google三个远程仓库,Gradle Sync太慢?一招教你配置阿里云镜像源。init.d/init.gradle
Stars: ✭ 37 (-86.97%)
Mutual labels:  publish, maven
gradle-git-versioning-plugin
This extension will set project version, based on current Git branch or tag.
Stars: ✭ 44 (-84.51%)
Mutual labels:  maven, gradle-plugin
Jib
🏗 Build container images for your Java applications.
Stars: ✭ 11,370 (+3903.52%)
Mutual labels:  gradle-plugin, maven
dmn-check
A tool which performs static analyses on Decision Model Notation (DMN) files to detect bugs
Stars: ✭ 34 (-88.03%)
Mutual labels:  maven, gradle-plugin
kobby
Kobby is a codegen plugin of Kotlin DSL Client by GraphQL schema. The generated DSL supports execution of complex GraphQL queries, mutation and subscriptions in Kotlin with syntax similar to native GraphQL syntax.
Stars: ✭ 52 (-81.69%)
Mutual labels:  maven, gradle-plugin
RapidMavenPushPlugin
A Gradle plugin : Upload Artifacts to Multi Maven Repository
Stars: ✭ 21 (-92.61%)
Mutual labels:  maven, gradle-plugin
jcenter-config
Painlessly publish your library/project to jcenter() with these simple scripts.
Stars: ✭ 13 (-95.42%)
Mutual labels:  maven, publish
native-build-tools
Native-image plugins for various build tools
Stars: ✭ 168 (-40.85%)
Mutual labels:  maven, gradle-plugin
jcabi-maven-plugin
Supplementary maven plugin for AspectJ weaving and versioning of artifacts
Stars: ✭ 25 (-91.2%)
Mutual labels:  maven
Gitee Pages Action
🤖 Auto Deploy Gitee Pages | 无须人为干预,自动部署 Gitee Pages
Stars: ✭ 265 (-6.69%)
Mutual labels:  publish
haveibeenpwned4j
The ultimate Java library for Troy Hunt's ';-- Have I Been Pwned (v3).
Stars: ✭ 13 (-95.42%)
Mutual labels:  maven
SSM-Maven-Heima
基于SSM(Spring+Springmvc+Mybatis)框架的电商小项目,使用Maven构建项目,MySQL为数据库系统,Redis的缓存服务器(并不是用的很多)。商城分为后台人员管理界面和前台处理服务器两个方面。实现了登录,邮件注册,redis缓存机制,cookie的历史记录浏览,分页浏览商品,加入购物车,提交订单等等功能。最精彩的是,如果你刚刚学完基础的SSM框架,那么你就可以跟着视频一起完成这个很nice的小工程了。话不多说,让我们进入无尽的学习中吧!(光头不再是梦想:) )
Stars: ✭ 106 (-62.68%)
Mutual labels:  maven
Teamspeak 3 Java Api
A Java wrapper of TeamSpeak's 3 server query API.
Stars: ✭ 273 (-3.87%)
Mutual labels:  maven
Gradle Aws Plugin
Gradle plugin to manage Amazon Web Services
Stars: ✭ 269 (-5.28%)
Mutual labels:  gradle-plugin
common
常用的模式、方法、算法。Common patterns and methods.
Stars: ✭ 59 (-79.23%)
Mutual labels:  maven
WAPI
The WhatsApp API
Stars: ✭ 36 (-87.32%)
Mutual labels:  maven

Gradle Sonatype Nexus plugin Build Status

Sonatype Logo

Over the past couple of years this plugin has seen many releases. Thanks to everyone involved! Unfortunately, I don't have much time to contribute anymore. In practice this means far less activity, responsiveness on issues and new releases from my end.
I am actively looking for contributors willing to take on maintenance and implementation of the project. If you are interested and would love to see this plugin continue to thrive, shoot me a mail.

The plugin provides support for configuring and uploading artifacts to Sonatype Nexus. It can be configured to deploy to a self-hosted instance of Nexus or Sonatype OSS. The default setup is to publish to Sonatype OSS. Currently, Java and Groovy project artifact generation is supported. In addition to the JAR and POM file artifacts containing the JavaDocs and source files are created. Signing the artifacts is optional.

Usage

To use the Sonatype Nexus plugin, include in your build script:

apply plugin: 'com.bmuschko.nexus'

The plugin JAR needs to be defined in the classpath of your build script. It is directly available on Bintray. Alternatively, you can download it from GitHub and deploy it to your local repository. The following code snippet shows an example on how to retrieve it from Bintray:

 buildscript {
     repositories {
         jcenter()
     }
     dependencies {
         classpath 'com.bmuschko:gradle-nexus-plugin:2.3.1'
     }
 }

Tasks

The Nexus plugin can add three tasks to your project:

  • javadocJar: Assembles a jar archive containing the generated Javadoc API documentation of this project (added by default).
  • sourcesJar: Assembles a jar archive containing the main sources of this project (added by default).
  • testsJar: Assembles a jar archive containing the test sources of this project.

The output of all tasks is added to the archives configuration. To tell the plugin that any of these tasks should be added to the project or removed, you will need to set a specific extension property.

Additionally, it applies the Maven plugin as well as signing in order to leverage maven's install and uploadArchives tasks.

Extension properties

The plugin defines the following extension properties in the extraArchive closure:

  • javadoc: Adds Javadoc JAR task to project (defaults to true).
  • sources: Adds sources JAR task to project (defaults to true).
  • tests: Adds test sources JAR task to project (defaults to false).

The plugin defines the following extension properties in the nexus closure:

  • sign: Specifies whether to sign the artifacts using the signing plugin (defaults to true).
  • configuration: The custom configuration used to publish artifacts (defaults to archives).
  • repositoryUrl: The stable release repository URL (defaults to https://oss.sonatype.org/service/local/staging/deploy/maven2/).
  • snapshotRepositoryUrl: The snapshot repository URL (defaults to https://oss.sonatype.org/content/repositories/snapshots/).

Additional configuration

POM customization

In addition to the convention properties the automatically generated POM file can be modified. To provide the data for the POM generation specify the information within the configuration element modifyPom.project.

 modifyPom {
     project {
         ...
     }
 }

Credentials

In your ~/.gradle/gradle.properties you will need to set the mandatory Nexus credentials required for uploading your artifacts.

 nexusUsername = yourUsername
 nexusPassword = yourPassword

If you don't specify one of these properties, the plugin will prompt your for their values in the console.

Example

 modifyPom {
     project {
         name 'Gradle Sonatype Nexus plugin'
         description 'Gradle plugin that provides tasks for configuring and uploading artifacts to Sonatype Nexus.'
         url 'https://github.com/bmuschko/gradle-nexus-plugin'
         inceptionYear '2012'

         scm {
             url 'https://github.com/bmuschko/gradle-nexus-plugin'
             connection 'scm:https://[email protected]/bmuschko/gradle-nexus-plugin.git'
             developerConnection 'scm:git://github.com/bmuschko/gradle-nexus-plugin.git'
         }

         licenses {
             license {
                 name 'The Apache Software License, Version 2.0'
                 url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
                 distribution 'repo'
             }
         }

         developers {
             developer {
                 id 'bmuschko'
                 name 'Benjamin Muschko'
                 email '[email protected]'
             }
         }
     }
 }
 
 extraArchive {
     sources = false
     tests = true
     javadoc = false
 }

 nexus {
     sign = true
     repositoryUrl = 'http://localhost:8081/nexus/content/repositories/internal/'
     snapshotRepositoryUrl = 'http://localhost:8081/nexus/content/repositories/internal-snapshots/'
 }

FAQ

How do I publish my artifacts to the Central Repository aka Maven Central aka Sonatype OSS?

By default the plugin is configured to upload your artifacts to the release and snapshot repository URLs of Sonatype OSS. There's no additional configuration required. If you want to tweak the automatically generated POM file please you the modifyPom closure. Make sure to stick to the process described in the Central Repository Documentation.

Is it possible to automatically publish artifacts to Maven Central without any manual steps in the Nexus GUI (e.g. from CI server)?

It is beyond the scope of this plugin, but there is a dedicated 3rd-party plugin gradle-nexus-staging-plugin which allows for releasing and promoting artifacts to Maven Central directly from Gradle. It also seamlessly integrates with gradle-nexus-plugin (e.g. allows to reuse provided credentials).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].