update link to upper-constraints.txt
[multicloud/framework.git] / multivimbroker / pom.xml
1 <?xml version="1.0"?>
2 <!--
3  Copyright (c) 2017 Wind River Systems, Inc.
4  Copyright (c) 2017-2018 VMware, Inc.
5
6  Licensed under the Apache License, Version 2.0 (the "License");
7  you may not use this file except in compliance with the License.
8  You may obtain a copy of the License at:
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 
16     xmlns="http://maven.apache.org/POM/4.0.0" 
17     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     <parent>
19         <groupId>org.onap.multicloud.framework</groupId>
20         <artifactId>multicloud-framework</artifactId>
21         <version>1.9.1-SNAPSHOT</version>
22     </parent>
23     <modelVersion>4.0.0</modelVersion>
24     <artifactId>multicloud-framework-broker</artifactId>
25     <version>1.9.1-SNAPSHOT</version>
26     <packaging>pom</packaging>
27     <name>multicloud-framework-broker</name>
28     <description>multivim broker</description>
29     <properties>
30         <encoding>UTF-8</encoding>
31         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
32         <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
33         <nexusproxy>https://nexus.onap.org</nexusproxy>
34         <sonar.sources>.</sonar.sources>
35         <sonar.junit.reportsPath>xunit-results.xml</sonar.junit.reportsPath>
36         <sonar.python.coverage.reportPaths>coverage.xml</sonar.python.coverage.reportPaths>
37         <sonar.language>py</sonar.language>
38         <sonar.pluginName>Python</sonar.pluginName>
39         <sonar.inclusions>**/*.py</sonar.inclusions>
40         <sonar.exclusions>**/venv-tox/**,**/.tox/**, **/api_v2/**, **/tests/**,setup.py</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.1.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.1.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>install</phase>
128                                 <goals>
129                                     <goal>copy-resources</goal>
130                                 </goals>
131                                 <configuration>
132                                     <overwrite>true</overwrite>
133                                     <nonFilteredFileExtensions>
134                                         <nonFilteredFileExtension>zip</nonFilteredFileExtension>
135                                     </nonFilteredFileExtensions>
136                                     <outputDirectory>${project.basedir}/docker_target</outputDirectory>
137                                     <resources>
138                                         <resource>
139                                             <directory>${project.basedir}/docker</directory>
140                                             <filtering>true</filtering>
141                                         </resource>
142                                         <resource>
143                                             <directory>${project.basedir}/target</directory>
144                                             <filtering>true</filtering>
145                                             <includes>
146                                                  <include>*.zip</include>
147                                             </includes>
148                                         </resource>
149                                     </resources>
150                                 </configuration>
151                             </execution>
152                         </executions>
153                     </plugin>
154                     <plugin>
155                         <groupId>org.apache.maven.plugins</groupId>
156                         <artifactId>maven-antrun-plugin</artifactId>
157                         <version>1.6</version>
158                         <executions>
159                             <execution>
160                                 <phase>install</phase>
161                                 <inherited>false</inherited>
162                                 <configuration>
163                                     <target>
164                                         <exec executable="docker">
165                                            <arg value="build"/>
166                                            <arg value="-t"/>
167                                            <arg value="${CONTAINER_PUSH_REGISTRY}/onap/multicloud/framework:${project.version}"/>
168                                            <arg value="docker_target"/>
169                                         </exec>
170                                         <exec executable="docker">
171                                             <arg value="tag"/>
172                                             <arg value="${CONTAINER_PUSH_REGISTRY}/onap/multicloud/framework:${project.version}"/>
173                                             <arg value="${CONTAINER_PUSH_REGISTRY}/onap/multicloud/framework:latest"/>
174                                         </exec>
175                                         <exec executable="docker">
176                                             <arg value="push"/>
177                                             <arg value="${CONTAINER_PUSH_REGISTRY}/onap/multicloud/framework:${project.version}"/>
178                                         </exec>
179                                         <exec executable="docker">
180                                             <arg value="push"/>
181                                             <arg value="${CONTAINER_PUSH_REGISTRY}/onap/multicloud/framework:latest"/>
182                                         </exec>
183                                     </target>
184                                 </configuration>
185                                 <goals>
186                                     <goal>run</goal>
187                                 </goals>
188                             </execution>
189                         </executions>
190                     </plugin>
191                 </plugins>
192             </build>
193             <activation>
194                 <activeByDefault>false</activeByDefault>
195             </activation>
196         </profile>
197     </profiles>
198 </project>