Skip to content

Commit

Permalink
refactor: Add a top-level BOM project for easy consumption of the pro…
Browse files Browse the repository at this point in the history
…duced binaries. (#562)

Closes #541.

---------
Co-authored-by: Gerrit Meier <[email protected]>
  • Loading branch information
michael-simons authored Mar 11, 2024
1 parent a38f66a commit cce2a30
Show file tree
Hide file tree
Showing 20 changed files with 212 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
run: >
./mvnw --no-transfer-progress
-P$USE_SONAR -Dsonar.projectKey=neo4j-jdbc -Dsonar.projectName='neo4j-jdbc'
-am -pl neo4j-jdbc -pl neo4j-jdbc-bundle -pl neo4j-jdbc-full-bundle
-am -pl neo4j-jdbc -pl neo4j-jdbc-bom -pl neo4j-jdbc-bundle -pl neo4j-jdbc-full-bundle
clean install
integration_tests:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ dependency-reduced-pom.xml
\.*.swp
.env
Neo4j-*-Created-*-*-*.txt
.flattened-pom.xml
8 changes: 7 additions & 1 deletion benchkit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc-bom</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<!-- Import dependency management from Spring Boot -->
<groupId>org.springframework.boot</groupId>
Expand All @@ -52,7 +59,6 @@
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openapitools</groupId>
Expand Down
14 changes: 12 additions & 2 deletions dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@
<name>Neo4j JDBC Driver (Distribution)</name>
<description>Zipped distribution containing the full bundle plus manual</description>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc-bom</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.neo4j</groupId>
Expand All @@ -43,7 +55,6 @@
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc-full-bundle</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

Expand Down Expand Up @@ -121,5 +132,4 @@
</plugin>
</plugins>
</build>

</project>
13 changes: 12 additions & 1 deletion docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/../${aggregate.report.dir}</sonar.coverage.jacoco.xmlReportPaths>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc-bom</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>com.opencsv</groupId>
Expand All @@ -50,7 +62,6 @@
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc-full-bundle</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

Expand Down
2 changes: 2 additions & 0 deletions docs/src/main/asciidoc/modules/ROOT/pages/distribution.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ Depending on your use-case or your environment you pick one or the other bundle,

Pick this distribution if you have an application that uses dependencies management in which you don't have to care about dealing with binary artifacts yourself.

IMPORTANT: We offer a Maven BOM project, which you should import when using the individual modules, so that you have always a consistent set of versions. The coordinates are `{group-id}:neo4j-jdbc-bom`.

For Maven you will want to use this dependency declaration:

[source,xml,subs="verbatim,attributes"]
Expand Down
99 changes: 99 additions & 0 deletions neo4j-jdbc-bom/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2023-2024 "Neo4j,"
Neo4j Sweden AB [https://neo4j.com]
This file is part of Neo4j.
Licensed 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
https://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>org.neo4j</groupId>
<artifactId>neo4j-jdbc-parent</artifactId>
<version>6.0.0-SNAPSHOT</version>
</parent>

<artifactId>neo4j-jdbc-bom</artifactId>

<packaging>pom</packaging>
<name>Neo4j JDBC Driver (BOM)</name>
<description>The BOM for the Neo4j JDBC Driver</description>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc-bundle</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc-full-bundle</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc-translator-impl</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc-translator-spi</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<id>flatten</id>
<goals>
<goal>flatten</goal>
</goals>
<phase>process-resources</phase>
<configuration>
<updatePomFile>true</updatePomFile>
<flattenMode>bom</flattenMode>
<pomElements>
<properties>remove</properties>
</pomElements>
</configuration>
</execution>
<execution>
<id>flatten-clean</id>
<goals>
<goal>clean</goal>
</goals>
<phase>clean</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
13 changes: 12 additions & 1 deletion neo4j-jdbc-bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,22 @@
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/../${aggregate.report.dir}</sonar.coverage.jacoco.xmlReportPaths>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc-bom</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
Expand Down
14 changes: 12 additions & 2 deletions neo4j-jdbc-full-bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,26 @@
<sonar.coverage.jacoco.xmlReportPaths>${basedir}/../${aggregate.report.dir}</sonar.coverage.jacoco.xmlReportPaths>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc-bom</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc-translator-impl</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
Expand Down
1 change: 0 additions & 1 deletion neo4j-jdbc-it/mybatis-smoke-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down
2 changes: 0 additions & 2 deletions neo4j-jdbc-it/neo4j-jdbc-it-cp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,11 @@
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc-translator-impl</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
2 changes: 0 additions & 2 deletions neo4j-jdbc-it/neo4j-jdbc-it-mp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,11 @@
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc-translator-impl</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
12 changes: 12 additions & 0 deletions neo4j-jdbc-it/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@
<module>quarkus-smoke-tests</module>
</modules>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc-bom</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.assertj</groupId>
Expand Down
1 change: 0 additions & 1 deletion neo4j-jdbc-it/quarkus-smoke-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc-full-bundle</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
Expand Down
1 change: 0 additions & 1 deletion neo4j-jdbc-it/spring-boot-smoke-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc-full-bundle</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down
13 changes: 12 additions & 1 deletion neo4j-jdbc-test-results/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,22 @@
<name>Neo4j JDBC Driver (Test Results)</name>
<description>Aggregator project for test results.</description>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc-bom</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
Expand Down
1 change: 0 additions & 1 deletion neo4j-jdbc-translator/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc-translator-spi</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<!-- It is referenced by jOOQ and will lead to compiler warnings unless present during compilation. Using provided scope so that it never appears as transitive dependency. -->
Expand Down
12 changes: 12 additions & 0 deletions neo4j-jdbc-translator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,16 @@
<module>spi</module>
<module>impl</module>
</modules>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-jdbc-bom</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>
Loading

0 comments on commit cce2a30

Please sign in to comment.