blob: 5ae5412b3f71e69ee2c9c4ea1557de5d3e14816b [file] [log] [blame]
ramverma0ba66782018-07-06 16:29:16 +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.
ramverma0ba66782018-07-06 16:29:16 +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-->
ramvermaea736d02018-11-29 13:47:30 +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">
ramverma0ba66782018-07-06 16:29:16 +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>
ramverma0ba66782018-07-06 16:29:16 +010028 </parent>
29
30 <artifactId>client-monitoring</artifactId>
31 <name>${project.artifactId}</name>
32 <description>Web client for monitoring Apex engines</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>
41 <groupId>org.glassfish.jersey.containers</groupId>
42 <artifactId>jersey-container-grizzly2-http</artifactId>
ramverma0ba66782018-07-06 16:29:16 +010043 </dependency>
44 <dependency>
45 <groupId>org.glassfish.jersey.containers</groupId>
46 <artifactId>jersey-container-servlet-core</artifactId>
ramverma0ba66782018-07-06 16:29:16 +010047 </dependency>
48 <dependency>
49 <groupId>org.glassfish.jersey.inject</groupId>
50 <artifactId>jersey-hk2</artifactId>
ramverma0ba66782018-07-06 16:29:16 +010051 </dependency>
52 <dependency>
53 <groupId>commons-cli</groupId>
54 <artifactId>commons-cli</artifactId>
ramverma0ba66782018-07-06 16:29:16 +010055 </dependency>
liamfallonacb59c72018-09-28 22:48:30 +010056 <dependency>
liamfallon0bfa9b42018-10-01 15:05:58 +010057 <groupId>org.mockito</groupId>
58 <artifactId>mockito-all</artifactId>
liamfallonacb59c72018-09-28 22:48:30 +010059 <scope>test</scope>
60 </dependency>
ramvermaea736d02018-11-29 13:47:30 +000061
62 <dependency>
63 <groupId>org.onap.policy.apex-pdp.client</groupId>
64 <artifactId>client-common</artifactId>
65 <version>${project.version}</version>
66 <classifier>resources</classifier>
67 <type>zip</type>
68 <scope>provided</scope>
69 </dependency>
70
ramverma0ba66782018-07-06 16:29:16 +010071 </dependencies>
72
73 <build>
74 <defaultGoal>install</defaultGoal>
75 <outputDirectory>${project.build.directory}/classes</outputDirectory>
76 <plugins>
ramvermaea736d02018-11-29 13:47:30 +000077
78<!-- https://blog.sonatype.com/2008/04/how-to-share-resources-across-projects-in-maven/ -->
ramverma0ba66782018-07-06 16:29:16 +010079 <plugin>
80 <groupId>org.apache.maven.plugins</groupId>
ramvermac6d74e62018-07-11 14:21:13 +010081 <artifactId>maven-dependency-plugin</artifactId>
82 <executions>
83 <execution>
ramvermaea736d02018-11-29 13:47:30 +000084 <id>unpack-shared-resources</id>
liamfallon32497612018-11-10 00:39:12 +000085 <goals>
ramvermaea736d02018-11-29 13:47:30 +000086 <goal>unpack-dependencies</goal>
liamfallon32497612018-11-10 00:39:12 +000087 </goals>
ramvermaea736d02018-11-29 13:47:30 +000088 <phase>generate-resources</phase>
ramvermac6d74e62018-07-11 14:21:13 +010089 <configuration>
ramvermaea736d02018-11-29 13:47:30 +000090 <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory>
91 <!--use as much as needed to be specific...also scope,type,classifier etc-->
92 <includeArtifacIds>client-common</includeArtifacIds>
93 <includeGroupIds>org.onap.policy.apex-pdp.client</includeGroupIds>
94 <excludeTransitive>true</excludeTransitive>
95 <excludeTypes>jar</excludeTypes>
96 <includeTypes>zip</includeTypes>
97 <excludeTransitive>true</excludeTransitive>
ramvermac6d74e62018-07-11 14:21:13 +010098 </configuration>
99 </execution>
100 </executions>
101 </plugin>
ramvermaea736d02018-11-29 13:47:30 +0000102 <plugin>
103 <groupId>org.apache.maven.plugins</groupId>
104 <artifactId>maven-assembly-plugin</artifactId>
105 <executions>
106 <execution>
107 <id>make shared resources</id>
108 <goals>
109 <goal>single</goal>
110 </goals>
111 <phase>package</phase>
112 <configuration>
113 <descriptors>
114 <descriptor>src/main/assembly/resources.xml</descriptor>
115 </descriptors>
116 </configuration>
117 </execution>
118 </executions>
119 </plugin>
120
liamfallon32497612018-11-10 00:39:12 +0000121
liamfallona41c8772018-09-05 15:46:31 +0100122 <plugin>
123 <groupId>org.apache.maven.plugins</groupId>
ramverma0ba66782018-07-06 16:29:16 +0100124 <artifactId>maven-shade-plugin</artifactId>
125 <executions>
126 <execution>
127 <phase>package</phase>
128 <goals>
129 <goal>shade</goal>
130 </goals>
131 </execution>
132 </executions>
133 <configuration>
134 <finalName>${project.artifactId}-uber-${project.version}</finalName>
135 <shadedArtifactAttached>true</shadedArtifactAttached>
136 <shadedClassifierName>monitoring</shadedClassifierName>
137 <artifactSet>
138 <includes>
139 <include>*:*</include>
140 </includes>
141 </artifactSet>
142 <filters>
143 <filter>
144 <artifact>*:*</artifact>
145 <excludes>
146 <exclude>META-INF/*.SF</exclude>
147 <exclude>META-INF/*.DSA</exclude>
148 <exclude>META-INF/*.RSA</exclude>
149 </excludes>
150 </filter>
151 </filters>
152 <transformers>
ramvermaea736d02018-11-29 13:47:30 +0000153 <transformer
154 implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
155 <transformer
156 implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
ramverma0ba66782018-07-06 16:29:16 +0100157 <resource>reference.conf</resource>
158 </transformer>
ramvermaea736d02018-11-29 13:47:30 +0000159 <transformer
160 implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
ramverma0ba66782018-07-06 16:29:16 +0100161 <resource>log4j.properties</resource>
162 </transformer>
ramvermaea736d02018-11-29 13:47:30 +0000163 <transformer
164 implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
ramverma0ba66782018-07-06 16:29:16 +0100165 <mainClass>org.onap.policy.apex.client.monitoring.rest.ApexMonitoringRestMain</mainClass>
166 </transformer>
167 </transformers>
168 </configuration>
169 </plugin>
170 <plugin>
171 <groupId>org.apache.maven.plugins</groupId>
172 <artifactId>maven-war-plugin</artifactId>
ramverma0ba66782018-07-06 16:29:16 +0100173 <configuration>
174 <classifier>ui</classifier>
175 <warSourceDirectory>src/main/resources/webapp</warSourceDirectory>
176 <webXml>src/main/resources/webapp/WEB-INF/web.xml</webXml>
177 </configuration>
178 <executions>
179 <execution>
180 <phase>prepare-package</phase>
181 <goals>
182 <goal>war</goal>
183 </goals>
184 </execution>
185 </executions>
186 </plugin>
187 <plugin>
188 <groupId>org.codehaus.mojo</groupId>
189 <artifactId>build-helper-maven-plugin</artifactId>
190 <version>3.0.0</version>
191 <executions>
192 <execution>
193 <id>attach-artifacts</id>
194 <phase>package</phase>
195 <goals>
196 <goal>attach-artifact</goal>
197 </goals>
198 <configuration>
199 <artifacts>
200 <artifact>
201 <file>${project.build.directory}/${project.artifactId}-${project.version}-ui.war</file>
202 <type>war</type>
203 </artifact>
204 <artifact>
205 <file>${project.build.directory}/${project.artifactId}-uber-${project.version}.jar</file>
206 <type>uber.jar</type>
207 </artifact>
208 </artifacts>
209 </configuration>
210 </execution>
211 </executions>
212 </plugin>
213 </plugins>
214 </build>
Dinh Danh Leba229772018-08-22 18:02:01 +0100215
216 <profiles>
217 <profile>
218 <id>apexSite</id>
219 <activation>
220 <property>
221 <name>apexSite</name>
222 </property>
223 </activation>
224 <distributionManagement>
225 <site>
226 <id>${project.artifactId}-site</id>
227 <url>${apex.adsite.prefix}/modules/${project.parent.artifactId}/${project.artifactId}/</url>
228 </site>
229 </distributionManagement>
230 </profile>
231 </profiles>
ramverma0ba66782018-07-06 16:29:16 +0100232</project>