Giter VIP home page Giter VIP logo

maven-release-plugin-example's Introduction

maven-release-plugin-example

Cleaning a Release

  1. Delete the release descriptor (release.properties)

  2. Delete any backup POM files

mvn release:clean

Preparing the Release

  1. Perform some checks – there should be no uncommitted changes and the project should depend on no SNAPSHOT dependencies

  2. Change the version of the project in the pom file to a full release number (remove SNAPSHOT suffix) – in our example – 0.1

  3. Run the project test suites

  4. Commit and push the changes

  5. Create the tag out of this non-SNAPSHOT versioned code

  6. Increase the version of the project in the pom – in our example – 0.2-SNAPSHOT

  7. Commit and push the changes

Dry Run

Allows you to run all operations in release:prepare goal except for actual commits into SCM.

mvn release:prepare -DdryRun=true

Performing the Release

  1. Checkout release tag from SCM

  2. Build and deploy released code

  3. Relies on the output of the Prepare step – the release.properties.

mvn release:prepare

Hosted Maven2 repository in Nexus

Create maven2 hosted repository in Nexus, for us it's api-release

Upload artifact in Nexus from command line:

curl -v --user admin:admin123 --upload-file <filename> http://localhost:8081/repository/<repository-name>/<filename>

Configure the credentials for the nexus-releases server in the global settings.xml (%USER_HOME%/.m2/settings.xml):

<servers>
   <server>
      <id>nexus-releases</id>
      <username>admin</username>
      <password>admin123</password>
   </server>
</servers>

Cleaning, Preparing and Performing the release

mvn release:clean release:prepare release:perform -DreleaseVersion=0.1 -DdevelopmentVersion=0.2-SNAPSHOT

Reference: http://www.baeldung.com/maven-release-nexus

maven-release-plugin-example's People

Contributors

saravananmoorthy avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.