blob: 149410a46235d17765cb9551bff5965774bee1d3 [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.
Ram Krishna Verma8d228522020-02-05 16:31:01 -05005 Modifications Copyright (C) 2020 Bell Canada.
ramvermac6d74e62018-07-11 14:21:13 +01006 ================================================================================
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
10
11 http://www.apache.org/licenses/LICENSE-2.0
12
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18
19 SPDX-License-Identifier: Apache-2.0
20 ============LICENSE_END=========================================================
21-->
liamfallon32497612018-11-10 00:39:12 +000022<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23 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 +010024 <modelVersion>4.0.0</modelVersion>
25 <parent>
26 <groupId>org.onap.policy.apex-pdp.client</groupId>
Ram Krishna Verma8d228522020-02-05 16:31:01 -050027 <artifactId>apex-client</artifactId>
jrh3d7d9df62019-09-12 10:07:06 -040028 <version>2.3.0-SNAPSHOT</version>
ramvermac6d74e62018-07-11 14:21:13 +010029 </parent>
30
Ram Krishna Verma8d228522020-02-05 16:31:01 -050031 <artifactId>apex-client-deployment</artifactId>
ramvermac6d74e62018-07-11 14:21:13 +010032 <name>${project.artifactId}</name>
33 <description>Web client for deploying models in Apex engine</description>
34
35 <dependencies>
36 <dependency>
liamfallond7eda872019-11-04 18:07:20 +000037 <groupId>org.onap.policy.common</groupId>
38 <artifactId>policy-endpoints</artifactId>
39 </dependency>
40 <dependency>
ramvermac6d74e62018-07-11 14:21:13 +010041 <groupId>org.onap.policy.apex-pdp.core</groupId>
42 <artifactId>core-deployment</artifactId>
43 <version>${project.version}</version>
44 </dependency>
45 <dependency>
ramvermac6d74e62018-07-11 14:21:13 +010046 <groupId>org.glassfish.jersey.containers</groupId>
47 <artifactId>jersey-container-grizzly2-http</artifactId>
ramvermac6d74e62018-07-11 14:21:13 +010048 </dependency>
49 <dependency>
ramvermac6d74e62018-07-11 14:21:13 +010050 <groupId>commons-cli</groupId>
51 <artifactId>commons-cli</artifactId>
ramvermac6d74e62018-07-11 14:21:13 +010052 </dependency>
ning.xic678c3a2019-08-13 05:20:20 +000053 <dependency>
54 <groupId>org.mockito</groupId>
55 <artifactId>mockito-all</artifactId>
56 <scope>test</scope>
57 </dependency>
58 <dependency>
59 <groupId>org.assertj</groupId>
60 <artifactId>assertj-core</artifactId>
ning.xic678c3a2019-08-13 05:20:20 +000061 <scope>test</scope>
62 </dependency>
ramvermaea736d02018-11-29 13:47:30 +000063
64 <dependency>
65 <groupId>org.onap.policy.apex-pdp.client</groupId>
Ram Krishna Verma8d228522020-02-05 16:31:01 -050066 <artifactId>apex-client-common</artifactId>
ramvermaea736d02018-11-29 13:47:30 +000067 <version>${project.version}</version>
68 <classifier>resources</classifier>
69 <type>zip</type>
70 <scope>provided</scope>
71 </dependency>
72
ramvermac6d74e62018-07-11 14:21:13 +010073 </dependencies>
74
75 <build>
76 <defaultGoal>install</defaultGoal>
77 <outputDirectory>${project.build.directory}/classes</outputDirectory>
78 <plugins>
ramvermaea736d02018-11-29 13:47:30 +000079
80<!-- https://blog.sonatype.com/2008/04/how-to-share-resources-across-projects-in-maven/ -->
ramvermac6d74e62018-07-11 14:21:13 +010081 <plugin>
82 <groupId>org.apache.maven.plugins</groupId>
83 <artifactId>maven-dependency-plugin</artifactId>
84 <executions>
85 <execution>
ramvermaea736d02018-11-29 13:47:30 +000086 <id>unpack-shared-resources</id>
liamfallon32497612018-11-10 00:39:12 +000087 <goals>
ramvermaea736d02018-11-29 13:47:30 +000088 <goal>unpack-dependencies</goal>
liamfallon32497612018-11-10 00:39:12 +000089 </goals>
ramvermaea736d02018-11-29 13:47:30 +000090 <phase>generate-resources</phase>
ramvermac6d74e62018-07-11 14:21:13 +010091 <configuration>
ramvermaea736d02018-11-29 13:47:30 +000092 <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory>
93 <!--use as much as needed to be specific...also scope,type,classifier etc-->
Ram Krishna Verma8d228522020-02-05 16:31:01 -050094 <includeArtifacIds>apex-client-common</includeArtifacIds>
ramvermaea736d02018-11-29 13:47:30 +000095 <includeGroupIds>org.onap.policy.apex-pdp.client</includeGroupIds>
96 <excludeTransitive>true</excludeTransitive>
97 <excludeTransitive>true</excludeTransitive>
98 <excludeTypes>jar</excludeTypes>
99 <includeTypes>zip</includeTypes>
ramvermac6d74e62018-07-11 14:21:13 +0100100 </configuration>
101 </execution>
102 </executions>
103 </plugin>
ramvermaea736d02018-11-29 13:47:30 +0000104 <plugin>
105 <groupId>org.apache.maven.plugins</groupId>
106 <artifactId>maven-assembly-plugin</artifactId>
107 <executions>
108 <execution>
109 <id>make shared resources</id>
110 <goals>
111 <goal>single</goal>
112 </goals>
113 <phase>package</phase>
114 <configuration>
115 <descriptors>
116 <descriptor>src/main/assembly/resources.xml</descriptor>
117 </descriptors>
118 </configuration>
119 </execution>
120 </executions>
121 </plugin>
122
liamfallon32497612018-11-10 00:39:12 +0000123
liamfallona41c8772018-09-05 15:46:31 +0100124 <plugin>
125 <groupId>org.apache.maven.plugins</groupId>
ramvermac6d74e62018-07-11 14:21:13 +0100126 <artifactId>maven-shade-plugin</artifactId>
127 <executions>
128 <execution>
129 <phase>package</phase>
130 <goals>
131 <goal>shade</goal>
132 </goals>
133 </execution>
134 </executions>
135 <configuration>
136 <finalName>${project.artifactId}-uber-${project.version}</finalName>
137 <shadedArtifactAttached>true</shadedArtifactAttached>
138 <shadedClassifierName>deployment</shadedClassifierName>
139 <artifactSet>
140 <includes>
141 <include>*:*</include>
142 </includes>
143 </artifactSet>
144 <filters>
145 <filter>
146 <artifact>*:*</artifact>
147 <excludes>
148 <exclude>META-INF/*.SF</exclude>
149 <exclude>META-INF/*.DSA</exclude>
150 <exclude>META-INF/*.RSA</exclude>
151 </excludes>
152 </filter>
153 </filters>
154 <transformers>
liamfallon32497612018-11-10 00:39:12 +0000155 <transformer
156 implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
157 <transformer
158 implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
ramvermac6d74e62018-07-11 14:21:13 +0100159 <resource>reference.conf</resource>
160 </transformer>
liamfallon32497612018-11-10 00:39:12 +0000161 <transformer
162 implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
ramvermac6d74e62018-07-11 14:21:13 +0100163 <resource>log4j.properties</resource>
164 </transformer>
liamfallon32497612018-11-10 00:39:12 +0000165 <transformer
166 implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
ramvermac6d74e62018-07-11 14:21:13 +0100167 <mainClass>org.onap.policy.apex.client.deployment.rest.ApexDeploymentRestMain</mainClass>
168 </transformer>
169 </transformers>
170 </configuration>
171 </plugin>
172 <plugin>
173 <groupId>org.apache.maven.plugins</groupId>
174 <artifactId>maven-war-plugin</artifactId>
ramvermac6d74e62018-07-11 14:21:13 +0100175 <configuration>
176 <classifier>ui</classifier>
177 <warSourceDirectory>src/main/resources/webapp</warSourceDirectory>
178 <webXml>src/main/resources/webapp/WEB-INF/web.xml</webXml>
179 </configuration>
180 <executions>
181 <execution>
182 <phase>prepare-package</phase>
183 <goals>
184 <goal>war</goal>
185 </goals>
186 </execution>
187 </executions>
188 </plugin>
189 <plugin>
190 <groupId>org.codehaus.mojo</groupId>
191 <artifactId>build-helper-maven-plugin</artifactId>
192 <version>3.0.0</version>
193 <executions>
194 <execution>
195 <id>attach-artifacts</id>
196 <phase>package</phase>
197 <goals>
198 <goal>attach-artifact</goal>
199 </goals>
200 <configuration>
201 <artifacts>
202 <artifact>
203 <file>${project.build.directory}/${project.artifactId}-${project.version}-ui.war</file>
204 <type>war</type>
205 </artifact>
206 <artifact>
207 <file>${project.build.directory}/${project.artifactId}-uber-${project.version}.jar</file>
208 <type>uber.jar</type>
209 </artifact>
210 </artifacts>
211 </configuration>
212 </execution>
213 </executions>
214 </plugin>
215 </plugins>
216 </build>
Dinh Danh Leba229772018-08-22 18:02:01 +0100217
218 <profiles>
219 <profile>
220 <id>apexSite</id>
221 <activation>
222 <property>
223 <name>apexSite</name>
224 </property>
225 </activation>
226 <distributionManagement>
227 <site>
228 <id>${project.artifactId}-site</id>
229 <url>${apex.adsite.prefix}/modules/${project.parent.artifactId}/${project.artifactId}/</url>
230 </site>
231 </distributionManagement>
232 </profile>
233 </profiles>
ramvermac6d74e62018-07-11 14:21:13 +0100234</project>