ramverma | c6d74e6 | 2018-07-11 14:21:13 +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 | --> |
| 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-deployment</artifactId> |
| 30 | <name>${project.artifactId}</name> |
| 31 | <description>Web client for deploying models in Apex engine</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.media</groupId> |
| 54 | <artifactId>jersey-media-multipart</artifactId> |
| 55 | <version>${version.jersey}</version> |
| 56 | </dependency> |
| 57 | <dependency> |
| 58 | <groupId>org.glassfish.jersey.containers</groupId> |
| 59 | <artifactId>jersey-container-servlet-core</artifactId> |
| 60 | <version>${version.jersey}</version> |
| 61 | </dependency> |
| 62 | <dependency> |
| 63 | <groupId>org.glassfish.jersey.inject</groupId> |
| 64 | <artifactId>jersey-hk2</artifactId> |
| 65 | <version>${version.jersey}</version> |
| 66 | </dependency> |
| 67 | <dependency> |
| 68 | <groupId>commons-cli</groupId> |
| 69 | <artifactId>commons-cli</artifactId> |
| 70 | <version>${version.commons-cli}</version> |
| 71 | </dependency> |
| 72 | </dependencies> |
| 73 | |
| 74 | <build> |
| 75 | <defaultGoal>install</defaultGoal> |
| 76 | <outputDirectory>${project.build.directory}/classes</outputDirectory> |
| 77 | <plugins> |
| 78 | <plugin> |
| 79 | <groupId>org.apache.maven.plugins</groupId> |
| 80 | <artifactId>maven-dependency-plugin</artifactId> |
| 81 | <executions> |
| 82 | <execution> |
| 83 | <id>unpack-client-deployment-shared-resources</id> |
| 84 | <goals> |
| 85 | <goal>unpack-dependencies</goal> |
| 86 | </goals> |
| 87 | <phase>generate-resources</phase> |
| 88 | <configuration> |
| 89 | <outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}</outputDirectory> |
| 90 | <includeArtifacIds>client-common</includeArtifacIds> |
| 91 | <includeGroupIds>${project.groupId}</includeGroupIds> |
| 92 | <excludeTransitive>true</excludeTransitive> |
| 93 | </configuration> |
| 94 | </execution> |
| 95 | </executions> |
| 96 | </plugin> |
| 97 | <plugin> |
| 98 | <groupId>org.apache.maven.plugins</groupId> |
| 99 | <artifactId>maven-shade-plugin</artifactId> |
| 100 | <executions> |
| 101 | <execution> |
| 102 | <phase>package</phase> |
| 103 | <goals> |
| 104 | <goal>shade</goal> |
| 105 | </goals> |
| 106 | </execution> |
| 107 | </executions> |
| 108 | <configuration> |
| 109 | <finalName>${project.artifactId}-uber-${project.version}</finalName> |
| 110 | <shadedArtifactAttached>true</shadedArtifactAttached> |
| 111 | <shadedClassifierName>deployment</shadedClassifierName> |
| 112 | <artifactSet> |
| 113 | <includes> |
| 114 | <include>*:*</include> |
| 115 | </includes> |
| 116 | </artifactSet> |
| 117 | <filters> |
| 118 | <filter> |
| 119 | <artifact>*:*</artifact> |
| 120 | <excludes> |
| 121 | <exclude>META-INF/*.SF</exclude> |
| 122 | <exclude>META-INF/*.DSA</exclude> |
| 123 | <exclude>META-INF/*.RSA</exclude> |
| 124 | </excludes> |
| 125 | </filter> |
| 126 | </filters> |
| 127 | <transformers> |
| 128 | <transformer |
| 129 | implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" /> |
| 130 | <transformer |
| 131 | implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> |
| 132 | <resource>reference.conf</resource> |
| 133 | </transformer> |
| 134 | <transformer |
| 135 | implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer"> |
| 136 | <resource>log4j.properties</resource> |
| 137 | </transformer> |
| 138 | <transformer |
| 139 | implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> |
| 140 | <mainClass>org.onap.policy.apex.client.deployment.rest.ApexDeploymentRestMain</mainClass> |
| 141 | </transformer> |
| 142 | </transformers> |
| 143 | </configuration> |
| 144 | </plugin> |
| 145 | <plugin> |
| 146 | <groupId>org.apache.maven.plugins</groupId> |
| 147 | <artifactId>maven-war-plugin</artifactId> |
ramverma | c6d74e6 | 2018-07-11 14:21:13 +0100 | [diff] [blame] | 148 | <configuration> |
| 149 | <classifier>ui</classifier> |
| 150 | <warSourceDirectory>src/main/resources/webapp</warSourceDirectory> |
| 151 | <webXml>src/main/resources/webapp/WEB-INF/web.xml</webXml> |
| 152 | </configuration> |
| 153 | <executions> |
| 154 | <execution> |
| 155 | <phase>prepare-package</phase> |
| 156 | <goals> |
| 157 | <goal>war</goal> |
| 158 | </goals> |
| 159 | </execution> |
| 160 | </executions> |
| 161 | </plugin> |
| 162 | <plugin> |
| 163 | <groupId>org.codehaus.mojo</groupId> |
| 164 | <artifactId>build-helper-maven-plugin</artifactId> |
| 165 | <version>3.0.0</version> |
| 166 | <executions> |
| 167 | <execution> |
| 168 | <id>attach-artifacts</id> |
| 169 | <phase>package</phase> |
| 170 | <goals> |
| 171 | <goal>attach-artifact</goal> |
| 172 | </goals> |
| 173 | <configuration> |
| 174 | <artifacts> |
| 175 | <artifact> |
| 176 | <file>${project.build.directory}/${project.artifactId}-${project.version}-ui.war</file> |
| 177 | <type>war</type> |
| 178 | </artifact> |
| 179 | <artifact> |
| 180 | <file>${project.build.directory}/${project.artifactId}-uber-${project.version}.jar</file> |
| 181 | <type>uber.jar</type> |
| 182 | </artifact> |
| 183 | </artifacts> |
| 184 | </configuration> |
| 185 | </execution> |
| 186 | </executions> |
| 187 | </plugin> |
| 188 | </plugins> |
| 189 | </build> |
| 190 | </project> |