Merge "Test template css changes"
[ccsdk/cds.git] / ms / command-executor / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ~  Copyright © 2019 Bell Canada.
4   ~
5   ~  Licensed under the Apache License, Version 2.0 (the "License");
6   ~  you may not use this file except in compliance with the License.
7   ~  You may obtain a copy of the License at
8   ~
9   ~      http://www.apache.org/licenses/LICENSE-2.0
10   ~
11   ~  Unless required by applicable law or agreed to in writing, software
12   ~  distributed under the License is distributed on an "AS IS" BASIS,
13   ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   ~  See the License for the specific language governing permissions and
15   ~  limitations under the License.
16   -->
17 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
18   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
19     <modelVersion>4.0.0</modelVersion>
20     <parent>
21         <groupId>org.onap.ccsdk.cds</groupId>
22         <artifactId>ms</artifactId>
23         <version>0.4.2-SNAPSHOT</version>
24         <relativePath>..</relativePath>
25     </parent>
26     <artifactId>command-executor</artifactId>
27     <packaging>pom</packaging>
28     <name>Command Executor</name>
29     <description>Micro-service providing python environment with gRPC binding for command execution</description>
30
31     <properties>
32         <assembly.id>maven</assembly.id>
33         <image.name>onap/ccsdk-commandexecutor</image.name>
34         <docker.buildArg.https_proxy>${https_proxy}</docker.buildArg.https_proxy>
35         <docker.push.phase>deploy</docker.push.phase>
36         <docker.verbose>true</docker.verbose>
37         <ccsdk.project.version>${project.version}</ccsdk.project.version>
38         <ccsdk.build.timestamp>${maven.build.timestamp}</ccsdk.build.timestamp>
39     </properties>
40
41     <build>
42         <plugins>
43             <plugin>
44                 <artifactId>maven-resources-plugin</artifactId>
45                 <version>2.6</version>
46                 <executions>
47                     <execution>
48                         <id>copy-dockerfile</id>
49                         <goals>
50                             <goal>copy-resources</goal>
51                         </goals>
52                         <phase>validate</phase>
53                         <configuration>
54                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
55                             <resources>
56                                 <resource>
57                                     <directory>src/main/docker</directory>
58                                     <includes>
59                                         <include>Dockerfile</include>
60                                         <include>start.sh</include>
61                                     </includes>
62                                     <filtering>true</filtering>
63                                 </resource>
64                             </resources>
65                         </configuration>
66                     </execution>
67                 </executions>
68             </plugin>
69             <plugin>
70                 <artifactId>maven-assembly-plugin</artifactId>
71                 <version>3.1.0</version>
72                 <configuration>
73                     <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
74                     <descriptors>
75                         <descriptor>src/main/docker/distribution.xml</descriptor>
76                     </descriptors>
77                     <tarLongFileMode>posix</tarLongFileMode>
78                 </configuration>
79                 <executions>
80                     <execution>
81                         <id>${assembly.id}</id>
82                         <phase>package</phase>
83                         <goals>
84                             <goal>single</goal>
85                         </goals>
86                     </execution>
87                 </executions>
88             </plugin>
89             <plugin>
90                 <groupId>org.codehaus.groovy.maven</groupId>
91                 <artifactId>gmaven-plugin</artifactId>
92                 <version>1.0</version>
93                 <executions>
94                     <execution>
95                         <phase>validate</phase>
96                         <goals>
97                             <goal>execute</goal>
98                         </goals>
99                         <configuration>
100                             <source>${basedir}/../../TagVersion.groovy</source>
101                         </configuration>
102                     </execution>
103                 </executions>
104             </plugin>
105         </plugins>
106     </build>
107
108     <profiles>
109         <profile>
110             <id>docker</id>
111             <build>
112                 <plugins>
113                     <plugin>
114                         <groupId>io.fabric8</groupId>
115                         <artifactId>docker-maven-plugin</artifactId>
116                         <version>0.26.1</version>
117                         <inherited>false</inherited>
118                         <configuration>
119                             <images>
120                                 <image>
121                                     <name>${image.name}</name>
122                                     <build>
123                                         <cleanup>try</cleanup>
124                                         <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
125                                         <tags>
126                                             <tag>${project.docker.latestfulltag.version}</tag>
127                                         </tags>
128                                     </build>
129                                 </image>
130                             </images>
131                             <verbose>true</verbose>
132                         </configuration>
133                         <executions>
134                             <execution>
135                                 <id>generate-images</id>
136                                 <phase>package</phase>
137                                 <goals>
138                                     <goal>build</goal>
139                                 </goals>
140                             </execution>
141                             <execution>
142                                 <id>push-images</id>
143                                 <phase>${docker.push.phase}</phase>
144                                 <goals>
145                                     <goal>build</goal>
146                                     <goal>push</goal>
147                                 </goals>
148                             </execution>
149                         </executions>
150                     </plugin>
151                 </plugins>
152             </build>
153         </profile>
154     </profiles>
155 </project>