You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by al...@apache.org on 2016/03/31 17:26:28 UTC
nifi-minifi git commit: MINIFI-10 init commit of minifi-assembly
Repository: nifi-minifi
Updated Branches:
refs/heads/master 6e7a147c1 -> bf22d35e4
MINIFI-10 init commit of minifi-assembly
This closes #3.
Signed-off-by: Aldrin Piri <al...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/nifi-minifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi-minifi/commit/bf22d35e
Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi/tree/bf22d35e
Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi/diff/bf22d35e
Branch: refs/heads/master
Commit: bf22d35e4016b14d05bcf09049ac5a5501e9ad21
Parents: 6e7a147
Author: Joseph Percivall <jo...@yahoo.com>
Authored: Wed Mar 30 17:17:03 2016 -0400
Committer: Aldrin Piri <al...@apache.org>
Committed: Thu Mar 31 11:25:51 2016 -0400
----------------------------------------------------------------------
minifi-assembly/LICENSE | 202 +++++++++++++++
minifi-assembly/NOTICE | 16 ++
minifi-assembly/pom.xml | 187 ++++++++++++++
.../src/main/assembly/dependencies.xml | 111 +++++++++
minifi-framework/minifi-resources/LICENSE | 202 +++++++++++++++
minifi-framework/minifi-resources/NOTICE | 5 +
minifi-framework/minifi-resources/pom.xml | 50 ++++
.../src/main/assembly/dependencies.xml | 52 ++++
.../src/main/resources/bin/dump-minifi.bat | 47 ++++
.../src/main/resources/bin/minifi.sh | 247 +++++++++++++++++++
.../src/main/resources/bin/run-minifi.bat | 47 ++++
.../src/main/resources/bin/status-minifi.bat | 47 ++++
.../src/main/resources/conf/bootstrap.conf | 60 +++++
.../src/main/resources/conf/logback.xml | 156 ++++++++++++
minifi-framework/pom.xml | 6 +-
pom.xml | 22 ++
16 files changed, 1456 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/bf22d35e/minifi-assembly/LICENSE
----------------------------------------------------------------------
diff --git a/minifi-assembly/LICENSE b/minifi-assembly/LICENSE
new file mode 100644
index 0000000..7a4a3ea
--- /dev/null
+++ b/minifi-assembly/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/bf22d35e/minifi-assembly/NOTICE
----------------------------------------------------------------------
diff --git a/minifi-assembly/NOTICE b/minifi-assembly/NOTICE
new file mode 100644
index 0000000..90163f2
--- /dev/null
+++ b/minifi-assembly/NOTICE
@@ -0,0 +1,16 @@
+Apache NiFi
+Copyright 2014-2016 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+===========================================
+Apache Software License v2
+===========================================
+
+The following binary components are provided under the Apache Software License v2
+
+ (ASLv2) Apache NiFi
+ The following NOTICE information applies:
+ Apache NiFi
+ Copyright 2014-2016 The Apache Software Foundation
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/bf22d35e/minifi-assembly/pom.xml
----------------------------------------------------------------------
diff --git a/minifi-assembly/pom.xml b/minifi-assembly/pom.xml
index 1a015d8..2006c86 100644
--- a/minifi-assembly/pom.xml
+++ b/minifi-assembly/pom.xml
@@ -28,4 +28,191 @@ limitations under the License.
<packaging>pom</packaging>
<description>This is the assembly of Apache NiFi - MiNiFi</description>
+ <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>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.nifi.minifi</groupId>
+ <artifactId>minifi-bootstrap</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.nifi.minifi</groupId>
+ <artifactId>minifi-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.nifi.minifi</groupId>
+ <artifactId>minifi-resources</artifactId>
+ <classifier>resources</classifier>
+ <scope>runtime</scope>
+ <type>zip</type>
+ <version>0.0.1-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>rpm</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <properties>
+ <minifi.run.as>minifi</minifi.run.as>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>unpack-shared-resources</id>
+ <goals>
+ <goal>unpack-dependencies</goal>
+ </goals>
+ <phase>generate-resources</phase>
+ <configuration>
+ <outputDirectory>${project.build.directory}/generated-resources</outputDirectory>
+ <includeArtifactIds>minifi-resources</includeArtifactIds>
+ <includeGroupIds>org.apache.nifi.minifi</includeGroupIds>
+ <excludeTransitive>false</excludeTransitive>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>rpm-maven-plugin</artifactId>
+ <configuration>
+ <name>minifi</name>
+ <summary>Apache NiFi - MiNiFi</summary>
+ <description>Apache NiFi - MiNiFi</description>
+ <license>Apache License, Version 2.0 and others (see included LICENSE file)</license>
+ <url>http://nifi.apache.org</url>
+ <group>Utilities</group>
+ <prefix>/opt/minifi</prefix>
+ <defineStatements>
+ <defineStatement>_use_internal_dependency_generator 0</defineStatement>
+ </defineStatements>
+ <defaultDirmode>750</defaultDirmode>
+ <defaultFilemode>640</defaultFilemode>
+ <defaultUsername>minifi</defaultUsername>
+ <defaultGroupname>minifi</defaultGroupname>
+ <preinstallScriptlet>
+ <script>
+ /usr/bin/getent group minifi >/dev/null || /usr/sbin/groupadd -r minifi; /usr/bin/getent passwd minifi >/dev/null || /usr/sbin/useradd -r -g minifi -d /opt/minifi -s /sbin/nologin -c "MiNiFi System User" minifi
+ </script>
+ </preinstallScriptlet>
+ </configuration>
+ <executions>
+ <execution>
+ <id>build-bin-rpm</id>
+ <goals>
+ <goal>attached-rpm</goal>
+ </goals>
+ <configuration>
+ <classifier>bin</classifier>
+ <provides>
+ <provide>minifi</provide>
+ </provides>
+ <mappings>
+ <mapping>
+ <directory>/opt/minifi/minifi-${project.version}</directory>
+ </mapping>
+ <mapping>
+ <directory>/opt/minifi/minifi-${project.version}</directory>
+ <sources>
+ <source>
+ <location>./LICENSE</location>
+ </source>
+ <source>
+ <location>./NOTICE</location>
+ </source>
+ </sources>
+ </mapping>
+ <mapping>
+ <directory>/opt/minifi</directory>
+ </mapping>
+ <mapping>
+ <directory>/opt/minifi/minifi-${project.version}/bin</directory>
+ <filemode>750</filemode>
+ <sources>
+ <source>
+ <location>${project.build.directory}/generated-resources/bin/minifi.sh</location>
+ <destination>minifi.sh</destination>
+ <filter>true</filter>
+ </source>
+ </sources>
+ </mapping>
+ <mapping>
+ <directory>/opt/minifi/minifi-${project.version}/conf</directory>
+ <configuration>true</configuration>
+ <sources>
+ <source>
+ <location>${project.build.directory}/generated-resources/conf</location>
+ <filter>true</filter>
+ </source>
+ </sources>
+ </mapping>
+ <mapping>
+ <directory>/opt/minifi/minifi-${project.version}/lib</directory>
+ </mapping>
+ <mapping>
+ <directory>/opt/minifi/minifi-${project.version}/lib</directory>
+ <dependency>
+ <excludes>
+ <exclude>org.apache.nifi.minifi:minifi-bootstrap</exclude>
+ <exclude>org.apache.nifi.minifi:minifi-resources</exclude>
+ <exclude>commons-io:commons-io</exclude>
+ <exclude>org.apache.commons:commons-lang3</exclude>
+ <exclude>org.antlr:antlr-runtime</exclude>
+ <exclude>javax.activation:activation</exclude>
+ <exclude>javax.mail:mail</exclude>
+ </excludes>
+ </dependency>
+ </mapping>
+ <mapping>
+ <directory>/opt/minifi/minifi-${project.version}/lib/bootstrap</directory>
+ <dependency>
+ <includes>
+ <include>org.apache.nifi.minifi:minifi-bootstrap</include>
+ </includes>
+ </dependency>
+ </mapping>
+ </mappings>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/bf22d35e/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
new file mode 100644
index 0000000..8cf91b8
--- /dev/null
+++ b/minifi-assembly/src/main/assembly/dependencies.xml
@@ -0,0 +1,111 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+-->
+<assembly>
+ <id>bin</id>
+ <formats>
+ <format>dir</format>
+ <format>zip</format>
+ <format>tar.gz</format>
+ </formats>
+ <includeBaseDirectory>true</includeBaseDirectory>
+ <baseDirectory>minifi-${project.version}</baseDirectory>
+
+ <dependencySets>
+ <!-- Write out all dependency artifacts to lib directory -->
+ <dependencySet>
+ <scope>runtime</scope>
+ <useProjectArtifact>false</useProjectArtifact>
+ <outputDirectory>lib</outputDirectory>
+ <directoryMode>0770</directoryMode>
+ <fileMode>0660</fileMode>
+ <useTransitiveFiltering>true</useTransitiveFiltering>
+ <excludes>
+ <exclude>minifi-bootstrap</exclude>
+ <exclude>minifi-resources</exclude>
+ </excludes>
+ </dependencySet>
+
+ <!-- Write out the bootstrap lib component to its own dir -->
+ <dependencySet>
+ <scope>runtime</scope>
+ <useProjectArtifact>false</useProjectArtifact>
+ <outputDirectory>lib/bootstrap</outputDirectory>
+ <directoryMode>0770</directoryMode>
+ <fileMode>0660</fileMode>
+ <useTransitiveFiltering>true</useTransitiveFiltering>
+ <includes>
+ <include>minifi-bootstrap</include>
+ </includes>
+ </dependencySet>
+
+ <!-- Write out the conf directory contents -->
+ <dependencySet>
+ <scope>runtime</scope>
+ <useProjectArtifact>false</useProjectArtifact>
+ <outputDirectory>./</outputDirectory>
+ <directoryMode>0770</directoryMode>
+ <fileMode>0664</fileMode>
+ <useTransitiveFiltering>true</useTransitiveFiltering>
+ <includes>
+ <include>minifi-resources</include>
+ </includes>
+ <unpack>true</unpack>
+ <unpackOptions>
+ <filtered>true</filtered>
+ <includes>
+ <include>conf/*</include>
+ </includes>
+ </unpackOptions>
+ </dependencySet>
+
+ <!-- Write out the bin directory contents -->
+ <dependencySet>
+ <scope>runtime</scope>
+ <useProjectArtifact>false</useProjectArtifact>
+ <outputDirectory>./</outputDirectory>
+ <directoryMode>0770</directoryMode>
+ <fileMode>0770</fileMode>
+ <useTransitiveFiltering>true</useTransitiveFiltering>
+ <includes>
+ <include>minifi-resources</include>
+ </includes>
+ <unpack>true</unpack>
+ <unpackOptions>
+ <filtered>true</filtered>
+ <includes>
+ <include>bin/*</include>
+ </includes>
+ </unpackOptions>
+ </dependencySet>
+
+ </dependencySets>
+ <files>
+ <file>
+ <source>./LICENSE</source>
+ <outputDirectory>./</outputDirectory>
+ <destName>LICENSE</destName>
+ <fileMode>0644</fileMode>
+ <filtered>true</filtered>
+ </file>
+ <file>
+ <source>./NOTICE</source>
+ <outputDirectory>./</outputDirectory>
+ <destName>NOTICE</destName>
+ <fileMode>0644</fileMode>
+ <filtered>true</filtered>
+ </file>
+ </files>
+</assembly>
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/bf22d35e/minifi-framework/minifi-resources/LICENSE
----------------------------------------------------------------------
diff --git a/minifi-framework/minifi-resources/LICENSE b/minifi-framework/minifi-resources/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/minifi-framework/minifi-resources/LICENSE
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/bf22d35e/minifi-framework/minifi-resources/NOTICE
----------------------------------------------------------------------
diff --git a/minifi-framework/minifi-resources/NOTICE b/minifi-framework/minifi-resources/NOTICE
new file mode 100644
index 0000000..4885e58
--- /dev/null
+++ b/minifi-framework/minifi-resources/NOTICE
@@ -0,0 +1,5 @@
+minifi-resources
+Copyright 2014-2016 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/bf22d35e/minifi-framework/minifi-resources/pom.xml
----------------------------------------------------------------------
diff --git a/minifi-framework/minifi-resources/pom.xml b/minifi-framework/minifi-resources/pom.xml
new file mode 100644
index 0000000..44958a7
--- /dev/null
+++ b/minifi-framework/minifi-resources/pom.xml
@@ -0,0 +1,50 @@
+<?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.0.1-SNAPSHOT</version>
+ </parent>
+ <artifactId>minifi-resources</artifactId>
+ <packaging>pom</packaging>
+ <description>holds common resources used to build installers</description>
+ <build>
+ <plugins>
+ <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>
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/bf22d35e/minifi-framework/minifi-resources/src/main/assembly/dependencies.xml
----------------------------------------------------------------------
diff --git a/minifi-framework/minifi-resources/src/main/assembly/dependencies.xml b/minifi-framework/minifi-resources/src/main/assembly/dependencies.xml
new file mode 100644
index 0000000..7c4188d
--- /dev/null
+++ b/minifi-framework/minifi-resources/src/main/assembly/dependencies.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+-->
+<assembly>
+ <id>resources</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <fileSet>
+ <directory>src/main/resources</directory>
+ <outputDirectory>/</outputDirectory>
+ </fileSet>
+ <fileSet>
+ <directory>src/main/resources/bin</directory>
+ <outputDirectory>/bin/</outputDirectory>
+ <includes>
+ <include>minifi.sh</include>
+ </includes>
+ <fileMode>0750</fileMode>
+ </fileSet>
+ </fileSets>
+ <files>
+ <file>
+ <source>./LICENSE</source>
+ <outputDirectory>./</outputDirectory>
+ <destName>LICENSE</destName>
+ <fileMode>0644</fileMode>
+ <filtered>true</filtered>
+ </file>
+ <file>
+ <source>./NOTICE</source>
+ <outputDirectory>./</outputDirectory>
+ <destName>NOTICE</destName>
+ <fileMode>0644</fileMode>
+ <filtered>true</filtered>
+ </file>
+ </files>
+</assembly>
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/bf22d35e/minifi-framework/minifi-resources/src/main/resources/bin/dump-minifi.bat
----------------------------------------------------------------------
diff --git a/minifi-framework/minifi-resources/src/main/resources/bin/dump-minifi.bat b/minifi-framework/minifi-resources/src/main/resources/bin/dump-minifi.bat
new file mode 100644
index 0000000..d55fcfd
--- /dev/null
+++ b/minifi-framework/minifi-resources/src/main/resources/bin/dump-minifi.bat
@@ -0,0 +1,47 @@
+@echo off
+rem
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements. See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+rem
+
+rem Use JAVA_HOME if it's set; otherwise, just use java
+
+if "%JAVA_HOME%" == "" goto noJavaHome
+if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
+set JAVA_EXE=%JAVA_HOME%\bin\java.exe
+goto startMiNifi
+
+:noJavaHome
+echo The JAVA_HOME environment variable is not defined correctly.
+echo Instead the PATH will be used to find the java executable.
+echo.
+set JAVA_EXE=java
+goto startMiNifi
+
+:startMiNifi
+set MINIFI_ROOT=%~dp0..\
+pushd "%MINIFI_ROOT%"
+set LIB_DIR=lib\bootstrap
+set CONF_DIR=conf
+
+set BOOTSTRAP_CONF_FILE=%CONF_DIR%\bootstrap.conf
+set JAVA_ARGS=-Dorg.apache.nifi.minifi.bootstrap.config.file=%BOOTSTRAP_CONF_FILE%
+
+SET JAVA_PARAMS=-cp %CONF_DIR%;%LIB_DIR%\* -Xms12m -Xmx24m %JAVA_ARGS% org.apache.nifi.minifi.bootstrap.RunMiNiFi
+set BOOTSTRAP_ACTION=dump
+
+cmd.exe /C "%JAVA_EXE%" %JAVA_PARAMS% %BOOTSTRAP_ACTION%
+
+popd
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/bf22d35e/minifi-framework/minifi-resources/src/main/resources/bin/minifi.sh
----------------------------------------------------------------------
diff --git a/minifi-framework/minifi-resources/src/main/resources/bin/minifi.sh b/minifi-framework/minifi-resources/src/main/resources/bin/minifi.sh
new file mode 100755
index 0000000..51bf67e
--- /dev/null
+++ b/minifi-framework/minifi-resources/src/main/resources/bin/minifi.sh
@@ -0,0 +1,247 @@
+#!/bin/sh
+#
+# 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.
+#
+# chkconfig: 2345 20 80
+# description: Apache NiFi - MiNiFi
+#
+
+# Script structure inspired from Apache Karaf and other Apache projects with similar startup approaches
+
+SCRIPT_DIR=$(dirname "$0")
+SCRIPT_NAME=$(basename "$0")
+MINIFI_HOME=$(cd "${SCRIPT_DIR}" && cd .. && pwd)
+PROGNAME=$(basename "$0")
+
+
+warn() {
+ echo "${PROGNAME}: $*"
+}
+
+die() {
+ warn "$*"
+ exit 1
+}
+
+detectOS() {
+ # OS specific support (must be 'true' or 'false').
+ cygwin=false;
+ aix=false;
+ os400=false;
+ darwin=false;
+ case "$(uname)" in
+ CYGWIN*)
+ cygwin=true
+ ;;
+ AIX*)
+ aix=true
+ ;;
+ OS400*)
+ os400=true
+ ;;
+ Darwin)
+ darwin=true
+ ;;
+ esac
+ # For AIX, set an environment variable
+ if ${aix}; then
+ export LDR_CNTRL=MAXDATA=0xB0000000@DSA
+ echo ${LDR_CNTRL}
+ fi
+}
+
+unlimitFD() {
+ # Use the maximum available, or set MAX_FD != -1 to use that
+ if [ "x${MAX_FD}" = "x" ]; then
+ MAX_FD="maximum"
+ fi
+
+ # Increase the maximum file descriptors if we can
+ if [ "${os400}" = "false" ] && [ "${cygwin}" = "false" ]; then
+ MAX_FD_LIMIT=$(ulimit -H -n)
+ if [ "${MAX_FD_LIMIT}" != 'unlimited' ]; then
+ if [ $? -eq 0 ]; then
+ if [ "${MAX_FD}" = "maximum" -o "${MAX_FD}" = "max" ]; then
+ # use the system max
+ MAX_FD="${MAX_FD_LIMIT}"
+ fi
+
+ ulimit -n ${MAX_FD} > /dev/null
+ # echo "ulimit -n" `ulimit -n`
+ if [ $? -ne 0 ]; then
+ warn "Could not set maximum file descriptor limit: ${MAX_FD}"
+ fi
+ else
+ warn "Could not query system maximum file descriptor limit: ${MAX_FD_LIMIT}"
+ fi
+ fi
+ fi
+}
+
+
+
+locateJava() {
+ # Setup the Java Virtual Machine
+ if $cygwin ; then
+ [ -n "${JAVA}" ] && JAVA=$(cygpath --unix "${JAVA}")
+ [ -n "${JAVA_HOME}" ] && JAVA_HOME=$(cygpath --unix "${JAVA_HOME}")
+ fi
+
+ if [ "x${JAVA}" = "x" ] && [ -r /etc/gentoo-release ] ; then
+ JAVA_HOME=$(java-config --jre-home)
+ fi
+ if [ "x${JAVA}" = "x" ]; then
+ if [ "x${JAVA_HOME}" != "x" ]; then
+ if [ ! -d "${JAVA_HOME}" ]; then
+ die "JAVA_HOME is not valid: ${JAVA_HOME}"
+ fi
+ JAVA="${JAVA_HOME}/bin/java"
+ else
+ warn "JAVA_HOME not set; results may vary"
+ JAVA=$(type java)
+ JAVA=$(expr "${JAVA}" : '.* \(/.*\)$')
+ if [ "x${JAVA}" = "x" ]; then
+ die "java command not found"
+ fi
+ fi
+ fi
+ # if command is env, attempt to add more to the classpath
+ if [ "$1" = "env" ]; then
+ [ "x${TOOLS_JAR}" = "x" ] && [ -n "${JAVA_HOME}" ] && TOOLS_JAR=$(find -H "${JAVA_HOME}" -name "tools.jar")
+ [ "x${TOOLS_JAR}" = "x" ] && [ -n "${JAVA_HOME}" ] && TOOLS_JAR=$(find -H "${JAVA_HOME}" -name "classes.jar")
+ if [ "x${TOOLS_JAR}" = "x" ]; then
+ warn "Could not locate tools.jar or classes.jar. Please set manually to avail all command features."
+ fi
+ fi
+
+}
+
+init() {
+ # Determine if there is special OS handling we must perform
+ detectOS
+
+ # Unlimit the number of file descriptors if possible
+ unlimitFD
+
+ # Locate the Java VM to execute
+ locateJava "$1"
+}
+
+
+install() {
+ SVC_NAME=minifi
+ if [ "x$2" != "x" ] ; then
+ SVC_NAME=$2
+ fi
+
+ SVC_FILE="/etc/init.d/${SVC_NAME}"
+ cp "$0" "${SVC_FILE}"
+ sed -i s:MINIFI_HOME=.*:MINIFI_HOME="${MINIFI_HOME}": "${SVC_FILE}"
+ sed -i s:PROGNAME=.*:PROGNAME="${SCRIPT_NAME}": "${SVC_FILE}"
+ rm -f "/etc/rc2.d/S65${SVC_NAME}"
+ ln -s "/etc/init.d/${SVC_NAME}" "/etc/rc2.d/S65${SVC_NAME}"
+ rm -f "/etc/rc2.d/K65${SVC_NAME}"
+ ln -s "/etc/init.d/${SVC_NAME}" "/etc/rc2.d/K65${SVC_NAME}"
+ echo "Service ${SVC_NAME} installed"
+}
+
+
+run() {
+ BOOTSTRAP_CONF_DIR="${MINIFI_HOME}/conf"
+ BOOTSTRAP_CONF="${BOOTSTRAP_CONF_DIR}/bootstrap.conf";
+ BOOTSTRAP_LIBS="${MINIFI_HOME}/lib/bootstrap/*"
+
+ run_as=$(grep run.as "${BOOTSTRAP_CONF}" | cut -d'=' -f2)
+ # If the run as user is the same as that starting the process, ignore this configuration
+ if [ "$run_as" = "$(whoami)" ]; then
+ unset run_as
+ fi
+
+ sudo_cmd_prefix=""
+ if $cygwin; then
+ if [ -n "${run_as}" ]; then
+ echo "The run.as option is not supported in a Cygwin environment. Exiting."
+ exit 1
+ fi;
+
+ MINIFI_HOME=$(cygpath --path --windows "${MINIFI_HOME}")
+ BOOTSTRAP_CONF=$(cygpath --path --windows "${BOOTSTRAP_CONF}")
+ BOOTSTRAP_CONF_DIR=$(cygpath --path --windows "${BOOTSTRAP_CONF_DIR}")
+ BOOTSTRAP_LIBS=$(cygpath --path --windows "${BOOTSTRAP_LIBS}")
+ BOOTSTRAP_CLASSPATH="${BOOTSTRAP_CONF_DIR};${BOOTSTRAP_LIBS}"
+ if [ -n "${TOOLS_JAR}" ]; then
+ TOOLS_JAR=$(cygpath --path --windows "${TOOLS_JAR}")
+ BOOTSTRAP_CLASSPATH="${TOOLS_JAR};${BOOTSTRAP_CLASSPATH}"
+ fi
+ else
+ if [ -n "${run_as}" ]; then
+ if id -u "${run_as}" >/dev/null 2>&1; then
+ sudo_cmd_prefix="sudo -u ${run_as}"
+ else
+ echo "The specified run.as user ${run_as} does not exist. Exiting."
+ exit 1
+ fi
+ fi;
+ BOOTSTRAP_CLASSPATH="${BOOTSTRAP_CONF_DIR}:${BOOTSTRAP_LIBS}"
+ if [ -n "${TOOLS_JAR}" ]; then
+ BOOTSTRAP_CLASSPATH="${TOOLS_JAR}:${BOOTSTRAP_CLASSPATH}"
+ fi
+ fi
+
+ echo
+ echo "Java home: ${JAVA_HOME}"
+ echo "MiNiFi home: ${MINIFI_HOME}"
+ echo
+ echo "Bootstrap Config File: ${BOOTSTRAP_CONF}"
+ echo
+
+ # run 'start' in the background because the process will continue to run, monitoring MiNiFi.
+ # all other commands will terminate quickly so want to just wait for them
+ if [ "$1" = "start" ]; then
+ (cd "${MINIFI_HOME}" && ${sudo_cmd_prefix} "${JAVA}" -cp "${BOOTSTRAP_CLASSPATH}" -Xms12m -Xmx24m -Dorg.apache.nifi.minifi.bootstrap.config.file="${BOOTSTRAP_CONF}" org.apache.nifi.minifi.bootstrap.RunMiNiFi $@ &)
+ else
+ (cd "${MINIFI_HOME}" && ${sudo_cmd_prefix} "${JAVA}" -cp "${BOOTSTRAP_CLASSPATH}" -Xms12m -Xmx24m -Dorg.apache.nifi.minifi.bootstrap.config.file="${BOOTSTRAP_CONF}" org.apache.nifi.minifi.bootstrap.RunMiNiFi $@)
+ fi
+
+ # Wait just a bit (3 secs) to wait for the logging to finish and then echo a new-line.
+ # We do this to avoid having logs spewed on the console after running the command and then not giving
+ # control back to the user
+ sleep 3
+ echo
+}
+
+main() {
+ init "$1"
+ run "$@"
+}
+
+
+case "$1" in
+ install)
+ install "$@"
+ ;;
+ start|stop|run|status|dump|env)
+ main "$@"
+ ;;
+ restart)
+ init
+ run "stop"
+ run "start"
+ ;;
+ *)
+ echo "Usage minifi {start|stop|run|restart|status|dump|install}"
+ ;;
+esac
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/bf22d35e/minifi-framework/minifi-resources/src/main/resources/bin/run-minifi.bat
----------------------------------------------------------------------
diff --git a/minifi-framework/minifi-resources/src/main/resources/bin/run-minifi.bat b/minifi-framework/minifi-resources/src/main/resources/bin/run-minifi.bat
new file mode 100644
index 0000000..8750af6
--- /dev/null
+++ b/minifi-framework/minifi-resources/src/main/resources/bin/run-minifi.bat
@@ -0,0 +1,47 @@
+@echo off
+rem
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements. See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+rem
+
+rem Use JAVA_HOME if it's set; otherwise, just use java
+
+if "%JAVA_HOME%" == "" goto noJavaHome
+if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
+set JAVA_EXE=%JAVA_HOME%\bin\java.exe
+goto startMiNifi
+
+:noJavaHome
+echo The JAVA_HOME environment variable is not defined correctly.
+echo Instead the PATH will be used to find the java executable.
+echo.
+set JAVA_EXE=java
+goto startMiNifi
+
+:startMiNifi
+set MiNIFI_ROOT=%~dp0..\
+pushd "%MiNIFI_ROOT%"
+set LIB_DIR=lib\bootstrap
+set CONF_DIR=conf
+
+set BOOTSTRAP_CONF_FILE=%CONF_DIR%\bootstrap.conf
+set JAVA_ARGS=-Dorg.apache.nifi.minifi.bootstrap.config.file=%BOOTSTRAP_CONF_FILE%
+
+SET JAVA_PARAMS=-cp %CONF_DIR%;%LIB_DIR%\* -Xms12m -Xmx24m %JAVA_ARGS% org.apache.nifi.minifi.bootstrap.RunMiNiFi
+set BOOTSTRAP_ACTION=run
+
+cmd.exe /C "%JAVA_EXE%" %JAVA_PARAMS% %BOOTSTRAP_ACTION%
+
+popd
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/bf22d35e/minifi-framework/minifi-resources/src/main/resources/bin/status-minifi.bat
----------------------------------------------------------------------
diff --git a/minifi-framework/minifi-resources/src/main/resources/bin/status-minifi.bat b/minifi-framework/minifi-resources/src/main/resources/bin/status-minifi.bat
new file mode 100644
index 0000000..8551baa
--- /dev/null
+++ b/minifi-framework/minifi-resources/src/main/resources/bin/status-minifi.bat
@@ -0,0 +1,47 @@
+@echo off
+rem
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements. See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+rem
+
+rem Use JAVA_HOME if it's set; otherwise, just use java
+
+if "%JAVA_HOME%" == "" goto noJavaHome
+if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
+set JAVA_EXE=%JAVA_HOME%\bin\java.exe
+goto startMiNifi
+
+:noJavaHome
+echo The JAVA_HOME environment variable is not defined correctly.
+echo Instead the PATH will be used to find the java executable.
+echo.
+set JAVA_EXE=java
+goto startMiNifi
+
+:startMiNifi
+set MINIFI_ROOT=%~dp0..\
+pushd "%MINIFI_ROOT%"
+set LIB_DIR=lib\bootstrap
+set CONF_DIR=conf
+
+set BOOTSTRAP_CONF_FILE=%CONF_DIR%\bootstrap.conf
+set JAVA_ARGS=-Dorg.apache.nifi.minifi.bootstrap.config.file=%BOOTSTRAP_CONF_FILE%
+
+set JAVA_PARAMS=-cp %LIB_DIR%\* -Xms12m -Xmx24m %JAVA_ARGS% org.apache.nifi.minifi.bootstrap.RunNiFiMi
+set BOOTSTRAP_ACTION=status
+
+cmd.exe /C "%JAVA_EXE%" %JAVA_PARAMS% %BOOTSTRAP_ACTION%
+
+popd
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/bf22d35e/minifi-framework/minifi-resources/src/main/resources/conf/bootstrap.conf
----------------------------------------------------------------------
diff --git a/minifi-framework/minifi-resources/src/main/resources/conf/bootstrap.conf b/minifi-framework/minifi-resources/src/main/resources/conf/bootstrap.conf
new file mode 100644
index 0000000..5e676ff
--- /dev/null
+++ b/minifi-framework/minifi-resources/src/main/resources/conf/bootstrap.conf
@@ -0,0 +1,60 @@
+#
+# 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.
+#
+
+# Java command to use when running MiNiFi
+java=java
+
+# Username to use when running MiNiFi. This value will be ignored on Windows.
+run.as=${minifi.run.as}
+
+# Configure where MiNiFi's lib and conf directories live
+lib.dir=./lib
+conf.dir=./conf
+
+# How long to wait after telling MiNiFi to shutdown before explicitly killing the Process
+graceful.shutdown.seconds=20
+
+# Disable JSR 199 so that we can use JSP's without running a JDK
+java.arg.1=-Dorg.apache.jasper.compiler.disablejsr199=true
+
+# JVM memory settings
+java.arg.2=-Xms${minifi.jvm.heap.mb}m
+java.arg.3=-Xmx${minifi.jvm.heap.mb}m
+
+# Enable Remote Debugging
+#java.arg.debug=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000
+
+java.arg.4=-Djava.net.preferIPv4Stack=true
+
+# allowRestrictedHeaders is required for Cluster/Node communications to work properly
+java.arg.5=-Dsun.net.http.allowRestrictedHeaders=true
+java.arg.6=-Djava.protocol.handler.pkgs=sun.net.www.protocol
+
+# Java 7 and below have issues with Code Cache. The following lines allow us to run well even with
+# many classes loaded in the JVM.
+#java.arg.7=-XX:ReservedCodeCacheSize=256m
+#java.arg.8=-XX:CodeCacheFlushingMinimumFreeSpace=10m
+#java.arg.9=-XX:+UseCodeCacheFlushing
+#java.arg.11=-XX:PermSize=${minifi.jvm.permgen.mb}M
+#java.arg.12=-XX:MaxPermSize=${minifi.jvm.permgen.mb}M
+
+# The G1GC is still considered experimental but has proven to be very advantageous in providing great
+# performance without significant "stop-the-world" delays.
+#java.arg.13=-XX:+UseG1GC
+
+#Set headless mode by default
+java.arg.14=-Djava.awt.headless=true
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/bf22d35e/minifi-framework/minifi-resources/src/main/resources/conf/logback.xml
----------------------------------------------------------------------
diff --git a/minifi-framework/minifi-resources/src/main/resources/conf/logback.xml b/minifi-framework/minifi-resources/src/main/resources/conf/logback.xml
new file mode 100644
index 0000000..8ea2809
--- /dev/null
+++ b/minifi-framework/minifi-resources/src/main/resources/conf/logback.xml
@@ -0,0 +1,156 @@
+<?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.
+-->
+
+<configuration scan="true" scanPeriod="30 seconds">
+ <contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
+ <resetJUL>true</resetJUL>
+ </contextListener>
+
+ <appender name="APP_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>logs/nifi-app.log</file>
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <!--
+ For daily rollover, use 'app_%d.log'.
+ For hourly rollover, use 'app_%d{yyyy-MM-dd_HH}.log'.
+ To GZIP rolled files, replace '.log' with '.log.gz'.
+ To ZIP rolled files, replace '.log' with '.log.zip'.
+ -->
+ <fileNamePattern>./logs/nifi-app_%d{yyyy-MM-dd_HH}.%i.log</fileNamePattern>
+ <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+ <maxFileSize>100MB</maxFileSize>
+ </timeBasedFileNamingAndTriggeringPolicy>
+ <!-- keep 30 log files worth of history -->
+ <maxHistory>30</maxHistory>
+ </rollingPolicy>
+ <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+ <pattern>%date %level [%thread] %logger{40} %msg%n</pattern>
+ <immediateFlush>true</immediateFlush>
+ </encoder>
+ </appender>
+
+ <appender name="USER_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>logs/nifi-user.log</file>
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <!--
+ For daily rollover, use 'user_%d.log'.
+ For hourly rollover, use 'user_%d{yyyy-MM-dd_HH}.log'.
+ To GZIP rolled files, replace '.log' with '.log.gz'.
+ To ZIP rolled files, replace '.log' with '.log.zip'.
+ -->
+ <fileNamePattern>./logs/nifi-user_%d.log</fileNamePattern>
+ <!-- keep 30 log files worth of history -->
+ <maxHistory>30</maxHistory>
+ </rollingPolicy>
+ <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+ <pattern>%date %level [%thread] %logger{40} %msg%n</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="BOOTSTRAP_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>logs/nifi-bootstrap.log</file>
+ <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+ <!--
+ For daily rollover, use 'user_%d.log'.
+ For hourly rollover, use 'user_%d{yyyy-MM-dd_HH}.log'.
+ To GZIP rolled files, replace '.log' with '.log.gz'.
+ To ZIP rolled files, replace '.log' with '.log.zip'.
+ -->
+ <fileNamePattern>./logs/nifi-bootstrap_%d.log</fileNamePattern>
+ <!-- keep 5 log files worth of history -->
+ <maxHistory>5</maxHistory>
+ </rollingPolicy>
+ <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+ <pattern>%date %level [%thread] %logger{40} %msg%n</pattern>
+ </encoder>
+ </appender>
+
+ <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
+ <pattern>%date %level [%thread] %logger{40} %msg%n</pattern>
+ </encoder>
+ </appender>
+
+ <!-- valid logging levels: TRACE, DEBUG, INFO, WARN, ERROR -->
+
+ <logger name="org.apache.nifi" level="INFO"/>
+ <logger name="org.apache.nifi.minifi.controller.repository.StandardProcessSession" level="WARN" />
+
+ <!-- Logger for managing logging statements for nifi clusters. -->
+ <logger name="org.apache.nifi.minifi.cluster" level="INFO"/>
+
+ <!-- Logger for logging HTTP requests received by the web server. -->
+ <logger name="org.apache.nifi.minifi.server.JettyServer" level="INFO"/>
+
+ <!-- Logger for managing logging statements for jetty -->
+ <logger name="org.eclipse.jetty" level="INFO"/>
+
+ <!-- Suppress non-error messages due to excessive logging by class or library -->
+ <logger name="com.sun.jersey.spi.container.servlet.WebComponent" level="ERROR"/>
+ <logger name="com.sun.jersey.spi.spring" level="ERROR"/>
+ <logger name="org.springframework" level="ERROR"/>
+
+ <!-- Suppress non-error messages due to known warning about redundant path annotation (NIFI-574) -->
+ <logger name="com.sun.jersey.spi.inject.Errors" level="ERROR"/>
+
+ <!--
+ Logger for capturing user events. We do not want to propagate these
+ log events to the root logger. These messages are only sent to the
+ user-log appender.
+ -->
+ <logger name="org.apache.nifi.minifi.web.security" level="INFO" additivity="false">
+ <appender-ref ref="USER_FILE"/>
+ </logger>
+ <logger name="org.apache.nifi.minifi.web.api.config" level="INFO" additivity="false">
+ <appender-ref ref="USER_FILE"/>
+ </logger>
+ <logger name="org.apache.nifi.minifi.authorization" level="INFO" additivity="false">
+ <appender-ref ref="USER_FILE"/>
+ </logger>
+ <logger name="org.apache.nifi.minifi.cluster.authorization" level="INFO" additivity="false">
+ <appender-ref ref="USER_FILE"/>
+ </logger>
+ <logger name="org.apache.nifi.minifi.web.filter.RequestLogger" level="INFO" additivity="false">
+ <appender-ref ref="USER_FILE"/>
+ </logger>
+
+
+ <!--
+ Logger for capturing Bootstrap logs and MiNiFi's standard error and standard out.
+ -->
+ <logger name="org.apache.nifi.minifi.bootstrap" level="INFO" additivity="false">
+ <appender-ref ref="BOOTSTRAP_FILE" />
+ </logger>
+ <logger name="org.apache.nifi.minifi.bootstrap.Command" level="INFO" additivity="false">
+ <appender-ref ref="CONSOLE" />
+ <appender-ref ref="BOOTSTRAP_FILE" />
+ </logger>
+
+ <!-- Everything written to MiNiFi's Standard Out will be logged with the logger org.apache.nifi.minifi.StdOut at INFO level -->
+ <logger name="org.apache.nifi.minifi.StdOut" level="INFO" additivity="false">
+ <appender-ref ref="BOOTSTRAP_FILE" />
+ </logger>
+
+ <!-- Everything written to MiNiFi's Standard Error will be logged with the logger org.apache.nifi.minifi.StdErr at ERROR level -->
+ <logger name="org.apache.nifi.minifi.StdErr" level="ERROR" additivity="false">
+ <appender-ref ref="BOOTSTRAP_FILE" />
+ </logger>
+
+
+ <root level="INFO">
+ <appender-ref ref="APP_FILE"/>
+ </root>
+
+</configuration>
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/bf22d35e/minifi-framework/pom.xml
----------------------------------------------------------------------
diff --git a/minifi-framework/pom.xml b/minifi-framework/pom.xml
index af17b77..c602931 100644
--- a/minifi-framework/pom.xml
+++ b/minifi-framework/pom.xml
@@ -25,6 +25,10 @@ limitations under the License.
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>minifi-framework</artifactId>
- <packaging>jar</packaging>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>minifi-resources</module>
+ </modules>
</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/nifi-minifi/blob/bf22d35e/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index d794334..432407c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -96,10 +96,32 @@ limitations under the License.
<dependencyManagement>
<dependencies>
+ <dependency>
+ <groupId>org.apache.nifi.minifi</groupId>
+ <artifactId>minifi-bootstrap</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.nifi.minifi</groupId>
+ <artifactId>minifi-api</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.nifi.minifi</groupId>
+ <artifactId>minifi-framework</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.nifi.minifi</groupId>
+ <artifactId>minifi-resources</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </dependency>
</dependencies>
</dependencyManagement>
+
<dependencies>
</dependencies>
+
<build>
<pluginManagement>
<plugins>