Releasing the source code

Once all code is compiled and tested, and the dependencies have been checked, it is time to release the software.

For a final Version x.y.0, best practice consists in:

  • Tagging the Version x.y.0 and removing its x.y.0-SNAPSHOT status
  • Creating a new branch x.y that will generate snapshots (x.y.1-SNAPSHOT, x.y.2-SNAPSHOT, and so on) and releases (x.y.1, x.y.2, and so on)
  • Upgrading the version of the trunk to x.(y+1).0-SNAPSHOT

The Maven Release plugin

Maven Release plugin can help you in performing these tasks with the minimum human intervention possible. Here is an example of a minimal POM using Maven Release:

<?xml version="1.0" encoding="UTF-8"?> <project xmlns="" xmlns:xsi="" ...

Get Apache Maven Dependency Management now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.