Building RPMs Locally
In otder for the MAven RPM plugin to work, the
rpm command must be avaialbe on the commandline. While this can be done for macOS and Linux develoment environmwents, it can't be done for Windows.
To get round this, this repository contains a Dockerfile which can be used to build projects with an RPM installer.
Check of this repository:
$ git clone firstname.lastname@example.org:yambay-tech/docker-maven.git $ cd docker-maven
Build the docker image, and tag it with the name
docker build . -t mvnbuilder
Change to the directory that contains the project you want to build, for example:
Run the docker image:
$ docker run -it --rm --name docker-maven -v "$PWD":/usr/src mvnbuilder /bin/bash
Once inside the container, perform the build:
cd /usr/src mvn clean package -Pconcourse -DversionNumber=RPMTEST
Back on your host you should have the output RPM, for example: