blob: 890c400ff433b961e4ac470801a6aea711ab19d6 [file] [log] [blame]
Giorgi Lekveishvili285ab622023-11-22 13:50:45 +04001<?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"
4 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5 <modelVersion>4.0.0</modelVersion>
6
7 <groupId>com.google.gerrit.operator</groupId>
8 <artifactId>operator</artifactId>
9 <version>${revision}</version>
10
11 <name>Gerrit Kubernetes Operator</name>
12 <description>Provisions and operates Gerrit instances in Kubernetes</description>
13 <packaging>jar</packaging>
14
15 <properties>
16 <revision>1.0.0-SNAPSHOT</revision>
17
18 <fabric8.version>6.6.2</fabric8.version>
19 <flogger.version>0.7.4</flogger.version>
20 <guice.version>5.1.0</guice.version>
21 <javaoperatorsdk.version>4.3.3</javaoperatorsdk.version>
22 <jetty.version>11.0.15</jetty.version>
23 <lombok.version>1.18.28</lombok.version>
24 <maven.compiler.source>11</maven.compiler.source>
25 <maven.compiler.target>11</maven.compiler.target>
26 <docker.registry>docker.io</docker.registry>
27 <docker.org>k8sgerrit</docker.org>
28
29 <test.docker.registry>docker.io</test.docker.registry>
30 <test.docker.org>k8sgerritdev</test.docker.org>
31 </properties>
32
33 <profiles>
34 <profile>
35 <id>publish</id>
36 <build>
37 <plugins>
38 <plugin>
39 <groupId>com.google.cloud.tools</groupId>
40 <artifactId>jib-maven-plugin</artifactId>
41 <version>3.3.1</version>
42 <executions>
43 <execution>
44 <phase>package</phase>
45 <goals>
46 <goal>build</goal>
47 </goals>
48 <configuration>
49 <container>
50 <mainClass>com.google.gerrit.k8s.operator.Main</mainClass>
51 </container>
52 <containerizingMode>packaged</containerizingMode>
53 <from>
54 <image>gcr.io/distroless/java:11</image>
55 </from>
56 <to>
57 <image>${docker.registry}/${docker.org}/gerrit-operator</image>
58 <tags>
59 <tag>${project.version}</tag>
60 </tags>
61 </to>
62 </configuration>
63 </execution>
64 </executions>
65 </plugin>
66 </plugins>
67 </build>
68 </profile>
69 <profile>
70 <id>integration-test</id>
71 <build>
72 <plugins>
73 <plugin>
74 <groupId>org.codehaus.mojo</groupId>
75 <artifactId>properties-maven-plugin</artifactId>
76 <version>1.1.0</version>
77 <executions>
78 <execution>
79 <phase>initialize</phase>
80 <goals>
81 <goal>read-project-properties</goal>
82 </goals>
83 <configuration>
84 <files>
85 <file>${basedir}/test.properties</file>
86 </files>
87 </configuration>
88 </execution>
89 </executions>
90 </plugin>
91 <plugin>
92 <groupId>com.google.cloud.tools</groupId>
93 <artifactId>jib-maven-plugin</artifactId>
94 <version>3.3.1</version>
95 <executions>
96 <execution>
97 <phase>pre-integration-test</phase>
98 <goals>
99 <goal>build</goal>
100 </goals>
101 <configuration>
102 <container>
103 <mainClass>com.google.gerrit.k8s.operator.Main</mainClass>
104 </container>
105 <containerizingMode>packaged</containerizingMode>
106 <from>
107 <image>gcr.io/distroless/java:11</image>
108 </from>
109 <to>
110 <image>
111 ${test.docker.registry}/${test.docker.org}/gerrit-operator</image>
112 <tags>
113 <tag>${project.version}</tag>
114 </tags>
115 </to>
116 </configuration>
117 </execution>
118 </executions>
119 </plugin>
120 <plugin>
121 <artifactId>maven-failsafe-plugin</artifactId>
122 <version>2.22.2</version>
123 <executions>
124 <execution>
125 <phase>integration-test</phase>
126 <goals>
127 <goal>integration-test</goal>
128 <goal>verify</goal>
129 </goals>
130 <configuration>
131 <includes>
132 <include>**/*E2E.java</include>
133 </includes>
134 </configuration>
135 </execution>
136 </executions>
137 </plugin>
138 </plugins>
139 </build>
140 </profile>
141 </profiles>
142
143 <dependencies>
144 <dependency>
145 <groupId>io.javaoperatorsdk</groupId>
146 <artifactId>operator-framework</artifactId>
147 <version>${javaoperatorsdk.version}</version>
148 </dependency>
149 <dependency>
150 <groupId>io.javaoperatorsdk</groupId>
151 <artifactId>micrometer-support</artifactId>
152 <version>${javaoperatorsdk.version}</version>
153 </dependency>
154 <dependency>
155 <groupId>io.javaoperatorsdk</groupId>
156 <artifactId>operator-framework-junit-5</artifactId>
157 <version>${javaoperatorsdk.version}</version>
158 <scope>test</scope>
159 </dependency>
160 <dependency>
161 <groupId>io.fabric8</groupId>
162 <artifactId>kubernetes-client</artifactId>
163 <version>${fabric8.version}</version>
164 </dependency>
165 <dependency>
166 <groupId>io.fabric8</groupId>
167 <artifactId>istio-client</artifactId>
168 <version>${fabric8.version}</version>
169 </dependency>
170 <dependency>
171 <groupId>io.fabric8</groupId>
172 <artifactId>crd-generator-apt</artifactId>
173 <version>${fabric8.version}</version>
174 <scope>provided</scope>
175 </dependency>
176 <dependency>
177 <groupId>io.fabric8</groupId>
178 <artifactId>generator-annotations</artifactId>
179 <version>${fabric8.version}</version>
180 </dependency>
181 <dependency>
182 <groupId>org.projectlombok</groupId>
183 <artifactId>lombok</artifactId>
184 <scope>provided</scope>
185 <version>${lombok.version}</version>
186 </dependency>
187 <dependency>
188 <groupId>org.eclipse.jetty</groupId>
189 <artifactId>jetty-server</artifactId>
190 <version>${jetty.version}</version>
191 </dependency>
192 <dependency>
193 <groupId>org.eclipse.jetty</groupId>
194 <artifactId>jetty-servlet</artifactId>
195 <version>${jetty.version}</version>
196 </dependency>
197 <dependency>
198 <groupId>com.google.flogger</groupId>
199 <artifactId>flogger</artifactId>
200 <version>${flogger.version}</version>
201 </dependency>
202 <dependency>
203 <groupId>com.google.flogger</groupId>
204 <artifactId>flogger-log4j2-backend</artifactId>
205 <version>${flogger.version}</version>
206 </dependency>
207 <dependency>
208 <groupId>com.google.inject</groupId>
209 <artifactId>guice</artifactId>
210 <version>${guice.version}</version>
211 </dependency>
212 <dependency>
213 <groupId>com.google.inject.extensions</groupId>
214 <artifactId>guice-assistedinject</artifactId>
215 <version>${guice.version}</version>
216 </dependency>
217 <dependency>
218 <groupId>org.apache.logging.log4j</groupId>
219 <artifactId>log4j-slf4j-impl</artifactId>
220 <version>2.19.0</version>
221 </dependency>
222 <dependency>
223 <groupId>org.eclipse.jgit</groupId>
224 <artifactId>org.eclipse.jgit</artifactId>
225 <version>6.5.0.202303070854-r</version>
226 </dependency>
227 <dependency>
228 <groupId>org.bouncycastle</groupId>
229 <artifactId>bcpkix-jdk18on</artifactId>
230 <version>1.73</version>
231 </dependency>
232 <dependency>
233 <groupId>com.urswolfer.gerrit.client.rest</groupId>
234 <artifactId>gerrit-rest-java-client</artifactId>
235 <version>0.9.5</version>
236 <scope>test</scope>
237 </dependency>
238 <dependency>
239 <groupId>org.mockito</groupId>
240 <artifactId>mockito-core</artifactId>
241 <version>4.8.0</version>
242 <scope>test</scope>
243 </dependency>
244 <dependency>
245 <groupId>io.fabric8</groupId>
246 <artifactId>kubernetes-server-mock</artifactId>
247 <version>${fabric8.version}</version>
248 <scope>test</scope>
249 </dependency>
250 <dependency>
251 <groupId>com.google.truth</groupId>
252 <artifactId>truth</artifactId>
253 <version>0.32</version>
254 </dependency>
255 <dependency>
256 <groupId>org.junit.jupiter</groupId>
257 <artifactId>junit-jupiter-params</artifactId>
258 <version>5.9.2</version>
259 <scope>test</scope>
260 </dependency>
261 </dependencies>
262
263 <build>
264 <plugins>
265 <plugin>
266 <groupId>io.fabric8</groupId>
267 <artifactId>java-generator-maven-plugin</artifactId>
268 <version>${fabric8.version}</version>
269 <configuration>
270 <source>${project.basedir}/src/main/resources/crd/emissary-crds.yaml</source>
271 <!-- Generate sundrio @Buildable annotations that generate Builder classes-->
272 <extraAnnotations>true</extraAnnotations>
273 </configuration>
274 <executions>
275 <execution>
276 <goals>
277 <goal>generate</goal>
278 </goals>
279 </execution>
280 </executions>
281 </plugin>
282 <plugin>
283 <groupId>com.spotify.fmt</groupId>
284 <artifactId>fmt-maven-plugin</artifactId>
285 <version>2.19</version>
286 <executions>
287 <execution>
288 <goals>
289 <goal>format</goal>
290 </goals>
291 </execution>
292 </executions>
293 </plugin>
294 <plugin>
295 <groupId>org.apache.maven.plugins</groupId>
296 <artifactId>maven-jar-plugin</artifactId>
297 <version>3.2.2</version>
298 <configuration>
299 <archive>
300 <manifest>
301 <mainClass>com.google.gerrit.k8s.operator.Main</mainClass>
302 <addDefaultImplementationEntries>
303 true
304 </addDefaultImplementationEntries>
305 </manifest>
306 </archive>
307 </configuration>
308 </plugin>
309 <plugin>
310 <groupId>com.google.cloud.tools</groupId>
311 <artifactId>jib-maven-plugin</artifactId>
312 <version>3.3.1</version>
313 <executions>
314 <execution>
315 <phase>package</phase>
316 <goals>
317 <goal>dockerBuild</goal>
318 </goals>
319 <configuration>
320 <container>
321 <mainClass>com.google.gerrit.k8s.operator.Main</mainClass>
322 </container>
323 <containerizingMode>packaged</containerizingMode>
324 <from>
325 <image>gcr.io/distroless/java:11</image>
326 </from>
327 <to>
328 <image>gerrit-operator</image>
329 <tags>${revision}</tags>
330 </to>
331 </configuration>
332 </execution>
333 </executions>
334 </plugin>
335 <plugin>
336 <artifactId>maven-resources-plugin</artifactId>
337 <version>3.3.1</version>
338 <executions>
339 <execution>
340 <id>copy-crds</id>
341 <phase>package</phase>
342 <goals>
343 <goal>copy-resources</goal>
344 </goals>
345 <configuration>
346 <outputDirectory>../helm-charts/gerrit-operator-crds/templates</outputDirectory>
347 <resources>
348 <resource>
349 <directory>target/classes/META-INF/fabric8</directory>
350 <includes>
351 <include>*-v1.yml</include>
352 </includes>
353 </resource>
354 </resources>
355 </configuration>
356 </execution>
357 </executions>
358 </plugin>
359 <plugin>
360 <groupId>org.apache.maven.plugins</groupId>
361 <artifactId>maven-compiler-plugin</artifactId>
362 <version>3.10.0</version>
363 </plugin>
364 <plugin>
365 <groupId>org.apache.maven.plugins</groupId>
366 <artifactId>maven-surefire-plugin</artifactId>
367 <version>2.22.2</version>
368 <configuration>
369 <includes>
370 <include>**/*Test.java</include>
371 </includes>
372 <rerunFailingTestsCount>1</rerunFailingTestsCount>
373 </configuration>
374 </plugin>
375 <plugin>
376 <groupId>org.codehaus.mojo</groupId>
377 <artifactId>build-helper-maven-plugin</artifactId>
378 <version>3.4.0</version>
379 <executions>
380 <execution>
381 <id>add-source</id>
382 <phase>generate-sources</phase>
383 <goals>
384 <goal>add-source</goal>
385 </goals>
386 <configuration>
387 <sources>
388 <source>${project.build.directory}/generated-sources/annotations/</source>
389 <source>${project.build.directory}/generated-sources/java/</source>
390 <source>${project.build.directory}/generated-test-sources/java/</source>
391 </sources>
392 </configuration>
393 </execution>
394 </executions>
395 </plugin>
396 </plugins>
397 </build>
398</project>