You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ma...@apache.org on 2015/01/26 14:32:43 UTC
[04/18] incubator-nifi git commit: Addressing the issue of
controlling the name of the top-level directory by allowing artifactId to be
something like "nifi-XXX-bundle" and artifactBaseName to be "XXX". Also
refactored the archetype to allow the package
Addressing the issue of controlling the name of the top-level directory by allowing artifactId to be something like "nifi-XXX-bundle" and artifactBaseName to be "XXX". Also refactored the archetype to allow the package to be specified, which updates the appropriate files and directories.
Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/27f69184
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/27f69184
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/27f69184
Branch: refs/heads/annotations
Commit: 27f6918445a14f5600446ffab5eb54256f90e305
Parents: db2072e
Author: bbende <bb...@gmail.com>
Authored: Thu Jan 22 21:09:30 2015 -0500
Committer: bbende <bb...@gmail.com>
Committed: Thu Jan 22 21:09:30 2015 -0500
----------------------------------------------------------------------
.../nifi-processor-bundle-archetype/pom.xml | 23 +++++
.../META-INF/maven/archetype-metadata.xml | 56 +++++-------
.../nifi-__artifactBaseName__-nar/pom.xml | 39 ++++++++
.../pom.xml | 61 +++++++++++++
.../src/main/java/MyProcessor.java | 82 +++++++++++++++++
.../org.apache.nifi.processor.Processor | 15 +++
.../docs/__package__.MyProcessor/index.html | 96 ++++++++++++++++++++
.../src/test/java/MyProcessorTest.java | 39 ++++++++
.../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 | 8 +-
15 files changed, 380 insertions(+), 371 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/27f69184/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
index 687536a..8eb2862 100644
--- a/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/pom.xml
+++ b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/pom.xml
@@ -22,5 +22,28 @@
<artifactId>nifi-maven-archetypes</artifactId>
<version>0.0.1-incubating-SNAPSHOT</version>
</parent>
+
<artifactId>nifi-processor-bundle-archetype</artifactId>
+ <packaging>maven-archetype</packaging>
+
+ <build>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.archetype</groupId>
+ <artifactId>archetype-packaging</artifactId>
+ <version>2.2</version>
+ </extension>
+ </extensions>
+
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-archetype-plugin</artifactId>
+ <version>2.2</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
</project>
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/27f69184/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
index 471780b..5d84041 100644
--- 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
@@ -13,42 +13,28 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<archetype-descriptor name="nifi-${artifactId}-bundle">
+<archetype-descriptor name="${artifactId}">
<requiredProperties>
- <requiredProperty key="nifiVersion" >
+ <requiredProperty key="artifactBaseName" />
+ <requiredProperty key="nifiVersion" >
<defaultValue>0.0.1-incubating-SNAPSHOT</defaultValue>
</requiredProperty>
</requiredProperties>
- <modules>
- <module id="nifi-${rootArtifactId}-processors" dir="nifi-__rootArtifactId__-processors" name="nifi-${rootArtifactId}-processors">
- <fileSets>
- <fileSet filtered="true" packaged="false" encoding="UTF-8">
- <directory>src/main/java</directory>
- <includes>
- <include>**/*.java</include>
- </includes>
- </fileSet>
- <fileSet encoding="UTF-8">
- <directory>src/main/resources</directory>
- <includes>
- <include>**/*.Processor</include>
- <include>**/index.html</include>
- </includes>
- </fileSet>
- <fileSet filtered="true" packaged="false" encoding="UTF-8">
- <directory>src/test/java</directory>
- <includes>
- <include>**/*.java</include>
- </includes>
- </fileSet>
- </fileSets>
- </module>
- <module id="nifi-${rootArtifactId}-nar" dir="nifi-__rootArtifactId__-nar" name="nifi-${rootArtifactId}-nar">
- <fileSets>
- <fileSet encoding="UTF-8">
- <directory></directory>
- </fileSet>
- </fileSets>
- </module>
- </modules>
-</archetype-descriptor>
+ <fileSets>
+ <fileSet filtered="true" packaged="false" encoding="UTF-8">
+ <directory>nifi-__artifactBaseName__-processors</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </fileSet>
+ <fileSet filtered="true" packaged="true" encoding="UTF-8">
+ <directory>nifi-__artifactBaseName__-processors/src/main/java</directory>
+ </fileSet>
+ <fileSet filtered="true" packaged="true" encoding="UTF-8">
+ <directory>nifi-__artifactBaseName__-processors/src/test/java</directory>
+ </fileSet>
+ <fileSet filtered="true" packaged="false" encoding="UTF-8">
+ <directory>nifi-__artifactBaseName__-nar</directory>
+ </fileSet>
+ </fileSets>
+</archetype-descriptor>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/27f69184/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-nar/pom.xml
----------------------------------------------------------------------
diff --git a/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-nar/pom.xml b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-nar/pom.xml
new file mode 100644
index 0000000..6759c96
--- /dev/null
+++ b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-nar/pom.xml
@@ -0,0 +1,39 @@
+<?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>${groupId}</groupId>
+ <artifactId>${rootArtifactId}</artifactId>
+ <version>${version}</version>
+ </parent>
+
+ <artifactId>nifi-${artifactBaseName}-nar</artifactId>
+ <version>${version}</version>
+ <packaging>nar</packaging>
+
+ <name>nifi-${artifactBaseName}-nar</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>${groupId}</groupId>
+ <artifactId>nifi-${artifactBaseName}-processors</artifactId>
+ <version>${version}</version>
+ </dependency>
+ </dependencies>
+
+</project>
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/27f69184/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-processors/pom.xml
----------------------------------------------------------------------
diff --git a/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-processors/pom.xml b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-processors/pom.xml
new file mode 100644
index 0000000..01d6c6d
--- /dev/null
+++ b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-processors/pom.xml
@@ -0,0 +1,61 @@
+<?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>${groupId}</groupId>
+ <artifactId>${rootArtifactId}</artifactId>
+ <version>${version}</version>
+ </parent>
+
+ <artifactId>nifi-${artifactBaseName}-processors</artifactId>
+ <packaging>jar</packaging>
+
+ <name>nifi-${artifactBaseName}-processors</name>
+ <url>http://maven.apache.org</url>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <dependencies>
+ <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/incubator-nifi/blob/27f69184/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-processors/src/main/java/MyProcessor.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-processors/src/main/java/MyProcessor.java b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-processors/src/main/java/MyProcessor.java
new file mode 100644
index 0000000..23b1094
--- /dev/null
+++ b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-processors/src/main/java/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 ${package};
+
+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<PropertyDescriptor> descriptors;
+
+ private Set<Relationship> relationships;
+
+ @Override
+ protected void init(ProcessorInitializationContext context) {
+ final List<PropertyDescriptor> descriptors = new ArrayList<PropertyDescriptor>();
+ descriptors.add(MY_PROPERTY);
+ this.descriptors = Collections.unmodifiableList(descriptors);
+
+ final Set<Relationship> relationships = new HashSet<Relationship>();
+ relationships.add(MY_RELATIONSHIP);
+ 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) {
+
+ }
+
+ @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/27f69184/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-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-__artifactBaseName__-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-__artifactBaseName__-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor
new file mode 100644
index 0000000..0454176
--- /dev/null
+++ b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-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.
+${package}.MyProcessor
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/27f69184/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-processors/src/main/resources/docs/__package__.MyProcessor/index.html
----------------------------------------------------------------------
diff --git a/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-processors/src/main/resources/docs/__package__.MyProcessor/index.html b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-processors/src/main/resources/docs/__package__.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-__artifactBaseName__-processors/src/main/resources/docs/__package__.MyProcessor/index.html
@@ -0,0 +1,96 @@
+<!DOCTYPE html>
+<html lang="en">
+ <!--
+ 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.
+ -->
+ <head>
+ <meta charset="utf-8"/>
+ <title>GetFile</title>
+ <link rel="stylesheet" href="../../css/component-usage.css" type="text/css"/>
+ </head>
+
+ <body>
+ <!-- Processor Documentation ================================================== -->
+ <h2>Description:</h2>
+
+ <p>Replace with a description.</p>
+
+ <p>
+ <strong>Uses Attributes:</strong>
+ </p>
+ <table border="1">
+ <thead>
+ <tr>
+ <th>Attribute Name</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td></td>
+ <td></td>
+ </tr>
+ </tbody>
+ </table>
+
+ <p>
+ <strong>Modifies Attributes:</strong>
+ </p>
+ <table border="1">
+ <thead>
+ <tr>
+ <th>Attribute Name</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td></td>
+ <td></td>
+ </tr>
+ </tbody>
+ </table>
+
+ <p>
+ <strong>Properties:</strong>
+ </p>
+
+ <p>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.</p>
+ <ul>
+ <li><strong>My Property</strong>
+ <ul>
+ <li>An example property.</li>
+ <li>Default value: no default</li>
+ <li>Supports expression language: false</li>
+ </ul>
+ </li>
+ </ul>
+
+ <p>
+ <strong>Relationships:</strong>
+ </p>
+ <ul>
+ <li>my_relationship
+ <ul>
+ <li>An example relationship.</li>
+ </ul>
+ </li>
+ </ul>
+
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/27f69184/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-processors/src/test/java/MyProcessorTest.java
----------------------------------------------------------------------
diff --git a/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-processors/src/test/java/MyProcessorTest.java b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-processors/src/test/java/MyProcessorTest.java
new file mode 100644
index 0000000..2b709f8
--- /dev/null
+++ b/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__artifactBaseName__-processors/src/test/java/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 ${package};
+
+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/27f69184/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
deleted file mode 100644
index 5987ff2..0000000
--- a/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__rootArtifactId__-nar/pom.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<?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>${groupId}</groupId>
- <artifactId>nifi-${rootArtifactId}-bundle</artifactId>
- <version>${version}</version>
- </parent>
-
- <artifactId>${artifactId}</artifactId>
- <version>${version}</version>
- <packaging>nar</packaging>
-
- <name>${artifactId}</name>
-
- <dependencies>
- <dependency>
- <groupId>${groupId}</groupId>
- <artifactId>nifi-${rootArtifactId}-processors</artifactId>
- <version>${version}</version>
- </dependency>
- </dependencies>
-
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/27f69184/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
deleted file mode 100644
index 48c42c8..0000000
--- a/nifi/nifi-maven-archetypes/nifi-processor-bundle-archetype/src/main/resources/archetype-resources/nifi-__rootArtifactId__-processors/pom.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-<?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>${groupId}</groupId>
- <artifactId>nifi-${rootArtifactId}-bundle</artifactId>
- <version>${version}</version>
- </parent>
-
- <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>
- <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/incubator-nifi/blob/27f69184/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
deleted file mode 100644
index 8832c2e..0000000
--- 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
+++ /dev/null
@@ -1,82 +0,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.
- */
-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<PropertyDescriptor> descriptors;
-
- private Set<Relationship> relationships;
-
- @Override
- protected void init(ProcessorInitializationContext context) {
- final List<PropertyDescriptor> descriptors = new ArrayList<PropertyDescriptor>();
- descriptors.add(MY_PROPERTY);
- this.descriptors = Collections.unmodifiableList(descriptors);
-
- final Set<Relationship> relationships = new HashSet<Relationship>();
- relationships.add(MY_RELATIONSHIP);
- 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) {
-
- }
-
- @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/27f69184/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
deleted file mode 100644
index aba9179..0000000
--- 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
+++ /dev/null
@@ -1,15 +0,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.
-org.apache.nifi.processors.MyProcessor
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/27f69184/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
deleted file mode 100644
index 34e494f..0000000
--- 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
+++ /dev/null
@@ -1,96 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <!--
- 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.
- -->
- <head>
- <meta charset="utf-8"/>
- <title>GetFile</title>
- <link rel="stylesheet" href="../../css/component-usage.css" type="text/css"/>
- </head>
-
- <body>
- <!-- Processor Documentation ================================================== -->
- <h2>Description:</h2>
-
- <p>Replace with a description.</p>
-
- <p>
- <strong>Uses Attributes:</strong>
- </p>
- <table border="1">
- <thead>
- <tr>
- <th>Attribute Name</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td></td>
- <td></td>
- </tr>
- </tbody>
- </table>
-
- <p>
- <strong>Modifies Attributes:</strong>
- </p>
- <table border="1">
- <thead>
- <tr>
- <th>Attribute Name</th>
- <th>Description</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td></td>
- <td></td>
- </tr>
- </tbody>
- </table>
-
- <p>
- <strong>Properties:</strong>
- </p>
-
- <p>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.</p>
- <ul>
- <li><strong>My Property</strong>
- <ul>
- <li>An example property.</li>
- <li>Default value: no default</li>
- <li>Supports expression language: false</li>
- </ul>
- </li>
- </ul>
-
- <p>
- <strong>Relationships:</strong>
- </p>
- <ul>
- <li>my_relationship
- <ul>
- <li>An example relationship.</li>
- </ul>
- </li>
- </ul>
-
- </body>
-</html>
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/27f69184/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
deleted file mode 100644
index 3563502..0000000
--- 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
+++ /dev/null
@@ -1,39 +0,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.
- */
-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/27f69184/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..806cf8d 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
@@ -23,11 +23,11 @@
</parent>
<groupId>${groupId}</groupId>
- <artifactId>nifi-${artifactId}-bundle</artifactId>
+ <artifactId>${artifactId}</artifactId>
<version>${version}</version>
<packaging>pom</packaging>
- <name>nifi-${artifactId}-bundle</name>
+ <name>${artifactId}</name>
<url>http://maven.apache.org</url>
<properties>
@@ -35,8 +35,8 @@
</properties>
<modules>
- <module>nifi-${rootArtifactId}-processors</module>
- <module>nifi-${rootArtifactId}-nar</module>
+ <module>nifi-${artifactBaseName}-processors</module>
+ <module>nifi-${artifactBaseName}-nar</module>
</modules>
</project>