blob: 0ffd40a55f16de3077c48961ccd552ae4deb3079 [file] [log] [blame]
ramverma08b595c2018-07-13 12:32:32 +01001<!--
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-->
ramvermaea736d02018-11-29 13:47:30 +000020<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">
ramverma08b595c2018-07-13 12:32:32 +010022 <modelVersion>4.0.0</modelVersion>
23 <parent>
24 <groupId>org.onap.policy.apex-pdp.client</groupId>
25 <artifactId>client</artifactId>
jrh3d7d9df62019-09-12 10:07:06 -040026 <version>2.3.0-SNAPSHOT</version>
ramverma08b595c2018-07-13 12:32:32 +010027 </parent>
28
29 <artifactId>client-editor</artifactId>
30 <name>${project.artifactId}</name>
31 <description>Web client for editing Apex policies</description>
32
33 <dependencies>
34 <dependency>
liamfallonefdaa0d2018-08-03 16:12:01 +010035 <groupId>org.onap.policy.common</groupId>
36 <artifactId>utils</artifactId>
37 </dependency>
38 <dependency>
ramverma08b595c2018-07-13 12:32:32 +010039 <groupId>org.onap.policy.apex-pdp.model</groupId>
40 <artifactId>model-api</artifactId>
41 <version>${project.version}</version>
42 </dependency>
43 <dependency>
44 <groupId>org.onap.policy.apex-pdp.core</groupId>
45 <artifactId>core-infrastructure</artifactId>
46 <version>${project.version}</version>
47 </dependency>
48 <dependency>
ramverma08b595c2018-07-13 12:32:32 +010049 <groupId>org.glassfish.jersey.containers</groupId>
50 <artifactId>jersey-container-grizzly2-http</artifactId>
51 <version>${version.jersey}</version>
52 </dependency>
53 <dependency>
54 <groupId>org.glassfish.jersey.media</groupId>
55 <artifactId>jersey-media-moxy</artifactId>
56 <version>${version.jersey}</version>
57 </dependency>
58 <dependency>
59 <groupId>org.glassfish.jersey.containers</groupId>
60 <artifactId>jersey-container-servlet-core</artifactId>
61 <version>${version.jersey}</version>
62 </dependency>
63 <dependency>
64 <groupId>org.glassfish.jersey.inject</groupId>
65 <artifactId>jersey-hk2</artifactId>
66 <version>${version.jersey}</version>
67 </dependency>
68 <dependency>
69 <groupId>commons-cli</groupId>
70 <artifactId>commons-cli</artifactId>
ramverma08b595c2018-07-13 12:32:32 +010071 </dependency>
72 <dependency>
73 <groupId>junit</groupId>
74 <artifactId>junit</artifactId>
75 <scope>test</scope>
76 </dependency>
77 <dependency>
78 <groupId>org.glassfish.jersey.test-framework</groupId>
79 <artifactId>jersey-test-framework-core</artifactId>
80 <version>${version.jersey}</version>
81 <scope>test</scope>
82 </dependency>
83 <dependency>
84 <groupId>org.glassfish.jersey.test-framework.providers</groupId>
85 <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
86 <version>${version.jersey}</version>
87 <scope>test</scope>
88 </dependency>
ramvermaea736d02018-11-29 13:47:30 +000089
90 <dependency>
91 <groupId>org.onap.policy.apex-pdp.client</groupId>
92 <artifactId>client-common</artifactId>
93 <version>${project.version}</version>
94 <classifier>resources</classifier>
95 <type>zip</type>
96 <scope>provided</scope>
97 </dependency>
98
ramverma08b595c2018-07-13 12:32:32 +010099 </dependencies>
100
101 <build>
102 <defaultGoal>install</defaultGoal>
103 <outputDirectory>${project.build.directory}/classes</outputDirectory>
104 <plugins>
ramvermaea736d02018-11-29 13:47:30 +0000105
106<!-- https://blog.sonatype.com/2008/04/how-to-share-resources-across-projects-in-maven/ -->
ramverma08b595c2018-07-13 12:32:32 +0100107 <plugin>
108 <groupId>org.apache.maven.plugins</groupId>
109 <artifactId>maven-dependency-plugin</artifactId>
110 <executions>
111 <execution>
ramvermaea736d02018-11-29 13:47:30 +0000112 <id>unpack-shared-resources</id>
liamfallon32497612018-11-10 00:39:12 +0000113 <goals>
ramvermaea736d02018-11-29 13:47:30 +0000114 <goal>unpack-dependencies</goal>
liamfallon32497612018-11-10 00:39:12 +0000115 </goals>
ramvermaea736d02018-11-29 13:47:30 +0000116 <phase>generate-resources</phase>
ramverma08b595c2018-07-13 12:32:32 +0100117 <configuration>
ramvermaea736d02018-11-29 13:47:30 +0000118 <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory>
119 <!--use as much as needed to be specific...also scope,type,classifier etc-->
120 <includeArtifacIds>client-common</includeArtifacIds>
121 <includeGroupIds>org.onap.policy.apex-pdp.client</includeGroupIds>
122 <excludeTransitive>true</excludeTransitive>
123 <excludeTransitive>true</excludeTransitive>
124 <excludeTypes>jar</excludeTypes>
125 <includeTypes>zip</includeTypes>
ramverma08b595c2018-07-13 12:32:32 +0100126 </configuration>
127 </execution>
128 </executions>
129 </plugin>
ramvermaea736d02018-11-29 13:47:30 +0000130 <plugin>
131 <groupId>org.apache.maven.plugins</groupId>
132 <artifactId>maven-assembly-plugin</artifactId>
133 <executions>
134 <execution>
135 <id>make shared resources</id>
136 <goals>
137 <goal>single</goal>
138 </goals>
139 <phase>package</phase>
140 <configuration>
141 <descriptors>
142 <descriptor>src/main/assembly/resources.xml</descriptor>
143 </descriptors>
144 </configuration>
145 </execution>
146 </executions>
147 </plugin>
148
liamfallon32497612018-11-10 00:39:12 +0000149
liamfallona41c8772018-09-05 15:46:31 +0100150 <plugin>
151 <groupId>org.apache.maven.plugins</groupId>
ramverma08b595c2018-07-13 12:32:32 +0100152 <artifactId>maven-shade-plugin</artifactId>
153 <executions>
154 <execution>
155 <phase>package</phase>
156 <goals>
157 <goal>shade</goal>
158 </goals>
159 </execution>
160 </executions>
161 <configuration>
162 <finalName>${project.artifactId}-uber-${project.version}</finalName>
163 <shadedArtifactAttached>true</shadedArtifactAttached>
164 <shadedClassifierName>editor</shadedClassifierName>
165 <artifactSet>
166 <includes>
167 <include>*:*</include>
168 </includes>
169 </artifactSet>
170 <filters>
171 <filter>
172 <artifact>*:*</artifact>
173 <excludes>
174 <exclude>META-INF/*.SF</exclude>
175 <exclude>META-INF/*.DSA</exclude>
176 <exclude>META-INF/*.RSA</exclude>
177 </excludes>
178 </filter>
179 </filters>
180 <transformers>
ramvermaea736d02018-11-29 13:47:30 +0000181 <transformer
182 implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
183 <transformer
184 implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
ramverma08b595c2018-07-13 12:32:32 +0100185 <resource>reference.conf</resource>
186 </transformer>
ramvermaea736d02018-11-29 13:47:30 +0000187 <transformer
188 implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
ramverma08b595c2018-07-13 12:32:32 +0100189 <resource>log4j.properties</resource>
190 </transformer>
ramvermaea736d02018-11-29 13:47:30 +0000191 <transformer
192 implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
ramverma08b595c2018-07-13 12:32:32 +0100193 <mainClass>org.onap.policy.apex.client.editor.rest.ApexEditorMain</mainClass>
194 </transformer>
195 </transformers>
196 </configuration>
197 </plugin>
198 <plugin>
199 <groupId>org.apache.maven.plugins</groupId>
200 <artifactId>maven-war-plugin</artifactId>
201 <configuration>
202 <classifier>ui</classifier>
203 <warSourceDirectory>src/main/resources/webapp</warSourceDirectory>
204 <webXml>src/main/resources/webapp/WEB-INF/web.xml</webXml>
205 </configuration>
206 <executions>
207 <execution>
208 <phase>prepare-package</phase>
209 <goals>
210 <goal>war</goal>
211 </goals>
212 </execution>
213 </executions>
214 </plugin>
215 <plugin>
216 <groupId>org.codehaus.mojo</groupId>
217 <artifactId>build-helper-maven-plugin</artifactId>
218 <version>3.0.0</version>
219 <executions>
220 <execution>
221 <id>attach-artifacts</id>
222 <phase>package</phase>
223 <goals>
224 <goal>attach-artifact</goal>
225 </goals>
226 <configuration>
227 <artifacts>
228 <artifact>
229 <file>${project.build.directory}/${project.artifactId}-${project.version}-ui.war</file>
230 <type>war</type>
231 </artifact>
232 <artifact>
233 <file>${project.build.directory}/${project.artifactId}-uber-${project.version}.jar</file>
234 <type>uber.jar</type>
235 </artifact>
236 </artifacts>
237 </configuration>
238 </execution>
239 </executions>
240 </plugin>
241 </plugins>
242 </build>
Dinh Danh Leba229772018-08-22 18:02:01 +0100243
244 <profiles>
245 <profile>
246 <id>apexSite</id>
247 <activation>
248 <property>
249 <name>apexSite</name>
250 </property>
251 </activation>
252 <distributionManagement>
253 <site>
254 <id>${project.artifactId}-site</id>
255 <url>${apex.adsite.prefix}/modules/${project.parent.artifactId}/${project.artifactId}/</url>
256 </site>
257 </distributionManagement>
258 </profile>
259 </profiles>
ramverma08b595c2018-07-13 12:32:32 +0100260</project>