nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ald...@apache.org
Subject [nifi-minifi] branch master updated: MINIFI-508 Providing a profile, active by default, to download/use the Commons Daemon for running MiNiFi as a Windows Service. Those that wish to exclude these dependencies can use the default-assembly profile to not require external resources.
Date Wed, 02 Oct 2019 16:59:22 GMT
This is an automated email from the ASF dual-hosted git repository.

aldrin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nifi-minifi.git


The following commit(s) were added to refs/heads/master by this push:
     new fd99a6c  MINIFI-508 Providing a profile, active by default, to download/use the Commons
Daemon for running MiNiFi as a Windows Service.  Those that wish to exclude these dependencies
can use the default-assembly profile to not require external resources.
fd99a6c is described below

commit fd99a6c72fe830b2aee5eb565e33d7c4b762d1c4
Author: Aldrin Piri <aldrin@apache.org>
AuthorDate: Thu Sep 26 15:39:10 2019 -0400

    MINIFI-508 Providing a profile, active by default, to download/use the Commons Daemon
for running MiNiFi as a Windows Service.  Those that wish to exclude these dependencies can
use the default-assembly profile to not require external resources.
---
 minifi-assembly/pom.xml                            | 214 ++++++++++++++-------
 ...encies.xml => dependencies-windows-service.xml} |   0
 minifi-assembly/src/main/assembly/dependencies.xml |  10 -
 pom.xml                                            |   1 -
 4 files changed, 141 insertions(+), 84 deletions(-)

diff --git a/minifi-assembly/pom.xml b/minifi-assembly/pom.xml
index 778e350..cc90adc 100644
--- a/minifi-assembly/pom.xml
+++ b/minifi-assembly/pom.xml
@@ -25,7 +25,21 @@ limitations under the License.
     <artifactId>minifi-assembly</artifactId>
     <packaging>pom</packaging>
     <description>This is the assembly of Apache NiFi - MiNiFi</description>
+
     <build>
+
+        <pluginManagement>
+            <plugins>
+                <!--
+                    Override the version of the plugin provided by the Apache parent pom
as prior versions lead to an NPE
+                -->
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-assembly-plugin</artifactId>
+                    <version>3.1.1</version>
+                </plugin>
+            </plugins>
+        </pluginManagement>
         <plugins>
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
@@ -50,81 +64,9 @@ limitations under the License.
                     <scmBranchPropertyName>buildBranch</scmBranchPropertyName>
                 </configuration>
             </plugin>
-            <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>
-                            <target>
-                                <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." />
-                                        <property name="commons.daemon.file" value="commons-daemon-${commons.daemon.version}-bin-windows.zip"/>
-                                        <get src="https://apache.claz.org/commons/daemon/binaries/windows/${commons.daemon.file}"
dest="${java.io.tmpdir}/${commons.daemon.file}" skipexisting="true"/>
-                                        <local name="checksum.matches"/>
-                                        <checksum file="${java.io.tmpdir}/${commons.daemon.file}"
algorithm="SHA-512" property="${commons.daemon.sha512sum}" 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.file}"
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>
-                            </target>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <configuration>
-                    <finalName>minifi-${project.version}</finalName>
-                    <attach>false</attach>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>make shared resource</id>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                        <phase>package</phase>
-                        <configuration>
-                            <archiverConfig>
-                                <defaultDirectoryMode>0775</defaultDirectoryMode>
-                                <directoryMode>0775</directoryMode>
-                                <fileMode>0664</fileMode>
-                            </archiverConfig>
-                            <descriptors>
-                                <descriptor>src/main/assembly/dependencies.xml</descriptor>
-                            </descriptors>
-                            <tarLongFileMode>posix</tarLongFileMode>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
         </plugins>
     </build>
+
     <dependencies>
         <!-- Logging -->
         <dependency>
