| | |
| | | information: "Portions Copyright [year] [name of copyright owner]". |
| | | |
| | | Copyright 2015-2016 ForgeRock AS. |
| | | Portions Copyright 2018 Open Identity Platform Community |
| | | --> |
| | | <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/xsd/maven-4.0.0.xsd"> |
| | | <modelVersion>4.0.0</modelVersion> |
| | |
| | | <parent> |
| | | <groupId>org.forgerock.opendj</groupId> |
| | | <artifactId>opendj-msi</artifactId> |
| | | <version>4.0.0-SNAPSHOT</version> |
| | | <version>4.1.5-SNAPSHOT</version> |
| | | </parent> |
| | | |
| | | <artifactId>opendj-msi-standard</artifactId> |
| | |
| | | <msi.resources>${basedir}/resources/msi</msi.resources> |
| | | <package.dir>${project.build.directory}/${product.name.lowercase}</package.dir> |
| | | </properties> |
| | | |
| | | <dependencies> |
| | | |
| | | </dependencies> |
| | | <build> |
| | | <plugins> |
| | | <plugin> |
| | |
| | | <artifactId>maven-dependency-plugin</artifactId> |
| | | </plugin> |
| | | |
| | | <plugin> |
| | | <groupId>com.savage7.maven.plugins</groupId> |
| | | <artifactId>maven-external-dependency-plugin</artifactId> |
| | | <version>0.6-SNAPSHOT</version> |
| | | <inherited>false</inherited> |
| | | <configuration> |
| | | <stagingDirectory> |
| | | ${project.build.directory}/dependencies/ |
| | | </stagingDirectory> |
| | | <createChecksum>false</createChecksum> |
| | | <skipChecksumVerification>true</skipChecksumVerification> |
| | | <force>false</force> |
| | | <artifactItems> |
| | | <artifactItem> |
| | | <groupId>wixtoolset.org</groupId> |
| | | <artifactId>wixtoolset</artifactId> |
| | | <version>3.11.1</version> |
| | | <packaging>zip</packaging> |
| | | <install>true</install> |
| | | <downloadUrl> |
| | | https://github.com/wixtoolset/wix3/releases/download/wix3111rtm/wix311-binaries.zip |
| | | </downloadUrl> |
| | | </artifactItem> |
| | | <artifactItem> |
| | | <groupId>winetricks</groupId> |
| | | <artifactId>winetricks</artifactId> |
| | | <version>LAST</version> |
| | | <packaging>sh</packaging> |
| | | <install>true</install> |
| | | <downloadUrl> |
| | | https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks |
| | | </downloadUrl> |
| | | </artifactItem> |
| | | </artifactItems> |
| | | </configuration> |
| | | <executions> |
| | | <execution> |
| | | <id>clean-external-dependencies</id> |
| | | <phase>clean</phase> |
| | | <goals> |
| | | <goal>clean-external</goal> |
| | | </goals> |
| | | </execution> |
| | | <execution> |
| | | <id>resolve-install-external-dependencies</id> |
| | | <phase>process-resources</phase> |
| | | <goals> |
| | | <goal>resolve-external</goal> |
| | | <goal>install-external</goal> |
| | | </goals> |
| | | </execution> |
| | | <execution> |
| | | <id>deploy-external-dependencies</id> |
| | | <phase>deploy</phase> |
| | | <goals> |
| | | <goal>deploy-external</goal> |
| | | </goals> |
| | | </execution> |
| | | </executions> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-dependency-plugin</artifactId> |
| | | <executions> |
| | | <execution> |
| | | <id>unpack-wix</id> |
| | | <phase>package</phase> |
| | | <goals> |
| | | <goal>unpack</goal> |
| | | </goals> |
| | | <configuration> |
| | | <artifactItems> |
| | | <artifactItem> |
| | | <groupId>wixtoolset.org</groupId> |
| | | <artifactId>wixtoolset</artifactId> |
| | | <version>3.11.1</version> |
| | | <type>zip</type> |
| | | </artifactItem> |
| | | </artifactItems> |
| | | <outputDirectory> |
| | | ${project.build.directory}/wix |
| | | </outputDirectory> |
| | | </configuration> |
| | | </execution> |
| | | <execution> |
| | | <id>unpack-winetricks</id> |
| | | <phase>package</phase> |
| | | <goals> |
| | | <goal>copy</goal> |
| | | </goals> |
| | | <configuration> |
| | | <artifactItems> |
| | | <artifactItem> |
| | | <groupId>winetricks</groupId> |
| | | <artifactId>winetricks</artifactId> |
| | | <version>LAST</version> |
| | | <type>sh</type> |
| | | </artifactItem> |
| | | </artifactItems> |
| | | <outputDirectory> |
| | | ${project.build.directory}/winetricks |
| | | </outputDirectory> |
| | | </configuration> |
| | | </execution> |
| | | </executions> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-antrun-plugin</artifactId> |
| | | <executions> |
| | | <execution> |
| | | <id>build-msi-package</id> |
| | | <id>build-msi-package-prepare</id> |
| | | <phase>package</phase> |
| | | <goals> |
| | | <goal>run</goal> |
| | | </goals> |
| | | <configuration> |
| | | <!-- Package the Directory Server for the MSI distribution. --> |
| | | <target> |
| | | <mkdir dir="${project.build.directory}/msi/files" /> |
| | | <copy toDir="${project.build.directory}/msi/files"> |
| | | <delete dir="${user.home}/.msi" /> |
| | | <mkdir dir="${user.home}/.msi" /> |
| | | <copy toDir="${user.home}/.msi"> |
| | | <fileset dir="${package.dir}"> |
| | | <!-- Exclude Mac apps --> |
| | | <exclude name="QuickSetup.app/**" /> |
| | |
| | | <copy file="${msi.resources}/package.wxs" toDir="${project.build.directory}/msi/build" /> |
| | | <copy file="${msi.resources}/opendjbanner.bmp" toDir="${project.build.directory}/msi/build" /> |
| | | <copy file="${msi.resources}/opendjdialog.bmp" toDir="${project.build.directory}/msi/build" /> |
| | | <mkdir dir="${project.build.directory}/msi/dist" /> |
| | | |
| | | <!-- Construct a .wxs file from the directory structure --> |
| | | <exec executable="heat.exe" dir="${project.build.directory}/msi/files"> |
| | | <arg value="dir" /> |
| | | <arg value="." /> |
| | | |
| | | <exec executable="wine" resultproperty="WineExitStatusCode" failifexecutionfails="false"> |
| | | <arg value="wineboot" /> |
| | | <arg value="--init" /> |
| | | </exec> |
| | | <echo>WineExitStatusCode=${WineExitStatusCode}</echo> |
| | | |
| | | <exec executable="sh" resultproperty="WineTricksExitStatusCode" failifexecutionfails="false"> |
| | | <arg value="${project.build.directory}/winetricks/winetricks-LAST.sh" /> |
| | | <arg value="--unattended" /> |
| | | <arg value="dotnet40" /> |
| | | <arg value="dotnet_verifier" /> |
| | | </exec> |
| | | <echo>WineTricksExitStatusCode=${WineTricksExitStatusCode}</echo> |
| | | |
| | | <property name="exec.heat" value="wine" /><property name="param.heat" value="${project.build.directory}/wix/heat.exe" /> |
| | | <property name="exec.candle" value="wine" /><property name="param.candle" value="${project.build.directory}/wix/candle.exe" /> |
| | | <property name="exec.light" value="wine" /><property name="param.light" value="${project.build.directory}/wix/light.exe" /> |
| | | |
| | | <echo>------------------- ${exec.heat} ${param.heat} -------------------</echo> |
| | | <exec executable="${exec.heat}" dir="${project.build.directory}/msi" failifexecutionfails="false" resultproperty="heatStatusCode"> |
| | | <arg value="${param.heat}" /> |
| | | <arg value="dir" /> <arg value="${user.home}/.msi" /> |
| | | <arg value="-nologo" /> |
| | | <arg value="-cg" /> <arg value="all" /> |
| | | <arg value="-cg" /><arg value="all" /> |
| | | <arg value="-gg" /> |
| | | <arg value="-sfrag" /> |
| | | <arg value="-srd" /> |
| | | <arg value="-ke" /> |
| | | <arg value="-dr" /> <arg value="OPENDJ" /> |
| | | <arg value="-var" /> <arg value="var.src" /> |
| | | <arg value="-template" /> <arg value="fragment" /> |
| | | <arg value="-o" /> <arg value="${project.build.directory}/msi/build/payload.wxs" /> |
| | | <arg value="-dr" /><arg value="OPENDJ" /> |
| | | <arg value="-var" /><arg value="var.src" /> |
| | | <arg value="-template" /><arg value="fragment" /> |
| | | <arg value="-o" /><arg value="build/payload.wxs" /> |
| | | <arg value="-v" /> |
| | | </exec> |
| | | |
| | | <!-- Compile all .wxs files into .wixobj files (fast) --> |
| | | <exec executable="candle.exe" dir="${project.build.directory}/msi"> |
| | | <echo>------------------- ${exec.candle} ${param.candle} -------------------</echo> |
| | | <exec executable="${exec.candle}" dir="${project.build.directory}/msi" resultproperty="candleStatusCode" > |
| | | <arg value="${param.candle}" /> |
| | | <arg value="-nologo" /> |
| | | <arg value="-out" /> <arg value="${project.build.directory}/msi/build/" /> |
| | | <arg value="-dsrc=files" /> |
| | | <arg value="-out" /> <arg value="build/" /> |
| | | <arg value="-dsrc=${user.home}/.msi" /> |
| | | <arg value="-dname=${product.name}" /> |
| | | <arg value="-dmajor=${parsedVersion.majorVersion}" /> |
| | | <arg value="-dminor=${parsedVersion.minorVersion}" /> |
| | |
| | | <arg value="build/package.wxs" /> |
| | | <arg value="build/payload.wxs" /> |
| | | </exec> |
| | | |
| | | <!-- Build the package (slow) --> |
| | | <exec executable="light.exe" dir="${project.build.directory}/msi"> |
| | | <echo>------------------- ${exec.light} ${param.light} -------------------</echo> |
| | | <exec executable="${exec.light}" dir="${project.build.directory}/msi" resultproperty="lightStatusCode" > |
| | | <arg value="${param.light}" /> |
| | | <arg value="-nologo" /> |
| | | <arg value="-ext" /> <arg value="WixUIExtension" /> |
| | | <arg value="-out" /> <arg value="dist/${product.name.lowercase}-${project.version}.msi" /> |
| | | <arg value="-out" /> <arg value="../${product.name.lowercase}-${project.version}.msi" /> |
| | | <arg value="-sval" /> |
| | | <arg value="build/package.wixobj" /> |
| | | <arg value="build/payload.wixobj" /> |
| | | </exec> |
| | | |
| | | <!-- Attach msi artifact to the build --> |
| | | <attachartifact file="${project.build.directory}/msi/dist/${product.name.lowercase}-${project.version}.msi" /> |
| | | <echo>lightStatusCode=${lightStatusCode}</echo> |
| | | <delete dir="${user.home}/.msi" /> |
| | | |
| | | <attachartifact file="${project.build.directory}/${product.name.lowercase}-${project.version}.msi" /> |
| | | </target> |
| | | </configuration> |
| | | </execution> |
| | |
| | | </plugin> |
| | | </plugins> |
| | | </build> |
| | | </project> |
| | | </project> |