nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marka...@apache.org
Subject [02/10] incubator-nifi git commit: NIFI-272: minor tweaks to archetype to be more consistent with existing poms and java code style
Date Fri, 23 Jan 2015 19:00:12 GMT
NIFI-272: minor tweaks to archetype to be more consistent with existing poms and java code
style


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

Branch: refs/heads/develop
Commit: a0b70fa9c62319670fbb9bb56267e5cbce780bf6
Parents: db2072e
Author: Mark Payne <markap14@hotmail.com>
Authored: Thu Jan 22 10:18:55 2015 -0500
Committer: Mark Payne <markap14@hotmail.com>
Committed: Thu Jan 22 10:18:55 2015 -0500

----------------------------------------------------------------------
 .../nifi-__rootArtifactId__-nar/pom.xml                 |  2 --
 .../nifi-__rootArtifactId__-processors/pom.xml          |  7 -------
 .../java/org/apache/nifi/processors/MyProcessor.java    | 12 +++++++++---
 .../src/main/resources/archetype-resources/pom.xml      |  7 -------
 4 files changed, 9 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a0b70fa9/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
index 5987ff2..fb146f1 100644
--- 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
@@ -26,8 +26,6 @@
     <version>${version}</version>
     <packaging>nar</packaging>
 
-    <name>${artifactId}</name>
-
     <dependencies>
         <dependency>
             <groupId>${groupId}</groupId>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a0b70fa9/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
index 48c42c8..06d346d 100644
--- 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
@@ -25,13 +25,6 @@
     <artifactId>${artifactId}</artifactId>
     <packaging>jar</packaging>
 
-    <name>${artifactId}</name>
-    <url>http://maven.apache.org</url>
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    </properties>
-
     <dependencies>
         <dependency>
             <groupId>org.apache.nifi</groupId>

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a0b70fa9/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
index 8832c2e..c3e3bf6 100644
--- 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
@@ -18,6 +18,7 @@ package org.apache.nifi.processors;
 
 import org.apache.nifi.components.PropertyDescriptor;
 import org.apache.nifi.components.PropertyValue;
+import org.apache.nifi.flowfile.FlowFile;
 import org.apache.nifi.processor.*;
 import org.apache.nifi.processor.annotation.CapabilityDescription;
 import org.apache.nifi.processor.annotation.OnScheduled;
@@ -48,7 +49,7 @@ public class MyProcessor extends AbstractProcessor {
     private Set<Relationship> relationships;
 
     @Override
-    protected void init(ProcessorInitializationContext context) {
+    protected void init(final ProcessorInitializationContext context) {
         final List<PropertyDescriptor> descriptors = new ArrayList<PropertyDescriptor>();
         descriptors.add(MY_PROPERTY);
         this.descriptors = Collections.unmodifiableList(descriptors);
@@ -74,9 +75,14 @@ public class MyProcessor extends AbstractProcessor {
     }
 
     @Override
-    public void onTrigger(ProcessContext context, ProcessSession session) throws ProcessException
{
-        PropertyValue propertyValue = context.getProperty(MY_PROPERTY);
+    public void onTrigger(final ProcessContext context, final ProcessSession session) throws
ProcessException {
+		FlowFile flowFile = session.get();
+		if ( flowFile == null ) {
+			return;
+		}
+		
         // TODO implement
+		
     }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/a0b70fa9/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
index dfa7f3a..014a4e1 100644
--- 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
@@ -27,13 +27,6 @@
     <version>${version}</version>
     <packaging>pom</packaging>
 
-    <name>nifi-${artifactId}-bundle</name>
-    <url>http://maven.apache.org</url>
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    </properties>
-
     <modules>
         <module>nifi-${rootArtifactId}-processors</module>
         <module>nifi-${rootArtifactId}-nar</module>


Mime
View raw message