8486d05d8bb4037042c3e841edcc1d6a57bfa34c
[multicloud/framework.git] / artifactbroker / packages / pom.xml
1 <!--
2   ============LICENSE_START=======================================================
3    Copyright (C) 2018 Ericsson. All rights reserved.
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   SPDX-License-Identifier: Apache-2.0
18   ============LICENSE_END=========================================================
19 -->
20
21 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23     <modelVersion>4.0.0</modelVersion>
24     <parent>
25         <groupId>org.onap.multicloud.framework</groupId>
26         <artifactId>multicloud-framework-artifactbroker</artifactId>
27         <version>1.4.1-SNAPSHOT</version>
28     </parent>
29
30     <artifactId>multicloud-framework-artifactbroker-package</artifactId>
31     <name>${project.artifactId}</name>
32     <description>[${project.parent.artifactId}]</description>
33
34     <dependencies>
35         <dependency>
36             <groupId>org.onap.multicloud.framework</groupId>
37             <artifactId>multicloud-framework-artifactbroker-main</artifactId>
38             <version>${project.version}</version>
39         </dependency>
40         <dependency>
41             <groupId>org.onap.multicloud.framework</groupId>
42             <artifactId>multicloud-framework-artifactbroker-reception</artifactId>
43             <version>${project.version}</version>
44         </dependency>
45         <dependency>
46             <groupId>org.onap.multicloud.framework</groupId>
47             <artifactId>multicloud-framework-artifactbroker-forwarding</artifactId>
48             <version>${project.version}</version>
49         </dependency>
50         <dependency>
51             <groupId>org.onap.multicloud.framework</groupId>
52             <artifactId>multicloud-framework-artifactbroker-reception-plugins</artifactId>
53             <version>${project.version}</version>
54         </dependency>
55         <dependency>
56             <groupId>org.onap.multicloud.framework</groupId>
57             <artifactId>multicloud-framework-artifactbroker-forwarding-plugins</artifactId>
58             <version>${project.version}</version>
59         </dependency>
60     </dependencies>
61
62     <build>
63         <plugins>
64             <plugin>
65                 <groupId>org.apache.maven.plugins</groupId>
66                 <artifactId>maven-assembly-plugin</artifactId>
67                 <configuration>
68                     <appendAssemblyId>false</appendAssemblyId>
69                     <descriptors>
70                         <descriptor>src/main/package/assembly.xml</descriptor>
71                     </descriptors>
72                 </configuration>
73                 <executions>
74                     <execution>
75                         <id>make-assembly</id>
76                         <phase>package</phase>
77                         <goals>
78                             <goal>single</goal>
79                         </goals>
80                     </execution>
81                 </executions>
82             </plugin>
83         </plugins>
84     </build>
85     <profiles>
86         <profile>
87             <id>docker</id>
88             <build>
89                 <plugins>
90                     <plugin>
91                         <groupId>org.apache.maven.plugins</groupId>
92                         <artifactId>maven-resources-plugin</artifactId>
93                         <version>3.1.0</version>
94                         <executions>
95                             <execution>
96                                 <id>copy-resources</id>
97                                 <phase>install</phase>
98                                 <goals>
99                                     <goal>copy-resources</goal>
100                                 </goals>
101                                 <configuration>
102                                     <overwrite>true</overwrite>
103                                     <nonFilteredFileExtensions>
104                                         <nonFilteredFileExtension>zip</nonFilteredFileExtension>
105                                         <nonFilteredFileExtension>jar</nonFilteredFileExtension>
106                                     </nonFilteredFileExtensions>
107                                     <outputDirectory>${project.basedir}/docker_target</outputDirectory>
108                                     <resources>
109                                         <resource>
110                                             <directory>${project.basedir}/docker</directory>
111                                             <filtering>true</filtering>
112                                         </resource>
113                                         <resource>
114                                             <directory>${project.basedir}/target</directory>
115                                             <filtering>true</filtering>
116                                             <includes>
117                                                  <include>*.zip</include>
118                                                  <include>*.jar</include>
119                                             </includes>
120                                         </resource>
121                                     </resources>
122                                 </configuration>
123                             </execution>
124                         </executions>
125                     </plugin>
126                     <plugin>
127                         <groupId>org.apache.maven.plugins</groupId>
128                         <artifactId>maven-antrun-plugin</artifactId>
129                         <version>1.6</version>
130                         <executions>
131                             <execution>
132                                 <phase>install</phase>
133                                 <inherited>false</inherited>
134                                 <configuration>
135                                     <target>
136                                         <exec executable="docker">
137                                            <arg value="build"/>
138                                            <arg value="-t"/>
139                                            <arg value="${CONTAINER_PUSH_REGISTRY}/onap/multicloud/framework-artifactbroker:${project.version}"/>
140                                            <arg value="docker_target"/>
141                                         </exec>
142                                         <exec executable="docker">
143                                             <arg value="tag"/>
144                                             <arg value="${CONTAINER_PUSH_REGISTRY}/onap/multicloud/framework-artifactbroker:${project.version}"/>
145                                             <arg value="${CONTAINER_PUSH_REGISTRY}/onap/multicloud/framework-artifactbroker:latest"/>
146                                         </exec>
147                                         <exec executable="docker">
148                                             <arg value="push"/>
149                                             <arg value="${CONTAINER_PUSH_REGISTRY}/onap/multicloud/framework-artifactbroker:${project.version}"/>
150                                         </exec>
151                                         <exec executable="docker">
152                                             <arg value="push"/>
153                                             <arg value="${CONTAINER_PUSH_REGISTRY}/onap/multicloud/framework-artifactbroker:latest"/>
154                                         </exec>
155                                     </target>
156                                 </configuration>
157                                 <goals>
158                                     <goal>run</goal>
159                                 </goals>
160                             </execution>
161                         </executions>
162                     </plugin>
163                 </plugins>
164             </build>
165             <activation>
166                 <activeByDefault>false</activeByDefault>
167             </activation>
168         </profile>
169     </profiles>
170 </project>