blob: cd139e18129960741907195230efa0a5b42d4091 [file] [log] [blame]
ramvermac6d74e62018-07-11 14:21:13 +01001<!--
2 ============LICENSE_START=======================================================
3 Copyright (C) 2018 Ericsson. All rights reserved.
liamfallon41712562019-11-01 11:47:21 +00004 Modifications Copyright (C) 2019 Nordix Foundation.
ramvermac6d74e62018-07-11 14:21:13 +01005 ================================================================================
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
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17
18 SPDX-License-Identifier: Apache-2.0
19 ============LICENSE_END=========================================================
20-->
liamfallon32497612018-11-10 00:39:12 +000021<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">
ramvermac6d74e62018-07-11 14:21:13 +010023 <modelVersion>4.0.0</modelVersion>
24 <parent>
25 <groupId>org.onap.policy.apex-pdp.client</groupId>
26 <artifactId>client</artifactId>
jrh3d7d9df62019-09-12 10:07:06 -040027 <version>2.3.0-SNAPSHOT</version>
ramvermac6d74e62018-07-11 14:21:13 +010028 </parent>
29
30 <artifactId>client-deployment</artifactId>
31 <name>${project.artifactId}</name>
32 <description>Web client for deploying models in Apex engine</description>
33
34 <dependencies>
35 <dependency>
36 <groupId>org.onap.policy.apex-pdp.core</groupId>
37 <artifactId>core-deployment</artifactId>
38 <version>${project.version}</version>
39 </dependency>
40 <dependency>
ramvermac6d74e62018-07-11 14:21:13 +010041 <groupId>org.glassfish.jersey.containers</groupId>
42 <artifactId>jersey-container-grizzly2-http</artifactId>
ramvermac6d74e62018-07-11 14:21:13 +010043 </dependency>
44 <dependency>
45 <groupId>org.glassfish.jersey.media</groupId>
46 <artifactId>jersey-media-multipart</artifactId>
ramvermac6d74e62018-07-11 14:21:13 +010047 </dependency>
48 <dependency>
49 <groupId>org.glassfish.jersey.containers</groupId>
50 <artifactId>jersey-container-servlet-core</artifactId>
ramvermac6d74e62018-07-11 14:21:13 +010051 </dependency>
52 <dependency>
53 <groupId>org.glassfish.jersey.inject</groupId>
54 <artifactId>jersey-hk2</artifactId>
ramvermac6d74e62018-07-11 14:21:13 +010055 </dependency>
56 <dependency>
57 <groupId>commons-cli</groupId>
58 <artifactId>commons-cli</artifactId>
ramvermac6d74e62018-07-11 14:21:13 +010059 </dependency>
ning.xic678c3a2019-08-13 05:20:20 +000060 <dependency>
61 <groupId>org.mockito</groupId>
62 <artifactId>mockito-all</artifactId>
63 <scope>test</scope>
64 </dependency>
65 <dependency>
66 <groupId>org.assertj</groupId>
67 <artifactId>assertj-core</artifactId>
ning.xic678c3a2019-08-13 05:20:20 +000068 <scope>test</scope>
69 </dependency>
ramvermaea736d02018-11-29 13:47:30 +000070
71 <dependency>
72 <groupId>org.onap.policy.apex-pdp.client</groupId>
73 <artifactId>client-common</artifactId>
74 <version>${project.version}</version>
75 <classifier>resources</classifier>
76 <type>zip</type>
77 <scope>provided</scope>
78 </dependency>
79
ramvermac6d74e62018-07-11 14:21:13 +010080 </dependencies>
81
82 <build>
83 <defaultGoal>install</defaultGoal>
84 <outputDirectory>${project.build.directory}/classes</outputDirectory>
85 <plugins>
ramvermaea736d02018-11-29 13:47:30 +000086
87<!-- https://blog.sonatype.com/2008/04/how-to-share-resources-across-projects-in-maven/ -->
ramvermac6d74e62018-07-11 14:21:13 +010088 <plugin>
89 <groupId>org.apache.maven.plugins</groupId>
90 <artifactId>maven-dependency-plugin</artifactId>
91 <executions>
92 <execution>
ramvermaea736d02018-11-29 13:47:30 +000093 <id>unpack-shared-resources</id>
liamfallon32497612018-11-10 00:39:12 +000094 <goals>
ramvermaea736d02018-11-29 13:47:30 +000095 <goal>unpack-dependencies</goal>
liamfallon32497612018-11-10 00:39:12 +000096 </goals>
ramvermaea736d02018-11-29 13:47:30 +000097 <phase>generate-resources</phase>
ramvermac6d74e62018-07-11 14:21:13 +010098 <configuration>
ramvermaea736d02018-11-29 13:47:30 +000099 <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory>
100 <!--use as much as needed to be specific...also scope,type,classifier etc-->
101 <includeArtifacIds>client-common</includeArtifacIds>
102 <includeGroupIds>org.onap.policy.apex-pdp.client</includeGroupIds>
103 <excludeTransitive>true</excludeTransitive>
104 <excludeTransitive>true</excludeTransitive>
105 <excludeTypes>jar</excludeTypes>
106 <includeTypes>zip</includeTypes>
ramvermac6d74e62018-07-11 14:21:13 +0100107 </configuration>
108 </execution>
109 </executions>
110 </plugin>
ramvermaea736d02018-11-29 13:47:30 +0000111 <plugin>
112 <groupId>org.apache.maven.plugins</groupId>
113 <artifactId>maven-assembly-plugin</artifactId>
114 <executions>
115 <execution>
116 <id>make shared resources</id>
117 <goals>
118 <goal>single</goal>
119 </goals>
120 <phase>package</phase>
121 <configuration>
122 <descriptors>
123 <descriptor>src/main/assembly/resources.xml</descriptor>
124 </descriptors>
125 </configuration>
126 </execution>
127 </executions>
128 </plugin>
129
liamfallon32497612018-11-10 00:39:12 +0000130
liamfallona41c8772018-09-05 15:46:31 +0100131 <plugin>
132 <groupId>org.apache.maven.plugins</groupId>
ramvermac6d74e62018-07-11 14:21:13 +0100133 <artifactId>maven-shade-plugin</artifactId>
134 <executions>
135 <execution>
136 <phase>package</phase>
137 <goals>
138 <goal>shade</goal>
139 </goals>
140 </execution>
141 </executions>
142 <configuration>
143 <finalName>${project.artifactId}-uber-${project.version}</finalName>
144 <shadedArtifactAttached>true</shadedArtifactAttached>
145 <shadedClassifierName>deployment</shadedClassifierName>
146 <artifactSet>
147 <includes>
148 <include>*:*</include>
149 </includes>
150 </artifactSet>
151 <filters>
152 <filter>
153 <artifact>*:*</artifact>
154 <excludes>
155 <exclude>META-INF/*.SF</exclude>
156 <exclude>META-INF/*.DSA</exclude>
157 <exclude>META-INF/*.RSA</exclude>
158 </excludes>
159 </filter>
160 </filters>
161 <transformers>
liamfallon32497612018-11-10 00:39:12 +0000162 <transformer
163 implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
164 <transformer
165 implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
ramvermac6d74e62018-07-11 14:21:13 +0100166 <resource>reference.conf</resource>
167 </transformer>
liamfallon32497612018-11-10 00:39:12 +0000168 <transformer
169 implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
ramvermac6d74e62018-07-11 14:21:13 +0100170 <resource>log4j.properties</resource>
171 </transformer>
liamfallon32497612018-11-10 00:39:12 +0000172 <transformer
173 implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
ramvermac6d74e62018-07-11 14:21:13 +0100174 <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>
ramvermac6d74e62018-07-11 14:21:13 +0100182 <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>
Dinh Danh Leba229772018-08-22 18:02:01 +0100224
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>
ramvermac6d74e62018-07-11 14:21:13 +0100241</project>