244a1607c5c7ca687dacb63bc8090b24b3793605
[optf/has.git] / conductor / pom.xml
1 <?xml version="1.0"?>
2 <!--
3     Copyright (c) 2018 Intel Corporation. All rights reserved.
4     Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
5
6     Licensed under the Apache License, Version 2.0 (the "License"); you may
7     not use this file except in compliance with the License. You may obtain
8     a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12     Unless required by applicable law or agreed to in writing, software
13     distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14     WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15     License for the specific language governing permissions and limitations
16     under the License.
17 -->
18 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
20     <modelVersion>4.0.0</modelVersion>
21     <packaging>pom</packaging>
22
23     <parent>
24         <groupId>org.onap.optf.has</groupId>
25         <version>2.2.0-SNAPSHOT</version>
26         <artifactId>optf-has</artifactId>
27     </parent>
28
29     <groupId>org.onap.optf.has</groupId>
30     <artifactId>optf-has-conductor</artifactId>
31
32     <name>optf-has-conductor</name>
33     <description>Homing Allocation Service/Conductor</description>
34     <build>
35         <plugins>
36             <plugin>
37                 <artifactId>exec-maven-plugin</artifactId>
38                 <groupId>org.codehaus.mojo</groupId>
39                 <executions>
40                     <execution>
41                         <id>tox-test</id>
42                         <phase>test</phase>
43                         <goals>
44                             <goal>exec</goal>
45                         </goals>
46                         <configuration>
47                             <executable>
48                                 ${session.executionRootDirectory}/sonar.sh
49                             </executable>
50                         </configuration>
51                     </execution>
52                 </executions>
53             </plugin>
54             <plugin>
55                 <artifactId>maven-assembly-plugin</artifactId>
56                 <configuration>
57                     <appendAssemblyId>false</appendAssemblyId>
58                     <descriptors>
59                         <descriptor>assembly.xml</descriptor>
60                     </descriptors>
61                 </configuration>
62                 <executions>
63                     <execution>
64                         <id>make-assembly</id>
65                         <phase>package</phase>
66                         <goals>
67                             <goal>single</goal>
68                         </goals>
69                     </execution>
70                 </executions>
71             </plugin>
72             <plugin>
73                                 <groupId>org.codehaus.groovy.maven</groupId>
74                                 <artifactId>gmaven-plugin</artifactId>
75                                 <version>1.0</version>
76                                 <executions>
77                                         <execution>
78                                                 <phase>validate</phase>
79                                                 <goals>
80                                                         <goal>execute</goal>
81                                                 </goals>
82                                                 <configuration>
83                                                         <source>${project.basedir}/../script/TagVersion.groovy</source>
84                                                 </configuration>
85                                         </execution>
86                                 </executions>
87                         </plugin>
88                         <plugin>
89                                 <groupId>io.fabric8</groupId>
90                                 <artifactId>docker-maven-plugin</artifactId>
91                                 <version>0.26.0</version>
92                                 <configuration>
93                                         <verbose>true</verbose>
94                                         <apiVersion>1.23</apiVersion>
95                                         <images>
96                                                 <image>
97                                                         <name>${image.namespace}</name>
98                                                         <alias>optf-has</alias>
99                                                         <build>
100                                                                 <cleanup>true</cleanup>
101                                                                 <tags>
102                                                                         <tag>latest</tag>
103                                                                         <tag>${project.docker.latesttagtimestamp.version}</tag>
104                                                                         <tag>${project.docker.latesttag.version}</tag>
105                                                                 </tags>
106
107                                                                 <dockerFile>${project.basedir}/docker/Dockerfile</dockerFile>
108                                                                 <assembly>
109                                                                         <descriptor>${project.basedir}/docker/assembly/has-files.xml</descriptor>
110                                                                         <name>onap-has-tm</name>
111                                                                 </assembly>
112                                                                 <args>
113                                                                         <MVN_ARTIFACT_VERSION>${project.version}</MVN_ARTIFACT_VERSION>
114                                                                         <REPO>${project.repo}</REPO>
115                                                                 </args>
116                                                         </build>
117                                                 </image>
118                                         </images>
119                                 </configuration>
120                                 <executions>
121                                         <execution>
122                                                 <id>generate-images</id>
123                                                 <phase>install</phase>
124                                                 <goals>
125                                                         <goal>build</goal>
126                                                 </goals>
127                                         </execution>
128                                         <execution>
129                                                 <id>push-images</id>
130                                                 <phase>deploy</phase>
131                                                 <goals>
132                                                         <goal>build</goal>
133                                                         <goal>push</goal>
134                                                 </goals>
135                                                 <configuration>
136                                                         <image>${image.namespace}:%l</image>
137                                                 </configuration>
138                                         </execution>
139                                 </executions>
140                         </plugin>
141         </plugins>
142     </build>
143 </project>