Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move spring-boot version to single location #431

Merged
merged 4 commits into from Oct 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 3 additions & 4 deletions examples/federation/base-app/pom.xml
Expand Up @@ -3,9 +3,9 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.expediagroup</groupId>
<artifactId>graphql-kotlin</artifactId>
<artifactId>federation</artifactId>
<version>1.1.1-SNAPSHOT</version>
<relativePath>../../..</relativePath>
<relativePath>..</relativePath>
</parent>

<artifactId>base-app</artifactId>
Expand All @@ -14,8 +14,7 @@
<packaging>jar</packaging>

<properties>
<spring-boot.version>2.2.0.M5</spring-boot.version>

<project.root>${project.basedir}/../../..</project.root>
<!-- skip release plugins -->
<maven.source.skip>true</maven.source.skip>
</properties>
Expand Down
7 changes: 3 additions & 4 deletions examples/federation/extend-app/pom.xml
Expand Up @@ -3,9 +3,9 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.expediagroup</groupId>
<artifactId>graphql-kotlin</artifactId>
<artifactId>federation</artifactId>
<version>1.1.1-SNAPSHOT</version>
<relativePath>../../..</relativePath>
<relativePath>..</relativePath>
</parent>

<artifactId>extend-app</artifactId>
Expand All @@ -14,8 +14,7 @@
<packaging>jar</packaging>

<properties>
<spring-boot.version>2.2.0.M5</spring-boot.version>

<project.root>${project.basedir}/../../..</project.root>
<!-- skip release plugins -->
<maven.source.skip>true</maven.source.skip>
</properties>
Expand Down
62 changes: 2 additions & 60 deletions examples/federation/pom.xml
Expand Up @@ -2,10 +2,10 @@
<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>
<artifactId>graphql-kotlin</artifactId>
<groupId>com.expediagroup</groupId>
<artifactId>examples</artifactId>
<version>1.1.1-SNAPSHOT</version>
<relativePath>../..</relativePath>
<relativePath>..</relativePath>
</parent>

<artifactId>federation</artifactId>
Expand Down Expand Up @@ -45,64 +45,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<!-- those can be run separately with mvn clean antrun:run@<target_id> -->
<execution>
<id>detekt</id>
<phase>validate</phase>
<configuration>
<target name="detekt">
<java taskname="detekt" dir="${project.basedir}" fork="true" failonerror="true" classname="io.gitlab.arturbosch.detekt.cli.Main" classpathref="maven.plugin.classpath">
<arg value="--fail-fast" />
<arg value="--input" />
<arg value="${project.basedir}${file.separator}src" />
<arg value="--config" />
<arg value="${project.parent.relativePath}${file.separator}detekt.yml" />
<arg value="--report" />
<arg value="html:${project.basedir}${file.separator}target${file.separator}site${file.separator}detekt.html" />
<arg value="--report" />
<arg value="xml:${project.basedir}${file.separator}target${file.separator}site${file.separator}detekt.xml" />
</java>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>ktlint</id>
<phase>validate</phase>
<configuration>
<target name="ktlint">
<java taskname="ktlint" dir="${project.basedir}" fork="true" failonerror="true" classname="com.github.shyiko.ktlint.Main" classpathref="maven.plugin.classpath">
<arg value="src/**/*.kt" />
<arg value="--reporter=plain" />
<arg value="--reporter=checkstyle,output=${project.build.directory}/ktlint.xml" />
</java>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>io.gitlab.arturbosch.detekt</groupId>
<artifactId>detekt-cli</artifactId>
<version>${detekt-cli.version}</version>
</dependency>
<dependency>
<groupId>com.github.shyiko</groupId>
<artifactId>ktlint</artifactId>
<version>${ktlint.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion examples/pom.xml
Expand Up @@ -2,8 +2,8 @@
<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>
<artifactId>graphql-kotlin</artifactId>
<groupId>com.expediagroup</groupId>
<artifactId>graphql-kotlin</artifactId>
<version>1.1.1-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
Expand Down
14 changes: 8 additions & 6 deletions examples/spring/README.md
Expand Up @@ -3,16 +3,18 @@
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).

