title: gradle-release plugin + maven publishing plugin
body: <p>I'm creating gradle builds as a new gradle user, but I have worked with maven in the past.</p>
  
  <p>I'm trying to reproduce actions of the maven release plugin:</p>
  
  <ul>
  <li>Change branch version to Release number (commit at svn)</li>
  <li>Create a tag (at svn)</li>
  <li>Deploy the release tag in Nexus OSS</li>
  <li>Change branch version to new Snapshot number (commit at svn)</li>
  </ul>
  
  <p>As you can see, I'm using:</p>
  
  <ul>
  <li>Nexus OSS as versioning repository</li>
  <li>SVN as scm</li>
  <li>Gradle (2.8)</li>
  </ul>
  
  <p>I'm trying to achieve my objectives with these two plugins:</p>
  
  <ol>
  <li><p><a href="https://github.com/researchgate/gradle-release" rel="nofollow noreferrer">Gradle-release Plugin</a>:</p>
  
  <ul>
  <li>Change branch version to Release number (commit at svn)</li>
  <li>Create a tag (at svn)</li>
  <li>Change branch version to new Snapshot number (commit at svn)</li>
  </ul>
  
  <p>Command line: <strong>gradle release</strong></p></li>
  <li><p><a href="https://docs.gradle.org/current/userguide/publishing_maven.html" rel="nofollow noreferrer">Maven Publish Plugin</a> to deploy to Nexus:</p>
  
  <p>Command line: <strong>gradle publish</strong></p></li>
  </ol>
  
  <p><strong>Any ideas how I could generate a release and automatically deploy it to Nexus in one shot?</strong></p>
  
  <p>Below is my <em>build.gradle</em>:</p>
  
  <pre><code>plugins {
      id 'net.researchgate.release' version '2.3.4'
  }
  
  apply plugin: 'maven-publish'
  
  
  /*------------------------
  ----- PUBLISH PLUGIN -----
  --------------------------
  https://docs.gradle.org/current/userguide/publishing_maven.html
  --------------------------*/
  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 PLUGIN -----
  --------------------------
  https://github.com/researchgate/gradle-release
  --------------------------*/
  release {
      failOnCommitNeeded = false 
      failOnUnversionedFiles = false
  
      scmAdapters = [
          net.researchgate.release.SvnAdapter
      ]
  }
  </code></pre>