blob: 5aa8f41a346aa0724479f04c04d131db0832e737 [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>
liamfallond7eda872019-11-04 18:07:20 +000036 <groupId>org.onap.policy.common</groupId>
37 <artifactId>policy-endpoints</artifactId>
38 </dependency>
39 <dependency>
ramvermac6d74e62018-07-11 14:21:13 +010040 <groupId>org.onap.policy.apex-pdp.core</groupId>
41 <artifactId>core-deployment</artifactId>
42 <version>${project.version}</version>
43 </dependency>
44 <dependency>
ramvermac6d74e62018-07-11 14:21:13 +010045 <groupId>org.glassfish.jersey.containers</groupId>
46 <artifactId>jersey-container-grizzly2-http</artifactId>
ramvermac6d74e62018-07-11 14:21:13 +010047 </dependency>
48 <dependency>
ramvermac6d74e62018-07-11 14:21:13 +010049 <groupId>commons-cli</groupId>
50 <artifactId>commons-cli</artifactId>
ramvermac6d74e62018-07-11 14:21:13 +010051 </dependency>
ning.xic678c3a2019-08-13 05:20:20 +000052 <dependency>
53 <groupId>org.mockito</groupId>
54 <artifactId>mockito-all</artifactId>
55 <scope>test</scope>
56 </dependency>
57 <dependency>
58 <groupId>org.assertj</groupId>
59 <artifactId>assertj-core</artifactId>
ning.xic678c3a2019-08-13 05:20:20 +000060 <scope>test</scope>
61 </dependency>
ramvermaea736d02018-11-29 13:47:30 +000062
63 <dependency>
64 <groupId>org.onap.policy.apex-pdp.client</groupId>
65 <artifactId>client-common</artifactId>
66 <version>${project.version}</version>
67 <classifier>resources</classifier>
68 <type>zip</type>
69 <scope>provided</scope>
70 </dependency>
71
ramvermac6d74e62018-07-11 14:21:13 +010072 </dependencies>
73
74 <build>
75 <defaultGoal>install</defaultGoal>
76 <outputDirectory>${project.build.directory}/classes</outputDirectory>
77 <plugins>
ramvermaea736d02018-11-29 13:47:30 +000078
79<!-- https://blog.sonatype.com/2008/04/how-to-share-resources-across-projects-in-maven/ -->
ramvermac6d74e62018-07-11 14:21:13 +010080 <plugin>
81 <groupId>org.apache.maven.plugins</groupId>
82 <artifactId>maven-dependency-plugin</artifactId>
83 <executions>
84 <execution>
ramvermaea736d02018-11-29 13:47:30 +000085 <id>unpack-shared-resources</id>
liamfallon32497612018-11-10 00:39:12 +000086 <goals>
ramvermaea736d02018-11-29 13:47:30 +000087 <goal>unpack-dependencies</goal>
liamfallon32497612018-11-10 00:39:12 +000088 </goals>
ramvermaea736d02018-11-29 13:47:30 +000089 <phase>generate-resources</phase>
ramvermac6d74e62018-07-11 14:21:13 +010090 <configuration>
ramvermaea736d02018-11-29 13:47:30 +000091 <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory>
92 <!--use as much as needed to be specific...also scope,type,classifier etc-->
93 <includeArtifacIds>client-common</includeArtifacIds>
94 <includeGroupIds>org.onap.policy.apex-pdp.client</includeGroupIds>
95 <excludeTransitive>true</excludeTransitive>
96 <excludeTransitive>true</excludeTransitive>
97 <excludeTypes>jar</excludeTypes>
98 <includeTypes>zip</includeTypes>
ramvermac6d74e62018-07-11 14:21:13 +010099 </configuration>
100 </execution>
101 </executions>
102 </plugin>
ramvermaea736d02018-11-29 13:47:30 +0000103 <plugin>
104 <groupId>org.apache.maven.plugins</groupId>
105 <artifactId>maven-assembly-plugin</artifactId>
106 <executions>
107 <execution>
108 <id>make shared resources</id>
109 <goals>
110 <goal>single</goal>
111 </goals>
112 <phase>package</phase>
113 <configuration>
114 <descriptors>
115 <descriptor>src/main/assembly/resources.xml</descriptor>
116 </descriptors>
117 </configuration>
118 </execution>
119 </executions>
120 </plugin>
121
liamfallon32497612018-11-10 00:39:12 +0000122
liamfallona41c8772018-09-05 15:46:31 +0100123 <plugin>
124 <groupId>org.apache.maven.plugins</groupId>
ramvermac6d74e62018-07-11 14:21:13 +0100125 <artifactId>maven-shade-plugin</artifactId>
126 <executions>
127 <execution>
128 <phase>package</phase>
129 <goals>
130 <goal>shade</goal>
131 </goals>
132 </execution>
133 </executions>
134 <configuration>
135 <finalName>${project.artifactId}-uber-${project.version}</finalName>
136 <shadedArtifactAttached>true</shadedArtifactAttached>
137 <shadedClassifierName>deployment</shadedClassifierName>
138 <artifactSet>
139 <includes>
140 <include>*:*</include>
141 </includes>
142 </artifactSet>
143 <filters>
144 <filter>
145 <artifact>*:*</artifact>
146 <excludes>
147 <exclude>META-INF/*.SF</exclude>
148 <exclude>META-INF/*.DSA</exclude>
149 <exclude>META-INF/*.RSA</exclude>
150 </excludes>
151 </filter>
152 </filters>
153 <transformers>
liamfallon32497612018-11-10 00:39:12 +0000154 <transformer
155 implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
156 <transformer
157 implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
ramvermac6d74e62018-07-11 14:21:13 +0100158 <resource>reference.conf</resource>
159 </transformer>
liamfallon32497612018-11-10 00:39:12 +0000160 <transformer
161 implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
ramvermac6d74e62018-07-11 14:21:13 +0100162 <resource>log4j.properties</resource>
163 </transformer>
liamfallon32497612018-11-10 00:39:12 +0000164 <transformer
165 implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
ramvermac6d74e62018-07-11 14:21:13 +0100166 <mainClass>org.onap.policy.apex.client.deployment.rest.ApexDeploymentRestMain</mainClass>
167 </transformer>
168 </transformers>
169 </configuration>
170 </plugin>
171 <plugin>
172 <groupId>org.apache.maven.plugins</groupId>
173 <artifactId>maven-war-plugin</artifactId>
ramvermac6d74e62018-07-11 14:21:13 +0100174 <configuration>
175 <classifier>ui</classifier>
176 <warSourceDirectory>src/main/resources/webapp</warSourceDirectory>
177 <webXml>src/main/resources/webapp/WEB-INF/web.xml</webXml>
178 </configuration>
179 <executions>
180 <execution>
181 <phase>prepare-package</phase>
182 <goals>
183 <goal>war</goal>
184 </goals>
185 </execution>
186 </executions>
187 </plugin>
188 <plugin>
189 <groupId>org.codehaus.mojo</groupId>
190 <artifactId>build-helper-maven-plugin</artifactId>
191 <version>3.0.0</version>
192 <executions>
193 <execution>
194 <id>attach-artifacts</id>
195 <phase>package</phase>
196 <goals>
197 <goal>attach-artifact</goal>
198 </goals>
199 <configuration>
200 <artifacts>
201 <artifact>
202 <file>${project.build.directory}/${project.artifactId}-${project.version}-ui.war</file>
203 <type>war</type>
204 </artifact>
205 <artifact>
206 <file>${project.build.directory}/${project.artifactId}-uber-${project.version}.jar</file>
207 <type>uber.jar</type>
208 </artifact>
209 </artifacts>
210 </configuration>
211 </execution>
212 </executions>
213 </plugin>
214 </plugins>
215 </build>
Dinh Danh Leba229772018-08-22 18:02:01 +0100216
217 <profiles>
218 <profile>
219 <id>apexSite</id>
220 <activation>
221 <property>
222 <name>apexSite</name>
223 </property>
224 </activation>
225 <distributionManagement>
226 <site>
227 <id>${project.artifactId}-site</id>
228 <url>${apex.adsite.prefix}/modules/${project.parent.artifactId}/${project.artifactId}/</url>
229 </site>
230 </distributionManagement>
231 </profile>
232 </profiles>
ramvermac6d74e62018-07-11 14:21:13 +0100233</project>