Skip to content
This repository was archived by the owner on Sep 1, 2023. It is now read-only.

Commit 8c5349c

Browse files
Use CI friendly version numbers.
See https://maven.apache.org/maven-ci-friendly.html for reference. The downside of this is that we don’t have the examples inherit from Spring Boot directly anymore. It’s easier to get the interproject dependencies straight when they inherit the starter’s parent.
1 parent b9ba6d5 commit 8c5349c

File tree

15 files changed

+157
-35
lines changed

15 files changed

+157
-35
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
target/
22
!.mvn/wrapper/maven-wrapper.jar
3+
.flattened-pom.xml
34

45
### STS ###
56
.apt_generated

examples/reactive-web/pom.xml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,34 @@
22
<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">
33
<modelVersion>4.0.0</modelVersion>
44
<parent>
5-
<artifactId>spring-boot-starter-parent</artifactId>
6-
<groupId>org.springframework.boot</groupId>
7-
<version>2.1.6.RELEASE</version>
8-
<relativePath></relativePath>
9-
<!-- lookup parent from repository -->
5+
<artifactId>neo4j-java-driver-spring-boot-starter-parent</artifactId>
6+
<groupId>org.neo4j.driver</groupId>
7+
<version>${revision}${sha1}${changelist}</version>
8+
<relativePath>../../</relativePath>
109
</parent>
10+
1111
<groupId>org.neo4j.doc.driver</groupId>
1212
<artifactId>reactive-web-spring-boot-starter-example</artifactId>
13-
<version>1.0.0.BUILD-SNAPSHOT</version>
1413
<name>Reactive Web example</name>
1514
<description>Demo project for Spring Boot</description>
1615

1716
<properties>
1817
<java.version>1.8</java.version>
1918
</properties>
2019

20+
<dependencyManagement>
21+
<dependencies>
22+
<dependency>
23+
<!-- Import dependency management from Spring Boot -->
24+
<groupId>org.springframework.boot</groupId>
25+
<artifactId>spring-boot-dependencies</artifactId>
26+
<version>2.1.6.RELEASE</version>
27+
<type>pom</type>
28+
<scope>import</scope>
29+
</dependency>
30+
</dependencies>
31+
</dependencyManagement>
32+
2133
<dependencies>
2234
<dependency>
2335
<groupId>org.neo4j.driver</groupId>
@@ -74,6 +86,13 @@
7486
<skip>true</skip>
7587
</configuration>
7688
</plugin>
89+
<plugin>
90+
<groupId>org.apache.maven.plugins</groupId>
91+
<artifactId>maven-javadoc-plugin</artifactId>
92+
<configuration>
93+
<detectOfflineLinks>false</detectOfflineLinks>
94+
</configuration>
95+
</plugin>
7796
</plugins>
7897
</build>
7998

examples/reactive-web/src/main/java/org/neo4j/doc/driver/springframework/boot/reactive_web/DisplayMoviesController.java renamed to examples/reactive-web/src/main/java/org/neo4j/doc/driver/springframework/boot/web/DisplayMoviesController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.neo4j.doc.driver.springframework.boot.reactive_web;
19+
package org.neo4j.doc.driver.springframework.boot.web;
2020

2121
// tag::reactive-web-example[]
2222

examples/reactive-web/src/main/java/org/neo4j/doc/driver/springframework/boot/reactive_web/ReactiveWebApplication.java renamed to examples/reactive-web/src/main/java/org/neo4j/doc/driver/springframework/boot/web/ReactiveWebApplication.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* See the License for the specific language governing permissions and
1717
* limitations under the License.
1818
*/
19-
package org.neo4j.doc.driver.springframework.boot.reactive_web;
19+
package org.neo4j.doc.driver.springframework.boot.web;
2020

2121
import org.springframework.boot.SpringApplication;
2222
import org.springframework.boot.autoconfigure.SpringBootApplication;

