e7ab780c8eadd787c2469df673ebffea51da53e2
[multicloud/azure.git] / azure / pom.xml
1 <?xml version="1.0"?>
2 <!--
3   Copyright (c) 2018 Amdocs
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   -->
15 <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">
16     <parent>
17         <groupId>org.onap.oparent</groupId>
18         <artifactId>oparent</artifactId>
19         <version>2.0.0</version>
20     </parent>
21     <modelVersion>4.0.0</modelVersion>
22     <groupId>org.onap.multicloud.azure</groupId>
23     <artifactId>multicloud-azure</artifactId>
24     <version>1.2.4-SNAPSHOT</version>
25     <packaging>pom</packaging>
26     <name>multicloud-azure</name>
27     <description>multicloud azure</description>
28     <properties>
29         <encoding>UTF-8</encoding>
30         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
31         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
32         <nexusproxy>https://nexus.onap.org</nexusproxy>
33         <sonar.sourceEncoding>UTF-8</sonar.sourceEncoding>
34         <sonar.sources>.</sonar.sources>
35         <sonar.junit.reportsPath>xunit-results.xml</sonar.junit.reportsPath>
36         <sonar.python.coverage.reportPath>azure/coverage.xml</sonar.python.coverage.reportPath>
37         <sonar.language>py</sonar.language>
38         <sonar.pluginName>Python</sonar.pluginName>
39         <sonar.inclusions>**/*.py</sonar.inclusions>
40         <sonar.exclusions>**/tests/*,setup.py,**/azure/aria/**</sonar.exclusions>
41     </properties>
42     <build>
43         <pluginManagement>
44         <plugins>
45             <plugin>
46               <groupId>org.codehaus.mojo</groupId>
47               <artifactId>exec-maven-plugin</artifactId>
48               <version>1.2.1</version>
49               <configuration>
50                 <executable>${project.basedir}/sonar.sh</executable>
51                 <environmentVariables>
52                   <!-- make mvn properties as env for our script -->
53                   <MVN_PROJECT_GROUPID>${project.groupId}</MVN_PROJECT_GROUPID>
54                   <MVN_PROJECT_ARTIFACTID>${project.artifactId}</MVN_PROJECT_ARTIFACTID>
55                   <MVN_PROJECT_VERSION>${project.version}</MVN_PROJECT_VERSION>
56                 </environmentVariables>
57               </configuration>
58             </plugin>
59         </plugins>
60       </pluginManagement>
61         <plugins>
62             <plugin>
63             <groupId>org.codehaus.mojo</groupId>
64             <artifactId>exec-maven-plugin</artifactId>
65             <version>1.2.1</version>
66             <executions>
67               <execution>
68                 <id>clean phase script</id>
69                 <phase>clean</phase>
70                 <goals>
71                   <goal>exec</goal>
72                 </goals>
73                 <configuration>
74                   <arguments>
75                     <argument>__</argument>
76                     <argument>clean</argument>
77                   </arguments>
78                 </configuration>
79               </execution>
80               <execution>
81                 <id>test script</id>
82                 <phase>test</phase>
83                 <goals>
84                   <goal>exec</goal>
85                 </goals>
86                 <configuration>
87                   <arguments>
88                     <argument>__</argument>
89                     <argument>test</argument>
90                   </arguments>
91                 </configuration>
92               </execution>
93             </executions>
94         </plugin>
95             <plugin>
96                 <artifactId>maven-assembly-plugin</artifactId>
97                 <configuration>
98                     <appendAssemblyId>false</appendAssemblyId>
99                     <descriptors>
100                         <descriptor>assembly.xml</descriptor>
101                     </descriptors>
102                 </configuration>
103                 <executions>
104                     <execution>
105                         <id>make-assembly</id>
106                         <phase>package</phase>
107                         <goals>
108                             <goal>single</goal>
109                         </goals>
110                     </execution>
111                 </executions>
112             </plugin>
113         </plugins>
114     </build>
115     <profiles>
116         <profile>
117             <id>docker</id>
118             <build>
119                 <plugins>
120                     <plugin>
121                         <groupId>org.apache.maven.plugins</groupId>
122                         <artifactId>maven-resources-plugin</artifactId>
123                         <version>3.1.0</version>
124                         <executions>
125                             <execution>
126                                 <id>copy-resources</id>
127                                 <phase>validate</phase>
128                                 <goals>
129                                     <goal>copy-resources</goal>
130                                 </goals>
131                                 <configuration>
132                                     <outputDirectory>${project.basedir}/docker_target</outputDirectory>
133                                     <resources>
134                                         <resource>
135                                             <directory>${project.basedir}/docker</directory>
136                                             <filtering>true</filtering>
137                                         </resource>
138                                     </resources>
139                                 </configuration>
140                             </execution>
141                         </executions>
142                     </plugin>
143                     <plugin>
144                         <groupId>org.apache.maven.plugins</groupId>
145                         <artifactId>maven-antrun-plugin</artifactId>
146                         <version>1.6</version>
147                         <executions>
148                             <execution>
149                                 <phase>install</phase>
150                                 <inherited>false</inherited>
151                                 <configuration>
152                                     <target>
153                                         <exec executable="docker">
154                                            <arg value="build"/>
155                                            <arg value="-t"/>
156                                            <arg value="${CONTAINER_PUSH_REGISTRY}/onap/multicloud/azure:${project.version}"/>
157                                            <arg value="docker_target"/>
158                                         </exec>
159                                         <exec executable="docker">
160                                             <arg value="tag"/>
161                                             <arg value="${CONTAINER_PUSH_REGISTRY}/onap/multicloud/azure:${project.version}"/>
162                                             <arg value="${CONTAINER_PUSH_REGISTRY}/onap/multicloud/azure:latest"/>
163                                         </exec>
164                                         <exec executable="docker">
165                                             <arg value="push"/>
166                                             <arg value="${CONTAINER_PUSH_REGISTRY}/onap/multicloud/azure:${project.version}"/>
167                                         </exec>
168                                         <exec executable="docker">
169                                             <arg value="push"/>
170                                             <arg value="${CONTAINER_PUSH_REGISTRY}/onap/multicloud/azure:latest"/>
171                                         </exec>
172                                     </target>
173                                 </configuration>
174                                 <goals>
175                                     <goal>run</goal>
176                                 </goals>
177                             </execution>
178                         </executions>
179                     </plugin>
180                 </plugins>
181             </build>
182             <activation>
183                 <activeByDefault>false</activeByDefault>
184             </activation>
185         </profile>
186     </profiles>
187 </project>