[java-idp-jetty-base] 01/01: GEN-330 Build Windows installers in our standard flow
Rod Widdowson
rdw at steadingsoftware.com
Fri Nov 3 16:24:28 UTC 2023
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch dev/IDP-2147
in repository java-idp-jetty-base.
View the commit online:
http://git.shibboleth.net/view/?p=java-idp-jetty-base.git;a=commit;h=dc72902b82b803ceae30d4878f624af07e1c72c3
commit dc72902b82b803ceae30d4878f624af07e1c72c3
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Fri Nov 3 16:22:11 2023 +0000
GEN-330 Build Windows installers in our standard flow
https://shibboleth.atlassian.net/browse/GEN-330
Soup-to-nuts build of jetty base msi installer in maven
---
.gitignore | 1 +
pom.xml | 339 +++++++++++++++++++++++++++++-----------------
src/main/assembly/zip.xml | 23 +---
src/main/wix/.gitignore | 3 +-
src/main/wix/pom.xml | 175 ------------------------
src/main/wix/wix.vcxproj | 6 +-
6 files changed, 220 insertions(+), 327 deletions(-)
diff --git a/.gitignore b/.gitignore
index 55222fa..1e66356 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,3 +21,4 @@
.settings
.classpath
.project
+
diff --git a/pom.xml b/pom.xml
index 1ae0e1c..1313230 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,20 +7,31 @@
<parent>
<groupId>net.shibboleth</groupId>
<artifactId>parent</artifactId>
- <version>11.3.5</version>
+ <version>17.0.2</version>
</parent>
- <name>idp-jetty-base</name>
+ <name>Jetty base and Windows Installer</name>
+ <description>
+ All the files needed for a jetty base to work with the IdP on
+ Windows plus the work needed to emit an MSI
+ </description>
<groupId>net.shibboleth.idp</groupId>
- <artifactId>idp-jetty-base</artifactId>
+ <artifactId>idp-jetty-base-windows</artifactId>
<packaging>pom</packaging>
- <version>11.0.19-WINDOWS-SNAPSHOT</version>
+ <version>11.0.19-SNAPSHOT</version>
<properties>
+ <!-- where to put the jetty-base we are making -->
<assemblyDirectory>${project.build.directory}/idp-jetty-base</assemblyDirectory>
+ <!-- dependencies for the shipped jetty-base -->
<logback.version>1.4.9</logback.version>
<slf4j.version>2.0.5</slf4j.version>
- <maven-dist-enforcer-data.version>1.0.14</maven-dist-enforcer-data.version>
+ <!-- The things we will combine into the MSI -->
+ <procrun.groupId>commons-daemon</procrun.groupId>
+ <procrun.artifactId>commons-daemon</procrun.artifactId>
+ <procrun.version>1.3.4</procrun.version>
+ <procrun.classifier>bin-windows</procrun.classifier>
+ <jetty.version>11.0.18</jetty.version>
</properties>
<dependencies>
@@ -38,131 +49,205 @@
</dependency>
<!-- sl4j to allow early debug of Spring -->
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jcl-over-slf4j</artifactId>
- <version>${slf4j.version}</version>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ <version>${slf4j.version}</version>
</dependency>
</dependencies>
- <build>
- <plugins>
- <!-- Copy src/main/resources to assembly directory. -->
- <plugin>
- <artifactId>maven-resources-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-resources</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <includeEmptyDirs>true</includeEmptyDirs>
- <outputDirectory>${assemblyDirectory}</outputDirectory>
- <resources>
- <resource>
- <directory>${basedir}/src/main/resources</directory>
- <excludes>
- <exclude>**/.gitkeep</exclude>
- </excludes>
- <filtering>false</filtering>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <!-- Copy Logback logging dependencies to jetty-base/lib/logging directory. -->
- <execution>
- <id>copy-jetty-logging-logback</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>copy</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-classic</artifactId>
- <version>${logback.version}</version>
- </artifactItem>
- <artifactItem>
- <groupId>ch.qos.logback</groupId>
- <artifactId>logback-core</artifactId>
- <version>${logback.version}</version>
- </artifactItem>
- <artifactItem>
- <groupId>org.slf4j</groupId>
- <artifactId>jcl-over-slf4j</artifactId>
- <version>${slf4j.version}</version>
- </artifactItem>
- </artifactItems>
- <outputDirectory>${assemblyDirectory}/jetty-base/lib/logging/</outputDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <!-- Assemble the artifacts. -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <appendAssemblyId>false</appendAssemblyId>
- <descriptors>
- <descriptor>src/main/assembly/zip.xml</descriptor>
- </descriptors>
- <tarLongFileMode>gnu</tarLongFileMode>
- </configuration>
- <executions>
- <execution>
- <id>make-assembly</id>
- <phase>package</phase>
- <goals>
- <goal>single</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-enforcer-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>net.shibboleth.maven.enforcer.rules</groupId>
- <artifactId>maven-dist-enforcer</artifactId>
- <version>${maven-dist-enforcer.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>idp-jetty-base-enforce</id>
- <phase>verify</phase>
- <goals>
- <goal>enforce</goal>
- </goals>
+ <profiles>
+ <profile>
+ <id>build-msi</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ <os>
+ <family>windows</family>
+ </os>
+ </activation>
+
+ <build>
+ <plugins>
+ <!-- Copy src/main/resources to assembly directory. -->
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-resources</id>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <includeEmptyDirs>true</includeEmptyDirs>
+ <outputDirectory>${assemblyDirectory}</outputDirectory>
+ <resources>
+ <resource>
+ <directory>${basedir}/src/main/resources</directory>
+ <excludes>
+ <exclude>**/.gitkeep</exclude>
+ </excludes>
+ <filtering>false</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <!-- Copy Logback logging dependencies to jetty-base/lib/logging directory. -->
+ <execution>
+ <id>copy-jetty-logging-logback</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <version>${logback.version}</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-core</artifactId>
+ <version>${logback.version}</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ <version>${slf4j.version}</version>
+ </artifactItem>
+ </artifactItems>
+ <outputDirectory>${assemblyDirectory}/jetty-base/lib/logging/</outputDirectory>
+ </configuration>
+ </execution>
+ <!-- Unpack procrun -->
+ <execution>
+ <id>unpack-procrun</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>${procrun.groupId}</groupId>
+ <artifactId>${procrun.artifactId}</artifactId>
+ <version>${procrun.version}</version>
+ <classifier>${procrun.classifier}</classifier>
+ <type>zip</type>
+ <outputDirectory>${project.build.directory}/procrun/</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ <!-- Unpack Jetty -->
+ <execution>
+ <id>unpack-jetty</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>${jetty.groupId}</groupId>
+ <artifactId>jetty-home</artifactId>
+ <version>${jetty.version}</version>
+ <type>zip</type>
+ <outputDirectory>${project.build.directory}/</outputDirectory>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- WIX -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>3.1.0</version>
+ <executions>
+ <!-- clean -->
+ <execution>
+ <id>clean</id>
+ <phase>clean</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>msbuild</executable>
+ <executable>dotnet</executable>
+ <arguments>
+ <argument>clean</argument>
+ <argument>src/main/wix/wix.vcxproj</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ <!--Build -->
+ <execution>
+ <id>compile</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>dotnet</executable>
+ <arguments>
+ <argument>build</argument>
+ <argument>src/main/wix/wix.vcxproj</argument>
+ <argument>/p:JettyVersion=${jetty.version}</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- copy built output to final location, giving the MSI an appropriate name -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.8</version>
+ <executions>
+ <execution>
+ <id>move-msi-to-target</id>
+ <phase>package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <copy file="src/main/wix/obj/Debug/wix.msi" tofile="${project.build.directory}/${project.build.finalName}.msi"/>
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- Assemble the artifacts. -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
<configuration>
- <rules>
- <jarEnforcer implementation="net.shibboleth.mvn.enforcer.impl.JarEnforcer">
- <dataGroupId>net.shibboleth.maven.enforcer.rules</dataGroupId>
- <dataArtifactId>maven-dist-enforcer-data</dataArtifactId>
- <dataVersion>${maven-dist-enforcer-data.version}</dataVersion>
- <dataKeyRing>${basedir}/src/main/enforcer/shibbolethKeys.gpg</dataKeyRing>
- <parentPomDir>${basedir}</parentPomDir>
- <zipFiles>${project.build.directory}/idp-jetty-base-${project.version}.zip</zipFiles>
- <checkSignatures>true</checkSignatures>
- <checkDependencies>true</checkDependencies>
- <listJarSources>false</listJarSources>
- <checkM2>false</checkM2>
- </jarEnforcer>
- </rules>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>src/main/assembly/zip.xml</descriptor>
+ </descriptors>
+ <tarLongFileMode>gnu</tarLongFileMode>
</configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
diff --git a/src/main/assembly/zip.xml b/src/main/assembly/zip.xml
index c6a9413..bba9cf2 100644
--- a/src/main/assembly/zip.xml
+++ b/src/main/assembly/zip.xml
@@ -7,29 +7,10 @@
</formats>
<fileSets>
<fileSet>
- <directory>${assemblyDirectory}</directory>
- <outputDirectory></outputDirectory>
- <excludes>
- <exclude>**/*.bat*</exclude>
- <exclude>**/*.config*</exclude>
- <exclude>**/*.ini*</exclude>
- <exclude>**/*.properties*</exclude>
- <exclude>**/*.txt*</exclude>
- <exclude>**/*.vm*</exclude>
- <exclude>**/*.xml*</exclude>
- </excludes>
- </fileSet>
- <fileSet>
- <directory>${assemblyDirectory}</directory>
+ <directory>${project.build.directory}</directory>
<outputDirectory></outputDirectory>
<includes>
- <include>**/*.bat*</include>
- <include>**/*.config*</include>
- <include>**/*.ini*</include>
- <include>**/*.properties*</include>
- <include>**/*.txt*</include>
- <include>**/*.vm*</include>
- <include>**/*.xml*</include>
+ <include>*.msi</include>
</includes>
<lineEnding>windows</lineEnding>
</fileSet>
diff --git a/src/main/wix/.gitignore b/src/main/wix/.gitignore
index ead7edb..53d13f9 100644
--- a/src/main/wix/.gitignore
+++ b/src/main/wix/.gitignore
@@ -7,4 +7,5 @@
*.wixpdb
/bin
/obj
-.wix
\ No newline at end of file
+/wixobj
+.wix
diff --git a/src/main/wix/pom.xml b/src/main/wix/pom.xml
deleted file mode 100644
index 8bd8048..0000000
--- a/src/main/wix/pom.xml
+++ /dev/null
@@ -1,175 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>net.shibboleth</groupId>
- <artifactId>parent</artifactId>
- <version>17.0.2-SNAPSHOT</version>
- </parent>
-
- <name>Windows Installer for jetty base</name>
- <description>
- A SAML Identity Provider and CAS login service implementation
- with robust extensibility to other protocols.
- </description>
-
- <groupId>net.shibboleth.idp</groupId>
- <artifactId>idp-jetty-base-installer</artifactId>
- <packaging>pom</packaging>
- <version>11.0.17-WINDOWS-SNAPSHOT</version>
-
- <properties>
- <procrun.groupId>commons-daemon</procrun.groupId>
- <procrun.artifactId>commons-daemon</procrun.artifactId>
- <procrun.version>1.3.4</procrun.version>
- <procrun.classifier>bin-windows</procrun.classifier>
- <jetty-base.groupId>net.shibboleth.idp</jetty-base.groupId>
- <jetty-base.artifactId>idp-jetty-base</jetty-base.artifactId>
- <jetty-base.version>11.0.16-WINDOWS</jetty-base.version>
- <jetty.version>11.0.16</jetty.version>
- <maven-dist-enforcer-data.version>1.0.14</maven-dist-enforcer-data.version>
- </properties>
-
- <profiles>
- <profile>
- <id>build-msi</id>
- <activation>
- <activeByDefault>false</activeByDefault>
- <os>
- <family>windows</family>
- </os>
- </activation>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <!-- Unpack procrun -->
- <execution>
- <id>unpack-procrun</id>
- <phase>process-resources</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>${procrun.groupId}</groupId>
- <artifactId>${procrun.artifactId}</artifactId>
- <version>${procrun.version}</version>
- <classifier>${procrun.classifier}</classifier>
- <type>zip</type>
- <outputDirectory>${project.build.directory}/procrun/</outputDirectory>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- <!-- Unpack Jetty -->
- <execution>
- <id>unpack-jetty</id>
- <phase>process-resources</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>${jetty.groupId}</groupId>
- <artifactId>jetty-home</artifactId>
- <version>${jetty.version}</version>
- <type>zip</type>
- <outputDirectory>${project.build.directory}/jetty/</outputDirectory>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- <!-- unpack jetty-base -->
- <execution>
- <id>unpack-jetty-base</id>
- <phase>process-resources</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>${jetty-base.groupId}</groupId>
- <artifactId>${jetty-base.artifactId}</artifactId>
- <version>${jetty-base.version}</version>
- <type>zip</type>
- <outputDirectory>${project.build.directory}/jetty-base</outputDirectory>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <version>3.1.0</version>
- <!-- clean -->
- <executions>
- <execution>
- <id>clean</id>
- <phase>clean</phase>
- <goals>
- <goal>exec</goal>
- </goals>
- <configuration>
- <executable>msbuild</executable>
- <executable>dotnet</executable>
- <arguments>
- <argument>clean</argument>
- <argument>wix.vcxproj</argument>
- </arguments>
- </configuration>
- </execution>
- <execution>
- <id>compile</id>
- <phase>compile</phase>
- <goals>
- <goal>exec</goal>
- </goals>
- <configuration>
- <executable>msbuild</executable>
- <executable>dotnet</executable>
- <arguments>
- <argument>build</argument>
- <argument>wix.vcxproj</argument>
- <argument>/p:JettyVersion=${jetty.version}</argument>
- </arguments>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <!-- copy built output to final location -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.8</version>
- <executions>
- <execution>
- <id>move-msi-to-target</id>
- <phase>package</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target>
- <copy file="obj/Debug/wix.msi" tofile="${project.build.directory}/${project.build.finalName}.msi"/>
- </target>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-</project>
diff --git a/src/main/wix/wix.vcxproj b/src/main/wix/wix.vcxproj
index 3c48a4f..5c9c681 100644
--- a/src/main/wix/wix.vcxproj
+++ b/src/main/wix/wix.vcxproj
@@ -10,9 +10,9 @@
<InstallerPlatform>x64</InstallerPlatform>
<HarvestDirectoryAutogenerateGuids>false</HarvestDirectoryAutogenerateGuids>
<HarvestDirectoryGenerateGuidsNow>true</HarvestDirectoryGenerateGuidsNow>
- <JettyBaseUnpackDir>target\jetty-base\jetty-base</JettyBaseUnpackDir>
- <JettyUnpackDir>target\jetty\jetty-home-$(JettyVersion)</JettyUnpackDir>
- <ProcrunUnpackDir>target\procrun</ProcrunUnpackDir>
+ <JettyBaseUnpackDir>..\..\..\target\idp-jetty-base</JettyBaseUnpackDir>
+ <JettyUnpackDir>..\..\..\target\jetty-home-$(JettyVersion)</JettyUnpackDir>
+ <ProcrunUnpackDir>..\..\..\target\procrun</ProcrunUnpackDir>
<DefineConstants>ProcrunSrc=$(ProcrunUnpackDir);jettyBaseSrc=$(JettyBaseUnpackDir);jettySrc=$(JettyUnpackDir)</DefineConstants>
<SuppressIces>ICE61</SuppressIces>
</PropertyGroup>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list