examples/simple/pom.xml

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,35 @@
22
<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">
33
<modelVersion>4.0.0</modelVersion>
44
<parent>
5-
<artifactId>spring-boot-starter-parent</artifactId>
6-
<groupId>org.springframework.boot</groupId>
7-
<version>2.1.6.RELEASE</version>
8-
<relativePath></relativePath>
9-
<!-- lookup parent from repository -->
5+
<artifactId>neo4j-java-driver-spring-boot-starter-parent</artifactId>
6+
<groupId>org.neo4j.driver</groupId>
7+
<version>${revision}${sha1}${changelist}</version>
8+
<relativePath>../../</relativePath>
109
</parent>
10+
1111
<groupId>org.neo4j.doc.driver</groupId>
1212
<artifactId>simple-spring-boot-starter-example</artifactId>
13-
<version>1.0.0.BUILD-SNAPSHOT</version>
13+
1414
<name>Simple example</name>
1515
<description>Demo project for Spring Boot</description>
1616

1717
<properties>
1818
<java.version>1.8</java.version>
1919
</properties>
2020

21+
<dependencyManagement>
22+
<dependencies>
23+
<dependency>
24+
<!-- Import dependency management from Spring Boot -->
25+
<groupId>org.springframework.boot</groupId>
26+
<artifactId>spring-boot-dependencies</artifactId>
27+
<version>2.1.6.RELEASE</version>
28+
<type>pom</type>
29+
<scope>import</scope>
30+
</dependency>
31+
</dependencies>
32+
</dependencyManagement>
33+
2134
<dependencies>
2235
<dependency>
2336
<groupId>org.neo4j.driver</groupId>
@@ -70,6 +83,13 @@
7083
<skip>true</skip>
7184
</configuration>
7285
</plugin>
86+
<plugin>
87+
<groupId>org.apache.maven.plugins</groupId>
88+
<artifactId>maven-javadoc-plugin</artifactId>
89+
<configuration>
90+
<detectOfflineLinks>false</detectOfflineLinks>
91+
</configuration>
92+
</plugin>
7393
</plugins>
7494
</build>
7595

examples/testing-with-neo4j-harness/pom.xml

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,37 @@
22
<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">
33
<modelVersion>4.0.0</modelVersion>
44
<parent>
5-
<artifactId>spring-boot-starter-parent</artifactId>
6-
<groupId>org.springframework.boot</groupId>
7-
<version>2.1.6.RELEASE</version>
8-
<relativePath></relativePath>
9-
<!-- lookup parent from repository -->
5+
<artifactId>neo4j-java-driver-spring-boot-starter-parent</artifactId>
6+
<groupId>org.neo4j.driver</groupId>
7+
<version>${revision}${sha1}${changelist}</version>
8+
<relativePath>../../</relativePath>
109
</parent>
10+
1111
<groupId>org.neo4j.doc.driver</groupId>
1212
<artifactId>testing-with-neo4j-harness</artifactId>
13-
<version>1.0.0.BUILD-SNAPSHOT</version>
14-
<name>Testing examples against the Neo4j harness</name>
15-
<description>Demo project for Spring Boot</description>
13+
14+
<name>Testing against Neo4j harness</name>
15+
<description>Testing examples against the Neo4j harness</description>
1616

1717
<properties>
1818
<java.version>1.8</java.version>
1919
<junit-jupiter.version>5.4.2</junit-jupiter.version>
2020
<neo4j.version>3.5.6</neo4j.version>
2121
</properties>
2222

23+
<dependencyManagement>
24+
<dependencies>
25+
<dependency>
26+
<!-- Import dependency management from Spring Boot -->
27+
<groupId>org.springframework.boot</groupId>
28+
<artifactId>spring-boot-dependencies</artifactId>
29+
<version>2.1.6.RELEASE</version>
30+
<type>pom</type>
31+
<scope>import</scope>
32+
</dependency>
33+
</dependencies>
34+
</dependencyManagement>
35+
2336
<dependencies>
2437

