60711f697e96380a35e9c7136a7c781845dbd9ec
[ccsdk/cds.git] / ms / cds-sdc-listener / distribution / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ~ Copyright (C) 2019 Bell Canada. All rights reserved.
4   ~
5   ~ NOTICE:  All the intellectual and technical concepts contained herein are
6   ~ proprietary to Bell Canada and are protected by trade secret or copyright law.
7   ~ Unauthorized copying of this file, via any medium is strictly prohibited.
8   -->
9 <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">
10   <parent>
11     <artifactId>cds-sdc-listener</artifactId>
12     <groupId>org.onap.ccsdk.apps</groupId>
13     <version>0.4.1-SNAPSHOT</version>
14   </parent>
15
16   <modelVersion>4.0.0</modelVersion>
17   <groupId>org.onap.ccsdk.apps</groupId>
18   <artifactId>cds-sdc-listener-distribution</artifactId>
19   <name>CDS-SDC Listener Distribution</name>
20
21   <properties>
22     <image.name>onap/ccsdk-cdssdclistener</image.name>
23     <docker.push.phase>deploy</docker.push.phase>
24   </properties>
25
26   <build>
27     <plugins>
28       <plugin>
29         <artifactId>maven-resources-plugin</artifactId>
30         <version>2.6</version>
31         <executions>
32           <execution>
33             <id>copy-dockerfile</id>
34             <goals>
35               <goal>copy-resources</goal>
36             </goals>
37             <phase>validate</phase>
38             <configuration>
39               <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
40               <resources>
41                 <resource>
42                   <directory>src/main/docker</directory>
43                   <includes>
44                     <include>*</include>
45                   </includes>
46                   <filtering>true</filtering>
47                 </resource>
48               </resources>
49             </configuration>
50           </execution>
51         </executions>
52       </plugin>
53     </plugins>
54   </build>
55
56   <profiles>
57     <profile>
58       <id>docker</id>
59       <build>
60         <plugins>
61           <plugin>
62             <!-- Maven plugin for managing docker images and containers -->
63             <groupId>io.fabric8</groupId>
64             <artifactId>docker-maven-plugin</artifactId>
65             <version>0.26.1</version>
66             <inherited>false</inherited>
67             <configuration>
68               <images>
69                 <image>
70                   <name>${image.name}</name>
71                   <build>
72                     <cleanup>try</cleanup>
73                     <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
74                     <tags>
75                       <tag>${project.version}</tag>
76                       <tag>${project.version}-STAGING-${maven.build.timestamp}</tag>
77                     </tags>
78                   </build>
79                 </image>
80               </images>
81               <verbose>true</verbose>
82             </configuration>
83             <executions>
84               <execution>
85                 <id>generate-images</id>
86                 <phase>package</phase>
87                 <goals>
88                   <goal>build</goal>
89                 </goals>
90               </execution>
91               <execution>
92                 <id>push-images</id>
93                 <phase>${docker.push.phase}</phase>
94                 <goals>
95                   <goal>build</goal>
96                   <goal>push</goal>
97                 </goals>
98               </execution>
99             </executions>
100           </plugin>
101         </plugins>
102       </build>
103     </profile>
104   </profiles>
105
106 </project>