/
Building the Windows jetty-base Installer using maven

Building the Windows jetty-base Installer using maven

In V5 of the IdP we separated the Windows Installer (msi file) which installs Jetty from the installer which installs the IdP. Long term, it is the intention that both of these installers are built, signed and deployed by Maven. But due to a mistrust of the technology (the Wix V4 installer) we current only build the Jetty Msi this was

Prerequisites (One-off)

The Windows machine you will use to do the build Installation box must have the following installed

  • Java JDK version 17 or later

    • Ensure that JAVA_HOME is set correctly

  • Maven

  • Git

  • A recent version of the .NET SDK

  • An appropriate settings.xml

Testing the prerequisites

mvn --version java --version echo %JAVA_HOME% dotnet --version git --version

Preparing Jetty-base

For now just follow this link

A word about versions

All versions are controlled from within the POM file. They are of four types

  • Versions of jars needed by jetty-base (logback.version and slf4j.version)

  • Versions of the subsystems shipped with the installed: Jetty (jetty.version) and Procrun (procrun.version)

  • The Revision (fourth digit) of the completed installer (jetty.revision)

    • This allows multiple release of the installer to ship with the same version of jetty.

  • The version of the artifact itself. This is specified separately from the versions above but must be the concatenation of jetty.version and jetty.revision

Building the Installer

Prepare the Maven & Git Repositories

Creates an empty git and maven directories in the temp directory and sets up the environmental variables used below

REM src\man\bin\SetRepos.bat set MAVEN_REPO=%TEMP%\MVN rd/s/q %MAVEN_REPO% md %MAVEN_REPO% set GIT_REPO=%TEMP%\GIT rd/s/q %GIT_REPO% md %GIT_REPO%

Checkout and Test Build

cd %GIT_REPO% git clone git@git.shibboleth.net:java-idp-jetty-base cd java-idp-jetty-base git checkout -b 11-windows origin/11-windows mvn clean install -Dmaven.repo.local=%MAVEN_REPO%

Smoke Test the installer.

Perform the release

  • Edit pom.xml to remove SNAPSHOT from versions.

  • Tag

SET JETTY_TAG=11.0.18.3-WINDOWS git add -A git commit -m "Update files to be tagged for release" git tag -s -m "Tag %JETTY_TAG%" %JETTY_TAG%
  • Edit pom.xml to change the the version, adding -SNAPSHOT Make sure that there is alignment between the version and the version properties

<version>11.0.18.3-SNAPSHOT</version> <jetty.version>11.0.18</jetty.version> <jetty.revision>3</jetty.revision>
  • Commit

git add -A git commit -m "Bump version after release"

Build the release version

git checkout %JETTY_TAG% mvn -Dmaven.repo.local=%MAVEN_REPO% clean install

Commit the work

Push to nexus using the gpg:sign-and-deploy-file plugin. For

ssh -L 1581:127.0.0.1:1581 -N build.shibboleth.net -f REM or use Putty set VERSION=11.0.18.3 set JETTY_VERSION=11.0.18 set JETTY_REVISION=3 set NEXUS_URL=http://127.0.0.1:1581/nexus/content/repositories/releases set REPO_ID=release SET CL1=mvn -Dmaven.repo.local=%MAVEN_REPO% gpg:sign-and-deploy-file -Durl=%NEXUS_URL% -DrepositoryId=%REPO_ID% SET CL2=-Dfile=target/shibboleth-jetty-base-x64-%VERSION%.msi -DgroupId=net.shibboleth.idp -DartifactId=idp-jetty-base-windows SET CL3=-Dversion=%VERSION% -DgeneratePom=false -Dclassifier=msi Set SIGN_AND_DEPLOY=%CL1% %CL2% %CL3% %SIGN_AND_DEPLOY%

Push changes to git

git checkout 11-windows git push origin 11-windows git push origin %JETTY_TAG%

 

Related content