| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| http://www.apache.org/licenses/LICENSE-2.0 |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <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>org.apache.nifi.minifi</groupId> |
| <artifactId>minifi-framework</artifactId> |
| <version>0.2.1-SNAPSHOT</version> |
| </parent> |
| <artifactId>minifi-resources</artifactId> |
| <packaging>pom</packaging> |
| <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}/prunsrv.exe" tofile="${basedir}/src/main/resources/bin/minifi.exe" /> |
| </else> |
| </if> |
| </tasks> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <artifactId>maven-assembly-plugin</artifactId> |
| <configuration> |
| <attach>true</attach> |
| </configuration> |
| <executions> |
| <execution> |
| <id>make shared resource</id> |
| <goals> |
| <goal>single</goal> |
| </goals> |
| <phase>package</phase> |
| <configuration> |
| <descriptors> |
| <descriptor>src/main/assembly/dependencies.xml</descriptor> |
| </descriptors> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </project> |