pom.xml 9.2 KB
Newer Older
1 2 3
<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
4 5

    <groupId>io.github.kobylynskyi</groupId>
6
    <artifactId>graphql-codegen-maven-plugin-example-client</artifactId>
7
    <version>4.1.4-SNAPSHOT</version>
8
    <name>graphql-codegen-maven-plugin-example-client</name>
9 10 11 12 13 14 15

    <build>
        <plugins>
            <!-- GraphQL Codegen Maven plugin -->
            <plugin>
                <groupId>io.github.kobylynskyi</groupId>
                <artifactId>graphql-codegen-maven-plugin</artifactId>
16 17
                <!-- use the latest available version:
                https://search.maven.org/artifact/io.github.kobylynskyi/graphql-codegen-maven-plugin -->
18
                <version>${project.version}</version>
19 20
                <executions>
                    <execution>
B
Bogdan Kobylynskyi 已提交
21
                        <id>generate-sources-product-client</id>
22 23 24 25
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
B
Bogdan Kobylynskyi 已提交
26 27 28
                            <graphqlSchemas>
                                <includePattern>schema-product-service\.graphqls</includePattern>
                            </graphqlSchemas>
29 30 31 32
                            <outputDir>${project.build.directory}/generated-sources/client</outputDir>
                            <modelPackageName>io.github.kobylynskyi.product.graphql.model</modelPackageName>
                            <customTypesMapping>
                                <DateTime>java.util.Date</DateTime>
33 34 35 36 37 38
                                <!-- Following code can be used to generate boxed types instead of primitives:
                                <property>
                                    <name>Int!</name>
                                    <value>Integer</value>
                                </property>
                                -->
39 40 41
                            </customTypesMapping>
                            <modelNameSuffix>TO</modelNameSuffix>
                            <generateApis>false</generateApis>
42 43
                            <generateClient>true</generateClient>
                            <generateParameterizedFieldsResolvers>false</generateParameterizedFieldsResolvers>
44 45 46 47
                        </configuration>
                    </execution>
                    <execution>
                        <id>generate-sources-server</id>
48 49 50 51
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
B
Bogdan Kobylynskyi 已提交
52 53 54
                            <graphqlSchemas>
                                <includePattern>schema\.graphqls</includePattern>
                            </graphqlSchemas>
55 56 57
                            <outputDir>${project.build.directory}/generated-sources/server</outputDir>
                            <apiPackageName>io.github.kobylynskyi.order.graphql.api</apiPackageName>
                            <modelPackageName>io.github.kobylynskyi.order.graphql.model</modelPackageName>
58 59 60 61 62 63
                            <customTypesMapping>
                                <DateTime>java.util.Date</DateTime>
                            </customTypesMapping>
                            <modelNameSuffix>TO</modelNameSuffix>
                        </configuration>
                    </execution>
B
Bogdan Kobylynskyi 已提交
64 65 66 67 68 69 70 71 72 73 74 75 76
                    <execution>
                        <id>generate-sources-starwars-client</id>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <graphqlSchemas>
                                <includePattern>schema-starwars-service\.graphqls</includePattern>
                            </graphqlSchemas>
                            <outputDir>${project.build.directory}/generated-sources/client-starwars</outputDir>
                            <modelPackageName>io.github.kobylynskyi.starwars.graphql</modelPackageName>
                            <customAnnotationsMapping>
                                <Character>
77 78
                                    <annotation1>@com.fasterxml.jackson.annotation.JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, property = "__typename")</annotation1>
                                    <annotation2>@com.fasterxml.jackson.databind.annotation.JsonTypeIdResolver(io.github.kobylynskyi.order.external.starwars.CharacterTypeResolver.class)</annotation2>
B
Bogdan Kobylynskyi 已提交
79 80 81 82
                                </Character>
                            </customAnnotationsMapping>
                            <generateClient>true</generateClient>
                            <generateApis>false</generateApis>
83
                            <generateBuilder>true</generateBuilder>
B
Bogdan Kobylynskyi 已提交
84
                            <generateToString>true</generateToString>
85
                            <generateParameterizedFieldsResolvers>false</generateParameterizedFieldsResolvers>
B
Bogdan Kobylynskyi 已提交
86 87
                        </configuration>
                    </execution>
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
                </executions>
            </plugin>
            <!-- GraphQL Codegen Maven plugin -->

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                    <source>1.8</source>
                    <target>1.8</target>
                    <showDeprecation>true</showDeprecation>
                    <annotationProcessorPaths>
                        <annotationProcessorPath>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
105
                            <version>1.18.12</version>
106 107 108 109
                        </annotationProcessorPath>
                        <annotationProcessorPath>
                            <groupId>org.mapstruct</groupId>
                            <artifactId>mapstruct-processor</artifactId>
B
Bogdan Kobylynskyi 已提交
110
                            <version>1.4.1.Final</version>
111 112 113 114 115 116 117 118 119 120 121
                        </annotationProcessorPath>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
122
            <version>2.4.3</version>
123 124 125 126
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-mongodb</artifactId>
127
            <version>2.4.2</version>
128 129 130 131 132
        </dependency>

        <dependency>
            <groupId>com.graphql-java-kickstart</groupId>
            <artifactId>graphql-spring-boot-starter</artifactId>
133
            <version>8.0.0</version>
134 135 136 137
        </dependency>
        <dependency>
            <groupId>com.graphql-java-kickstart</groupId>
            <artifactId>graphiql-spring-boot-starter</artifactId>
138
            <version>8.0.0</version>
139
        </dependency>
B
Bogdan Kobylynskyi 已提交
140 141 142
        <dependency>
            <groupId>com.graphql-java</groupId>
            <artifactId>graphql-java-extended-scalars</artifactId>
143
            <version>15.0.0</version>
B
Bogdan Kobylynskyi 已提交
144 145
        </dependency>

146

147 148 149
        <dependency>
            <groupId>io.github.kobylynskyi</groupId>
            <artifactId>graphql-java-codegen</artifactId>
150 151
            <!-- use the latest available version:
            https://search.maven.org/artifact/io.github.kobylynskyi/graphql-java-codegen -->
152 153 154 155 156
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
157
            <version>4.5.13</version>
158
        </dependency>
159 160 161 162 163
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <version>2.0.1.Final</version>
        </dependency>
164

165 166 167
        <dependency>
            <groupId>org.mapstruct</groupId>
            <artifactId>mapstruct</artifactId>
168
            <version>1.4.2.Final</version>
169 170 171 172
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
173
            <version>1.18.18</version>
174
        </dependency>
175 176 177 178

        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
179
            <version>4.3.3</version>
180 181 182 183
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
184
            <version>5.7.1</version>
185 186 187 188
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
189
            <version>5.7.1</version>
190
        </dependency>
191 192
    </dependencies>

193 194 195 196 197 198 199 200
    <repositories>
        <repository>
            <id>jcenter</id>
            <name>jcenter</name>
            <url>https://jcenter.bintray.com</url>
        </repository>
    </repositories>

201
</project>