Repository: nifi
Updated Branches:
  refs/heads/NIFI-964 00375ced2 -> b9cff5d24 (forced update)


NIFI-964 Creating pcap bundle and updating poms
- Initial implementation of GetPcap processor
- Cleaning up code from review


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/b9cff5d2
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/b9cff5d2
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/b9cff5d2

Branch: refs/heads/NIFI-964
Commit: b9cff5d24dd4d0edc723c5a63f5db64a03a9890b
Parents: b36841e
Author: Bryan Bende <[email protected]>
Authored: Wed Sep 16 10:55:59 2015 -0400
Committer: Bryan Bende <[email protected]>
Committed: Wed Sep 16 15:56:28 2015 -0400

----------------------------------------------------------------------
 nifi-assembly/pom.xml                           |   5 +
 .../nifi-pcap-bundle/nifi-pcap-nar/pom.xml      |  37 +++
 .../nifi-pcap-processors/pom.xml                |  64 +++++
 .../apache/nifi/processors/pcap/GetPcap.java    | 243 +++++++++++++++++++
 .../org.apache.nifi.processor.Processor         |  15 ++
 .../nifi/processors/pcap/TestGetPcap.java       |  39 +++
 nifi-nar-bundles/nifi-pcap-bundle/pom.xml       |  35 +++
 nifi-nar-bundles/pom.xml                        |   5 +-
 pom.xml                                         |   6 +
 9 files changed, 447 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/b9cff5d2/nifi-assembly/pom.xml
----------------------------------------------------------------------
diff --git a/nifi-assembly/pom.xml b/nifi-assembly/pom.xml
index 3b42802..1d406b4 100644
--- a/nifi-assembly/pom.xml
+++ b/nifi-assembly/pom.xml
@@ -227,6 +227,11 @@ language governing permissions and limitations under the 
License. -->
             <artifactId>nifi-image-nar</artifactId>
             <type>nar</type>
         </dependency>
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-pcap-nar</artifactId>
+            <type>nar</type>
+        </dependency>
     </dependencies>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/nifi/blob/b9cff5d2/nifi-nar-bundles/nifi-pcap-bundle/nifi-pcap-nar/pom.xml
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-pcap-bundle/nifi-pcap-nar/pom.xml 
b/nifi-nar-bundles/nifi-pcap-bundle/nifi-pcap-nar/pom.xml
new file mode 100644
index 0000000..ac78399
--- /dev/null
+++ b/nifi-nar-bundles/nifi-pcap-bundle/nifi-pcap-nar/pom.xml
@@ -0,0 +1,37 @@
+<?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/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.nifi</groupId>
+        <artifactId>nifi-pcap-bundle</artifactId>
+        <version>0.3.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>nifi-pcap-nar</artifactId>
+    <version>0.3.0-SNAPSHOT</version>
+    <packaging>nar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-pcap-processors</artifactId>
+            <version>0.3.0-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
+
+</project>

http://git-wip-us.apache.org/repos/asf/nifi/blob/b9cff5d2/nifi-nar-bundles/nifi-pcap-bundle/nifi-pcap-processors/pom.xml
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-pcap-bundle/nifi-pcap-processors/pom.xml 
b/nifi-nar-bundles/nifi-pcap-bundle/nifi-pcap-processors/pom.xml
new file mode 100644
index 0000000..0907b98
--- /dev/null
+++ b/nifi-nar-bundles/nifi-pcap-bundle/nifi-pcap-processors/pom.xml
@@ -0,0 +1,64 @@
+<?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/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.nifi</groupId>
+        <artifactId>nifi-pcap-bundle</artifactId>
+        <version>0.3.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>nifi-pcap-processors</artifactId>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.pcap4j</groupId>
+            <artifactId>pcap4j-core</artifactId>
+            <version>1.6.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.pcap4j</groupId>
+            <artifactId>pcap4j-packetfactory-static</artifactId>
+            <version>1.6.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-processor-utils</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.nifi</groupId>
+            <artifactId>nifi-mock</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-simple</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.11</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/nifi/blob/b9cff5d2/nifi-nar-bundles/nifi-pcap-bundle/nifi-pcap-processors/src/main/java/org/apache/nifi/processors/pcap/GetPcap.java
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-pcap-bundle/nifi-pcap-processors/src/main/java/org/apache/nifi/processors/pcap/GetPcap.java
 
