Return-Path: X-Original-To: apmail-nifi-commits-archive@minotaur.apache.org Delivered-To: apmail-nifi-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4EE1E1054D for ; Fri, 23 Jan 2015 19:00:43 +0000 (UTC) Received: (qmail 16942 invoked by uid 500); 23 Jan 2015 19:00:43 -0000 Delivered-To: apmail-nifi-commits-archive@nifi.apache.org Received: (qmail 16843 invoked by uid 500); 23 Jan 2015 19:00:43 -0000 Mailing-List: contact commits-help@nifi.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.incubator.apache.org Delivered-To: mailing list commits@nifi.incubator.apache.org Received: (qmail 16713 invoked by uid 99); 23 Jan 2015 19:00:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Jan 2015 19:00:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 23 Jan 2015 19:00:40 +0000 Received: (qmail 15211 invoked by uid 99); 23 Jan 2015 19:00:20 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Jan 2015 19:00:20 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 40EBEE0DD7; Fri, 23 Jan 2015 19:00:11 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: markap14@apache.org To: commits@nifi.incubator.apache.org Date: Fri, 23 Jan 2015 19:00:11 -0000 Message-Id: <8df8fb0c587d4f239c9355db7dd2a6c1@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [01/10] incubator-nifi git commit: Creating the nifi-maven-archetypes module and adding the nifi-processor-bundle-archetype. X-Virus-Checked: Checked by ClamAV on apache.org Repository: incubator-nifi Updated Branches: refs/heads/develop 8ee676212 -> c4dffe2ab Creating the nifi-maven-archetypes module and adding the nifi-processor-bundle-archetype. Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/db2072ed Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/db2072ed Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/db2072ed Branch: refs/heads/develop Commit: db2072ed8aa46bd8d157fe13387558f9ff7e44df Parents: cff8b0d Author: bbende Authored: Thu Jan 22 08:53:23 2015 -0500 Committer: bbende Committed: Thu Jan 22 08:53:23 2015 -0500 ---------------------------------------------------------------------- .../nifi-processor-bundle-archetype/pom.xml | 26 ++++++ .../META-INF/maven/archetype-metadata.xml | 54 +++++++++++ .../nifi-__rootArtifactId__-nar/pom.xml | 39 ++++++++ .../nifi-__rootArtifactId__-processors/pom.xml | 61 +++++++++++++ .../org/apache/nifi/processors/MyProcessor.java | 82 +++++++++++++++++ .../org.apache.nifi.processor.Processor | 15 +++ .../index.html | 96 ++++++++++++++++++++ .../apache/nifi/processors/MyProcessorTest.java | 39 ++++++++ .../main/resources/archetype-resources/pom.xml | 42 +++++++++ nifi/nifi-maven-archetypes/pom.xml | 30 ++++++ nifi/pom.xml | 1 + 11 files changed, 485 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/db2072ed/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/pom.xml ---------------------------------------------------------------------- diff --git a/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/pom.xml b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/pom.xml new file mode 100644 index 0000000..687536a --- /dev/null +++ b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/pom.xml @@ -0,0 +1,26 @@ + + + + 4.0.0 + + org.apache.nifi + nifi-maven-archetypes + 0.0.1-incubating-SNAPSHOT + + nifi-processor-bundle-archetype + http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/db2072ed/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml ---------------------------------------------------------------------- diff --git a/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000..471780b --- /dev/null +++ b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,54 @@ + + + + + + 0.0.1-incubating-SNAPSHOT + + + + + + + src/main/java + + **/*.java + + + + src/main/resources + + **/*.Processor + **/index.html + + + + src/test/java + + **/*.java + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/db2072ed/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__rootArtifactId__-nar/pom.xml ---------------------------------------------------------------------- diff --git a/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__rootArtifactId__-nar/pom.xml b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__rootArtifactId__-nar/pom.xml new file mode 100644 index 0000000..5987ff2 --- /dev/null +++ b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__rootArtifactId__-nar/pom.xml @@ -0,0 +1,39 @@ + + + + 4.0.0 + + + ${groupId} + nifi-${rootArtifactId}-bundle + ${version} + + + ${artifactId} + ${version} + nar + + ${artifactId} + + + + ${groupId} + nifi-${rootArtifactId}-processors + ${version} + + + + http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/db2072ed/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__rootArtifactId__-processors/pom.xml ---------------------------------------------------------------------- diff --git a/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__rootArtifactId__-processors/pom.xml b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__rootArtifactId__-processors/pom.xml new file mode 100644 index 0000000..48c42c8 --- /dev/null +++ b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__rootArtifactId__-processors/pom.xml @@ -0,0 +1,61 @@ + + + + 4.0.0 + + + ${groupId} + nifi-${rootArtifactId}-bundle + ${version} + + + ${artifactId} + jar + + ${artifactId} + http://maven.apache.org + + + UTF-8 + + + + + org.apache.nifi + nifi-api + + + org.apache.nifi + nifi-processor-utils + + + org.apache.nifi + nifi-mock + test + + + org.slf4j + slf4j-simple + test + + + junit + junit + 4.11 + test + + + http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/db2072ed/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__rootArtifactId__-processors/src/main/java/org/apache/nifi/processors/MyProcessor.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__rootArtifactId__-processors/src/main/java/org/apache/nifi/processors/MyProcessor.java b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__rootArtifactId__-processors/src/main/java/org/apache/nifi/processors/MyProcessor.java new file mode 100644 index 0000000..8832c2e --- /dev/null +++ b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__rootArtifactId__-processors/src/main/java/org/apache/nifi/processors/MyProcessor.java @@ -0,0 +1,82 @@ +/* + * 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; + +import org.apache.nifi.components.PropertyDescriptor; +import org.apache.nifi.components.PropertyValue; +import org.apache.nifi.processor.*; +import org.apache.nifi.processor.annotation.CapabilityDescription; +import org.apache.nifi.processor.annotation.OnScheduled; +import org.apache.nifi.processor.annotation.Tags; +import org.apache.nifi.processor.exception.ProcessException; +import org.apache.nifi.processor.util.StandardValidators; + +import java.util.*; + +@Tags({"example"}) +@CapabilityDescription("Provide a description") +public class MyProcessor extends AbstractProcessor { + + public static final PropertyDescriptor MY_PROPERTY = new PropertyDescriptor + .Builder().name("My Property") + .description("Example Property") + .required(true) + .addValidator(StandardValidators.NON_EMPTY_VALIDATOR) + .build(); + + public static final Relationship MY_RELATIONSHIP = new Relationship.Builder() + .name("my_relationship") + .description("Example relationship") + .build(); + + private List descriptors; + + private Set relationships; + + @Override + protected void init(ProcessorInitializationContext context) { + final List descriptors = new ArrayList(); + descriptors.add(MY_PROPERTY); + this.descriptors = Collections.unmodifiableList(descriptors); + + final Set relationships = new HashSet(); + relationships.add(MY_RELATIONSHIP); + this.relationships = Collections.unmodifiableSet(relationships); + } + + @Override + public Set getRelationships() { + return this.relationships; + } + + @Override + public final List getSupportedPropertyDescriptors() { + return descriptors; + } + + @OnScheduled + public void onScheduled(final ProcessContext context) { + + } + + @Override + public void onTrigger(ProcessContext context, ProcessSession session) throws ProcessException { + PropertyValue propertyValue = context.getProperty(MY_PROPERTY); + // TODO implement + } + +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/db2072ed/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__rootArtifactId__-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor ---------------------------------------------------------------------- diff --git a/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__rootArtifactId__-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__rootArtifactId__-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor new file mode 100644 index 0000000..aba9179 --- /dev/null +++ b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__rootArtifactId__-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.MyProcessor \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/db2072ed/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__rootArtifactId__-processors/src/main/resources/docs/org.apache.nifi.processors.MyProcessor/index.html ---------------------------------------------------------------------- diff --git a/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__rootArtifactId__-processors/src/main/resources/docs/org.apache.nifi.processors.MyProcessor/index.html b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__rootArtifactId__-processors/src/main/resources/docs/org.apache.nifi.processors.MyProcessor/index.html new file mode 100644 index 0000000..34e494f --- /dev/null +++ b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__rootArtifactId__-processors/src/main/resources/docs/org.apache.nifi.processors.MyProcessor/index.html @@ -0,0 +1,96 @@ + + + + + + GetFile + + + + + +

Description:

+ +

Replace with a description.

+ +

+ Uses Attributes: +

+ + + + + + + + + + + + + +
Attribute NameDescription
+ +

+ Modifies Attributes: +

+ + + + + + + + + + + + + +
Attribute NameDescription
+ +

+ Properties: +

+ +

In the list below, the names of required properties appear + in bold. Any other properties (not in bold) are considered optional. + If a property has a default value, it is indicated. If a property + supports the use of the NiFi Expression Language (or simply, + "expression language"), that is also indicated.

+
    +
  • My Property +
      +
    • An example property.
    • +
    • Default value: no default
    • +
    • Supports expression language: false
    • +
    +
  • +
+ +

+ Relationships: +

+
    +
  • my_relationship +
      +
    • An example relationship.
    • +
    +
  • +
+ + + http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/db2072ed/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__rootArtifactId__-processors/src/test/java/org/apache/nifi/processors/MyProcessorTest.java ---------------------------------------------------------------------- diff --git a/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__rootArtifactId__-processors/src/test/java/org/apache/nifi/processors/MyProcessorTest.java b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__rootArtifactId__-processors/src/test/java/org/apache/nifi/processors/MyProcessorTest.java new file mode 100644 index 0000000..3563502 --- /dev/null +++ b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__rootArtifactId__-processors/src/test/java/org/apache/nifi/processors/MyProcessorTest.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; + +import org.apache.nifi.util.TestRunner; +import org.apache.nifi.util.TestRunners; +import org.junit.Before; +import org.junit.Test; + + +public class MyProcessorTest { + + private TestRunner testRunner; + + @Before + public void init() { + testRunner = TestRunners.newTestRunner(MyProcessor.class); + } + + @Test + public void testProcessor() { + + } + +} http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/db2072ed/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/pom.xml ---------------------------------------------------------------------- diff --git a/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/pom.xml b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000..dfa7f3a --- /dev/null +++ b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,42 @@ + + + + 4.0.0 + + + org.apache.nifi + nifi-nar-bundles + ${nifiVersion} + + + ${groupId} + nifi-${artifactId}-bundle + ${version} + pom + + nifi-${artifactId}-bundle + http://maven.apache.org + + + UTF-8 + + + + nifi-${rootArtifactId}-processors + nifi-${rootArtifactId}-nar + + + http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/db2072ed/nifi/nifi-maven-archetypes/pom.xml ---------------------------------------------------------------------- diff --git a/nifi/nifi-maven-archetypes/pom.xml b/nifi/nifi-maven-archetypes/pom.xml new file mode 100644 index 0000000..b4ee95b --- /dev/null +++ b/nifi/nifi-maven-archetypes/pom.xml @@ -0,0 +1,30 @@ + + + + 4.0.0 + + org.apache.nifi + nifi + 0.0.1-incubating-SNAPSHOT + + org.apache.nifi + nifi-maven-archetypes + pom + + nifi-processor-bundle-archetype + + http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/db2072ed/nifi/pom.xml ---------------------------------------------------------------------- diff --git a/nifi/pom.xml b/nifi/pom.xml index 4237cc2..6742395 100644 --- a/nifi/pom.xml +++ b/nifi/pom.xml @@ -64,6 +64,7 @@ nifi-nar-bundles nifi-assembly nifi-docs + nifi-maven-archetypes scm:git:git://git.apache.org/incubator-nifi.git