Set new master version for Dublin
[policy/apex-pdp.git] / client / client-deployment / 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 <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">
21     <modelVersion>4.0.0</modelVersion>
22     <parent>
23         <groupId>org.onap.policy.apex-pdp.client</groupId>
24         <artifactId>client</artifactId>
25         <version>2.1.0-SNAPSHOT</version>
26     </parent>
27
28     <artifactId>client-deployment</artifactId>
29     <name>${project.artifactId}</name>
30     <description>Web client for deploying models in Apex engine</description>
31
32     <dependencies>
33         <dependency>
34             <groupId>org.onap.policy.apex-pdp.core</groupId>
35             <artifactId>core-deployment</artifactId>
36             <version>${project.version}</version>
37         </dependency>
38         <dependency>
39             <groupId>org.onap.policy.apex-pdp.client</groupId>
40             <artifactId>client-common</artifactId>
41             <version>${project.version}</version>
42             <classifier>resources</classifier>
43             <type>zip</type>
44             <scope>provided</scope>
45         </dependency>
46         <dependency>
47             <groupId>org.glassfish.jersey.containers</groupId>
48             <artifactId>jersey-container-grizzly2-http</artifactId>
49             <version>${version.jersey}</version>
50         </dependency>
51         <dependency>
52             <groupId>org.glassfish.jersey.media</groupId>
53             <artifactId>jersey-media-multipart</artifactId>
54             <version>${version.jersey}</version>
55         </dependency>
56         <dependency>
57             <groupId>org.glassfish.jersey.containers</groupId>
58             <artifactId>jersey-container-servlet-core</artifactId>
59             <version>${version.jersey}</version>
60         </dependency>
61         <dependency>
62             <groupId>org.glassfish.jersey.inject</groupId>
63             <artifactId>jersey-hk2</artifactId>
64             <version>${version.jersey}</version>
65         </dependency>
66         <dependency>
67             <groupId>commons-cli</groupId>
68             <artifactId>commons-cli</artifactId>
69         </dependency>
70     </dependencies>
71
72     <build>
73         <defaultGoal>install</defaultGoal>
74         <outputDirectory>${project.build.directory}/classes</outputDirectory>
75         <plugins>
76             <plugin>
77                 <groupId>org.apache.maven.plugins</groupId>
78                 <artifactId>maven-dependency-plugin</artifactId>
79                 <executions>
80                     <execution>
81                         <id>unpack-client-deployment-shared-resources-war</id>
82                         <goals>
83                             <goal>unpack-dependencies</goal>
84                         </goals>
85                         <phase>validate</phase>
86                         <configuration>
87                             <outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}</outputDirectory>
88                             <includeArtifacIds>client-common</includeArtifacIds>
89                             <includeGroupIds>${project.groupId}</includeGroupIds>
90                             <excludeTransitive>true</excludeTransitive>
91                         </configuration>
92                     </execution>
93                 </executions>
94             </plugin>
95             <plugin>
96                 <groupId>org.apache.maven.plugins</groupId>
97                 <artifactId>maven-resources-plugin</artifactId>
98                 <executions>
99                     <execution>
100                         <id>copy-common-resources-to-jar</id>
101                         <phase>initialize</phase>
102                         <goals>
103                             <goal>copy-resources</goal>
104                         </goals>
105                         <configuration>
106                             <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory>
107                             <filtering>false</filtering>
108                             <resources>
109                                 <resource>
110                                     <directory>../client-common/src/main/resources</directory>
111                                 </resource>
112                             </resources>
113                             <overwrite>true</overwrite>
114                         </configuration>
115                     </execution>
116                     <execution>
117                         <id>copy-local-resources-to-jar</id>
118                         <phase>generate-sources</phase>
119                         <goals>
120                             <goal>copy-resources</goal>
121                         </goals>
122                         <configuration>
123                             <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory>
124                             <filtering>false</filtering>
125                             <resources>
126                                 <resource>
127                                     <directory>src/main/resources/webapp</directory>
128                                 </resource>
129                             </resources>
130                             <overwrite>true</overwrite>
131                         </configuration>
132                     </execution>
133                 </executions>
134             </plugin>
135             <plugin>
136                 <groupId>org.apache.maven.plugins</groupId>
137                 <artifactId>maven-shade-plugin</artifactId>
138                 <executions>
139                     <execution>
140                         <phase>package</phase>
141                         <goals>
142                             <goal>shade</goal>
143                         </goals>
144                     </execution>
145                 </executions>
146                 <configuration>
147                     <finalName>${project.artifactId}-uber-${project.version}</finalName>
148                     <shadedArtifactAttached>true</shadedArtifactAttached>
149                     <shadedClassifierName>deployment</shadedClassifierName>
150                     <artifactSet>
151                         <includes>
152                             <include>*:*</include>
153                         </includes>
154                     </artifactSet>
155                     <filters>
156                         <filter>
157                             <artifact>*:*</artifact>
158                             <excludes>
159                                 <exclude>META-INF/*.SF</exclude>
160                                 <exclude>META-INF/*.DSA</exclude>
161                                 <exclude>META-INF/*.RSA</exclude>
162                             </excludes>
163                         </filter>
164                     </filters>
165                     <transformers>
166                         <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
167                         <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
168                             <resource>reference.conf</resource>
169                         </transformer>
170                         <transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
171                             <resource>log4j.properties</resource>
172                         </transformer>
173                         <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
174                             <mainClass>org.onap.policy.apex.client.deployment.rest.ApexDeploymentRestMain</mainClass>
175                         </transformer>
176                     </transformers>
177                 </configuration>
178             </plugin>
179             <plugin>
180                 <groupId>org.apache.maven.plugins</groupId>
181                 <artifactId>maven-war-plugin</artifactId>
182                 <configuration>
183                     <classifier>ui</classifier>
184                     <warSourceDirectory>src/main/resources/webapp</warSourceDirectory>
185                     <webXml>src/main/resources/webapp/WEB-INF/web.xml</webXml>
186                 </configuration>
187                 <executions>
188                     <execution>
189                         <phase>prepare-package</phase>
190                         <goals>
191                             <goal>war</goal>
192                         </goals>
193                     </execution>
194                 </executions>
195             </plugin>
196             <plugin>
197                 <groupId>org.codehaus.mojo</groupId>
198                 <artifactId>build-helper-maven-plugin</artifactId>
199                 <version>3.0.0</version>
200                 <executions>
201                     <execution>
202                         <id>attach-artifacts</id>
203                         <phase>package</phase>
204                         <goals>
205                             <goal>attach-artifact</goal>
206                         </goals>
207                         <configuration>
208                             <artifacts>
209                                 <artifact>
210                                     <file>${project.build.directory}/${project.artifactId}-${project.version}-ui.war</file>
211                                     <type>war</type>
212                                 </artifact>
213                                 <artifact>
214                                     <file>${project.build.directory}/${project.artifactId}-uber-${project.version}.jar</file>
215                                     <type>uber.jar</type>
216                                 </artifact>
217                             </artifacts>
218                         </configuration>
219                     </execution>
220                 </executions>
221             </plugin>
222         </plugins>
223     </build>
224
225     <profiles>
226         <profile>
227             <id>apexSite</id>
228             <activation>
229                 <property>
230                     <name>apexSite</name>
231                 </property>
232             </activation>
233             <distributionManagement>
234                 <site>
235                     <id>${project.artifactId}-site</id>
236                     <url>${apex.adsite.prefix}/modules/${project.parent.artifactId}/${project.artifactId}/</url>
237                 </site>
238             </distributionManagement>
239         </profile>
240     </profiles>
241 </project>