Skip to content

Commit 4baa6cc

Browse files
author
EtienneSF
committed
Dependencies retructured (with dedicated pom for client and server)
1 parent 4d5b1ac commit 4baa6cc

File tree

72 files changed

+261
-228
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+261
-228
lines changed

graphql-java-client-dependencies/README.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

graphql-java-client-dependencies/pom.xml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
1-
<?xml version="1.0"?>
2-
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
3-
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
1+
<project xmlns="http://maven.apache.org/POM/4.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
44
<modelVersion>4.0.0</modelVersion>
5-
65
<parent>
76
<groupId>com.graphql-java-generator</groupId>
87
<artifactId>graphql-java-generator</artifactId>
98
<version>0.3.0-SNAPSHOT</version>
109
</parent>
11-
1210
<artifactId>graphql-java-client-dependencies</artifactId>
13-
<description>This module contains no code. It contains only the dependencies uses by the client code generated by graphql-java-generator</description>
14-
11+
<packaging>pom</packaging>
12+
<description>This pom module contains the needed dependencies for the code generated by graphql-java-generator,
13+
when the plugin is in client mode. When you use maven plugin or the gradle plugin, just add this dependency
14+
so that the generated code embeds the necessary dependencies: &lt;dependency&gt;&lt;groupId&gt;com.xyz&lt;/groupId&gt;
15+
&lt;artifactId&gt;mvn-web-deps&lt;/artifactId&gt; &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt; &lt;type&gt;pom&lt;/type&gt;
16+
&lt;/dependency&gt;</description>
1517

1618
<dependencies>
1719
<!-- GraphQL dependencies -->
@@ -33,7 +35,6 @@
3335
<groupId>org.springframework.boot</groupId>
3436
<artifactId>spring-boot-starter-log4j2</artifactId>
3537
</dependency>
36-
3738
</dependencies>
3839

39-
</project>
40+
</project>

graphql-java-client/pom.xml renamed to graphql-java-runtime/pom.xml

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<version>0.3.0-SNAPSHOT</version>
1010
</parent>
1111

12-
<artifactId>graphql-java-client</artifactId>
12+
<artifactId>graphql-java-runtime</artifactId>
1313

1414
<build>
1515
<plugins>
@@ -42,8 +42,6 @@
4242
<artifactId>junit-jupiter-api</artifactId>
4343
<scope>test</scope>
4444
</dependency>
45-
<!-- dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter-params</artifactId> <version>${junit.jupiter.version}</version>
46-
<scope>test</scope> </dependency -->
4745
<dependency>
4846
<groupId>org.junit.jupiter</groupId>
4947
<artifactId>junit-jupiter-engine</artifactId>
@@ -59,14 +57,39 @@
5957
<artifactId>mockito-junit-jupiter</artifactId>
6058
<scope>test</scope>
6159
</dependency>
62-
63-
<!-- GraphQL dependencies -->
60+
6461
<dependency>
6562
<groupId>com.graphql-java-generator</groupId>
6663
<artifactId>graphql-java-client-dependencies</artifactId>
67-
<version>${project.version}</version>
64+
<type>pom</type>
65+
</dependency>
66+
<dependency>
67+
<groupId>com.graphql-java-generator</groupId>
68+
<artifactId>graphql-java-server-dependencies</artifactId>
69+
<type>pom</type>
6870
</dependency>
6971

72+
<!--
73+
<!- GraphQL dependencies ->
74+
<dependency>
75+
<groupId>com.graphql-java</groupId>
76+
<artifactId>graphql-java</artifactId>
77+
</dependency>
78+
<dependency>
79+
<groupId>commons-io</groupId>
80+
<artifactId>commons-io</artifactId>
81+
</dependency>
82+
83+
<!- Other dependencies ->
84+
<dependency>
85+
<groupId>org.springframework.boot</groupId>
86+
<artifactId>spring-boot-starter-jersey</artifactId>
87+
</dependency>
88+
<dependency>
89+
<groupId>org.springframework.boot</groupId>
90+
<artifactId>spring-boot-starter-log4j2</artifactId>
91+
</dependency>
92+
-->
7093
</dependencies>
7194

7295
</project>

graphql-java-client/src/main/java/graphql/java/client/annotation/GraphQLNonScalar.java renamed to graphql-java-runtime/src/main/java/graphql/java/annotation/GraphQLNonScalar.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package graphql.java.client.annotation;
1+
package graphql.java.annotation;
22

33
import java.lang.annotation.ElementType;
44
import java.lang.annotation.Retention;

