-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathpom.xml
93 lines (84 loc) · 3.82 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>xyz.tomd.demos</groupId>
<artifactId>hello-java</artifactId>
<version>1.0.${revision}</version>
<name>Hello Java</name>
<description>A tiny website that says Hello World!</description>
<properties>
<revision>0-SNAPSHOT</revision>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<undertow.version>2.0.27.Final</undertow.version>
<jib.version>2.7.1</jib.version>
</properties>
<dependencies>
<dependency>
<groupId>io.undertow</groupId>
<artifactId>undertow-core</artifactId>
<version>${undertow.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Use Google Jib to build a Docker image -->
<!-- This builds an image without needing a Dockerfile, or Docker installed! -->
<!-- Huzzah! -->
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>${jib.version}</version>
<configuration>
<container>
<!-- Define the port manually here, because Google Jib isn't a mind-reader you know -->
<ports>
<port>8080</port>
</ports>
</container>
<!-- If you need a shell in the container, use the 'debug' base image -->
<!-- If you change this setting and rebuild, you'll need to `docker pull` again if you want the latest image locally -->
<!--<from>
<image>gcr.io/distroless/java:debug</image>
</from>-->
<!-- If you want Jib to push to a registry then configure it here -->
<!--<to>
<image>quay.io/tdonohue/hello-java</image>
<auth>
<username>${env.REGISTRY_USERNAME}</username>
<password>${env.REGISTRY_PASSWORD}</password>
</auth>
</to>-->
</configuration>
</plugin>
<!-- This builds an executable jar ("jar-with-dependencies") -->
<!-- So we can run using: java -jar my-app.jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<archive>
<manifest>
<mainClass>xyz.tomd.demos.hellorestjava.Application</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>