-
Notifications
You must be signed in to change notification settings - Fork 82
Expand file tree
/
Copy pathpom.xml
More file actions
121 lines (113 loc) · 4.94 KB
/
pom.xml
File metadata and controls
121 lines (113 loc) · 4.94 KB
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
112
113
114
115
116
117
118
119
120
121
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2021 PANTHEON.tech s.r.o. All Rights Reserved.
~
~ This program and the accompanying materials are made available under the
~ terms of the Eclipse Public License v1.0 which accompanies this distribution,
~ and is available at https://www.eclipse.org/legal/epl-v10.html
-->
<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>io.lighty.applications.rcgnmi</groupId>
<artifactId>lighty-rcgnmi-app-docker</artifactId>
<version>22.2.0-SNAPSHOT</version>
<properties>
<image.name>lighty-rcgnmi</image.name>
<lighty.app.name>lighty-rcgnmi-app-${project.version}</lighty.app.name>
<lighty.app.zip>${lighty.app.name}-bin.zip</lighty.app.zip>
<lighty.app.jar>${lighty.app.name}.jar</lighty.app.jar>
<maven.deploy.skip>true</maven.deploy.skip>
</properties>
<dependencies>
<dependency>
<groupId>io.lighty.applications.rcgnmi</groupId>
<artifactId>lighty-rcgnmi-app</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.4.0</version>
<executions>
<execution>
<id>copy-dockerfile-and-license</id>
<goals>
<goal>copy-resources</goal>
</goals>
<phase>prepare-package</phase>
<configuration>
<outputDirectory>${basedir}/target/docker-stage</outputDirectory>
<resources>
<resource>
<directory>src/main/docker</directory>
<includes>
<include>Dockerfile</include>
</includes>
</resource>
<resource>
<directory>src/main/docker</directory>
<includes>
<include>entrypoint.sh</include>
</includes>
</resource>
<resource>
<directory>${basedir}/../../../</directory>
<includes>
<include>LICENSE</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>unzip-lighty-app</id>
<phase>prepare-package</phase>
<configuration>
<target>
<unzip src="${basedir}/../lighty-rcgnmi-app/target/${lighty.app.zip}" dest="${basedir}/target/docker-stage" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.48.0</version>
<configuration>
<images>
<image>
<name>${image.name}</name>
<build>
<cleanup>try</cleanup>
<contextDir>${basedir}/target/docker-stage</contextDir>
<dockerFile>Dockerfile</dockerFile>
</build>
</image>
</images>
</configuration>
<executions>
<execution>
<id>generate-images</id>
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>