graphql-java-client/src/main/java/graphql/java/client/annotation/GraphQLQuery.java renamed to graphql-java-runtime/src/main/java/graphql/java/annotation/GraphQLQuery.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package graphql.java.client.annotation;
1+
package graphql.java.annotation;
22

33
import java.lang.annotation.ElementType;
44
import java.lang.annotation.Retention;

graphql-java-client/src/main/java/graphql/java/client/annotation/GraphQLScalar.java renamed to graphql-java-runtime/src/main/java/graphql/java/annotation/GraphQLScalar.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package graphql.java.client.annotation;
1+
package graphql.java.annotation;
22

33
import java.lang.annotation.ElementType;
44
import java.lang.annotation.Retention;

graphql-java-client/src/main/java/graphql/java/client/annotation/package-info.java renamed to graphql-java-runtime/src/main/java/graphql/java/annotation/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
* All annotations used by the GraphQL-generator client part
33
*/
44

5-
package graphql.java.client.annotation;
5+
package graphql.java.annotation;

graphql-java-client/src/main/java/graphql/java/client/GraphqlUtils.java renamed to graphql-java-runtime/src/main/java/graphql/java/client/GraphqlUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
import java.util.regex.Matcher;
1212
import java.util.regex.Pattern;
1313

14-
import graphql.java.client.annotation.GraphQLNonScalar;
15-
import graphql.java.client.annotation.GraphQLScalar;
14+
import graphql.java.annotation.GraphQLNonScalar;
15+
import graphql.java.annotation.GraphQLScalar;
1616
import graphql.java.client.request.ObjectResponse;
1717
import graphql.java.client.response.GraphQLRequestPreparationException;
1818

graphql-java-client/src/main/java/graphql/java/client/request/Builder.java renamed to graphql-java-runtime/src/main/java/graphql/java/client/request/Builder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
import java.util.List;
66
import java.util.StringTokenizer;
77

8+
import graphql.java.annotation.GraphQLScalar;
89
import graphql.java.client.GraphqlUtils;
9-
import graphql.java.client.annotation.GraphQLScalar;
1010
import graphql.java.client.response.GraphQLRequestPreparationException;
1111

