Skip to content

Pom which can be inherited for camunda releases defining some common release properties

License

Notifications You must be signed in to change notification settings

camunda/camunda-release-parent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maven Central

camunda-release-parent

Pom which can be inherited for camunda releases defining some common release properties. It allows to deploy to two repositories simultaneously. One is a Nexus OSS server, the other one a Nexus Enterprise server. It will deploy the artifacts at the end of the build to keep the window of failure small when talking to external systems.

Usage

Inherit the camunda-release-parent pom inside your project like so

<parent>
  <groupId>org.camunda</groupId>
  <artifactId>camunda-release-parent</artifactId>
  <version>${LATEST_VERSION}</version>
  <!-- do not remove empty tag - http://jira.codehaus.org/browse/MNG-4687 -->
 <relativePath />
</parent>  

If you have a multi-module build, just inherit in your parent pom.

Specify the section for your project eg.

<scm>
  <url>https://github.com/camunda/MY_PROJECT_URL</url>
  <connection>scm:git:git@github.com:camunda/MY_PROJECT_URL.git</connection>
  <developerConnection>scm:git:git@github.com:camunda/MY_PROJECT_URL.git</developerConnection>
</scm>

Release

Prerequisite:

Add the following to the profiles and servers section of your local settings.xml file. This allows the signing of your artifacts during the release. Mandatory for maven central.

<settings>
  ...
  
  <servers>
    ...
    
    <server>
      <id>camunda-nexus</id>
      <username>MY_CAMUNDA_NEXUS_USER</username>
      <password>MY_CAMUNDA_NEXUS_PASSWORD</password>
    </server>
    <server>
      <id>central</id>
      <username>MY_CENTRAL_USER</username>
      <password>MY_CENTRAL_PASSWORD</password>
    </server>
    
  </servers>
  
  
  <profiles>
    ...
    
    <profile>
      <id>sonatype-oss-release</id>
      <properties>
        <gpg.passphrase>YOUR_SECRET_GPG_PASSPHRASE</gpg.passphrase>
      </properties>
    </profile>
    
  </profiles>
</settings>

To release your own project use the following command:

mvn \
release:prepare release:perform \
-B -Dresume=false -Dtag=1.0.0 -DreleaseVersion=1.0.0 -DdevelopmentVersion=1.1.0-SNAPSHOT \
-Darguments="--settings=${PATH_TO_YOUR_SETTINGS_XML_FILE}" \
--settings=${PATH_TO_YOUR_SETTINGS_XML_FILE}

This will trigger the sonatpye-oss-release profile inside the camunda-release-parent pom automatically.

Customization

You can override some default behaviours through the usage of the command line properties below. Add those properties to the -Darguments="INSERT_PROPERTIES_HERE" part of the Maven release command.

PropertyDescription
nexus.snapshot.repositorySpecify the url to your snapshot repository.
Default is https://artifacts.camunda.com/artifactory/camunda-bpm-snapshots.
nexus.release.repositorySpecify the url to your release repository.
Default is https://artifacts.camunda.com/artifactory/camunda-bpm.
skip.nexus.releaseWhen setting the value to true, skip the deployment to the release repository specified in .
Default is false.
skip.central.releaseWhen setting the value to true, skip the deployment to maven central.
Default is false.
serverIdPoints to the corresponding entry in your settings.xml like yourServerId to specify your login credentials.
Default is central for maven central.
nexusUrlThe plain url which points to your nexus installation.
Must be a Nexus Enterprise Edition
Default is https://oss.sonatype.org aka maven central.

Testing

You can test your release steps by using the following Maven release command:

mvn \
release:prepare release:perform \
-B -Dresume=false -Dtag=1.0.0 -DreleaseVersion=1.0.0 -DdevelopmentVersion=1.1.0-SNAPSHOT \
-Darguments="--settings=${PATH_TO_YOUR_SETTINGS_XML_FILE} -Dskip.central.release=true -Dnexus.release.repository=${URL_OF_YOUR_LOCAL_NEXUS_REPOSITORY}" \
--settings=${PATH_TO_YOUR_SETTINGS_XML_FILE} \
-DpushChanges=false -DremoteTagging=false -DlocalCheckout=true

This will do a release but will not push anything to the involved git repositories and will not deploy to Maven Central. Instead it will deploy to a local Nexus repository. (Hint: You can use a simple Nexus Docker image to do so.)

About

Pom which can be inherited for camunda releases defining some common release properties

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published