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