b/nifi-nar-bundles/nifi-pcap-bundle/nifi-pcap-processors/src/main/java/org/apache/nifi/processors/pcap/GetPcap.java
new file mode 100644
index 0000000..d0d35b9
--- /dev/null
+++ 
b/nifi-nar-bundles/nifi-pcap-bundle/nifi-pcap-processors/src/main/java/org/apache/nifi/processors/pcap/GetPcap.java
@@ -0,0 +1,243 @@
+/*
+ * 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.
+ */
+package org.apache.nifi.processors.pcap;
+
+import org.apache.nifi.annotation.behavior.WritesAttribute;
+import org.apache.nifi.annotation.behavior.WritesAttributes;
+import org.apache.nifi.annotation.documentation.CapabilityDescription;
+import org.apache.nifi.annotation.documentation.Tags;
+import org.apache.nifi.annotation.lifecycle.OnScheduled;
+import org.apache.nifi.annotation.lifecycle.OnUnscheduled;
+import org.apache.nifi.components.AllowableValue;
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.flowfile.FlowFile;
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.DataUnit;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.ProcessorInitializationContext;
+import org.apache.nifi.processor.Relationship;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processor.io.OutputStreamCallback;
+import org.apache.nifi.processor.util.StandardValidators;
+import org.pcap4j.core.BpfProgram;
+import org.pcap4j.core.NotOpenException;
+import org.pcap4j.core.PacketListener;
+import org.pcap4j.core.PcapHandle;
+import org.pcap4j.core.PcapNativeException;
+import org.pcap4j.core.PcapNetworkInterface;
+import org.pcap4j.core.Pcaps;
+import org.pcap4j.packet.Packet;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicReference;
+
+@Tags({"pcap", "packet", "network"})
+@CapabilityDescription("Uses the pcap4j library to capture packets for a given 
network interface. Each packet is emitted as " +
+        "a single FlowFile, with the content of the FlowFile being the payload 
of the packet. It is expected that libpcap is " +
+        "already installed on the host operating system prior to using this 
processor, and on some operating systems it may " +
+        "require running NiFi as root in order for libpcap to access the 
network interfaces. In some cases it may also be " +
+        "necessary to specify the native libpcap filename through the pcap4j 
property: org.pcap4j.core.pcapLibName." +
+        "Consult the pcap4j documentation for further information.")
+@WritesAttributes({@WritesAttribute(attribute="packet.header", 
description="The header of the given packet")})
+public class GetPcap extends AbstractProcessor {
+
+    public static final PropertyDescriptor INTERFACE_NAME = new 
PropertyDescriptor
+            .Builder().name("Interface Name")
+            .description("The name of the interface to capture from (ex: en0)")
+            .required(true)
+            .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
+            .build();
+
+    public static final PropertyDescriptor BPF_EXPRESSION = new 
PropertyDescriptor
+            .Builder().name("BPF Expression")
+            .description("A Berkeley Packet Filter expression used to filter 
packets (ex: icmp)")
+            .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
+            .build();
+
+    public static final PropertyDescriptor SNAPSHOT_LENGTH = new 
PropertyDescriptor
+            .Builder().name("Snapshot Length")
+            .description("The amount of data in bytes to capture for each 
packet.")
+            .required(true)
+            .addValidator(StandardValidators.DATA_SIZE_VALIDATOR)
+            .defaultValue("65536 B")
+            .build();
+
+    public static final PropertyDescriptor READ_TIMEOUT = new 
PropertyDescriptor
+            .Builder().name("Read Timeout")
+            .description("The read timeout in milliseconds. Must be 
non-negative. May be ignored by some OSs. " +
+                    "0 means disable buffering on Solaris. 0 means infinite on 
the other OSs. 1 through 9 means infinite on Solaris.")
+            .required(true)
+            .addValidator(StandardValidators.TIME_PERIOD_VALIDATOR)
+            .defaultValue("10 ms")
+            .build();
+
+    public static final AllowableValue PROMISCUOUS_MODE_VALUE = new 
AllowableValue("PROMISCUOUS", "Promiscuous");
+    public static final AllowableValue NON_PROMISCUOUS_MODE_VALUE = new 
AllowableValue("NONPROMISCUOUS", "Non-Promiscuous");
+
+    public static final PropertyDescriptor CAPTURE_MODE = new 
PropertyDescriptor
+            .Builder().name("Capture Mode")
+            .description("The capture mode.")
+            .required(true)
+            .allowableValues(PROMISCUOUS_MODE_VALUE, 
NON_PROMISCUOUS_MODE_VALUE)
+            .defaultValue(PROMISCUOUS_MODE_VALUE.getValue())
+            .build();
+
+    public static final Relationship SUCCESS = new Relationship.Builder()
+            .name("success")
+            .description("Successful captures are route out this relationship")
+            .build();
+
+    public static final String PACKET_HEADER_ATTR = "packet.header";
+
+    private List<PropertyDescriptor> descriptors;
+    private Set<Relationship> relationships;
+
+    private AtomicReference<PcapNetworkInterface> pcapNetworkInterface = new 
AtomicReference<>(null);
+    private AtomicReference<PcapHandle> pcapHandle = new 
AtomicReference<>(null);
+    private final BlockingQueue<Packet> packetQueue = new 
LinkedBlockingQueue<>(100);
+
+    @Override
+    protected void init(final ProcessorInitializationContext context) {
+        final List<PropertyDescriptor> descriptors = new ArrayList<>();
+        descriptors.add(INTERFACE_NAME);
+        descriptors.add(BPF_EXPRESSION);
+        descriptors.add(SNAPSHOT_LENGTH);
+        descriptors.add(READ_TIMEOUT);
+        descriptors.add(CAPTURE_MODE);
+        this.descriptors = Collections.unmodifiableList(descriptors);
+
+        final Set<Relationship> relationships = new HashSet<>();
+        relationships.add(SUCCESS);
+        this.relationships = Collections.unmodifiableSet(relationships);
+    }
+
+    @Override
+    public Set<Relationship> getRelationships() {
+        return this.relationships;
+    }
+
+    @Override
+    public final List<PropertyDescriptor> getSupportedPropertyDescriptors() {
+        return descriptors;
+    }
+
+    @OnScheduled
+    public void onScheduled(final ProcessContext context) throws 
PcapNativeException, NotOpenException {
+        final String interfaceName = 
context.getProperty(INTERFACE_NAME).getValue();
+        final String filter = context.getProperty(BPF_EXPRESSION).getValue();
+        final String mode = context.getProperty(CAPTURE_MODE).getValue();
+        final int snapLen = 
context.getProperty(SNAPSHOT_LENGTH).asDataSize(DataUnit.B).intValue();
+        final int readTimeout = 
context.getProperty(READ_TIMEOUT).asTimePeriod(TimeUnit.MILLISECONDS).intValue();
+
+        final PcapNetworkInterface nif = Pcaps.getDevByName(interfaceName);
+        if (nif == null) {
+            throw new IllegalStateException("Unable to locate Network 
Interface " + interfaceName);
+        }
+
+        final PcapHandle handle = nif.openLive(snapLen, 
PcapNetworkInterface.PromiscuousMode.valueOf(mode), readTimeout);
+        if (filter != null && filter.length() > 0) {
+            handle.setFilter(filter, BpfProgram.BpfCompileMode.OPTIMIZE);
+        }
+
+        final Thread listenerThread = new Thread(new Runnable() {
+            @Override
+            public void run() {
+                try {
+                    handle.loop(-1, new PacketListener() {
+                        @Override
+                        public void gotPacket(Packet packet) {
+                            packetQueue.offer(packet);
+                        }
+                    });
+                    getLogger().info("PcapListener shutting down...");
+                } catch (PcapNativeException e) {
+                    getLogger().error("Error calling pcap native libraries", 
e);
+                } catch (NotOpenException e) {
+                    getLogger().error("Pcap handle was not open", e);
+                } catch (InterruptedException e) {
+                    getLogger().info("PcapListener interrupted");
+                } catch (Exception e) {
+                    getLogger().error("Unexpected error in PcapListener", e);
+                }
+            }
+        });
+        listenerThread.setDaemon(true);
+        listenerThread.setName("PcapListener-" + getIdentifier());
+        listenerThread.start();
+
+        pcapNetworkInterface.set(nif);
+        pcapHandle.set(handle);
+    }
+
+    @OnUnscheduled
+    public void onUnscheduled() {
+        final PcapHandle handle = pcapHandle.get();
+        if (handle != null) {
+            try {
+                getLogger().debug("Breaking pcap loop...");
+                handle.breakLoop();
+            } catch (NotOpenException e) {
+                getLogger().warn("Pcap handle was not open: {}", new 
Object[]{e.getMessage()});
+            } finally {
+                getLogger().debug("Closing pcap Handle...");
+                handle.close();
+            }
+        }
+    }
+
+    @Override
+    public void onPropertyModified(PropertyDescriptor descriptor, String 
oldValue, String newValue) {
+        packetQueue.clear(); // clear any queued packets as they may no longer 
be valid after properties have been changed
+    }
+
+    @Override
+    public void onTrigger(final ProcessContext context, final ProcessSession 
session) throws ProcessException {
+        final Packet packet = packetQueue.poll();
+        if (packet == null) {
+            return;
+        }
+
+        try {
+            FlowFile flowFile = session.create();
+            flowFile = session.putAttribute(flowFile, PACKET_HEADER_ATTR, 
packet.getHeader().toString());
+            flowFile = session.write(flowFile, new OutputStreamCallback() {
+                @Override
+                public void process(OutputStream out) throws IOException {
+                    out.write(packet.getRawData());
+                    out.flush();
+                }
+            });
+
+            getLogger().info("Transferring {} to success", new 
Object[]{flowFile});
+            session.transfer(flowFile, SUCCESS);
+        } catch (ProcessException pe) {
+            getLogger().error("Error processing packet", pe);
+            packetQueue.offer(packet); // requeue the packet so we try again
+        }
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/nifi/blob/b9cff5d2/nifi-nar-bundles/nifi-pcap-bundle/nifi-pcap-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-pcap-bundle/nifi-pcap-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor
 
b/nifi-nar-bundles/nifi-pcap-bundle/nifi-pcap-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor
new file mode 100644
index 0000000..4f28c0b
--- /dev/null
+++ 
b/nifi-nar-bundles/nifi-pcap-bundle/nifi-pcap-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor
@@ -0,0 +1,15 @@
+# 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.
+org.apache.nifi.processors.pcap.GetPcap
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/nifi/blob/b9cff5d2/nifi-nar-bundles/nifi-pcap-bundle/nifi-pcap-processors/src/test/java/org/apache/nifi/processors/pcap/TestGetPcap.java
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-pcap-bundle/nifi-pcap-processors/src/test/java/org/apache/nifi/processors/pcap/TestGetPcap.java
 
b/nifi-nar-bundles/nifi-pcap-bundle/nifi-pcap-processors/src/test/java/org/apache/nifi/processors/pcap/TestGetPcap.java
new file mode 100644
index 0000000..752122b
--- /dev/null
+++ 
b/nifi-nar-bundles/nifi-pcap-bundle/nifi-pcap-processors/src/test/java/org/apache/nifi/processors/pcap/TestGetPcap.java
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ */
+package org.apache.nifi.processors.pcap;
+
+import org.apache.nifi.util.TestRunner;
+import org.apache.nifi.util.TestRunners;
+import org.junit.Before;
+import org.junit.Test;
+
+
+public class TestGetPcap {
+
+    private TestRunner testRunner;
+
+    @Before
+    public void init() {
+        testRunner = TestRunners.newTestRunner(GetPcap.class);
+    }
+
+    @Test
+    public void testProcessor() {
+
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/nifi/blob/b9cff5d2/nifi-nar-bundles/nifi-pcap-bundle/pom.xml
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-pcap-bundle/pom.xml 
b/nifi-nar-bundles/nifi-pcap-bundle/pom.xml
new file mode 100644
index 0000000..30d9d09
--- /dev/null
+++ b/nifi-nar-bundles/nifi-pcap-bundle/pom.xml
@@ -0,0 +1,35 @@
+<?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/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.nifi</groupId>
+        <artifactId>nifi-nar-bundles</artifactId>
+        <version>0.3.0-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.apache.nifi</groupId>
+    <artifactId>nifi-pcap-bundle</artifactId>
+    <version>0.3.0-SNAPSHOT</version>
+    <packaging>pom</packaging>
+
+    <modules>
+        <module>nifi-pcap-processors</module>
+        <module>nifi-pcap-nar</module>
+    </modules>
+
+</project>

http://git-wip-us.apache.org/repos/asf/nifi/blob/b9cff5d2/nifi-nar-bundles/pom.xml
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/pom.xml b/nifi-nar-bundles/pom.xml
index 4d9edbf..18c105e 100644
--- a/nifi-nar-bundles/pom.xml
+++ b/nifi-nar-bundles/pom.xml
@@ -45,7 +45,8 @@
         <module>nifi-ambari-bundle</module>
         <module>nifi-image-bundle</module>
         <module>nifi-avro-bundle</module>
-    </modules>
+        <module>nifi-pcap-bundle</module>
+  </modules>
     <dependencyManagement>
         <dependencies>
             <dependency>
@@ -130,4 +131,4 @@
             </dependency>
         </dependencies>
     </dependencyManagement>
-</project>
+</project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/nifi/blob/b9cff5d2/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index e4abdf2..59aa982 100644
--- a/pom.xml
+++ b/pom.xml
@@ -909,6 +909,12 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.nifi</groupId>
+                <artifactId>nifi-pcap-nar</artifactId>
+                <version>0.3.0-SNAPSHOT</version>
+                <type>nar</type>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.nifi</groupId>
                 <artifactId>nifi-properties</artifactId>
                 <version>0.3.0-SNAPSHOT</version>
             </dependency>

Reply via email to