Update versions for London
[ccsdk/cds.git] / ms / sdclistener / distribution / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ~  Copyright © 2019 IBM, 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
18 <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">
19     <modelVersion>4.0.0</modelVersion>
20
21     <parent>
22         <groupId>org.onap.ccsdk.cds.sdclistener</groupId>
23         <artifactId>sdclistener-parent</artifactId>
24         <version>1.5.0-SNAPSHOT</version>
25         <relativePath>../parent</relativePath>
26     </parent>
27
28     <artifactId>sdclistener-distribution</artifactId>
29     <packaging>pom</packaging>
30
31     <name>MS SDC Listener - Distribution</name>
32
33     <properties>
34         <serviceArtifactName>sdclistener</serviceArtifactName>
35         <image.name>onap/ccsdk-sdclistener</image.name>
36     </properties>
37
38     <dependencies>
39         <dependency>
40             <groupId>org.onap.ccsdk.cds.sdclistener</groupId>
41             <artifactId>sdclistener-application</artifactId>
42         </dependency>
43     </dependencies>
44
45     <build>
46         <plugins>
47             <plugin>
48                 <artifactId>maven-resources-plugin</artifactId>
49                 <version>2.6</version>
50                 <executions>
51                     <execution>
52                         <id>copy-dockerfile</id>
53                         <goals>
54                             <goal>copy-resources</goal>
55                         </goals><!-- here the phase you need -->
56                         <phase>validate</phase>
57                         <configuration>
58                             <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
59                             <resources>
60                                 <resource>
61                                     <directory>src/main/docker</directory>
62                                     <includes>
63                                         <include>*</include>
64                                     </includes>
65                                     <filtering>true</filtering>
66                                 </resource>
67                             </resources>
68                         </configuration>
69                     </execution>
70                 </executions>
71             </plugin>
72             <plugin>
73                 <groupId>org.apache.maven.plugins</groupId>
74                 <artifactId>maven-antrun-plugin</artifactId>
75                 <executions>
76                     <execution>
77                         <id>ant-test</id>
78                         <phase>package</phase>
79                         <configuration>
80                             <tasks>
81                                 <fixcrlf srcdir="${basedir}" eol="unix" includes="**/*.sh, **/*.source"/>
82                             </tasks>
83                         </configuration>
84                         <goals>
85                             <goal>run</goal>
86                         </goals>
87                     </execution>
88                 </executions>
89             </plugin>
90             <plugin><!--build the final artifact for docker deployment -->
91                 <artifactId>maven-assembly-plugin</artifactId>
92                 <version>3.1.0</version>
93                 <configuration>
94                     <!-- <skipAssembly>${skip.assembly}</skipAssembly> -->
95                     <outputDirectory>${basedir}/target/docker-stage</outputDirectory>
96                     <descriptors>
97                         <descriptor>src/main/docker/distribution.xml</descriptor>
98                     </descriptors>
99                     <tarLongFileMode>posix</tarLongFileMode>
100                 </configuration>
101                 <executions>
102                     <execution>
103                         <id>${assembly.id}</id>
104                         <phase>package</phase>
105                         <goals>
106                             <goal>single</goal>
107                         </goals>
108                     </execution>
109                 </executions>
110             </plugin>
111             <plugin>
112                 <groupId>org.codehaus.groovy.maven</groupId>
113                 <artifactId>gmaven-plugin</artifactId>
114                 <version>1.0</version>
115                 <executions>
116                     <execution>
117                         <phase>validate</phase>
118                         <goals>
119                             <goal>execute</goal>
120                         </goals>
121                         <configuration>
122                             <source>${basedir}/../../../TagVersion.groovy</source>
123                         </configuration>
124                     </execution>
125                 </executions>
126             </plugin>
127
128         </plugins>
129     </build>
130
131     <profiles>
132         <profile>
133             <id>docker</id>
134             <build>
135                 <plugins>
136                     <plugin>
137                         <groupId>io.fabric8</groupId>
138                         <artifactId>docker-maven-plugin</artifactId>
139                         <version>0.34.0</version>
140                         <inherited>false</inherited>
141                         <configuration>
142                             <images>
143                                 <image>
144                                     <name>${image.name}</name>
145                                     <build>
146                                         <cleanup>try</cleanup>
147                                         <noCache>true</noCache>
148                                         <dockerFileDir>${basedir}/target/docker-stage</dockerFileDir>
149                                         <tags>
150                                             <tag>${project.docker.latestminortag.version}</tag>
151                                             <tag>${project.docker.latestfulltag.version}</tag>
152                                             <tag>${project.docker.latesttagtimestamp.version}</tag>
153                                         </tags>
154                                     </build>
155                                 </image>
156                             </images>
157                             <verbose>${docker.verbose}</verbose>
158                             <skipPush>${docker.skip.push}</skipPush>
159                         </configuration>
160                         <executions>
161                             <execution>
162                                 <id>build-push-images</id>
163                                 <goals>
164                                     <goal>build</goal>
165                                     <goal>push</goal>
166                                 </goals>
167                             </execution>
168                         </executions>
169                     </plugin>
170                 </plugins>
171             </build>
172         </profile>
173     </profiles>
174 </project>