Repository: nifi-minifi Updated Branches: refs/heads/master 632adb9a3 -> 3e592b496
MINIFI-420 Migrate Windows service executable handling to minifi-assembly to avoid executables in source packages. This closes #107. Project: http://git-wip-us.apache.org/repos/asf/nifi-minifi/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi-minifi/commit/3e592b49 Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi/tree/3e592b49 Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi/diff/3e592b49 Branch: refs/heads/master Commit: 3e592b496f757054050f020405ab598028ebe4f4 Parents: 632adb9 Author: Aldrin Piri <[email protected]> Authored: Mon Dec 18 12:49:38 2017 -0500 Committer: Aldrin Piri <[email protected]> Committed: Mon Dec 18 15:11:59 2017 -0500 ---------------------------------------------------------------------- minifi-assembly/pom.xml | 46 +++++++++++++++++ .../src/main/assembly/dependencies.xml | 11 +++++ .../minifi-framework/minifi-resources/pom.xml | 52 -------------------- 3 files changed, 57 insertions(+), 52 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/3e592b49/minifi-assembly/pom.xml ---------------------------------------------------------------------- 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 @@ limitations under the License. <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> http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/3e592b49/minifi-assembly/src/main/assembly/dependencies.xml ---------------------------------------------------------------------- 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> http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/3e592b49/minifi-nar-bundles/minifi-framework-bundle/minifi-framework/minifi-resources/pom.xml ---------------------------------------------------------------------- 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>
