4
4
xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
5
5
<modelVersion >4.0.0</modelVersion >
6
6
7
- <groupId >com.example.jaxdemo</groupId >
8
- <artifactId >tomcat-operator</artifactId >
9
- <version >1.0-SNAPSHOT</version >
7
+ <parent >
8
+ <groupId >com.github.containersolutions</groupId >
9
+ <artifactId >java-operator-sdk-samples</artifactId >
10
+ <version >1.3.1-SNAPSHOT</version >
11
+ </parent >
12
+
13
+ <artifactId >tomcat-sample</artifactId >
14
+ <name >Operator SDK - Samples - Tomcat</name >
15
+ <description >Provisions a Tomcat server based on CRDs</description >
16
+ <packaging >jar</packaging >
10
17
11
18
<properties >
12
19
<project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
13
20
<java-operator-sdk .version>1.3.0</java-operator-sdk .version>
14
- <maven .compiler.source>11</maven .compiler.source>
15
- <maven .compiler.target>11</maven .compiler.target>
21
+ <java .version>8</java .version>
22
+ <maven .compiler.source>1.8</maven .compiler.source>
23
+ <maven .compiler.target>1.8</maven .compiler.target>
16
24
<jib-maven-plugin .version>2.5.2</jib-maven-plugin .version>
17
25
</properties >
18
26
19
27
<dependencies >
20
28
<dependency >
21
29
<groupId >com.github.containersolutions</groupId >
22
30
<artifactId >operator-framework</artifactId >
23
- <version >${java-operator-sdk .version} </version >
31
+ <version >${project .version} </version >
24
32
</dependency >
25
33
<dependency >
26
34
<groupId >org.apache.logging.log4j</groupId >
37
45
<artifactId >commons-io</artifactId >
38
46
<version >2.6</version >
39
47
</dependency >
48
+ <dependency >
49
+ <groupId >io.fabric8</groupId >
50
+ <artifactId >kubernetes-client</artifactId >
51
+ <version >4.12.0</version >
52
+ </dependency >
40
53
</dependencies >
41
54
42
55
<build >
43
56
<plugins >
44
57
<plugin >
45
- <groupId >com.google.cloud.tools</groupId >
46
- <artifactId >jib-maven-plugin</artifactId >
47
- <version >${jib-maven-plugin.version} </version >
58
+ <groupId >org.apache.maven.plugins</groupId >
59
+ <artifactId >maven-compiler-plugin</artifactId >
60
+ <version >3.8.1</version >
61
+ </plugin >
62
+ <plugin >
63
+ <groupId >com.spotify</groupId >
64
+ <artifactId >dockerfile-maven-plugin</artifactId >
65
+ <version >1.4.13</version >
48
66
<configuration >
49
- <from >
50
- <image >gcr.io/distroless/java:11</image >
51
- </from >
52
- <to >
53
- <image >eu.gcr.io/adamsandor-test/tomcat-operator</image >
54
- </to >
67
+ <repository >tomcat-operator</repository >
68
+ <tag >latest</tag >
69
+ <buildArgs >
70
+ <JAR_FILE >${project.build.finalName} .jar</JAR_FILE >
71
+ </buildArgs >
55
72
</configuration >
73
+ </plugin >
74
+ <plugin >
75
+ <groupId >org.apache.maven.plugins</groupId >
76
+ <artifactId >maven-shade-plugin</artifactId >
77
+ <version >3.2.4</version >
56
78
<executions >
57
79
<execution >
58
80
<phase >package</phase >
59
81
<goals >
60
- <goal >build </goal >
82
+ <goal >shade </goal >
61
83
</goals >
84
+ <configuration >
85
+ <createDependencyReducedPom >false</createDependencyReducedPom >
86
+ <transformers >
87
+ <transformer implementation =" org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
88
+ <transformer implementation =" org.apache.maven.plugins.shade.resource.ManifestResourceTransformer" >
89
+ <manifestEntries >
90
+ <Main-Class >com.github.containersolutions.operator.sample.TomcatOperator</Main-Class >
91
+ <Build-Number >1.0</Build-Number >
92
+ <Multi-Release >true</Multi-Release >
93
+ </manifestEntries >
94
+ </transformer >
95
+ </transformers >
96
+ <filters >
97
+ <filter >
98
+ <artifact >io.fabric8:openshift-client</artifact >
99
+ <excludes >
100
+ <exclude >io/fabric8/kubernetes/client/Config*</exclude >
101
+ </excludes >
102
+ </filter >
103
+ </filters >
104
+ </configuration >
62
105
</execution >
63
106
</executions >
64
107
</plugin >
65
- <plugin >
66
- <groupId >org.apache.maven.plugins</groupId >
67
- <artifactId >maven-compiler-plugin</artifactId >
68
- <version >3.8.1</version >
69
- </plugin >
70
108
</plugins >
71
109
</build >
72
- </project >
110
+ </project >
0 commit comments