This is an automated email from the ASF dual-hosted git repository.
pvillard pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new c421172ee2 NIFI-12286 Removed nifi-example-bundle
c421172ee2 is described below
commit c421172ee241e9c1c8222e0b9b31d68eac792fd2
Author: exceptionfactory <[email protected]>
AuthorDate: Fri Oct 27 09:18:44 2023 -0500
NIFI-12286 Removed nifi-example-bundle
Signed-off-by: Pierre Villard <[email protected]>
This closes #7944.
---
nifi-external/README.md | 19 ----
.../nifi-nifi-example-nar/pom.xml | 38 --------
.../nifi-nifi-example-processors/pom.xml | 58 -----------
.../nifi/processors/WriteResourceToStream.java | 106 ---------------------
.../services/org.apache.nifi.processor.Processor | 15 ---
.../src/main/resources/file.txt | 1 -
.../nifi/processors/WriteResourceToStreamTest.java | 47 ---------
nifi-external/nifi-example-bundle/pom.xml | 42 --------
nifi-external/pom.xml | 1 -
9 files changed, 327 deletions(-)
diff --git a/nifi-external/README.md b/nifi-external/README.md
deleted file mode 100644
index 649ad176b8..0000000000
--- a/nifi-external/README.md
+++ /dev/null
@@ -1,19 +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.
--->
-# nifi-external
-
-The nifi-external module is a location where components can be developed by
the NiFi team
-that are not intended to be used directly by NiFi but are to be used within
other frameworks
-in order to integrate with NiFi.
\ No newline at end of file
diff --git a/nifi-external/nifi-example-bundle/nifi-nifi-example-nar/pom.xml
b/nifi-external/nifi-example-bundle/nifi-nifi-example-nar/pom.xml
deleted file mode 100644
index 35d0429755..0000000000
--- a/nifi-external/nifi-example-bundle/nifi-nifi-example-nar/pom.xml
+++ /dev/null
@@ -1,38 +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
https://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.nifi</groupId>
- <artifactId>nifi-example-bundle</artifactId>
- <version>2.0.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>nifi-nifi-example-nar</artifactId>
- <packaging>nar</packaging>
- <properties>
- <maven.javadoc.skip>true</maven.javadoc.skip>
- <source.skip>true</source.skip>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.nifi</groupId>
- <artifactId>nifi-nifi-example-processors</artifactId>
- </dependency>
- </dependencies>
-</project>
diff --git
a/nifi-external/nifi-example-bundle/nifi-nifi-example-processors/pom.xml
b/nifi-external/nifi-example-bundle/nifi-nifi-example-processors/pom.xml
deleted file mode 100644
index 1a2e4e6d73..0000000000
--- a/nifi-external/nifi-example-bundle/nifi-nifi-example-processors/pom.xml
+++ /dev/null
@@ -1,58 +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
https://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.nifi</groupId>
- <artifactId>nifi-example-bundle</artifactId>
- <version>2.0.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>nifi-nifi-example-processors</artifactId>
- <packaging>jar</packaging>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.nifi</groupId>
- <artifactId>nifi-api</artifactId>
- <version>2.0.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.nifi</groupId>
- <artifactId>nifi-mock</artifactId>
- <version>2.0.0-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.rat</groupId>
- <artifactId>apache-rat-plugin</artifactId>
- <configuration>
- <excludes>
- <exclude>src/main/resources/file.txt</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
diff --git
a/nifi-external/nifi-example-bundle/nifi-nifi-example-processors/src/main/java/org/apache/nifi/processors/WriteResourceToStream.java
b/nifi-external/nifi-example-bundle/nifi-nifi-example-processors/src/main/java/org/apache/nifi/processors/WriteResourceToStream.java
deleted file mode 100644
index cb5b888fb8..0000000000
---
a/nifi-external/nifi-example-bundle/nifi-nifi-example-processors/src/main/java/org/apache/nifi/processors/WriteResourceToStream.java
+++ /dev/null
@@ -1,106 +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 java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.charset.Charset;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-import org.apache.commons.io.IOUtils;
-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.flowfile.FlowFile;
-import org.apache.nifi.processor.AbstractProcessor;
-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;
-
-@Tags({ "example", "resources" })
-@CapabilityDescription("This example processor loads a resource from the nar
and writes it to the FlowFile content")
-public class WriteResourceToStream extends AbstractProcessor {
-
- public static final Relationship REL_SUCCESS = new Relationship.Builder()
- .name("success")
- .description("files that were successfully processed").build();
- public static final Relationship REL_FAILURE = new Relationship.Builder()
- .name("failure")
- .description("files that were not successfully processed").build();
-
- private Set<Relationship> relationships;
-
- private String resourceData;
-
- @Override
- protected void init(final ProcessorInitializationContext context) {
-
- final Set<Relationship> relationships = new HashSet<Relationship>();
- relationships.add(REL_SUCCESS);
- relationships.add(REL_FAILURE);
- this.relationships = Collections.unmodifiableSet(relationships);
- final InputStream resourceStream = getClass()
- .getClassLoader().getResourceAsStream("file.txt");
- try {
- this.resourceData = IOUtils.toString(resourceStream,
Charset.defaultCharset());
- } catch (IOException e) {
- throw new RuntimeException("Unable to load resources", e);
- } finally {
- IOUtils.closeQuietly(resourceStream);
- }
-
- }
-
- @Override
- public Set<Relationship> getRelationships() {
- return this.relationships;
- }
-
- @OnScheduled
- public void onScheduled(final ProcessContext context) {
-
- }
-
- @Override
- public void onTrigger(final ProcessContext context,
- final ProcessSession session) throws ProcessException {
- FlowFile flowFile = session.get();
- if (flowFile == null) {
- return;
- }
-
- try {
- flowFile = session.write(flowFile, new OutputStreamCallback() {
-
- @Override
- public void process(OutputStream out) throws IOException {
- IOUtils.write(resourceData, out, Charset.defaultCharset());
-
- }
- });
- session.transfer(flowFile, REL_SUCCESS);
- } catch (ProcessException ex) {
- getLogger().error("Unable to process", ex);
- session.transfer(flowFile, REL_FAILURE);
- }
- }
-}
diff --git
a/nifi-external/nifi-example-bundle/nifi-nifi-example-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor
b/nifi-external/nifi-example-bundle/nifi-nifi-example-processors/src/main/resources/META-INF/services/org.apache.nifi.processor.Processor
deleted file mode 100644
index 94485417f9..0000000000
---
a/nifi-external/nifi-example-bundle/nifi-nifi-example-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.WriteResourceToStream
\ No newline at end of file
diff --git
a/nifi-external/nifi-example-bundle/nifi-nifi-example-processors/src/main/resources/file.txt
b/nifi-external/nifi-example-bundle/nifi-nifi-example-processors/src/main/resources/file.txt
deleted file mode 100644
index f0e1d6c9e3..0000000000
---
a/nifi-external/nifi-example-bundle/nifi-nifi-example-processors/src/main/resources/file.txt
+++ /dev/null
@@ -1 +0,0 @@
-this came from a resource
\ No newline at end of file
diff --git
a/nifi-external/nifi-example-bundle/nifi-nifi-example-processors/src/test/java/org/apache/nifi/processors/WriteResourceToStreamTest.java
b/nifi-external/nifi-example-bundle/nifi-nifi-example-processors/src/test/java/org/apache/nifi/processors/WriteResourceToStreamTest.java
deleted file mode 100644
index 5ed5468705..0000000000
---
a/nifi-external/nifi-example-bundle/nifi-nifi-example-processors/src/test/java/org/apache/nifi/processors/WriteResourceToStreamTest.java
+++ /dev/null
@@ -1,47 +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.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-public class WriteResourceToStreamTest {
-
- private TestRunner testRunner;
-
- @BeforeEach
- public void init() {
- testRunner = TestRunners.newTestRunner(WriteResourceToStream.class);
- }
-
- @Test
- public void testProcessor() {
- testRunner.enqueue(new byte[] { 1, 2, 3, 4, 5 });
- testRunner.run();
-
testRunner.assertAllFlowFilesTransferred(WriteResourceToStream.REL_SUCCESS, 1);
- final byte[] data = testRunner
-
.getFlowFilesForRelationship(WriteResourceToStream.REL_SUCCESS).get(0)
- .toByteArray();
- final String stringData = new String(data);
- assertEquals("this came from a resource", stringData);
- }
-
-}
diff --git a/nifi-external/nifi-example-bundle/pom.xml
b/nifi-external/nifi-example-bundle/pom.xml
deleted file mode 100644
index 27e57a0a43..0000000000
--- a/nifi-external/nifi-example-bundle/pom.xml
+++ /dev/null
@@ -1,42 +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
https://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.nifi</groupId>
- <artifactId>nifi-external</artifactId>
- <version>2.0.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>nifi-example-bundle</artifactId>
- <packaging>pom</packaging>
-
- <modules>
- <module>nifi-nifi-example-processors</module>
- <module>nifi-nifi-example-nar</module>
- </modules>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.apache.nifi</groupId>
- <artifactId>nifi-nifi-example-processors</artifactId>
- <version>2.0.0-SNAPSHOT</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
-</project>
diff --git a/nifi-external/pom.xml b/nifi-external/pom.xml
index d393f7e2d3..7443f2aa2b 100644
--- a/nifi-external/pom.xml
+++ b/nifi-external/pom.xml
@@ -23,7 +23,6 @@
<artifactId>nifi-external</artifactId>
<packaging>pom</packaging>
<modules>
- <module>nifi-example-bundle</module>
<module>nifi-kafka-connect</module>
</modules>
</project>