Skip to content

Commit 271467c

Browse files
authored
Move spring-boot version to single location (ExpediaGroup#431)
* Move spring-boot version to single location Move the declared verion of spring-boot to the root so we use the same version across all the modules and examples * Update README docs * Update parent/child for the examples * Update maven settings for root directory
1 parent 3886140 commit 271467c

File tree

10 files changed

+29
-82
lines changed

10 files changed

+29
-82
lines changed

examples/federation/base-app/pom.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<modelVersion>4.0.0</modelVersion>
44
<parent>
55
<groupId>com.expediagroup</groupId>
6-
<artifactId>graphql-kotlin</artifactId>
6+
<artifactId>federation</artifactId>
77
<version>1.1.1-SNAPSHOT</version>
8-
<relativePath>../../..</relativePath>
8+
<relativePath>..</relativePath>
99
</parent>
1010

1111
<artifactId>base-app</artifactId>
@@ -14,8 +14,7 @@
1414
<packaging>jar</packaging>
1515

1616
<properties>
17-
<spring-boot.version>2.2.0.M5</spring-boot.version>
18-
17+
<project.root>${project.basedir}/../../..</project.root>
1918
<!-- skip release plugins -->
2019
<maven.source.skip>true</maven.source.skip>
2120
</properties>

examples/federation/extend-app/pom.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<modelVersion>4.0.0</modelVersion>
44
<parent>
55
<groupId>com.expediagroup</groupId>
6-
<artifactId>graphql-kotlin</artifactId>
6+
<artifactId>federation</artifactId>
77
<version>1.1.1-SNAPSHOT</version>
8-
<relativePath>../../..</relativePath>
8+
<relativePath>..</relativePath>
99
</parent>
1010

1111
<artifactId>extend-app</artifactId>
@@ -14,8 +14,7 @@
1414
<packaging>jar</packaging>
1515

1616
<properties>
17-
<spring-boot.version>2.2.0.M5</spring-boot.version>
18-
17+
<project.root>${project.basedir}/../../..</project.root>
1918
<!-- skip release plugins -->
2019
<maven.source.skip>true</maven.source.skip>
2120
</properties>

examples/federation/pom.xml

Lines changed: 2 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
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>graphql-kotlin</artifactId>
65
<groupId>com.expediagroup</groupId>
6+
<artifactId>examples</artifactId>
77
<version>1.1.1-SNAPSHOT</version>
8-
<relativePath>../..</relativePath>
8+
<relativePath>..</relativePath>
99
</parent>
1010

1111
<artifactId>federation</artifactId>
@@ -45,64 +45,6 @@
4545
</execution>
4646
</executions>
4747
</plugin>
48-
<plugin>
49-
<groupId>org.apache.maven.plugins</groupId>
50-
<artifactId>maven-antrun-plugin</artifactId>
51-
<version>1.8</version>
52-
<executions>
53-
<!-- those can be run separately with mvn clean antrun:run@<target_id> -->
54-
<execution>
55-
<id>detekt</id>
56-
<phase>validate</phase>
57-
<configuration>
58-
<target name="detekt">
59-
<java taskname="detekt" dir="${project.basedir}" fork="true" failonerror="true" classname="io.gitlab.arturbosch.detekt.cli.Main" classpathref="maven.plugin.classpath">
60-
<arg value="--fail-fast" />
61-
<arg value="--input" />
62-
<arg value="${project.basedir}${file.separator}src" />
63-
<arg value="--config" />
64-
<arg value="${project.parent.relativePath}${file.separator}detekt.yml" />
65-
<arg value="--report" />
66-
<arg value="html:${project.basedir}${file.separator}target${file.separator}site${file.separator}detekt.html" />
67-
<arg value="--report" />
68-
<arg value="xml:${project.basedir}${file.separator}target${file.separator}site${file.separator}detekt.xml" />
69-
</java>
70-
</target>
71-
</configuration>
72-
<goals>
73-
<goal>run</goal>
74-
</goals>
75-
</execution>
76-
<execution>
77-
<id>ktlint</id>
78-
<phase>validate</phase>
79-
<configuration>
80-
<target name="ktlint">
81-
<java taskname="ktlint" dir="${project.basedir}" fork="true" failonerror="true" classname="com.github.shyiko.ktlint.Main" classpathref="maven.plugin.classpath">
82-
<arg value="src/**/*.kt" />
83-
<arg value="--reporter=plain" />
84-
<arg value="--reporter=checkstyle,output=${project.build.directory}/ktlint.xml" />
85-
</java>
86-
</target>
87-
</configuration>
88-
<goals>
89-
<goal>run</goal>
90-
</goals>
91-
</execution>
92-
</executions>
93-
<dependencies>
94-
<dependency>
95-
<groupId>io.gitlab.arturbosch.detekt</groupId>
96-
<artifactId>detekt-cli</artifactId>
97-
<version>${detekt-cli.version}</version>
98-
</dependency>
99-
<dependency>
100-
<groupId>com.github.shyiko</groupId>
101-
<artifactId>ktlint</artifactId>
102-
<version>${ktlint.version}</version>
103-
</dependency>
104-
</dependencies>
105-
</plugin>
10648
<plugin>
10749
<groupId>org.apache.maven.plugins</groupId>
10850
<artifactId>maven-surefire-plugin</artifactId>

examples/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
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>graphql-kotlin</artifactId>
65
<groupId>com.expediagroup</groupId>
6+
<artifactId>graphql-kotlin</artifactId>
77
<version>1.1.1-SNAPSHOT</version>
88
<relativePath>..</relativePath>
99
</parent>

examples/spring/README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@
33
One way to run a GraphQL server is with [Spring Boot](https://github.com/spring-projects/spring-boot). This example app uses [Spring Webflux](https://docs.spring.io/spring/docs/current/spring-framework-reference/web-reactive.html) together with `graphql-kotlin` and [graphql-playground](https://github.com/prisma/graphql-playground).
44

55
### Running locally
6-
Build the application
76

8-
```bash
7+
First you must build all the other modules since this is a multi-module project.
8+
9+
From the root directory:
10+
11+
```shell script
912
mvn clean install
1013
```
1114

12-
Start the server:
15+
Then to start the server:
1316

1417
* Run `Application.kt` directly from your IDE
15-
* Alternatively you can also use the spring boot maven plugin by running `mvn spring-boot:run` from the command line.
16-
18+
* Alternatively you can also use the spring boot maven plugin by running `mvn spring-boot:run` from the command line in the spring example directory.
1719

18-
Once the app has started you can explore the example schema by opening Playground endpoint at http://localhost:8080/playground.
20+
Once the app has started you can explore the example schema by opening the GraphQL Playground endpoint at http://localhost:8080/playground.

examples/spring/pom.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<modelVersion>4.0.0</modelVersion>
44
<parent>
55
<groupId>com.expediagroup</groupId>
6-
<artifactId>graphql-kotlin</artifactId>
6+
<artifactId>examples</artifactId>
77
<version>1.1.1-SNAPSHOT</version>
8-
<relativePath>../..</relativePath>
8+
<relativePath>..</relativePath>
99
</parent>
1010

1111
<artifactId>spring-example</artifactId>
@@ -14,8 +14,7 @@
1414
<packaging>jar</packaging>
1515

1616
<properties>
17-
<spring-boot.version>2.2.0.M5</spring-boot.version>
18-
17+
<project.root>${project.basedir}/../..</project.root>
1918
<!-- skip release plugins -->
2019
<maven.source.skip>true</maven.source.skip>
2120
</properties>

graphql-kotlin-federation/pom.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@
1010
</parent>
1111

1212
<artifactId>graphql-kotlin-federation</artifactId>
13-
<name>graphql-kotlin-federation</name>
1413
<packaging>jar</packaging>
1514

15+
<properties>
16+
<project.root>${project.basedir}/..</project.root>
17+
</properties>
18+
1619
<build>
1720
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
1821
<testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>

graphql-kotlin-schema-generator/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<packaging>jar</packaging>
1515

1616
<properties>
17+
<project.root>${project.basedir}/..</project.root>
1718
<rxjava2.version>2.2.12</rxjava2.version>
1819
</properties>
1920

graphql-kotlin-spring-server/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<packaging>jar</packaging>
1313

1414
<properties>
15-
<spring-boot.version>2.2.0.RC1</spring-boot.version>
15+
<project.root>${project.basedir}/..</project.root>
1616
<reactor.version>3.3.0.RELEASE</reactor.version>
1717
<reactor-kotlin-extensions.version>1.0.0.RELEASE</reactor-kotlin-extensions.version>
1818
</properties>

pom.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,15 @@
5959
<!-- Project Versions -->
6060
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
6161
<java.version>1.8</java.version>
62+
<project.root>${project.basedir}</project.root>
6263

6364
<!-- Dependency Versions -->
6465
<graphql-java.version>13.0</graphql-java.version>
6566
<jackson-module-kotlin.version>2.10.0</jackson-module-kotlin.version>
6667
<kotlin.version>1.3.50</kotlin.version>
6768
<kotlin-coroutines.version>1.3.2</kotlin-coroutines.version>
6869
<reflections.version>0.9.11</reflections.version>
70+
<spring-boot.version>2.2.0.RC1</spring-boot.version>
6971

7072
<!-- Test Dependency Versions -->
7173
<junit-jupiter.version>5.5.2</junit-jupiter.version>
@@ -132,7 +134,7 @@
132134
<arg value="--input" />
133135
<arg value="${project.basedir}${file.separator}src" />
134136
<arg value="--config" />
135-
<arg value="${project.parent.relativePath}${file.separator}detekt.yml" />
137+
<arg value="${project.root}${file.separator}detekt.yml" />
136138
<arg value="--report" />
137139
<arg value="html:${project.basedir}${file.separator}target${file.separator}site${file.separator}detekt.html" />
138140
<arg value="--report" />

0 commit comments

Comments
 (0)