MINIFI-420 Migrate Windows service executable handling to minifi-assembly to avoid executables in source packages.
This closes #107.
diff --git a/minifi-assembly/pom.xml b/minifi-assembly/pom.xml
index 46e2efc..5dad45f 100644
--- a/minifi-assembly/pom.xml
+++ b/minifi-assembly/pom.xml
@@ -28,6 +28,52 @@
<build>
<plugins>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>ant-contrib</groupId>
+ <artifactId>ant-contrib</artifactId>
+ <version>20020829</version>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <id>download-commons-daemon</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <taskdef resource="net/sf/antcontrib/antcontrib.properties" />
+ <if>
+ <available file="${basedir}/target/minifiw.exe" />
+ <then>
+ <echo message="Skipping download of commons-daemon." />
+ </then>
+ <else>
+ <echo message="Downloading Commons Daemon Windows binaries." />
+ <get src="http://apache.claz.org/commons/daemon/binaries/windows/commons-daemon-1.1.0-bin-windows.zip" dest="${java.io.tmpdir}/commons-daemon-1.1.0-bin-windows.zip" skipexisting="true" />
+ <local name="checksum.matches" />
+ <property name="sha256sum" value="b5a211f826dc4c0d90508eb1222fe00d70c04a960a6c06540b13ccc5ca71d377" />
+ <checksum file="${java.io.tmpdir}/commons-daemon-1.1.0-bin-windows.zip" algorithm="SHA-256" property="${sha256sum}" verifyProperty="checksum.matches" />
+ <echo message="Checksum match = ${checksum.matches}" />
+ <condition property="checksum.matches.fail">
+ <equals arg1="${checksum.matches}" arg2="false" />
+ </condition>
+ <fail if="checksum.matches.fail">Checksum error</fail>
+ <unzip src="${java.io.tmpdir}/commons-daemon-1.1.0-bin-windows.zip" dest="${java.io.tmpdir}" />
+ <copy file="${java.io.tmpdir}/prunmgr.exe" tofile="${basedir}/target/minifiw.exe" />
+ <copy file="${java.io.tmpdir}/amd64/prunsrv.exe" tofile="${basedir}/target/minifi.exe" />
+ </else>
+ </if>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<finalName>minifi-${project.version}</finalName>
diff --git a/minifi-assembly/src/main/assembly/dependencies.xml b/minifi-assembly/src/main/assembly/dependencies.xml
index 71b0ff4..e588b8a 100644
--- a/minifi-assembly/src/main/assembly/dependencies.xml
+++ b/minifi-assembly/src/main/assembly/dependencies.xml
@@ -136,6 +136,17 @@
</dependencySets>
<files>
<file>
+ <source>./target/minifi.exe</source>
+ <outputDirectory>./bin</outputDirectory>
+ <filtered>false</filtered>
+ </file>
+ <file>
+ <source>./target/minifiw.exe</source>
+ <outputDirectory>./bin</outputDirectory>
+ <filtered>false</filtered>
+ </file>
+
+ <file>
<source>./README.md</source>
<outputDirectory>./</outputDirectory>
<destName>README</destName>
diff --git a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/pom.xml b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/pom.xml
index f326b22..3d888ca 100644
--- a/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/pom.xml
+++ b/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/pom.xml
@@ -25,58 +25,6 @@
<description>holds common resources used to build installers</description>
<build>
<plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <dependencies>
- <dependency>
- <groupId>ant-contrib</groupId>
- <artifactId>ant-contrib</artifactId>
- <version>20020829</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <id>download-commons-daemon</id>
- <phase>compile</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <taskdef resource="net/sf/antcontrib/antcontrib.properties" />
- <if>
- <available file="${basedir}/src/main/resources/bin/minifiw.exe" />
- <then>
- <echo message="Skipping download of commons-daemon." />
- </then>
- <else>
- <echo message="Downloading Commons Daemon Windows binaries." />
- <get
- src="http://apache.claz.org/commons/daemon/binaries/windows/commons-daemon-1.1.0-bin-windows.zip"
- dest="${java.io.tmpdir}/commons-daemon-1.1.0-bin-windows.zip"
- skipexisting="true" />
- <local name="checksum.matches" />
- <property name="sha256sum" value="b5a211f826dc4c0d90508eb1222fe00d70c04a960a6c06540b13ccc5ca71d377" />
- <checksum file="${java.io.tmpdir}/commons-daemon-1.1.0-bin-windows.zip" algorithm="SHA-256" property="${sha256sum}" verifyProperty="checksum.matches"/>
- <echo message="Checksum match = ${checksum.matches}"/>
- <condition property="checksum.matches.fail">
- <equals arg1="${checksum.matches}" arg2="false"/>
- </condition>
- <fail if="checksum.matches.fail">Checksum error</fail>
- <unzip
- src="${java.io.tmpdir}/commons-daemon-1.1.0-bin-windows.zip"
- dest="${java.io.tmpdir}" />
- <copy file="${java.io.tmpdir}/prunmgr.exe"
- tofile="${basedir}/src/main/resources/bin/minifiw.exe" />
- <copy file="${java.io.tmpdir}/amd64/prunsrv.exe" tofile="${basedir}/src/main/resources/bin/minifi.exe" />
- </else>
- </if>
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>