pom.xml 8.6 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>2.4.2-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 33 34 35
                            <outputDir>${project.build.directory}/generated-sources/client</outputDir>
                            <modelPackageName>io.github.kobylynskyi.product.graphql.model</modelPackageName>
                            <customTypesMapping>
                                <DateTime>java.util.Date</DateTime>
                            </customTypesMapping>
                            <modelNameSuffix>TO</modelNameSuffix>
                            <generateApis>false</generateApis>
36 37
                            <generateClient>true</generateClient>
                            <generateParameterizedFieldsResolvers>false</generateParameterizedFieldsResolvers>
38 39 40 41
                        </configuration>
                    </execution>
                    <execution>
                        <id>generate-sources-server</id>
42 43 44 45
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
B
Bogdan Kobylynskyi 已提交
46 47 48
                            <graphqlSchemas>
                                <includePattern>schema\.graphqls</includePattern>
                            </graphqlSchemas>
49 50 51
                            <outputDir>${project.build.directory}/generated-sources/server</outputDir>
                            <apiPackageName>io.github.kobylynskyi.order.graphql.api</apiPackageName>
                            <modelPackageName>io.github.kobylynskyi.order.graphql.model</modelPackageName>
52 53 54 55 56 57
                            <customTypesMapping>
                                <DateTime>java.util.Date</DateTime>
                            </customTypesMapping>
                            <modelNameSuffix>TO</modelNameSuffix>
                        </configuration>
                    </execution>
B
Bogdan Kobylynskyi 已提交
58 59 60 61 62 63 64 65 66 67 68 69 70
                    <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>
71
                                    @com.fasterxml.jackson.annotation.JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, property = "__typename")
B
Bogdan Kobylynskyi 已提交
72 73 74 75 76 77 78
                                    @com.fasterxml.jackson.databind.annotation.JsonTypeIdResolver(io.github.kobylynskyi.order.external.starwars.CharacterTypeResolver.class)
                                </Character>
                            </customAnnotationsMapping>
                            <generateClient>true</generateClient>
                            <generateApis>false</generateApis>
                            <generateBuilder>false</generateBuilder>
                            <generateToString>true</generateToString>
79
                            <generateParameterizedFieldsResolvers>false</generateParameterizedFieldsResolvers>
B
Bogdan Kobylynskyi 已提交
80 81
                        </configuration>
                    </execution>
82 83 84 85 86 87 88 89 90 91 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>
                <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>
99
                            <version>1.18.12</version>
100 101 102 103
                        </annotationProcessorPath>
                        <annotationProcessorPath>
                            <groupId>org.mapstruct</groupId>
                            <artifactId>mapstruct-processor</artifactId>
104
                            <version>1.3.1.Final</version>
105 106 107 108 109 110 111 112 113 114 115
                        </annotationProcessorPath>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
116
            <version>2.3.2.RELEASE</version>
117 118 119 120
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-mongodb</artifactId>
121
            <version>2.3.2.RELEASE</version>
122 123 124 125 126
        </dependency>

        <dependency>
            <groupId>com.graphql-java-kickstart</groupId>
            <artifactId>graphql-spring-boot-starter</artifactId>
127
            <version>7.1.0</version>
128 129 130 131
        </dependency>
        <dependency>
            <groupId>com.graphql-java-kickstart</groupId>
            <artifactId>graphiql-spring-boot-starter</artifactId>
132
            <version>7.1.0</version>
133
        </dependency>
B
Bogdan Kobylynskyi 已提交
134 135 136
        <dependency>
            <groupId>com.graphql-java</groupId>
            <artifactId>graphql-java-extended-scalars</artifactId>
137
            <version>1.0.1</version>
B
Bogdan Kobylynskyi 已提交
138 139
        </dependency>

140

141 142 143
        <dependency>
            <groupId>io.github.kobylynskyi</groupId>
            <artifactId>graphql-java-codegen</artifactId>
144 145
            <!-- use the latest available version:
            https://search.maven.org/artifact/io.github.kobylynskyi/graphql-java-codegen -->
146 147 148 149 150 151 152
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5.12</version>
        </dependency>
153 154 155 156 157
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <version>2.0.1.Final</version>
        </dependency>
158

159 160 161
        <dependency>
            <groupId>org.mapstruct</groupId>
            <artifactId>mapstruct</artifactId>
162
            <version>1.3.1.Final</version>
163 164 165 166
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
167
            <version>1.18.12</version>
168
        </dependency>
169 170 171 172 173


        <dependency>
            <groupId>io.rest-assured</groupId>
            <artifactId>rest-assured</artifactId>
174
            <version>4.3.1</version>
175 176 177 178
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
179
            <version>5.6.2</version>
180 181 182 183
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
184
            <version>5.6.2</version>
185
        </dependency>
186 187 188
    </dependencies>

</project>