ramverma | c6d74e6 | 2018-07-11 14:21:13 +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 | c6d74e6 | 2018-07-11 14:21:13 +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 | --> |
liamfallon | 3249761 | 2018-11-10 00:39:12 +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 | c6d74e6 | 2018-07-11 14:21:13 +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 | c6d74e6 | 2018-07-11 14:21:13 +0100 | [diff] [blame] | 28 | </parent> |
| 29 | |
| 30 | <artifactId>client-deployment</artifactId> |
| 31 | <name>${project.artifactId}</name> |
| 32 | <description>Web client for deploying models in Apex engine</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> |
ramverma | c6d74e6 | 2018-07-11 14:21:13 +0100 | [diff] [blame] | 41 | <groupId>org.glassfish.jersey.containers</groupId> |
| 42 | <artifactId>jersey-container-grizzly2-http</artifactId> |
ramverma | c6d74e6 | 2018-07-11 14:21:13 +0100 | [diff] [blame] | 43 | </dependency> |
| 44 | <dependency> |
| 45 | <groupId>org.glassfish.jersey.media</groupId> |
| 46 | <artifactId>jersey-media-multipart</artifactId> |
ramverma | c6d74e6 | 2018-07-11 14:21:13 +0100 | [diff] [blame] | 47 | </dependency> |
| 48 | <dependency> |
| 49 | <groupId>org.glassfish.jersey.containers</groupId> |
| 50 | <artifactId>jersey-container-servlet-core</artifactId> |
ramverma | c6d74e6 | 2018-07-11 14:21:13 +0100 | [diff] [blame] | 51 | </dependency> |
| 52 | <dependency> |
| 53 | <groupId>org.glassfish.jersey.inject</groupId> |
| 54 | <artifactId>jersey-hk2</artifactId> |
ramverma | c6d74e6 | 2018-07-11 14:21:13 +0100 | [diff] [blame] | 55 | </dependency> |
| 56 | <dependency> |
| 57 | <groupId>commons-cli</groupId> |
| 58 | <artifactId>commons-cli</artifactId> |
ramverma | c6d74e6 | 2018-07-11 14:21:13 +0100 | [diff] [blame] | 59 | </dependency> |
ning.xi | c678c3a | 2019-08-13 05:20:20 +0000 | [diff] [blame] | 60 | <dependency> |
| 61 | <groupId>org.mockito</groupId> |
| 62 | <artifactId>mockito-all</artifactId> |
| 63 | <scope>test</scope> |
| 64 | </dependency> |
| 65 | <dependency> |
| 66 | <groupId>org.assertj</groupId> |
| 67 | <artifactId>assertj-core</artifactId> |
ning.xi | c678c3a | 2019-08-13 05:20:20 +0000 | [diff] [blame] | 68 | <scope>test</scope> |
| 69 | </dependency> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 70 | |
| 71 | <dependency> |
| 72 | <groupId>org.onap.policy.apex-pdp.client</groupId> |
| 73 | <artifactId>client-common</artifactId> |
| 74 | <version>${project.version}</version> |
| 75 | <classifier>resources</classifier> |
| 76 | <type>zip</type> |
| 77 | <scope>provided</scope> |
| 78 | </dependency> |
| 79 | |
ramverma | c6d74e6 | 2018-07-11 14:21:13 +0100 | [diff] [blame] | 80 | </dependencies> |
| 81 | |
| 82 | <build> |
| 83 | <defaultGoal>install</defaultGoal> |
| 84 | <outputDirectory>${project.build.directory}/classes</outputDirectory> |
| 85 | <plugins> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 86 | |
| 87 | <!-- https://blog.sonatype.com/2008/04/how-to-share-resources-across-projects-in-maven/ --> |
ramverma | c6d74e6 | 2018-07-11 14:21:13 +0100 | [diff] [blame] | 88 | <plugin> |
| 89 | <groupId>org.apache.maven.plugins</groupId> |
| 90 | <artifactId>maven-dependency-plugin</artifactId> |
| 91 | <executions> |
| 92 | <execution> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 93 | <id>unpack-shared-resources</id> |
liamfallon | 3249761 | 2018-11-10 00:39:12 +0000 | [diff] [blame] | 94 | <goals> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 95 | <goal>unpack-dependencies</goal> |
liamfallon | 3249761 | 2018-11-10 00:39:12 +0000 | [diff] [blame] | 96 | </goals> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 97 | <phase>generate-resources</phase> |
ramverma | c6d74e6 | 2018-07-11 14:21:13 +0100 | [diff] [blame] | 98 | <configuration> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 99 | <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory> |
| 100 | <!--use as much as needed to be specific...also scope,type,classifier etc--> |
| 101 | <includeArtifacIds>client-common</includeArtifacIds> |
| 102 | <includeGroupIds>org.onap.policy.apex-pdp.client</includeGroupIds> |
| 103 | <excludeTransitive>true</excludeTransitive> |
| 104 | <excludeTransitive>true</excludeTransitive> |
| 105 | <excludeTypes>jar</excludeTypes> |
| 106 | <includeTypes>zip</includeTypes> |
ramverma | c6d74e6 | 2018-07-11 14:21:13 +0100 | [diff] [blame] | 107 | </configuration> |
| 108 | </execution> |
| 109 | </executions> |
| 110 | </plugin> |
ramverma | ea736d0 | 2018-11-29 13:47:30 +0000 | [diff] [blame] | 111 | <plugin> |
| 112 | <groupId>org.apache.maven.plugins</groupId> |
| 113 | <artifactId>maven-assembly-plugin</artifactId> |
| 114 | <executions> |
| 115 | <execution> |
| 116 | <id>make shared resources</id> |
| 117 | <goals> |
| 118 | <goal>single</goal> |
| 119 | </goals> |
| 120 | <phase>package</phase> |
| 121 | <configuration> |
| 122 | <descriptors> |
| 123 | <descriptor>src/main/assembly/resources.xml</descriptor> |
| 124 | </descriptors> |
| 125 | </configuration> |
| 126 | </execution> |
| 127 | </executions> |
| 128 | </plugin> |
| 129 | |
liamfallon | 3249761 | 2018-11-10 00:39:12 +0000 | [diff] [blame] | 130 | |
liamfallon | a41c877 | 2018-09-05 15:46:31 +0100 | [diff] [blame] | 131 | <plugin> |
| 132 | <groupId>org.apache.maven.plugins</groupId> |
ramverma | c6d74e6 | 2018-07-11 14:21:13 +0100 | [diff] [blame] | 133 | <artifactId>maven-shade-plugin</artifactId> |
| 134 | <executions> |
| 135 | <execution> |
| 136 | <phase>package</phase> |
| 137 | <goals> |
| 138 | <goal>shade</goal> |
| 139 | </goals> |
| 140 | </execution> |
| 141 | </executions> |
| 142 | <configuration> |
| 143 | <finalName>${project.artifactId}-uber-${project.version}</finalName> |
| 144 | <shadedArtifactAttached>true</shadedArtifactAttached> |
| 145 | <shadedClassifierName>deployment</shadedClassifierName> |
| 146 | <artifactSet> |
| 147 | <includes> |
| 148 | <include>*:*</include> |
| 149 | </includes> |
| 150 | </artifactSet> |
| 151 | <filters> |
| 152 | <filter> |
| 153 | <artifact>*:*</artifact> |
| 154 | <excludes> |
| 155 | <exclude>META-INF/*.SF</exclude> |
| 156 | <exclude>META-INF/*.DSA</exclude> |
| 157 | <exclude>META-INF/*.RSA</exclude> |
| 158 | </excludes> |
| 159 | </filter> |
| 160 | </filters> |
| 161 | <transformers> |
liamfallon | 3249761 | 2018-11-10 00:39:12 +0000 | [diff] [blame] | 162 | <transformer |
| 163 | implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" /> |
| 164 | <transformer |
| 165 | implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> |
ramverma | c6d74e6 | 2018-07-11 14:21:13 +0100 | [diff] [blame] | 166 | <resource>reference.conf</resource> |
| 167 | </transformer> |
liamfallon | 3249761 | 2018-11-10 00:39:12 +0000 | [diff] [blame] | 168 | <transformer |
| 169 | implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer"> |
ramverma | c6d74e6 | 2018-07-11 14:21:13 +0100 | [diff] [blame] | 170 | <resource>log4j.properties</resource> |
| 171 | </transformer> |
liamfallon | 3249761 | 2018-11-10 00:39:12 +0000 | [diff] [blame] | 172 | <transformer |
| 173 | implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> |
ramverma | c6d74e6 | 2018-07-11 14:21:13 +0100 | [diff] [blame] | 174 | <mainClass>org.onap.policy.apex.client.deployment.rest.ApexDeploymentRestMain</mainClass> |
| 175 | </transformer> |
| 176 | </transformers> |
| 177 | </configuration> |
| 178 | </plugin> |
| 179 | <plugin> |
| 180 | <groupId>org.apache.maven.plugins</groupId> |
| 181 | <artifactId>maven-war-plugin</artifactId> |
ramverma | c6d74e6 | 2018-07-11 14:21:13 +0100 | [diff] [blame] | 182 | <configuration> |
| 183 | <classifier>ui</classifier> |
| 184 | <warSourceDirectory>src/main/resources/webapp</warSourceDirectory> |
| 185 | <webXml>src/main/resources/webapp/WEB-INF/web.xml</webXml> |
| 186 | </configuration> |
| 187 | <executions> |
| 188 | <execution> |
| 189 | <phase>prepare-package</phase> |
| 190 | <goals> |
| 191 | <goal>war</goal> |
| 192 | </goals> |
| 193 | </execution> |
| 194 | </executions> |
| 195 | </plugin> |
| 196 | <plugin> |
| 197 | <groupId>org.codehaus.mojo</groupId> |
| 198 | <artifactId>build-helper-maven-plugin</artifactId> |
| 199 | <version>3.0.0</version> |
| 200 | <executions> |
| 201 | <execution> |
| 202 | <id>attach-artifacts</id> |
| 203 | <phase>package</phase> |
| 204 | <goals> |
| 205 | <goal>attach-artifact</goal> |
| 206 | </goals> |
| 207 | <configuration> |
| 208 | <artifacts> |
| 209 | <artifact> |
| 210 | <file>${project.build.directory}/${project.artifactId}-${project.version}-ui.war</file> |
| 211 | <type>war</type> |
| 212 | </artifact> |
| 213 | <artifact> |
| 214 | <file>${project.build.directory}/${project.artifactId}-uber-${project.version}.jar</file> |
| 215 | <type>uber.jar</type> |
| 216 | </artifact> |
| 217 | </artifacts> |
| 218 | </configuration> |
| 219 | </execution> |
| 220 | </executions> |
| 221 | </plugin> |
| 222 | </plugins> |
| 223 | </build> |
Dinh Danh Le | ba22977 | 2018-08-22 18:02:01 +0100 | [diff] [blame] | 224 | |
| 225 | <profiles> |
| 226 | <profile> |
| 227 | <id>apexSite</id> |
| 228 | <activation> |
| 229 | <property> |
| 230 | <name>apexSite</name> |
| 231 | </property> |
| 232 | </activation> |
| 233 | <distributionManagement> |
| 234 | <site> |
| 235 | <id>${project.artifactId}-site</id> |
| 236 | <url>${apex.adsite.prefix}/modules/${project.parent.artifactId}/${project.artifactId}/</url> |
| 237 | </site> |
| 238 | </distributionManagement> |
| 239 | </profile> |
| 240 | </profiles> |
ramverma | c6d74e6 | 2018-07-11 14:21:13 +0100 | [diff] [blame] | 241 | </project> |