blob: 4e5eb0b3ea43d9837e5b68b21aa47ce4a87680ba [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>
liamfallond7eda872019-11-04 18:07:20 +000035 <dependency>
36 <groupId>org.onap.policy.common</groupId>
37 <artifactId>policy-endpoints</artifactId>
38 </dependency>
ramverma0ba66782018-07-06 16:29:16 +010039 <dependency>
40 <groupId>org.onap.policy.apex-pdp.core</groupId>
41 <artifactId>core-deployment</artifactId>
42 <version>${project.version}</version>
43 </dependency>
44 <dependency>
45 <groupId>org.glassfish.jersey.containers</groupId>
46 <artifactId>jersey-container-grizzly2-http</artifactId>
ramverma0ba66782018-07-06 16:29:16 +010047 </dependency>
48 <dependency>
ramverma0ba66782018-07-06 16:29:16 +010049 <groupId>commons-cli</groupId>
50 <artifactId>commons-cli</artifactId>
ramverma0ba66782018-07-06 16:29:16 +010051 </dependency>
liamfallonacb59c72018-09-28 22:48:30 +010052 <dependency>
liamfallon0bfa9b42018-10-01 15:05:58 +010053 <groupId>org.mockito</groupId>
54 <artifactId>mockito-all</artifactId>
liamfallonacb59c72018-09-28 22:48:30 +010055 <scope>test</scope>
56 </dependency>
ramvermaea736d02018-11-29 13:47:30 +000057
58 <dependency>
59 <groupId>org.onap.policy.apex-pdp.client</groupId>
60 <artifactId>client-common</artifactId>
61 <version>${project.version}</version>
62 <classifier>resources</classifier>
63 <type>zip</type>
64 <scope>provided</scope>
65 </dependency>
66
ramverma0ba66782018-07-06 16:29:16 +010067 </dependencies>
68
69 <build>
70 <defaultGoal>install</defaultGoal>
71 <outputDirectory>${project.build.directory}/classes</outputDirectory>
72 <plugins>
ramvermaea736d02018-11-29 13:47:30 +000073
74<!-- https://blog.sonatype.com/2008/04/how-to-share-resources-across-projects-in-maven/ -->
ramverma0ba66782018-07-06 16:29:16 +010075 <plugin>
76 <groupId>org.apache.maven.plugins</groupId>
ramvermac6d74e62018-07-11 14:21:13 +010077 <artifactId>maven-dependency-plugin</artifactId>
78 <executions>
79 <execution>
ramvermaea736d02018-11-29 13:47:30 +000080 <id>unpack-shared-resources</id>
liamfallon32497612018-11-10 00:39:12 +000081 <goals>
ramvermaea736d02018-11-29 13:47:30 +000082 <goal>unpack-dependencies</goal>
liamfallon32497612018-11-10 00:39:12 +000083 </goals>
ramvermaea736d02018-11-29 13:47:30 +000084 <phase>generate-resources</phase>
ramvermac6d74e62018-07-11 14:21:13 +010085 <configuration>
ramvermaea736d02018-11-29 13:47:30 +000086 <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory>
87 <!--use as much as needed to be specific...also scope,type,classifier etc-->
88 <includeArtifacIds>client-common</includeArtifacIds>
89 <includeGroupIds>org.onap.policy.apex-pdp.client</includeGroupIds>
90 <excludeTransitive>true</excludeTransitive>
91 <excludeTypes>jar</excludeTypes>
92 <includeTypes>zip</includeTypes>
93 <excludeTransitive>true</excludeTransitive>
ramvermac6d74e62018-07-11 14:21:13 +010094 </configuration>
95 </execution>
96 </executions>
97 </plugin>
ramvermaea736d02018-11-29 13:47:30 +000098 <plugin>
99 <groupId>org.apache.maven.plugins</groupId>
100 <artifactId>maven-assembly-plugin</artifactId>
101 <executions>
102 <execution>
103 <id>make shared resources</id>
104 <goals>
105 <goal>single</goal>
106 </goals>
107 <phase>package</phase>
108 <configuration>
109 <descriptors>
110 <descriptor>src/main/assembly/resources.xml</descriptor>
111 </descriptors>
112 </configuration>
113 </execution>
114 </executions>
115 </plugin>
116
liamfallon32497612018-11-10 00:39:12 +0000117
liamfallona41c8772018-09-05 15:46:31 +0100118 <plugin>
119 <groupId>org.apache.maven.plugins</groupId>
ramverma0ba66782018-07-06 16:29:16 +0100120 <artifactId>maven-shade-plugin</artifactId>
121 <executions>
122 <execution>
123 <phase>package</phase>
124 <goals>
125 <goal>shade</goal>
126 </goals>
127 </execution>
128 </executions>
129 <configuration>
130 <finalName>${project.artifactId}-uber-${project.version}</finalName>
131 <shadedArtifactAttached>true</shadedArtifactAttached>
132 <shadedClassifierName>monitoring</shadedClassifierName>
133 <artifactSet>
134 <includes>
135 <include>*:*</include>
136 </includes>
137 </artifactSet>
138 <filters>
139 <filter>
140 <artifact>*:*</artifact>
141 <excludes>
142 <exclude>META-INF/*.SF</exclude>
143 <exclude>META-INF/*.DSA</exclude>
144 <exclude>META-INF/*.RSA</exclude>
145 </excludes>
146 </filter>
147 </filters>
148 <transformers>
ramvermaea736d02018-11-29 13:47:30 +0000149 <transformer
150 implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
151 <transformer
152 implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
ramverma0ba66782018-07-06 16:29:16 +0100153 <resource>reference.conf</resource>
154 </transformer>
ramvermaea736d02018-11-29 13:47:30 +0000155 <transformer
156 implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
ramverma0ba66782018-07-06 16:29:16 +0100157 <resource>log4j.properties</resource>
158 </transformer>
ramvermaea736d02018-11-29 13:47:30 +0000159 <transformer
160 implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
ramverma0ba66782018-07-06 16:29:16 +0100161 <mainClass>org.onap.policy.apex.client.monitoring.rest.ApexMonitoringRestMain</mainClass>
162 </transformer>
163 </transformers>
164 </configuration>
165 </plugin>
166 <plugin>
167 <groupId>org.apache.maven.plugins</groupId>
168 <artifactId>maven-war-plugin</artifactId>
ramverma0ba66782018-07-06 16:29:16 +0100169 <configuration>
170 <classifier>ui</classifier>
171 <warSourceDirectory>src/main/resources/webapp</warSourceDirectory>
172 <webXml>src/main/resources/webapp/WEB-INF/web.xml</webXml>
173 </configuration>
174 <executions>
175 <execution>
176 <phase>prepare-package</phase>
177 <goals>
178 <goal>war</goal>
179 </goals>
180 </execution>
181 </executions>
182 </plugin>
183 <plugin>
184 <groupId>org.codehaus.mojo</groupId>
185 <artifactId>build-helper-maven-plugin</artifactId>
186 <version>3.0.0</version>
187 <executions>
188 <execution>
189 <id>attach-artifacts</id>
190 <phase>package</phase>
191 <goals>
192 <goal>attach-artifact</goal>
193 </goals>
194 <configuration>
195 <artifacts>
196 <artifact>
197 <file>${project.build.directory}/${project.artifactId}-${project.version}-ui.war</file>
198 <type>war</type>
199 </artifact>
200 <artifact>
201 <file>${project.build.directory}/${project.artifactId}-uber-${project.version}.jar</file>
202 <type>uber.jar</type>
203 </artifact>
204 </artifacts>
205 </configuration>
206 </execution>
207 </executions>
208 </plugin>
209 </plugins>
210 </build>
Dinh Danh Leba229772018-08-22 18:02:01 +0100211
212 <profiles>
213 <profile>
214 <id>apexSite</id>
215 <activation>
216 <property>
217 <name>apexSite</name>
218 </property>
219 </activation>
220 <distributionManagement>
221 <site>
222 <id>${project.artifactId}-site</id>
223 <url>${apex.adsite.prefix}/modules/${project.parent.artifactId}/${project.artifactId}/</url>
224 </site>
225 </distributionManagement>
226 </profile>
227 </profiles>
ramverma0ba66782018-07-06 16:29:16 +0100228</project>