@@ -341,4 +283,130 @@ limitations under the License.
         <commons.daemon.sha512sum>62777d2424361162736b4a9b39b9fb4155760d4d7c4a3489fe1868e0912158ae126ef5f42abbd1bcca1dbf5aa6204d8d0029be7c49f222293d6e1421a5173dd7</commons.daemon.sha512sum>
     </properties>
 
+    <profiles>
+        <profile>
+            <id>default-assembly</id>
+            <activation>
+                <activeByDefault>false</activeByDefault>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-assembly-plugin</artifactId>
+                        <configuration>
+                            <finalName>minifi-${project.version}</finalName>
+                            <attach>false</attach>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>make shared resource</id>
+                                <goals>
+                                    <goal>single</goal>
+                                </goals>
+                                <phase>package</phase>
+                                <configuration>
+                                    <archiverConfig>
+                                        <defaultDirectoryMode>0775</defaultDirectoryMode>
+                                        <directoryMode>0775</directoryMode>
+                                        <fileMode>0664</fileMode>
+                                    </archiverConfig>
+                                    <descriptors>
+                                        <descriptor>src/main/assembly/dependencies.xml</descriptor>
+                                    </descriptors>
+                                    <tarLongFileMode>posix</tarLongFileMode>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>windows-service-assembly</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+                <property>
+                    <name>!default-assembly</name>
+                </property>
+            </activation>
+            <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>
+                                    <target>
+                                        <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." />
+                                                <property name="commons.daemon.file" value="commons-daemon-${commons.daemon.version}-bin-windows.zip"/>
+                                                <get src="https://apache.claz.org/commons/daemon/binaries/windows/${commons.daemon.file}"
dest="${java.io.tmpdir}/${commons.daemon.file}" skipexisting="true"/>
+                                                <local name="checksum.matches"/>
+                                                <checksum file="${java.io.tmpdir}/${commons.daemon.file}"
algorithm="SHA-512" property="${commons.daemon.sha512sum}" 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.file}"
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>
+                                    </target>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <artifactId>maven-assembly-plugin</artifactId>
+                        <configuration>
+                            <finalName>minifi-${project.version}</finalName>
+                            <attach>false</attach>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>make shared resource</id>
+                                <goals>
+                                    <goal>single</goal>
+                                </goals>
+                                <phase>package</phase>
+                                <configuration>
+                                    <archiverConfig>
+                                        <defaultDirectoryMode>0775</defaultDirectoryMode>
+                                        <directoryMode>0775</directoryMode>
+                                        <fileMode>0664</fileMode>
+                                    </archiverConfig>
+                                    <descriptors>
+                                        <descriptor>src/main/assembly/dependencies-windows-service.xml</descriptor>
+                                    </descriptors>
+                                    <tarLongFileMode>posix</tarLongFileMode>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
 </project>
diff --git a/minifi-assembly/src/main/assembly/dependencies.xml b/minifi-assembly/src/main/assembly/dependencies-windows-service.xml
similarity index 100%
copy from minifi-assembly/src/main/assembly/dependencies.xml
copy to minifi-assembly/src/main/assembly/dependencies-windows-service.xml
diff --git a/minifi-assembly/src/main/assembly/dependencies.xml b/minifi-assembly/src/main/assembly/dependencies.xml
index 6ae5411..dd4b46a 100644
--- a/minifi-assembly/src/main/assembly/dependencies.xml
+++ b/minifi-assembly/src/main/assembly/dependencies.xml
@@ -142,16 +142,6 @@
             <fileMode>0444</fileMode>
             <filtered>true</filtered>
         </file>
-        <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>
diff --git a/pom.xml b/pom.xml
index 32b9582..21a1e5e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1189,7 +1189,6 @@ limitations under the License.
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-assembly-plugin</artifactId>
-                    <version>2.5.2</version>
                     <configuration>
                         <tarLongFileMode>gnu</tarLongFileMode>
                     </configuration>


Mime
View raw message