abac35db2876c9a371e5908918f81e3dc30e16c6
[policy/apex-pdp.git] / client / client-monitoring / pom.xml
1 <!--
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
8
9        http://www.apache.org/licenses/LICENSE-2.0
10
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.
16
17   SPDX-License-Identifier: Apache-2.0
18   ============LICENSE_END=========================================================
19 -->
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>
23     <parent>
24         <groupId>org.onap.policy.apex-pdp.client</groupId>
25         <artifactId>client</artifactId>
26         <version>2.0.0-SNAPSHOT</version>
27     </parent>
28
29     <artifactId>client-monitoring</artifactId>
30     <name>${project.artifactId}</name>
31     <description>Web client for monitoring Apex engines</description>
32
33     <dependencies>
34         <dependency>
35             <groupId>org.onap.policy.apex-pdp.core</groupId>
36             <artifactId>core-deployment</artifactId>
37             <version>${project.version}</version>
38         </dependency>
39         <dependency>
40             <groupId>org.onap.policy.apex-pdp.client</groupId>
41             <artifactId>client-common</artifactId>
42             <version>${project.version}</version>
43             <classifier>resources</classifier>
44             <type>zip</type>
45             <scope>provided</scope>
46         </dependency>
47         <dependency>
48             <groupId>org.glassfish.jersey.containers</groupId>
49             <artifactId>jersey-container-grizzly2-http</artifactId>
50             <version>${version.jersey}</version>
51         </dependency>
52         <dependency>
53             <groupId>org.glassfish.jersey.containers</groupId>
54             <artifactId>jersey-container-servlet-core</artifactId>
55             <version>${version.jersey}</version>
56         </dependency>
57         <dependency>
58             <groupId>org.glassfish.jersey.inject</groupId>
59             <artifactId>jersey-hk2</artifactId>
60             <version>${version.jersey}</version>
61         </dependency>
62         <dependency>
63             <groupId>commons-cli</groupId>
64             <artifactId>commons-cli</artifactId>
65             <version>${version.commons-cli}</version>
66         </dependency>
67     </dependencies>
68
69     <build>
70         <defaultGoal>install</defaultGoal>
71         <outputDirectory>${project.build.directory}/classes</outputDirectory>
72         <plugins>
73             <plugin>
74                 <groupId>org.apache.maven.plugins</groupId>
75                 <artifactId>maven-dependency-plugin</artifactId>
76                 <executions>
77                     <execution>
78                         <id>unpack-client-monitoring-shared-resources</id>
79                         <goals>
80                             <goal>unpack-dependencies</goal>
81                         </goals>
82                         <phase>generate-resources</phase>
83                         <configuration>
84                             <outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}</outputDirectory>
85                             <includeArtifacIds>client-common</includeArtifacIds>
86                             <includeGroupIds>${project.groupId}</includeGroupIds>
87                             <excludeTransitive>true</excludeTransitive>
88                         </configuration>
89                     </execution>
90                 </executions>
91             </plugin>
92             <plugin>
93                 <groupId>org.apache.maven.plugins</groupId>
94                 <artifactId>maven-shade-plugin</artifactId>
95                 <executions>
96                     <execution>
97                         <phase>package</phase>
98                         <goals>
99                             <goal>shade</goal>
100                         </goals>
101                     </execution>
102                 </executions>
103                 <configuration>
104                     <finalName>${project.artifactId}-uber-${project.version}</finalName>
105                     <shadedArtifactAttached>true</shadedArtifactAttached>
106                     <shadedClassifierName>monitoring</shadedClassifierName>
107                     <artifactSet>
108                         <includes>
109                             <include>*:*</include>
110                         </includes>
111                     </artifactSet>
112                     <filters>
113                         <filter>
114                             <artifact>*:*</artifact>
115                             <excludes>
116                                 <exclude>META-INF/*.SF</exclude>
117                                 <exclude>META-INF/*.DSA</exclude>
118                                 <exclude>META-INF/*.RSA</exclude>
119                             </excludes>
120                         </filter>
121                     </filters>
122                     <transformers>
123                         <transformer
124                             implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
125                         <transformer
126                             implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
127                             <resource>reference.conf</resource>
128                         </transformer>
129                         <transformer
130                             implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
131                             <resource>log4j.properties</resource>
132                         </transformer>
133                         <transformer
134                             implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
135                             <mainClass>org.onap.policy.apex.client.monitoring.rest.ApexMonitoringRestMain</mainClass>
136                         </transformer>
137                     </transformers>
138                 </configuration>
139             </plugin>
140             <plugin>
141                 <groupId>org.apache.maven.plugins</groupId>
142                 <artifactId>maven-war-plugin</artifactId>
143                 <version>2.6</version>
144                 <configuration>
145                     <classifier>ui</classifier>
146                     <warSourceDirectory>src/main/resources/webapp</warSourceDirectory>
147                     <webXml>src/main/resources/webapp/WEB-INF/web.xml</webXml>
148                 </configuration>
149                 <executions>
150                     <execution>
151                         <phase>prepare-package</phase>
152                         <goals>
153                             <goal>war</goal>
154                         </goals>
155                     </execution>
156                 </executions>
157             </plugin>
158             <plugin>
159                 <groupId>org.codehaus.mojo</groupId>
160                 <artifactId>build-helper-maven-plugin</artifactId>
161                 <version>3.0.0</version>
162                 <executions>
163                     <execution>
164                         <id>attach-artifacts</id>
165                         <phase>package</phase>
166                         <goals>
167                             <goal>attach-artifact</goal>
168                         </goals>
169                         <configuration>
170                             <artifacts>
171                                 <artifact>
172                                     <file>${project.build.directory}/${project.artifactId}-${project.version}-ui.war</file>
173                                     <type>war</type>
174                                 </artifact>
175                                 <artifact>
176                                     <file>${project.build.directory}/${project.artifactId}-uber-${project.version}.jar</file>
177                                     <type>uber.jar</type>
178                                 </artifact>
179                             </artifacts>
180                         </configuration>
181                     </execution>
182                 </executions>
183             </plugin>
184         </plugins>
185     </build>
186 </project>