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
9 http://www.apache.org/licenses/LICENSE-2.0
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.
17 SPDX-License-Identifier: Apache-2.0
18 ============LICENSE_END=========================================================
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>
24 <groupId>org.onap.policy.apex-pdp.client</groupId>
25 <artifactId>client</artifactId>
26 <version>2.2.2-SNAPSHOT</version>
29 <artifactId>client-deployment</artifactId>
30 <name>${project.artifactId}</name>
31 <description>Web client for deploying models in Apex engine</description>
35 <groupId>org.onap.policy.apex-pdp.core</groupId>
36 <artifactId>core-deployment</artifactId>
37 <version>${project.version}</version>
40 <groupId>org.glassfish.jersey.containers</groupId>
41 <artifactId>jersey-container-grizzly2-http</artifactId>
42 <version>${version.jersey}</version>
45 <groupId>org.glassfish.jersey.media</groupId>
46 <artifactId>jersey-media-multipart</artifactId>
47 <version>${version.jersey}</version>
50 <groupId>org.glassfish.jersey.containers</groupId>
51 <artifactId>jersey-container-servlet-core</artifactId>
52 <version>${version.jersey}</version>
55 <groupId>org.glassfish.jersey.inject</groupId>
56 <artifactId>jersey-hk2</artifactId>
57 <version>${version.jersey}</version>
60 <groupId>commons-cli</groupId>
61 <artifactId>commons-cli</artifactId>
65 <groupId>org.onap.policy.apex-pdp.client</groupId>
66 <artifactId>client-common</artifactId>
67 <version>${project.version}</version>
68 <classifier>resources</classifier>
70 <scope>provided</scope>
76 <defaultGoal>install</defaultGoal>
77 <outputDirectory>${project.build.directory}/classes</outputDirectory>
80 <!-- https://blog.sonatype.com/2008/04/how-to-share-resources-across-projects-in-maven/ -->
82 <groupId>org.apache.maven.plugins</groupId>
83 <artifactId>maven-dependency-plugin</artifactId>
86 <id>unpack-shared-resources</id>
88 <goal>unpack-dependencies</goal>
90 <phase>generate-resources</phase>
92 <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory>
93 <!--use as much as needed to be specific...also scope,type,classifier etc-->
94 <includeArtifacIds>client-common</includeArtifacIds>
95 <includeGroupIds>org.onap.policy.apex-pdp.client</includeGroupIds>
96 <excludeTransitive>true</excludeTransitive>
97 <excludeTransitive>true</excludeTransitive>
98 <excludeTypes>jar</excludeTypes>
99 <includeTypes>zip</includeTypes>
105 <groupId>org.apache.maven.plugins</groupId>
106 <artifactId>maven-assembly-plugin</artifactId>
109 <id>make shared resources</id>
113 <phase>package</phase>
116 <descriptor>src/main/assembly/resources.xml</descriptor>
125 <groupId>org.apache.maven.plugins</groupId>
126 <artifactId>maven-shade-plugin</artifactId>
129 <phase>package</phase>
136 <finalName>${project.artifactId}-uber-${project.version}</finalName>
137 <shadedArtifactAttached>true</shadedArtifactAttached>
138 <shadedClassifierName>deployment</shadedClassifierName>
141 <include>*:*</include>
146 <artifact>*:*</artifact>
148 <exclude>META-INF/*.SF</exclude>
149 <exclude>META-INF/*.DSA</exclude>
150 <exclude>META-INF/*.RSA</exclude>
156 implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
158 implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
159 <resource>reference.conf</resource>
162 implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
163 <resource>log4j.properties</resource>
166 implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
167 <mainClass>org.onap.policy.apex.client.deployment.rest.ApexDeploymentRestMain</mainClass>
173 <groupId>org.apache.maven.plugins</groupId>
174 <artifactId>maven-war-plugin</artifactId>
176 <classifier>ui</classifier>
177 <warSourceDirectory>src/main/resources/webapp</warSourceDirectory>
178 <webXml>src/main/resources/webapp/WEB-INF/web.xml</webXml>
182 <phase>prepare-package</phase>
190 <groupId>org.codehaus.mojo</groupId>
191 <artifactId>build-helper-maven-plugin</artifactId>
192 <version>3.0.0</version>
195 <id>attach-artifacts</id>
196 <phase>package</phase>
198 <goal>attach-artifact</goal>
203 <file>${project.build.directory}/${project.artifactId}-${project.version}-ui.war</file>
207 <file>${project.build.directory}/${project.artifactId}-uber-${project.version}.jar</file>
208 <type>uber.jar</type>
223 <name>apexSite</name>
226 <distributionManagement>
228 <id>${project.artifactId}-site</id>
229 <url>${apex.adsite.prefix}/modules/${project.parent.artifactId}/${project.artifactId}/</url>
231 </distributionManagement>