[java-idp-jetty-base] branch dev/IDP-2147 updated: GEN-330 Build Windows installers in our standard flow

Rod Widdowson rdw at steadingsoftware.com
Thu Oct 5 14:44:51 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=8d36cf42e2e27f40b5bbbc7aa4172a0123ec976b

The following commit(s) were added to refs/heads/dev/IDP-2147 by this push:
     new 8d36cf4  GEN-330 Build Windows installers in our standard flow
8d36cf4 is described below

commit 8d36cf42e2e27f40b5bbbc7aa4172a0123ec976b
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Thu Oct 5 15:44:01 2023 +0100

    GEN-330 Build Windows installers in our standard flow
    
    https://shibboleth.atlassian.net/browse/GEN-330
    
    Mock up a pom to do most of the work.
---
 src/main/wix/pom.xml     | 165 +++++++++++++++++++++++++++++++++++++++++++++++
 src/main/wix/wix.vcxproj |  14 ++--
 2 files changed, 174 insertions(+), 5 deletions(-)

diff --git a/src/main/wix/pom.xml b/src/main/wix/pom.xml
new file mode 100644
index 0000000..01becc9
--- /dev/null
+++ b/src/main/wix/pom.xml
@@ -0,0 +1,165 @@
+<?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>
+
+    <!-- Do we need to describe our dependencies.  We really only just feed the maven-dependency-plugin -->
+    
+    <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>
+</project>
diff --git a/src/main/wix/wix.vcxproj b/src/main/wix/wix.vcxproj
index 78839a3..3c48a4f 100644
--- a/src/main/wix/wix.vcxproj
+++ b/src/main/wix/wix.vcxproj
@@ -6,28 +6,32 @@
 	<PackageReference Include="WixToolset.Heat" Version="4.0.2" />
     </ItemGroup>
     <PropertyGroup>
+	<JettyVersion>unspecified</JettyVersion>
 	<InstallerPlatform>x64</InstallerPlatform>
 	<HarvestDirectoryAutogenerateGuids>false</HarvestDirectoryAutogenerateGuids>
 	<HarvestDirectoryGenerateGuidsNow>true</HarvestDirectoryGenerateGuidsNow>
-	<DefineConstants>ProcrunSrc=procrun-extract;jettyBaseRoot=idp-jetty-base-extract\jetty-base</DefineConstants>
+	<JettyBaseUnpackDir>target\jetty-base\jetty-base</JettyBaseUnpackDir>
+	<JettyUnpackDir>target\jetty\jetty-home-$(JettyVersion)</JettyUnpackDir>
+	<ProcrunUnpackDir>target\procrun</ProcrunUnpackDir>
+	<DefineConstants>ProcrunSrc=$(ProcrunUnpackDir);jettyBaseSrc=$(JettyBaseUnpackDir);jettySrc=$(JettyUnpackDir)</DefineConstants>
 	<SuppressIces>ICE61</SuppressIces>
     </PropertyGroup>
 
     <ItemGroup>
-	<HarvestDirectory Include="idp-jetty-base-extract\jetty-base">
+	<HarvestDirectory Include="$(JettyBaseUnpackDir)">
 	    <ComponentGroupName>JettyBaseGroup</ComponentGroupName>
 	    <DirectoryRefId>IDP_INSTALLDIR</DirectoryRefId>
-	    <PreprocessorVariable>var.jettyBaseRoot</PreprocessorVariable>
+	    <PreprocessorVariable>var.jettyBaseSrc</PreprocessorVariable>
 	    <SuppressRootDirectory>true</SuppressRootDirectory>
 	</HarvestDirectory>
 	<BindPath Include="idp-jetty-base-extract\jetty-base" />
     </ItemGroup>
 
     <ItemGroup>
-	<HarvestDirectory Include="jetty-extract">
+	<HarvestDirectory Include="$(JettyUnpackDir)">
 	    <ComponentGroupName>JettyGroup</ComponentGroupName>
 	    <DirectoryRefId>JETTYROOT</DirectoryRefId>
-	    
+	    <PreprocessorVariable>var.jettySrc</PreprocessorVariable>
 	    <SuppressRootDirectory>true</SuppressRootDirectory>
 	</HarvestDirectory>
 	<BindPath Include="jetty-extract" />

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list