-
Notifications
You must be signed in to change notification settings - Fork 2
/
pom.xml
139 lines (125 loc) · 4.48 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.1</version>
<relativePath />
</parent>
<groupId>com.graphql-java-generator</groupId>
<artifactId>GraphQL-Forum-Maven-Sample-server</artifactId>
<version>local-SNAPSHOT</version>
<url>https://github.com/graphql-java-generator/GraphQL-Forum-Maven-Sample-client
</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- The graphql plugin's version, used in this tutorial -->
<graphql-maven-plugin.version>2.4</graphql-maven-plugin.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>com.graphql-java-generator</groupId>
<artifactId>graphql-maven-plugin</artifactId>
<version>${graphql-maven-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>generateServerCode</goal>
</goals>
</execution>
</executions>
<configuration>
<!-- Let's configure the GraphQL Gradle Plugin: -->
<!-- All available parameters are described here: -->
<!-- https://graphql-maven-plugin-project.graphql-java-generator.com/graphql-maven-plugin/generateServerCode-mojo.html -->
<packageName>org.forum.server.graphql</packageName>
<scanBasePackages>org.forum.server.impl, org.forum.server.jpa</scanBasePackages>
<schemaPersonalizationFile>src/main/graphql/forum_personalization.json</schemaPersonalizationFile>
<useJakartaEE9>true</useJakartaEE9> <!-- This is mandatory for Spring Boot 3 -->
<customScalars>
<customScalar>
<graphQLTypeName>Date</graphQLTypeName>
<javaType>java.util.Date</javaType>
<graphQLScalarTypeStaticField>com.graphql_java_generator.customscalars.GraphQLScalarTypeDate.Date
</graphQLScalarTypeStaticField>
</customScalar>
</customScalars>
</configuration>
</plugin>
<plugin>
<!-- This helps by adding the generated source in the build path of your IDE -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/graphql-maven-plugin</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!-- Needed to properly package the jar or war, so that spring can link all resources together -->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>org.forum.server.graphql.util.GraphQLServerMain</mainClass>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<!-- Dependencies for GraphQL -->
<dependency>
<groupId>com.graphql-java-generator</groupId>
<artifactId>graphql-java-server-runtime</artifactId>
<version>${graphql-maven-plugin.version}</version>
</dependency>
<!-- Mandatory to enable Web Sockets for Spring-mvc application (mandatory for subscription) -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
<!-- Database access dependencies -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<!-- Only here for the tests, to load the data in an in-memory database -->
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<!-- A mapper that'll help you to create Entities from GraphQL objects, and reverse -->
<dependency>
<groupId>com.github.dozermapper</groupId>
<artifactId>dozer-core</artifactId>
<version>6.5.2</version>
</dependency>
</dependencies>
</project>