title: Deploying maven artifacts without rebuilding
body: <p>We are using declarative pipeline, latest Jenkins. Builds are executed in a docker slave container, which has maven and other tools. Our current Jenkinsfile resembles this:</p>
  
  <pre><code>stage('build') { steps { sh 'mvn clean install'} }
  stage('test') { /* functional tests using a different tool */ }
  stage('publish') { 
      steps {
        // mvn clean deploy -DskipTests -DaltDeploymentRepository... (rebuilds, which we want to avoid, as its a multimodule project)
        // withMaven(options:[artifactsPublisher()] { } ... (from maven-pipeline-plugin)
      }
  }
  </code></pre>
  
  <p>Jenkins classic mode has a Maven Integration plugin which provides a section "Deploy artifacts to Maven repository" which uses Maven RedeployPublisher to only publish artifacts. I am looking for a pipeline equivalent of this, I thought the maven-pipeline-plugin does this, but cant find an example. Any pointers appreciated!</p>