### Running locally
Build the application

```bash
First you must build all the other modules since this is a multi-module project.

From the root directory:

```shell script
mvn clean install
```

Start the server:
Then to start the server:

* Run `Application.kt` directly from your IDE
* Alternatively you can also use the spring boot maven plugin by running `mvn spring-boot:run` from the command line.

* 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.

Once the app has started you can explore the example schema by opening Playground endpoint at http://localhost:8080/playground.
Once the app has started you can explore the example schema by opening the GraphQL Playground endpoint at http://localhost:8080/playground.
7 changes: 3 additions & 4 deletions examples/spring/pom.xml
Expand Up @@ -3,9 +3,9 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.expediagroup</groupId>
<artifactId>graphql-kotlin</artifactId>
<artifactId>examples</artifactId>
<version>1.1.1-SNAPSHOT</version>
<relativePath>../..</relativePath>
<relativePath>..</relativePath>
</parent>

<artifactId>spring-example</artifactId>
Expand All @@ -14,8 +14,7 @@
<packaging>jar</packaging>

<properties>
<spring-boot.version>2.2.0.M5</spring-boot.version>

<project.root>${project.basedir}/../..</project.root>
<!-- skip release plugins -->
<maven.source.skip>true</maven.source.skip>
</properties>
Expand Down
5 changes: 4 additions & 1 deletion graphql-kotlin-federation/pom.xml
Expand Up @@ -10,9 +10,12 @@
</parent>

<artifactId>graphql-kotlin-federation</artifactId>
<name>graphql-kotlin-federation</name>
<packaging>jar</packaging>

<properties>
<project.root>${project.basedir}/..</project.root>
</properties>

<build>
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
<testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
Expand Down
1 change: 1 addition & 0 deletions graphql-kotlin-schema-generator/pom.xml
Expand Up @@ -14,6 +14,7 @@
<packaging>jar</packaging>

<properties>
<project.root>${project.basedir}/..</project.root>
<rxjava2.version>2.2.12</rxjava2.version>
</properties>

Expand Down
2 changes: 1 addition & 1 deletion graphql-kotlin-spring-server/pom.xml
Expand Up @@ -12,7 +12,7 @@
<packaging>jar</packaging>

<properties>
<spring-boot.version>2.2.0.RC1</spring-boot.version>
<project.root>${project.basedir}/..</project.root>
<reactor.version>3.3.0.RELEASE</reactor.version>
<reactor-kotlin-extensions.version>1.0.0.RELEASE</reactor-kotlin-extensions.version>
</properties>
Expand Down
4 changes: 3 additions & 1 deletion pom.xml
Expand Up @@ -59,13 +59,15 @@
<!-- Project Versions -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<project.root>${project.basedir}</project.root>

<!-- Dependency Versions -->
<graphql-java.version>13.0</graphql-java.version>
<jackson-module-kotlin.version>2.10.0</jackson-module-kotlin.version>
<kotlin.version>1.3.50</kotlin.version>
<kotlin-coroutines.version>1.3.2</kotlin-coroutines.version>
<reflections.version>0.9.11</reflections.version>
<spring-boot.version>2.2.0.RC1</spring-boot.version>

<!-- Test Dependency Versions -->
<junit-jupiter.version>5.5.2</junit-jupiter.version>
Expand Down Expand Up @@ -132,7 +134,7 @@
<arg value="--input" />
<arg value="${project.basedir}${file.separator}src" />
<arg value="--config" />
<arg value="${project.parent.relativePath}${file.separator}detekt.yml" />
<arg value="${project.root}${file.separator}detekt.yml" />
<arg value="--report" />
<arg value="html:${project.basedir}${file.separator}target${file.separator}site${file.separator}detekt.html" />
<arg value="--report" />
Expand Down