This is an automated email from the ASF dual-hosted git repository.

exceptionfactory 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 e172a3f224 NIFI-10840 Added a build profile to enable Neo4J 5 support
e172a3f224 is described below

commit e172a3f2244039d564d8c0f0e998eb0d4b78b8df
Author: Mike Thomsen <[email protected]>
AuthorDate: Fri Nov 18 11:40:33 2022 -0500

    NIFI-10840 Added a build profile to enable Neo4J 5 support
    
    This closes #6684
    
    Signed-off-by: David Handermann <[email protected]>
---
 .../nifi-neo4j-cypher-service/pom.xml              | 32 +++++++++++++++++++++-
 .../nifi/graph/ITNeo4JCypherClientServiceSSL.java  |  2 +-
 .../nifi/graph/ITNeo4JCypherExecutorNoSSL.java     |  2 +-
 3 files changed, 33 insertions(+), 3 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-graph-bundle/nifi-neo4j-cypher-service/pom.xml 
b/nifi-nar-bundles/nifi-graph-bundle/nifi-neo4j-cypher-service/pom.xml
index 6d47bc0c16..0b98f2358a 100644
--- a/nifi-nar-bundles/nifi-graph-bundle/nifi-neo4j-cypher-service/pom.xml
+++ b/nifi-nar-bundles/nifi-graph-bundle/nifi-neo4j-cypher-service/pom.xml
@@ -18,6 +18,11 @@
     <artifactId>nifi-neo4j-cypher-service</artifactId>
     <packaging>jar</packaging>
 
+    <properties>
+        <neo4j.driver.version>4.4.9</neo4j.driver.version>
+        <neo4j.docker.version>4.4</neo4j.docker.version>
+    </properties>
+
     <dependencies>
         <dependency>
             <groupId>org.apache.nifi</groupId>
@@ -74,7 +79,7 @@
         <dependency>
             <groupId>org.neo4j.driver</groupId>
             <artifactId>neo4j-java-driver</artifactId>
-            <version>4.4.9</version>
+            <version>${neo4j.driver.version}</version>
             <scope>compile</scope>
         </dependency>
         <dependency>
@@ -94,6 +99,19 @@
     </dependencies>
 
     <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-failsafe-plugin</artifactId>
+                    <configuration>
+                        <systemPropertyVariables>
+                            
<neo4j.docker.image>neo4j:${neo4j.docker.version}</neo4j.docker.image>
+                        </systemPropertyVariables>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
         <plugins>
             <plugin>
                 <groupId>org.apache.rat</groupId>
@@ -115,4 +133,16 @@
             </plugin>
         </plugins>
     </build>
+
+    <profiles>
+        <profile>
+            <!-- Neo4j 5 has a hard dependency on Java 17. Do NOT activate 
this profile unless you
+             intend to do a full build of NiFi with Java 17! -->
+            <id>neo4j-5</id>
+            <properties>
+                <neo4j.driver.version>5.2.0</neo4j.driver.version>
+                <neo4j.docker.version>5.1</neo4j.docker.version>
+            </properties>
+        </profile>
+    </profiles>
 </project>
diff --git 
a/nifi-nar-bundles/nifi-graph-bundle/nifi-neo4j-cypher-service/src/test/java/org/apache/nifi/graph/ITNeo4JCypherClientServiceSSL.java
 
b/nifi-nar-bundles/nifi-graph-bundle/nifi-neo4j-cypher-service/src/test/java/org/apache/nifi/graph/ITNeo4JCypherClientServiceSSL.java
index 42fcad0013..5f5c97a134 100644
--- 
a/nifi-nar-bundles/nifi-graph-bundle/nifi-neo4j-cypher-service/src/test/java/org/apache/nifi/graph/ITNeo4JCypherClientServiceSSL.java
+++ 
b/nifi-nar-bundles/nifi-graph-bundle/nifi-neo4j-cypher-service/src/test/java/org/apache/nifi/graph/ITNeo4JCypherClientServiceSSL.java
@@ -58,7 +58,7 @@ public class ITNeo4JCypherClientServiceSSL {
 
     private static final String ADMIN_ACCESS = UUID.randomUUID().toString();
 
-    private static final String IMAGE_NAME = "neo4j:4.4";
+    private static final String IMAGE_NAME = 
System.getProperty("neo4j.docker.image");
 
     private static final Map<String, String> CONTAINER_ENVIRONMENT = new 
LinkedHashMap<>();
 
diff --git 
a/nifi-nar-bundles/nifi-graph-bundle/nifi-neo4j-cypher-service/src/test/java/org/apache/nifi/graph/ITNeo4JCypherExecutorNoSSL.java
 
b/nifi-nar-bundles/nifi-graph-bundle/nifi-neo4j-cypher-service/src/test/java/org/apache/nifi/graph/ITNeo4JCypherExecutorNoSSL.java
index 95290ebb2f..6f9318a5ba 100644
--- 
a/nifi-nar-bundles/nifi-graph-bundle/nifi-neo4j-cypher-service/src/test/java/org/apache/nifi/graph/ITNeo4JCypherExecutorNoSSL.java
+++ 
b/nifi-nar-bundles/nifi-graph-bundle/nifi-neo4j-cypher-service/src/test/java/org/apache/nifi/graph/ITNeo4JCypherExecutorNoSSL.java
@@ -48,7 +48,7 @@ import static org.junit.Assert.assertEquals;
 public class ITNeo4JCypherExecutorNoSSL {
     @Container
     private static Neo4jContainer<?> neo4jContainer =
-            new Neo4jContainer<>(DockerImageName.parse("neo4j:4.4"))
+            new 
Neo4jContainer<>(DockerImageName.parse(System.getProperty("neo4j.docker.image")))
                     .withAdminPassword("testing1234");
 
     protected TestRunner runner;

Reply via email to