|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<project xmlns="http://maven.apache.org/POM/4.0.0" |
| 3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 4 | + <parent> |
| 5 | + <artifactId>kafka-ui</artifactId> |
| 6 | + <groupId>com.provectus</groupId> |
| 7 | + <version>0.2.2-SNAPSHOT</version> |
| 8 | + </parent> |
| 9 | + |
| 10 | + <modelVersion>4.0.0</modelVersion> |
| 11 | + <artifactId>kafka-ui-contract</artifactId> |
| 12 | + |
| 13 | + <profiles> |
| 14 | + <profile> |
| 15 | + <id>generate-spring-webflux-api</id> |
| 16 | + <activation> |
| 17 | + <activeByDefault>true</activeByDefault> |
| 18 | + </activation> |
| 19 | + |
| 20 | + <dependencies> |
| 21 | + <dependency> |
| 22 | + <groupId>org.springframework.boot</groupId> |
| 23 | + <artifactId>spring-boot-starter-webflux</artifactId> |
| 24 | + <version>${spring-boot.version}</version> |
| 25 | + </dependency> |
| 26 | + <dependency> |
| 27 | + <groupId>org.springframework.boot</groupId> |
| 28 | + <artifactId>spring-boot-starter-validation</artifactId> |
| 29 | + <version>${spring-boot.version}</version> |
| 30 | + </dependency> |
| 31 | + <dependency> |
| 32 | + <groupId>io.swagger</groupId> |
| 33 | + <artifactId>swagger-annotations</artifactId> |
| 34 | + <version>${swagger-annotations.version}</version> |
| 35 | + </dependency> |
| 36 | + <dependency> |
| 37 | + <groupId>org.openapitools</groupId> |
| 38 | + <artifactId>jackson-databind-nullable</artifactId> |
| 39 | + <version>${jackson-databind-nullable.version}</version> |
| 40 | + </dependency> |
| 41 | + <dependency> |
| 42 | + <groupId>com.google.code.findbugs</groupId> |
| 43 | + <artifactId>jsr305</artifactId> |
| 44 | + <version>3.0.2</version> |
| 45 | + <scope>provided</scope> |
| 46 | + </dependency> |
| 47 | + </dependencies> |
| 48 | + |
| 49 | + <build> |
| 50 | + <plugins> |
| 51 | + <plugin> |
| 52 | + <groupId>org.openapitools</groupId> |
| 53 | + <artifactId>openapi-generator-maven-plugin</artifactId> |
| 54 | + <version>${openapi-generator-maven-plugin.version}</version> |
| 55 | + <executions> |
| 56 | + <execution> |
| 57 | + <id>generate-kafka-ui-client</id> |
| 58 | + <goals> |
| 59 | + <goal>generate</goal> |
| 60 | + </goals> |
| 61 | + <configuration> |
| 62 | + <inputSpec>${project.basedir}/src/main/resources/swagger/kafka-ui-api.yaml |
| 63 | + </inputSpec> |
| 64 | + <output>${project.build.directory}/generated-sources/kafka-ui-client</output> |
| 65 | + <generatorName>java</generatorName> |
| 66 | + <generateApiTests>false</generateApiTests> |
| 67 | + <generateModelTests>false</generateModelTests> |
| 68 | + <configOptions> |
| 69 | + <modelPackage>com.provectus.kafka.ui.api.model</modelPackage> |
| 70 | + <apiPackage>com.provectus.kafka.ui.api.api</apiPackage> |
| 71 | + <sourceFolder>kafka-ui-client</sourceFolder> |
| 72 | + <asyncNative>true</asyncNative> |
| 73 | + <library>webclient</library> |
| 74 | + <useBeanValidation>true</useBeanValidation> |
| 75 | + <dateLibrary>java8</dateLibrary> |
| 76 | + </configOptions> |
| 77 | + </configuration> |
| 78 | + </execution> |
| 79 | + <execution> |
| 80 | + <id>generate-backend-api</id> |
| 81 | + <goals> |
| 82 | + <goal>generate</goal> |
| 83 | + </goals> |
| 84 | + <configuration> |
| 85 | + <inputSpec>${project.basedir}/src/main/resources/swagger/kafka-ui-api.yaml |
| 86 | + </inputSpec> |
| 87 | + <output>${project.build.directory}/generated-sources/api</output> |
| 88 | + <generatorName>spring</generatorName> |
| 89 | + <modelNameSuffix>DTO</modelNameSuffix> |
| 90 | + <configOptions> |
| 91 | + <modelPackage>com.provectus.kafka.ui.model</modelPackage> |
| 92 | + <apiPackage>com.provectus.kafka.ui.api</apiPackage> |
| 93 | + <sourceFolder>kafka-ui-contract</sourceFolder> |
| 94 | + |
| 95 | + <reactive>true</reactive> |
| 96 | + |
| 97 | + <interfaceOnly>true</interfaceOnly> |
| 98 | + <skipDefaultInterface>true</skipDefaultInterface> |
| 99 | + <useBeanValidation>true</useBeanValidation> |
| 100 | + <useTags>true</useTags> |
| 101 | + |
| 102 | + <dateLibrary>java8</dateLibrary> |
| 103 | + </configOptions> |
| 104 | + </configuration> |
| 105 | + </execution> |
| 106 | + <execution> |
| 107 | + <id>generate-connect-client</id> |
| 108 | + <goals> |
| 109 | + <goal>generate</goal> |
| 110 | + </goals> |
| 111 | + <configuration> |
| 112 | + <inputSpec>${project.basedir}/src/main/resources/swagger/kafka-connect-api.yaml |
| 113 | + </inputSpec> |
| 114 | + <output>${project.build.directory}/generated-sources/kafka-connect-client</output> |
| 115 | + <generatorName>java</generatorName> |
| 116 | + <generateApiTests>false</generateApiTests> |
| 117 | + <generateModelTests>false</generateModelTests> |
| 118 | + |
| 119 | + <configOptions> |
| 120 | + <modelPackage>com.provectus.kafka.ui.connect.model</modelPackage> |
| 121 | + <apiPackage>com.provectus.kafka.ui.connect.api</apiPackage> |
| 122 | + <sourceFolder>kafka-connect-client</sourceFolder> |
| 123 | + |
| 124 | + <asyncNative>true</asyncNative> |
| 125 | + <library>webclient</library> |
| 126 | + |
| 127 | + <useBeanValidation>true</useBeanValidation> |
| 128 | + <dateLibrary>java8</dateLibrary> |
| 129 | + </configOptions> |
| 130 | + </configuration> |
| 131 | + </execution> |
| 132 | + </executions> |
| 133 | + </plugin> |
| 134 | + <plugin> |
| 135 | + <groupId>com.github.eirslett</groupId> |
| 136 | + <artifactId>frontend-maven-plugin</artifactId> |
| 137 | + <version>${frontend-maven-plugin.version}</version> |
| 138 | + <configuration> |
| 139 | + <workingDirectory>../kafka-ui-react-app</workingDirectory> |
| 140 | + <environmentVariables> |
| 141 | + <REACT_APP_TAG>v${project.version}</REACT_APP_TAG> |
| 142 | + </environmentVariables> |
| 143 | + </configuration> |
| 144 | + <executions> |
| 145 | + <execution> |
| 146 | + <id>install node and npm</id> |
| 147 | + <goals> |
| 148 | + <goal>install-node-and-npm</goal> |
| 149 | + </goals> |
| 150 | + <configuration> |
| 151 | + <nodeVersion>${node.version}</nodeVersion> |
| 152 | + </configuration> |
| 153 | + </execution> |
| 154 | + <execution> |
| 155 | + <id>npm install</id> |
| 156 | + <goals> |
| 157 | + <goal>npm</goal> |
| 158 | + </goals> |
| 159 | + <configuration> |
| 160 | + <arguments>install</arguments> |
| 161 | + </configuration> |
| 162 | + </execution> |
| 163 | + <execution> |
| 164 | + <id>npm run gen:sources</id> |
| 165 | + <goals> |
| 166 | + <goal>npm</goal> |
| 167 | + </goals> |
| 168 | + <configuration> |
| 169 | + <arguments>run gen:sources</arguments> |
| 170 | + </configuration> |
| 171 | + </execution> |
| 172 | + </executions> |
| 173 | + </plugin> |
| 174 | + <plugin> |
| 175 | + <groupId>org.apache.maven.plugins</groupId> |
| 176 | + <artifactId>maven-clean-plugin</artifactId> |
| 177 | + <version>${maven-clean-plugin.version}</version> |
| 178 | + <configuration> |
| 179 | + <filesets> |
| 180 | + <fileset> |
| 181 | + <directory>${basedir}/${frontend-generated-sources-directory}</directory> |
| 182 | + </fileset> |
| 183 | + </filesets> |
| 184 | + </configuration> |
| 185 | + </plugin> |
| 186 | + <plugin> |
| 187 | + <groupId>org.apache.maven.plugins</groupId> |
| 188 | + <artifactId>maven-resources-plugin</artifactId> |
| 189 | + <version>${maven-resources-plugin.version}</version> |
| 190 | + <executions> |
| 191 | + <execution> |
| 192 | + <id>copy-resource-one</id> |
| 193 | + <phase>generate-resources</phase> |
| 194 | + <goals> |
| 195 | + <goal>copy-resources</goal> |
| 196 | + </goals> |
| 197 | + |
| 198 | + <configuration> |
| 199 | + <outputDirectory>${basedir}/${frontend-generated-sources-directory}</outputDirectory> |
| 200 | + <resources> |
| 201 | + <resource> |
| 202 | + <directory>${project.build.directory}/generated-sources/frontend/</directory> |
| 203 | + <includes> |
| 204 | + <include>**/*.ts</include> |
| 205 | + </includes> |
| 206 | + </resource> |
| 207 | + </resources> |
| 208 | + </configuration> |
| 209 | + </execution> |
| 210 | + </executions> |
| 211 | + |
| 212 | + </plugin> |
| 213 | + </plugins> |
| 214 | + </build> |
| 215 | + </profile> |
| 216 | + </profiles> |
| 217 | +</project> |
0 commit comments