I create gradle as a new gradle user, but I have worked with maven in the past.
I am trying to reproduce the actions of the maven release plugin:
- Change the branch version to release number (commit at svn)
- Create tag (on svn)
- Expand the release tag in Nexus OSS
- Change the version of a branch to a new snapshot number (commit at svn)
As you can see, I use:
- Nexus OSS as a version repository
- SVN as scm
- Gradle (2.8)
I am trying to achieve my goals with these two plugins:
Gradle -release Plugin :
- Change the branch version to release number (commit at svn)
- Create tag (on svn)
- Change the version of a branch to a new snapshot number (commit at svn)
Command line: Gradle release
Maven Publish plugin for deployment on Nexus:
Command Line: Gradle Publish
Any ideas on how I can generate the release and automatically deploy it to Nexus in one shot?
Below is my build.gradle:
plugins { id 'net.researchgate.release' version '2.3.4' } apply plugin: 'maven-publish' publishing { publications { maven(MavenPublication) { groupId mavenGroup artifactId mavenArtifact version version from components.java } } repositories { maven { if(project.version.endsWith('-SNAPSHOT')) { url "${nexusUrl}/content/repositories/repo-snapshots" } else { url "${nexusUrl}/content/repositories/repo-releases" } credentials { username nexusUsername password nexusPassword } } } } release { failOnCommitNeeded = false failOnUnversionedFiles = false scmAdapters = [ net.researchgate.release.SvnAdapter ] }
source share