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