An open API service indexing awesome lists of open source software.

https://github.com/operaton/operaton-release-parent


https://github.com/operaton/operaton-release-parent

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

          

[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.operaton/operaton-release-parent/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.operaton/operaton-release-parent)

operaton-release-parent
======================

Pom which can be inherited for operaton 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 operaton-release-parent pom inside your project like so


org.operaton
operaton-release-parent
${LATEST_VERSION}




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

Specify the section for your project eg.


https://github.com/operaton/MY_PROJECT_URL
scm:git:git@github.com:operaton/MY_PROJECT_URL.git
scm:git:git@github.com:operaton/MY_PROJECT_URL.git

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.


...


...


operaton-nexus
MY_CAMUNDA_NEXUS_USER
MY_CAMUNDA_NEXUS_PASSWORD


central
MY_CENTRAL_USER
MY_CENTRAL_PASSWORD






...


sonatype-oss-release

YOUR_SECRET_GPG_PASSPHRASE




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 `operaton-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.operaton.com/artifactory/operaton-bpm-snapshots.


nexus.release.repositorySpecify the url to your release repository.
Default is https://artifacts.operaton.com/artifactory/operaton-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.)