ramverma | 0ba6678 | 2018-07-06 16:29:16 +0100 | [diff] [blame] | 1 | <!-- |
| 2 | ============LICENSE_START======================================================= |
| 3 | Copyright (C) 2018 Ericsson. All rights reserved. |
liamfallon | 4171256 | 2019-11-01 11:47:21 +0000 | [diff] [blame] | 4 | Modifications Copyright (C) 2019 Nordix Foundation. |
ramverma | 0ba6678 | 2018-07-06 16:29:16 +0100 | [diff] [blame] | 5 | ================================================================================ |
| 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 | --> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 21 | <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"> |
ramverma | 0ba6678 | 2018-07-06 16:29:16 +0100 | [diff] [blame] | 23 | <modelVersion>4.0.0</modelVersion> |
| 24 | <parent> |
| 25 | <groupId>org.onap.policy.apex-pdp.client</groupId> |
| 26 | <artifactId>client</artifactId> |
jrh3 | d7d9df6 | 2019-09-12 10:07:06 -0400 | [diff] [blame] | 27 | <version>2.3.0-SNAPSHOT</version> |
ramverma | 0ba6678 | 2018-07-06 16:29:16 +0100 | [diff] [blame] | 28 | </parent> |
| 29 | |
| 30 | <artifactId>client-monitoring</artifactId> |
| 31 | <name>${project.artifactId}</name> |
| 32 | <description>Web client for monitoring Apex engines</description> |
| 33 | |
| 34 | <dependencies> |
liamfallon | d7eda87 | 2019-11-04 18:07:20 +0000 | [diff] [blame] | 35 | <dependency> |
| 36 | <groupId>org.onap.policy.common</groupId> |
| 37 | <artifactId>policy-endpoints</artifactId> |
| 38 | </dependency> |
ramverma | 0ba6678 | 2018-07-06 16:29:16 +0100 | [diff] [blame] | 39 | <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> |
ramverma | 0ba6678 | 2018-07-06 16:29:16 +0100 | [diff] [blame] | 47 | </dependency> |
| 48 | <dependency> |
ramverma | 0ba6678 | 2018-07-06 16:29:16 +0100 | [diff] [blame] | 49 | <groupId>commons-cli</groupId> |
| 50 | <artifactId>commons-cli</artifactId> |
ramverma | 0ba6678 | 2018-07-06 16:29:16 +0100 | [diff] [blame] | 51 | </dependency> |
liamfallon | acb59c7 | 2018-09-28 22:48:30 +0100 | [diff] [blame] | 52 | <dependency> |
liamfallon | 0bfa9b4 | 2018-10-01 15:05:58 +0100 | [diff] [blame] | 53 | <groupId>org.mockito</groupId> |
| 54 | <artifactId>mockito-all</artifactId> |
liamfallon | acb59c7 | 2018-09-28 22:48:30 +0100 | [diff] [blame] | 55 | <scope>test</scope> |
| 56 | </dependency> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 57 | |
| 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 | |
ramverma | 0ba6678 | 2018-07-06 16:29:16 +0100 | [diff] [blame] | 67 | </dependencies> |
| 68 | |
| 69 | <build> |
| 70 | <defaultGoal>install</defaultGoal> |
| 71 | <outputDirectory>${project.build.directory}/classes</outputDirectory> |
| 72 | <plugins> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 73 | |
| 74 | <!-- 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] | 75 | <plugin> |
| 76 | <groupId>org.apache.maven.plugins</groupId> |
ramverma | c6d74e6 | 2018-07-11 14:21:13 +0100 | [diff] [blame] | 77 | <artifactId>maven-dependency-plugin</artifactId> |
| 78 | <executions> |
| 79 | <execution> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 80 | <id>unpack-shared-resources</id> |
liamfallon | 3249761 | 2018-11-10 00:39:12 +0000 | [diff] [blame] | 81 | <goals> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 82 | <goal>unpack-dependencies</goal> |
liamfallon | 3249761 | 2018-11-10 00:39:12 +0000 | [diff] [blame] | 83 | </goals> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 84 | <phase>generate-resources</phase> |
ramverma | c6d74e6 | 2018-07-11 14:21:13 +0100 | [diff] [blame] | 85 | <configuration> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 86 | <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> |
ramverma | c6d74e6 | 2018-07-11 14:21:13 +0100 | [diff] [blame] | 94 | </configuration> |
| 95 | </execution> |
| 96 | </executions> |
| 97 | </plugin> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 98 | <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 | |
liamfallon | 3249761 | 2018-11-10 00:39:12 +0000 | [diff] [blame] | 117 | |
liamfallon | a41c877 | 2018-09-05 15:46:31 +0100 | [diff] [blame] | 118 | <plugin> |
| 119 | <groupId>org.apache.maven.plugins</groupId> |
ramverma | 0ba6678 | 2018-07-06 16:29:16 +0100 | [diff] [blame] | 120 | <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> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 149 | <transformer |
| 150 | implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" /> |
| 151 | <transformer |
| 152 | implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> |
ramverma | 0ba6678 | 2018-07-06 16:29:16 +0100 | [diff] [blame] | 153 | <resource>reference.conf</resource> |
| 154 | </transformer> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 155 | <transformer |
| 156 | implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer"> |
ramverma | 0ba6678 | 2018-07-06 16:29:16 +0100 | [diff] [blame] | 157 | <resource>log4j.properties</resource> |
| 158 | </transformer> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 159 | <transformer |
| 160 | implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> |
ramverma | 0ba6678 | 2018-07-06 16:29:16 +0100 | [diff] [blame] | 161 | <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> |
ramverma | 0ba6678 | 2018-07-06 16:29:16 +0100 | [diff] [blame] | 169 | <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 Le | ba22977 | 2018-08-22 18:02:01 +0100 | [diff] [blame] | 211 | |
| 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> |
ramverma | 0ba6678 | 2018-07-06 16:29:16 +0100 | [diff] [blame] | 228 | </project> |