Page tree
Skip to end of metadata
Go to start of metadata

Changes in the repository

1) Change the SCM tag of your pom file to use SSL.




2) Make sure to set the correct distributionManagement for your project:

     <name>OpenMRS Nexus Modules</name>
    <name>OpenMRS Nexus Snapshots</name>


3) Check the release plugin configuration

It cannot have a 'pushChanges=false', and the tag name format should be set to the OpenMRS standard.

                 <!-- remove the next line if it exists --> 
				 <!-- add this line if it does not exist -->


4) If you want to use the version of modules and dependencies defined in the refapp distro pom:

4.1) Add to your parent pom:

            <!-- Importing versions from refapp distro -->
                  <!-- refapp distro contains SNAPSHOT dependencies -->

4.2) Delete all the other dependencies in DependencyManagement already defined.

For each dependency of your omod and api that belongs to the distro, make sure it's provided or test scoped.

Keep the properties used to generate the config.xml file for your omod.

4.3) Confirm your plugin still ships the right dependencies

Generate a dependency tree of both versions (before the changes and after), and make sure the scope and the dependencies are correct. If it changed, try to identify what caused it.

Do a mvn package and confirm that inside omod/target/your module-1.0-SNAPSHOT/lib/ it's only shipping what it should include. If not, find the dependency added and change its scope to provided or test.

4.4) Make sure to update the register of modules using it.

(temporarily it's in openmrs-contrib-bamboo repo)

Creating a new build with a release stage:

1) Clone the Release test module build


2) Change the plan configuration

When selecting the plan, Actions/Configure plan. Make sure to click in the plan level again in the configuration mode.

2.1) Plan details tab

Add a link to the Releasing a Module from Bamboo page in the plan config. For example, 'More details of the release in'

2.2) Repositories tab, 'Git' repository

Change it to point to your repository.

2.3) Variables tab

  • Delete variable
  • Change maven.release.version to the next version that should be released (e.g, if your pom is 1.0-SNAPSHOT, this variable should be 1.0)
  • Change to the property of this module in the refapp distro pom file. If it's not part of the distro, delete this variable.

2.4.) Update Java version

Make sure you are using the correct java version in both the first stage and the release stage (controlled by the JAVA_HOME variable):

To run in JDK 7, you can just remove the JAVA_HOME variable in the release prepare/perform task (or use JAVA_HOME=${bamboo.capability.system.jdk.openjdk-7-jdk}).

2.5) Dependencies tab

If your build is going to trigger other plans, make sure to add to its dependencies.


2.6) Refapp distro release tasks

If your module is not part of the refapp distro, make sure to delete the relevant tasks in the 'Release to maven' job of your build:

  • Retrieve next snaphot version
  • Update distro with the new version

Creating a manual stage for a build that already exists:

 Click here to expand...

1) Add a link to the Releasing a Module from Bamboo page in the plan config

For example, 'More details of the release in'

2) Create the plan variables:

  • maven.development.version - leave it empty. It could be used to override the default value
  • maven.release.version: add the next release version of this module. Check the pom file in doubt. 
  • only necessary if this module is part of the refapp distro. The maven property in the refapp distro pom file for this module.

(warning) If you are using Release test module as a guide, ignore the variable. It's there only for testing purposes.



3) In the plan configuration, add 'Release scripts' as the second repository:

This repository contains some scripts to execute the release.


4) Remove the polling trigger of the 'Release scripts' repository


5) Create a manual stage for the release:


6) Create the job for that stage

You can use Release module - Release to maven job as a reference.

6.1) Checkout task:

6.2) Release prepare/perform

Execute the release bash script from

If your build requires JDK 8, make sure to add JAVA_HOME=${bamboo.capability.system.jdk.openjdk-8-jdk} to the environment variables. 

6.3) Retrieve from the pom file what will be the next release

Save next version in the plan.


6.4) Retrieve the snapshot version to use in the next task

Only if this module is part of the refapp distro


6.5) Update version in the distro

Only if this module is part of the refapp distro

Execute the distro update bash script from


Update documentation

Make sure to add your module to Releasing a New Version of a Module.

  • No labels


  1. In step 4 above, when setting a module to use versions of modules defined in the ref app distro, i think it is not correct to set allowTimestampedSnapshots to true, you should never release a module that has snapshot dependencies

  2. I tried to release a module where i need a java 8 compiler to be used and it failed of course, the release stage executes a script that i have no access to nor do i have a way to tell it which compiler version to use, Cynthia Louis how do get around this?

    1. Sorry to hear that. I haven't been able to help more on openmrs lately.


      So, the release script are in, and you should be able to modify it (just make sure other releases will continue to work with the same script).


      What you'll need to do it actually set the JAVA_HOME of the release task in Bamboo, the same way we are already setting the MAVEN_HOME. An example like


      Are you admin in Bamboo?nIf you give me the build you are trying to release I can do it for you and get you printscreens of the modifications.


  3. I ended up doing a manual release before i read this, but i get what you're saying, I'll update the plan to set JAVA_HOME.

    Thanks Cintia Del Rio