ramverma | 0ba6678 | 2018-07-06 16:29:16 +0100 | [diff] [blame] | 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 | --> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 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"> |
ramverma | 0ba6678 | 2018-07-06 16:29:16 +0100 | [diff] [blame] | 22 | <modelVersion>4.0.0</modelVersion> |
| 23 | <parent> |
| 24 | <groupId>org.onap.policy.apex-pdp.client</groupId> |
| 25 | <artifactId>client</artifactId> |
jhh | 26696e5 | 2020-05-28 17:02:18 -0500 | [diff] [blame] | 26 | <version>2.2.4-SNAPSHOT</version> |
ramverma | 0ba6678 | 2018-07-06 16:29:16 +0100 | [diff] [blame] | 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.glassfish.jersey.containers</groupId> |
| 41 | <artifactId>jersey-container-grizzly2-http</artifactId> |
| 42 | <version>${version.jersey}</version> |
| 43 | </dependency> |
| 44 | <dependency> |
| 45 | <groupId>org.glassfish.jersey.containers</groupId> |
| 46 | <artifactId>jersey-container-servlet-core</artifactId> |
| 47 | <version>${version.jersey}</version> |
| 48 | </dependency> |
| 49 | <dependency> |
| 50 | <groupId>org.glassfish.jersey.inject</groupId> |
| 51 | <artifactId>jersey-hk2</artifactId> |
| 52 | <version>${version.jersey}</version> |
| 53 | </dependency> |
| 54 | <dependency> |
| 55 | <groupId>commons-cli</groupId> |
| 56 | <artifactId>commons-cli</artifactId> |
ramverma | 0ba6678 | 2018-07-06 16:29:16 +0100 | [diff] [blame] | 57 | </dependency> |
liamfallon | acb59c7 | 2018-09-28 22:48:30 +0100 | [diff] [blame] | 58 | <dependency> |
liamfallon | 0bfa9b4 | 2018-10-01 15:05:58 +0100 | [diff] [blame] | 59 | <groupId>org.mockito</groupId> |
| 60 | <artifactId>mockito-all</artifactId> |
liamfallon | acb59c7 | 2018-09-28 22:48:30 +0100 | [diff] [blame] | 61 | <scope>test</scope> |
| 62 | </dependency> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 63 | |
| 64 | <dependency> |
| 65 | <groupId>org.onap.policy.apex-pdp.client</groupId> |
| 66 | <artifactId>client-common</artifactId> |
| 67 | <version>${project.version}</version> |
| 68 | <classifier>resources</classifier> |
| 69 | <type>zip</type> |
| 70 | <scope>provided</scope> |
| 71 | </dependency> |
| 72 | |
ramverma | 0ba6678 | 2018-07-06 16:29:16 +0100 | [diff] [blame] | 73 | </dependencies> |
| 74 | |
| 75 | <build> |
| 76 | <defaultGoal>install</defaultGoal> |
| 77 | <outputDirectory>${project.build.directory}/classes</outputDirectory> |
| 78 | <plugins> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 79 | |
| 80 | <!-- https://blog.sonatype.com/2008/04/how-to-share-resources-across-projects-in-maven/ --> |
ramverma | 0ba6678 | 2018-07-06 16:29:16 +0100 | [diff] [blame] | 81 | <plugin> |
| 82 | <groupId>org.apache.maven.plugins</groupId> |
ramverma | c6d74e6 | 2018-07-11 14:21:13 +0100 | [diff] [blame] | 83 | <artifactId>maven-dependency-plugin</artifactId> |
| 84 | <executions> |
| 85 | <execution> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 86 | <id>unpack-shared-resources</id> |
liamfallon | 3249761 | 2018-11-10 00:39:12 +0000 | [diff] [blame] | 87 | <goals> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 88 | <goal>unpack-dependencies</goal> |
liamfallon | 3249761 | 2018-11-10 00:39:12 +0000 | [diff] [blame] | 89 | </goals> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 90 | <phase>generate-resources</phase> |
ramverma | c6d74e6 | 2018-07-11 14:21:13 +0100 | [diff] [blame] | 91 | <configuration> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 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 | <excludeTypes>jar</excludeTypes> |
| 98 | <includeTypes>zip</includeTypes> |
| 99 | <excludeTransitive>true</excludeTransitive> |
ramverma | c6d74e6 | 2018-07-11 14:21:13 +0100 | [diff] [blame] | 100 | </configuration> |
| 101 | </execution> |
| 102 | </executions> |
| 103 | </plugin> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 104 | <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 | |
liamfallon | 3249761 | 2018-11-10 00:39:12 +0000 | [diff] [blame] | 123 | |
liamfallon | a41c877 | 2018-09-05 15:46:31 +0100 | [diff] [blame] | 124 | <plugin> |
| 125 | <groupId>org.apache.maven.plugins</groupId> |
ramverma | 0ba6678 | 2018-07-06 16:29:16 +0100 | [diff] [blame] | 126 | <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>monitoring</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> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 155 | <transformer |
| 156 | implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" /> |
| 157 | <transformer |
| 158 | implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> |
ramverma | 0ba6678 | 2018-07-06 16:29:16 +0100 | [diff] [blame] | 159 | <resource>reference.conf</resource> |
| 160 | </transformer> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 161 | <transformer |
| 162 | implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer"> |
ramverma | 0ba6678 | 2018-07-06 16:29:16 +0100 | [diff] [blame] | 163 | <resource>log4j.properties</resource> |
| 164 | </transformer> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 165 | <transformer |
| 166 | implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> |
ramverma | 0ba6678 | 2018-07-06 16:29:16 +0100 | [diff] [blame] | 167 | <mainClass>org.onap.policy.apex.client.monitoring.rest.ApexMonitoringRestMain</mainClass> |
| 168 | </transformer> |
| 169 | </transformers> |
| 170 | </configuration> |
| 171 | </plugin> |
| 172 | <plugin> |
| 173 | <groupId>org.apache.maven.plugins</groupId> |
| 174 | <artifactId>maven-war-plugin</artifactId> |
ramverma | 0ba6678 | 2018-07-06 16:29:16 +0100 | [diff] [blame] | 175 | <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 Le | ba22977 | 2018-08-22 18:02:01 +0100 | [diff] [blame] | 217 | |
| 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> |
ramverma | 0ba6678 | 2018-07-06 16:29:16 +0100 | [diff] [blame] | 234 | </project> |