forked from GoogleContainerTools/jib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpom.xml
111 lines (98 loc) · 4.24 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?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>example</groupId>
<artifactId>dropwizard-jib-example</artifactId>
<version>1</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<!-- for exec-maven-plugin -->
<mainClass>example.JibExampleApplication</mainClass>
<dropwizard.version>1.3.16</dropwizard.version>
<dropwizard.server.config>dropwizard.yml</dropwizard.server.config>
<dropwizard-template-config.version>1.5.0</dropwizard-template-config.version>
<jib.container.appRoot>/app</jib.container.appRoot>
<jib-maven-plugin.version>3.4.4</jib-maven-plugin.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-bom</artifactId>
<version>${dropwizard.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-core</artifactId>
</dependency>
<dependency>
<groupId>de.thomaskrille</groupId>
<artifactId>dropwizard-template-config</artifactId>
<version>${dropwizard-template-config.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>${jib-maven-plugin.version}</version>
<configuration>
<container>
<args>
<arg>server</arg>
<arg>${jib.container.appRoot}/resources/${dropwizard.server.config}</arg>
</args>
<ports>
<port>8080</port>
</ports>
<!-- good defaults intended for Java 8 (>= 8u191) containers -->
<jvmFlags>
<jvmFlag>-server</jvmFlag>
<jvmFlag>-Djava.awt.headless=true</jvmFlag>
<jvmFlag>-XX:InitialRAMFraction=2</jvmFlag>
<jvmFlag>-XX:MinRAMFraction=2</jvmFlag>
<jvmFlag>-XX:MaxRAMFraction=2</jvmFlag>
<jvmFlag>-XX:+UseG1GC</jvmFlag>
<jvmFlag>-XX:MaxGCPauseMillis=100</jvmFlag>
<jvmFlag>-XX:+UseStringDeduplication</jvmFlag>
</jvmFlags>
</container>
</configuration>
<executions>
<execution>
<id>dockerBuild</id>
<goals>
<goal>dockerBuild</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<configuration>
<mainClass>${mainClass}</mainClass>
<arguments>
<argument>server</argument>
<argument>${project.build.sourceDirectory}/../resources/${dropwizard.server.config}</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
</project>