Article DetailsDetailsHelp DetailsThis article describes how to configure a maven project to use neo4j-harness-enterprise. Configure Neo4j Enterprise Maven Repository Follow the steps outlined in the following KB to configure access to Neo4j's private maven repository Dependency location for Neo4j Enterprise Edition artifacts Configure dependencies Add the following to your pom.xml file sure to set properties ${neo4j.version} and ${neo4j-java-driver.version}: <dependency> <groupId>com.neo4j.test</groupId> <artifactId>neo4j-harness-enterprise</artifactId> <version>${neo4j.version}</version> <scope>test</scope> </dependency> <--! driver is only required as we are using it to connect back to test-harness during tests --> <dependency> <!-- Used to send cypher statements to our procedure. --> <groupId>org.neo4j.driver</groupId> <artifactId>neo4j-java-driver</artifactId> <version>${neo4j-java-driver.version}</version> <scope>test</scope> </dependency> It is now possible to access com.neo4j.test.neo4j-harness-enterprise in tests. Sample code import com.neo4j.harness.EnterpriseNeo4jBuilders; import org.junit.jupiter.api.*; import org.neo4j.driver.*; import org.neo4j.harness.Neo4j; @TestInstance(TestInstance.Lifecycle.PER_CLASS) public class sampleTest { private Driver driver; private Neo4j embeddedDatabaseServer; @BeforeAll void initializeNeo4j() { this.embeddedDatabaseServer = EnterpriseNeo4jBuilders.newInProcessBuilder() .withDisabledServer() // You can add custom procedures using .withProcedure() // .withProcedure(SampleProcedure.class) .build(); this.driver = GraphDatabase.driver(embeddedDatabaseServer.boltURI()); } @AfterAll void closeDriver(){ this.driver.close(); this.embeddedDatabaseServer.close(); } // add test cases } InformationTitleHow to setup neo4j-harness-enterpriseArticle Created Date3/15/2024, 10:55 PMURL Name17818010888083-How-to-setup-neo4j-harness-enterpriseLast Modified Date3/25/2024, 9:43 PM