1212
/**

graphql-java-client/src/test/java/graphql/java/client/domain/forum/Board.java renamed to graphql-java-runtime/src/test/java/graphql/java/client/domain/forum/Board.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
import java.util.List;
44

55
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
6-
import graphql.java.client.annotation.GraphQLNonScalar;
7-
import graphql.java.client.annotation.GraphQLScalar;
6+
7+
import graphql.java.annotation.GraphQLNonScalar;
8+
import graphql.java.annotation.GraphQLScalar;
89

910
/**
1011
* @author generated by graphql-java-generator

graphql-java-client/src/test/java/graphql/java/client/domain/forum/Member.java renamed to graphql-java-runtime/src/test/java/graphql/java/client/domain/forum/Member.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package graphql.java.client.domain.forum;
22

3-
import graphql.java.client.annotation.GraphQLScalar;
3+
import graphql.java.annotation.GraphQLScalar;
44

55
/**
66
* @author generated by graphql-java-generator

graphql-java-client/src/test/java/graphql/java/client/domain/forum/MutationType.java renamed to graphql-java-runtime/src/test/java/graphql/java/client/domain/forum/MutationType.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
import org.apache.logging.log4j.LogManager;
88
import org.apache.logging.log4j.Logger;
99

10+
import graphql.java.annotation.GraphQLNonScalar;
11+
import graphql.java.annotation.GraphQLQuery;
1012
import graphql.java.client.QueryExecutor;
1113
import graphql.java.client.QueryExecutorImpl;
12-
import graphql.java.client.annotation.GraphQLNonScalar;
13-
import graphql.java.client.annotation.GraphQLQuery;
1414
import graphql.java.client.request.Builder;
1515
import graphql.java.client.request.InputParameter;
1616
import graphql.java.client.request.ObjectResponse;

graphql-java-client/src/test/java/graphql/java/client/domain/forum/Post.java renamed to graphql-java-runtime/src/test/java/graphql/java/client/domain/forum/Post.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
import java.util.List;
44

55
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
6-
import graphql.java.client.annotation.GraphQLNonScalar;
7-
import graphql.java.client.annotation.GraphQLScalar;
6+
7+
import graphql.java.annotation.GraphQLNonScalar;
8+
import graphql.java.annotation.GraphQLScalar;
89

910
/**
1011
* @author generated by graphql-java-generator

graphql-java-client/src/test/java/graphql/java/client/domain/forum/QueryType.java renamed to graphql-java-runtime/src/test/java/graphql/java/client/domain/forum/QueryType.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
import org.apache.logging.log4j.LogManager;
88
import org.apache.logging.log4j.Logger;
99

10+
import graphql.java.annotation.GraphQLNonScalar;
11+
import graphql.java.annotation.GraphQLQuery;
1012
import graphql.java.client.QueryExecutor;
1113
import graphql.java.client.QueryExecutorImpl;
12-
import graphql.java.client.annotation.GraphQLNonScalar;
13-
import graphql.java.client.annotation.GraphQLQuery;
1414
import graphql.java.client.request.Builder;
1515
import graphql.java.client.request.InputParameter;
1616
import graphql.java.client.request.ObjectResponse;

graphql-java-client/src/test/java/graphql/java/client/domain/forum/Topic.java renamed to graphql-java-runtime/src/test/java/graphql/java/client/domain/forum/Topic.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
import java.util.List;
44

55
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
6-
import graphql.java.client.annotation.GraphQLNonScalar;
7-
import graphql.java.client.annotation.GraphQLScalar;
6+
7+
import graphql.java.annotation.GraphQLNonScalar;
8+
import graphql.java.annotation.GraphQLScalar;
89

910
/**
1011
* @author generated by graphql-java-generator

graphql-java-client/src/test/java/graphql/java/client/domain/starwars/Character.java renamed to graphql-java-runtime/src/test/java/graphql/java/client/domain/starwars/Character.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
77

8-
import graphql.java.client.annotation.GraphQLNonScalar;
9-
import graphql.java.client.annotation.GraphQLScalar;
8+
import graphql.java.annotation.GraphQLNonScalar;
9+
import graphql.java.annotation.GraphQLScalar;
1010

1111
/**
1212
* @author generated by graphql-java-generator

graphql-java-client/src/test/java/graphql/java/client/domain/starwars/CharacterImpl.java renamed to graphql-java-runtime/src/test/java/graphql/java/client/domain/starwars/CharacterImpl.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
import java.util.List;
44

55
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
6-
import graphql.java.client.annotation.GraphQLNonScalar;
7-
import graphql.java.client.annotation.GraphQLScalar;
6+
7+
import graphql.java.annotation.GraphQLNonScalar;
8+
import graphql.java.annotation.GraphQLScalar;
89

910
/**
1011
* @author generated by graphql-java-generator

graphql-java-client/src/test/java/graphql/java/client/domain/starwars/Droid.java renamed to graphql-java-runtime/src/test/java/graphql/java/client/domain/starwars/Droid.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
import java.util.List;
44

55
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
6-
import graphql.java.client.annotation.GraphQLNonScalar;
7-
import graphql.java.client.annotation.GraphQLScalar;
6+
7+
import graphql.java.annotation.GraphQLNonScalar;
8+
import graphql.java.annotation.GraphQLScalar;
89

910
/**
1011
* @author generated by graphql-java-generator

graphql-java-client/src/test/java/graphql/java/client/domain/starwars/Human.java renamed to graphql-java-runtime/src/test/java/graphql/java/client/domain/starwars/Human.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
import java.util.List;
44

55
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
6-
import graphql.java.client.annotation.GraphQLNonScalar;
7-
import graphql.java.client.annotation.GraphQLScalar;
6+
7+
import graphql.java.annotation.GraphQLNonScalar;
8+
import graphql.java.annotation.GraphQLScalar;
89

910
/**
1011
* @author generated by graphql-java-generator

graphql-java-client/src/test/java/graphql/java/client/domain/starwars/MutationType.java renamed to graphql-java-runtime/src/test/java/graphql/java/client/domain/starwars/MutationType.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
import org.apache.logging.log4j.LogManager;
88
import org.apache.logging.log4j.Logger;
99

10+
import graphql.java.annotation.GraphQLNonScalar;
11+
import graphql.java.annotation.GraphQLQuery;
1012
import graphql.java.client.QueryExecutor;
1113
import graphql.java.client.QueryExecutorImpl;
12-
import graphql.java.client.annotation.GraphQLNonScalar;
13-
import graphql.java.client.annotation.GraphQLQuery;
1414
import graphql.java.client.request.Builder;
1515
import graphql.java.client.request.InputParameter;
1616
import graphql.java.client.request.ObjectResponse;

graphql-java-client/src/test/java/graphql/java/client/domain/starwars/QueryType.java renamed to graphql-java-runtime/src/test/java/graphql/java/client/domain/starwars/QueryType.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
import org.apache.logging.log4j.LogManager;
1111
import org.apache.logging.log4j.Logger;
1212

13+
import graphql.java.annotation.GraphQLNonScalar;
14+
import graphql.java.annotation.GraphQLQuery;
1315
import graphql.java.client.QueryExecutor;
1416
import graphql.java.client.QueryExecutorImpl;
15-
import graphql.java.client.annotation.GraphQLNonScalar;
16-
import graphql.java.client.annotation.GraphQLQuery;
1717
import graphql.java.client.request.Builder;
1818
import graphql.java.client.request.InputParameter;
1919
import graphql.java.client.request.ObjectResponse;

graphql-java-client/src/test/java/graphql/java/client/domain/starwars/ScalarTest.java renamed to graphql-java-runtime/src/test/java/graphql/java/client/domain/starwars/ScalarTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package graphql.java.client.domain.starwars;
22

3-
import graphql.java.client.annotation.GraphQLScalar;
3+
import graphql.java.annotation.GraphQLScalar;
44

55
public class ScalarTest {
66

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<parent>
6+
<groupId>com.graphql-java-generator</groupId>
7+
<artifactId>graphql-java-generator</artifactId>
8+
<version>0.3.0-SNAPSHOT</version>
9+
</parent>
10+
<artifactId>graphql-java-server-dependencies</artifactId>
11+
<packaging>pom</packaging>
12+
<description>This pom module contains the needed dependencies for the code generated by graphql-java-generator,
13+
when the plugin is in server mode. When you use maven plugin or the gradle plugin, just add this dependency
14+
so that the generated code embeds the necessary dependencies: &lt;dependency&gt;&lt;groupId&gt;com.xyz&lt;/groupId&gt;
15+
&lt;artifactId&gt;mvn-web-deps&lt;/artifactId&gt; &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt; &lt;type&gt;pom&lt;/type&gt;
16+
&lt;/dependency&gt;</description>
17+
18+
<dependencies>
19+
<!-- Dependencies for GraphQL -->
20+
<dependency>
21+
<!-- The needed runtime to link graphql-java to the spring boot stuff -->
22+
<groupId>com.graphql-java</groupId>
23+
<artifactId>graphql-java-spring-boot-starter-webmvc</artifactId>
24+
</dependency>
25+
26+
<!-- Other dependencies -->
27+
<dependency>
28+
<groupId>org.springframework.boot</groupId>
29+
<artifactId>spring-boot-starter-web</artifactId>
30+
</dependency>
31+
<dependency>
32+
<!-- You need to provide in your pom the fact the this dependency is provided.
33+
This is to ensure that the embedded servlet container does not interfere
34+
with the servlet container to which the war file is deployed -->
35+
<!-- If you just import the graphql-java-servlet-dependencies pom in your
36+
own pom, this dependency is imported as compile scope -->
37+
<groupId>org.springframework.boot</groupId>
38+
<artifactId>spring-boot-starter-tomcat</artifactId>
39+
<scope>provided</scope>
40+
</dependency>
41+
<dependency>
42+
<groupId>org.springframework.boot</groupId>
43+
<artifactId>spring-boot-starter-log4j2</artifactId>
44+
</dependency>
45+
<dependency>
46+
<groupId>org.springframework.boot</groupId>
47+
<artifactId>spring-boot-starter-data-jpa</artifactId>
48+
</dependency>
49+
50+
</dependencies>
51+
52+
</project>

graphql-maven-plugin-samples/graphql-maven-plugin-samples-Forum-client/pom.xml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?xml version="1.0"?>
2-
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
3-
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
2+
<project
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
4+
xmlns="http://maven.apache.org/POM/4.0.0"
5+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
46
<modelVersion>4.0.0</modelVersion>
57
<parent>
68
<groupId>com.graphql-java-generator</groupId>
@@ -41,7 +43,8 @@
4143
</executions>
4244
</plugin>
4345
<plugin>
44-
<!-- This plugin allows to start the SpringBoot Forum-server in the background during the integration tests -->
46+
<!-- This plugin allows to start the SpringBoot Forum-server in the background
47+
during the integration tests -->
4548
<groupId>com.bazaarvoice.maven.plugins</groupId>
4649
<artifactId>process-exec-maven-plugin</artifactId>
4750
<executions>
@@ -132,7 +135,7 @@
132135
<dependency>
133136
<groupId>com.graphql-java-generator</groupId>
134137
<artifactId>graphql-java-client-dependencies</artifactId>
135-
<version>${project.version}</version>
138+
<type>pom</type>
136139
</dependency>
137140
</dependencies>
138141

0 commit comments

Comments
 (0)