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