blob: b577e3913da8ec294845b632bd54476ea462b7da [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-->
liamfallon32497612018-11-10 00:39:12 +000020<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">
ramvermac6d74e62018-07-11 14:21:13 +010022 <modelVersion>4.0.0</modelVersion>
23 <parent>
24 <groupId>org.onap.policy.apex-pdp.client</groupId>
25 <artifactId>client</artifactId>
jrh3d7d9df62019-09-12 10:07:06 -040026 <version>2.3.0-SNAPSHOT</version>
ramvermac6d74e62018-07-11 14:21:13 +010027 </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>
ramvermac6d74e62018-07-11 14:21:13 +010040 <groupId>org.glassfish.jersey.containers</groupId>
41 <artifactId>jersey-container-grizzly2-http</artifactId>
42 <version>${version.jersey}</version>
43 </dependency>
44 <dependency>
45 <groupId>org.glassfish.jersey.media</groupId>
46 <artifactId>jersey-media-multipart</artifactId>
47 <version>${version.jersey}</version>
48 </dependency>
49 <dependency>
50 <groupId>org.glassfish.jersey.containers</groupId>
51 <artifactId>jersey-container-servlet-core</artifactId>
52 <version>${version.jersey}</version>
53 </dependency>
54 <dependency>
55 <groupId>org.glassfish.jersey.inject</groupId>
56 <artifactId>jersey-hk2</artifactId>
57 <version>${version.jersey}</version>
58 </dependency>
59 <dependency>
60 <groupId>commons-cli</groupId>
61 <artifactId>commons-cli</artifactId>
ramvermac6d74e62018-07-11 14:21:13 +010062 </dependency>
ning.xic678c3a2019-08-13 05:20:20 +000063 <dependency>
64 <groupId>org.mockito</groupId>
65 <artifactId>mockito-all</artifactId>
66 <scope>test</scope>
67 </dependency>
68 <dependency>
69 <groupId>org.assertj</groupId>
70 <artifactId>assertj-core</artifactId>
ning.xic678c3a2019-08-13 05:20:20 +000071 <scope>test</scope>
72 </dependency>
ramvermaea736d02018-11-29 13:47:30 +000073
74 <dependency>
75 <groupId>org.onap.policy.apex-pdp.client</groupId>
76 <artifactId>client-common</artifactId>
77 <version>${project.version}</version>
78 <classifier>resources</classifier>
79 <type>zip</type>
80 <scope>provided</scope>
81 </dependency>
82
ramvermac6d74e62018-07-11 14:21:13 +010083 </dependencies>
84
85 <build>
86 <defaultGoal>install</defaultGoal>
87 <outputDirectory>${project.build.directory}/classes</outputDirectory>
88 <plugins>
ramvermaea736d02018-11-29 13:47:30 +000089
90<!-- https://blog.sonatype.com/2008/04/how-to-share-resources-across-projects-in-maven/ -->
ramvermac6d74e62018-07-11 14:21:13 +010091 <plugin>
92 <groupId>org.apache.maven.plugins</groupId>
93 <artifactId>maven-dependency-plugin</artifactId>
94 <executions>
95 <execution>
ramvermaea736d02018-11-29 13:47:30 +000096 <id>unpack-shared-resources</id>
liamfallon32497612018-11-10 00:39:12 +000097 <goals>
ramvermaea736d02018-11-29 13:47:30 +000098 <goal>unpack-dependencies</goal>
liamfallon32497612018-11-10 00:39:12 +000099 </goals>
ramvermaea736d02018-11-29 13:47:30 +0000100 <phase>generate-resources</phase>
ramvermac6d74e62018-07-11 14:21:13 +0100101 <configuration>
ramvermaea736d02018-11-29 13:47:30 +0000102 <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory>
103 <!--use as much as needed to be specific...also scope,type,classifier etc-->
104 <includeArtifacIds>client-common</includeArtifacIds>
105 <includeGroupIds>org.onap.policy.apex-pdp.client</includeGroupIds>
106 <excludeTransitive>true</excludeTransitive>
107 <excludeTransitive>true</excludeTransitive>
108 <excludeTypes>jar</excludeTypes>
109 <includeTypes>zip</includeTypes>
ramvermac6d74e62018-07-11 14:21:13 +0100110 </configuration>
111 </execution>
112 </executions>
113 </plugin>
ramvermaea736d02018-11-29 13:47:30 +0000114 <plugin>
115 <groupId>org.apache.maven.plugins</groupId>
116 <artifactId>maven-assembly-plugin</artifactId>
117 <executions>
118 <execution>
119 <id>make shared resources</id>
120 <goals>
121 <goal>single</goal>
122 </goals>
123 <phase>package</phase>
124 <configuration>
125 <descriptors>
126 <descriptor>src/main/assembly/resources.xml</descriptor>
127 </descriptors>
128 </configuration>
129 </execution>
130 </executions>
131 </plugin>
132
liamfallon32497612018-11-10 00:39:12 +0000133
liamfallona41c8772018-09-05 15:46:31 +0100134 <plugin>
135 <groupId>org.apache.maven.plugins</groupId>
ramvermac6d74e62018-07-11 14:21:13 +0100136 <artifactId>maven-shade-plugin</artifactId>
137 <executions>
138 <execution>
139 <phase>package</phase>
140 <goals>
141 <goal>shade</goal>
142 </goals>
143 </execution>
144 </executions>
145 <configuration>
146 <finalName>${project.artifactId}-uber-${project.version}</finalName>
147 <shadedArtifactAttached>true</shadedArtifactAttached>
148 <shadedClassifierName>deployment</shadedClassifierName>
149 <artifactSet>
150 <includes>
151 <include>*:*</include>
152 </includes>
153 </artifactSet>
154 <filters>
155 <filter>
156 <artifact>*:*</artifact>
157 <excludes>
158 <exclude>META-INF/*.SF</exclude>
159 <exclude>META-INF/*.DSA</exclude>
160 <exclude>META-INF/*.RSA</exclude>
161 </excludes>
162 </filter>
163 </filters>
164 <transformers>
liamfallon32497612018-11-10 00:39:12 +0000165 <transformer
166 implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
167 <transformer
168 implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
ramvermac6d74e62018-07-11 14:21:13 +0100169 <resource>reference.conf</resource>
170 </transformer>
liamfallon32497612018-11-10 00:39:12 +0000171 <transformer
172 implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
ramvermac6d74e62018-07-11 14:21:13 +0100173 <resource>log4j.properties</resource>
174 </transformer>
liamfallon32497612018-11-10 00:39:12 +0000175 <transformer
176 implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
ramvermac6d74e62018-07-11 14:21:13 +0100177 <mainClass>org.onap.policy.apex.client.deployment.rest.ApexDeploymentRestMain</mainClass>
178 </transformer>
179 </transformers>
180 </configuration>
181 </plugin>
182 <plugin>
183 <groupId>org.apache.maven.plugins</groupId>
184 <artifactId>maven-war-plugin</artifactId>
ramvermac6d74e62018-07-11 14:21:13 +0100185 <configuration>
186 <classifier>ui</classifier>
187 <warSourceDirectory>src/main/resources/webapp</warSourceDirectory>
188 <webXml>src/main/resources/webapp/WEB-INF/web.xml</webXml>
189 </configuration>
190 <executions>
191 <execution>
192 <phase>prepare-package</phase>
193 <goals>
194 <goal>war</goal>
195 </goals>
196 </execution>
197 </executions>
198 </plugin>
199 <plugin>
200 <groupId>org.codehaus.mojo</groupId>
201 <artifactId>build-helper-maven-plugin</artifactId>
202 <version>3.0.0</version>
203 <executions>
204 <execution>
205 <id>attach-artifacts</id>
206 <phase>package</phase>
207 <goals>
208 <goal>attach-artifact</goal>
209 </goals>
210 <configuration>
211 <artifacts>
212 <artifact>
213 <file>${project.build.directory}/${project.artifactId}-${project.version}-ui.war</file>
214 <type>war</type>
215 </artifact>
216 <artifact>
217 <file>${project.build.directory}/${project.artifactId}-uber-${project.version}.jar</file>
218 <type>uber.jar</type>
219 </artifact>
220 </artifacts>
221 </configuration>
222 </execution>
223 </executions>
224 </plugin>
225 </plugins>
226 </build>
Dinh Danh Leba229772018-08-22 18:02:01 +0100227
228 <profiles>
229 <profile>
230 <id>apexSite</id>
231 <activation>
232 <property>
233 <name>apexSite</name>
234 </property>
235 </activation>
236 <distributionManagement>
237 <site>
238 <id>${project.artifactId}-site</id>
239 <url>${apex.adsite.prefix}/modules/${project.parent.artifactId}/${project.artifactId}/</url>
240 </site>
241 </distributionManagement>
242 </profile>
243 </profiles>
ramvermac6d74e62018-07-11 14:21:13 +0100244</project>