pom.xml 9.3 KB
Newer Older
1
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
2 3
         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>5.8.1-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 79 80 81 82
                                    <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 已提交
83 84 85 86
                                </Character>
                            </customAnnotationsMapping>
                            <generateClient>true</generateClient>
                            <generateApis>false</generateApis>
87
                            <generateBuilder>true</generateBuilder>
B
Bogdan Kobylynskyi 已提交
88
                            <generateToString>true</generateToString>
89
                            <generateParameterizedFieldsResolvers>false</generateParameterizedFieldsResolvers>
B
Bogdan Kobylynskyi 已提交
90 91
                        </configuration>
                    </execution>
92 93 94 95 96 97 98
                </executions>
            </plugin>
            <!-- GraphQL Codegen Maven plugin -->

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
99
                <version>3.11.0</version>
100 101 102 103 104 105 106 107 108
                <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>
109
                            <version>1.18.26</version>
110 111 112 113
                        </annotationProcessorPath>
                        <annotationProcessorPath>
                            <groupId>org.mapstruct</groupId>
                            <artifactId>mapstruct-processor</artifactId>
114
                            <version>1.5.5.Final</version>
115 116 117 118 119 120 121 122 123 124 125
                        </annotationProcessorPath>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
B
Bogdan Kobylynskyi 已提交
126
            <version>2.7.10</version>
127 128 129 130
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-mongodb</artifactId>
131
            <version>2.7.14</version>
132 133 134 135 136
        </dependency>

        <dependency>
            <groupId>com.graphql-java-kickstart</groupId>
            <artifactId>graphql-spring-boot-starter</artifactId>
B
Bogdan Kobylynskyi 已提交
137
            <version>11.1.0</version>
138 139 140 141
        </dependency>
        <dependency>
            <groupId>com.graphql-java-kickstart</groupId>
            <artifactId>graphiql-spring-boot-starter</artifactId>
142
            <version>11.1.0</version>
143
        </dependency>
B
Bogdan Kobylynskyi 已提交
144 145 146
        <dependency>
            <groupId>com.graphql-java</groupId>
            <artifactId>graphql-java-extended-scalars</artifactId>
147
            <version>20.2</version>
B
Bogdan Kobylynskyi 已提交
148 149
        </dependency>

150

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

169 170 171
        <dependency>
            <groupId>org.mapstruct</groupId>
            <artifactId>mapstruct</artifactId>
172
            <version>1.5.5.Final</version>
173 174 175 176
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
177
            <version>1.18.28</version>
178
        </dependency>
179 180 181 182

        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
183
            <version>5.3.1</version>
184 185 186 187
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
188
            <version>5.9.3</version>
189 190 191 192
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
193
            <version>5.10.0</version>
194
        </dependency>
195 196
    </dependencies>

197 198 199 200 201 202 203 204
    <repositories>
        <repository>
            <id>jcenter</id>
            <name>jcenter</name>
            <url>https://jcenter.bintray.com</url>
        </repository>
    </repositories>

205
</project>