2538
<dependency>
@@ -91,6 +104,26 @@
91104
<skip>true</skip>
92105
</configuration>
93106
</plugin>
107+
<!--
108+
| This is mainly due to all the dependencies the test harness brings.
109+
| That bunch of dependencies is one of the main reasons we actually
110+
| are very reluctant to recommend using the test harness in large
111+
| enterprise projects that often have a ton of dependencies already.
112+
-->
113+
<plugin>
114+
<groupId>org.apache.maven.plugins</groupId>
115+
<artifactId>maven-enforcer-plugin</artifactId>
116+
<configuration>
117+
<skip>true</skip>
118+
</configuration>
119+
</plugin>
120+
<plugin>
121+
<groupId>org.apache.maven.plugins</groupId>
122+
<artifactId>maven-javadoc-plugin</artifactId>
123+
<configuration>
124+
<detectOfflineLinks>false</detectOfflineLinks>
125+
</configuration>
126+
</plugin>
94127
</plugins>
95128
</build>
96129

examples/testing-with-neo4j-harness/src/main/java/org/neo4j/doc/driver/springframework/boot/simple/MoviesService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ public List<String> getMovieTitles() {
4343
.collect(Collectors.toList());
4444
}
4545
}
46-
}
46+
}

examples/testing-with-neo4j-harness/src/test/java/org/neo4j/doc/driver/springframework/boot/simple/MoviesServiceAltTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@ void shouldRetrieveMovieTitles() {
7777
.hasSize(3)
7878
.contains("The Matrix");
7979
}
80-
}
80+
}

examples/testing-with-neo4j-harness/src/test/java/org/neo4j/doc/driver/springframework/boot/simple/MoviesServiceTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,4 @@ void shouldRetrieveMovieTitles() {
8282
.hasSize(3)
8383
.contains("The Matrix");
8484
}
85-
}
85+
}

examples/web/pom.xml

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,35 @@
22
<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">
33
<modelVersion>4.0.0</modelVersion>
44
<parent>
5-
<artifactId>spring-boot-starter-parent</artifactId>
6-
<groupId>org.springframework.boot</groupId>
7-
<version>2.1.6.RELEASE</version>
8-
<relativePath></relativePath>
9-
<!-- lookup parent from repository -->
5+
<artifactId>neo4j-java-driver-spring-boot-starter-parent</artifactId>
6+
<groupId>org.neo4j.driver</groupId>
7+
<version>${revision}${sha1}${changelist}</version>
8+
<relativePath>../../</relativePath>
109
</parent>
10+
1111
<groupId>org.neo4j.doc.driver</groupId>
1212
<artifactId>imperative-web-spring-boot-starter-example</artifactId>
13-
<version>1.0.0.BUILD-SNAPSHOT</version>
14-
<name>Web example</name>
13+
14+
<name>Imperative web example</name>
1515
<description>Demo project for Spring Boot</description>
1616

1717
<properties>
1818
<java.version>1.8</java.version>
1919
</properties>
2020

21+
<dependencyManagement>
22+
<dependencies>
23+
<dependency>
24+
<!-- Import dependency management from Spring Boot -->
25+
<groupId>org.springframework.boot</groupId>
26+
<artifactId>spring-boot-dependencies</artifactId>
27+
<version>2.1.6.RELEASE</version>
28+
<type>pom</type>
29+
<scope>import</scope>
30+
</dependency>
31+
</dependencies>
32+
</dependencyManagement>
33+
2134
<dependencies>
2235
<dependency>
2336
<groupId>org.neo4j.driver</groupId>
@@ -74,6 +87,13 @@
7487
<skip>true</skip>
7588
</configuration>
7689
</plugin>
90+
<plugin>
91+
<groupId>org.apache.maven.plugins</groupId>
92+
<artifactId>maven-javadoc-plugin</artifactId>
93+
<configuration>
94+
<detectOfflineLinks>false</detectOfflineLinks>
95+
</configuration>
96+
</plugin>
7797
</plugins>
7898
</build>
7999

0 commit comments

Comments
 (0)