Use jersey dependencies from policy-endpoints
[policy/apex-pdp.git] / client / client-editor / pom.xml
1 <!--
2   ============LICENSE_START=======================================================
3    Copyright (C) 2018 Ericsson. All rights reserved.
4    Modifications Copyright (C) 2019 Nordix Foundation.
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 -->
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">
23     <modelVersion>4.0.0</modelVersion>
24     <parent>
25         <groupId>org.onap.policy.apex-pdp.client</groupId>
26         <artifactId>client</artifactId>
27         <version>2.3.0-SNAPSHOT</version>
28     </parent>
29
30     <artifactId>client-editor</artifactId>
31     <name>${project.artifactId}</name>
32     <description>Web client for editing Apex policies</description>
33
34     <dependencies>
35         <dependency>
36             <groupId>org.onap.policy.common</groupId>
37             <artifactId>policy-endpoints</artifactId>
38         </dependency>
39         <dependency>
40             <groupId>org.onap.policy.common</groupId>
41             <artifactId>utils</artifactId>
42         </dependency>
43         <dependency>
44             <groupId>org.onap.policy.apex-pdp.model</groupId>
45             <artifactId>model-api</artifactId>
46             <version>${project.version}</version>
47         </dependency>
48         <dependency>
49             <groupId>org.onap.policy.apex-pdp.core</groupId>
50             <artifactId>core-infrastructure</artifactId>
51             <version>${project.version}</version>
52         </dependency>
53         <dependency>
54             <groupId>org.glassfish.jersey.containers</groupId>
55             <artifactId>jersey-container-grizzly2-http</artifactId>
56         </dependency>
57         <dependency>
58             <groupId>org.glassfish.jersey.media</groupId>
59             <artifactId>jersey-media-moxy</artifactId>
60         </dependency>
61         <dependency>
62             <groupId>org.glassfish.jersey.test-framework.providers</groupId>
63             <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
64             <scope>test</scope>
65         </dependency>
66         <dependency>
67             <groupId>commons-cli</groupId>
68             <artifactId>commons-cli</artifactId>
69         </dependency>
70         <dependency>
71             <groupId>junit</groupId>
72             <artifactId>junit</artifactId>
73             <scope>test</scope>
74         </dependency>
75         <dependency>
76             <groupId>org.onap.policy.apex-pdp.client</groupId>
77             <artifactId>client-common</artifactId>
78             <version>${project.version}</version>
79             <classifier>resources</classifier>
80             <type>zip</type>
81             <scope>provided</scope>
82         </dependency>
83
84     </dependencies>
85
86     <build>
87         <defaultGoal>install</defaultGoal>
88         <outputDirectory>${project.build.directory}/classes</outputDirectory>
89         <plugins>
90
91 <!-- https://blog.sonatype.com/2008/04/how-to-share-resources-across-projects-in-maven/ -->
92             <plugin>
93                 <groupId>org.apache.maven.plugins</groupId>
94                 <artifactId>maven-dependency-plugin</artifactId>
95                 <executions>
96                     <execution>
97                         <id>unpack-shared-resources</id>
98                         <goals>
99                             <goal>unpack-dependencies</goal>
100                         </goals>
101                         <phase>generate-resources</phase>
102                         <configuration>
103                             <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory>
104        <!--use as much as needed to be specific...also scope,type,classifier etc-->
105                             <includeArtifacIds>client-common</includeArtifacIds>
106                             <includeGroupIds>org.onap.policy.apex-pdp.client</includeGroupIds>
107                             <excludeTransitive>true</excludeTransitive>
108                             <excludeTransitive>true</excludeTransitive>
109                             <excludeTypes>jar</excludeTypes>
110                             <includeTypes>zip</includeTypes>
111                         </configuration>
112                     </execution>
113                 </executions>
114             </plugin>
115             <plugin>
116                 <groupId>org.apache.maven.plugins</groupId>
117                 <artifactId>maven-assembly-plugin</artifactId>
118                 <executions>
119                     <execution>
120                         <id>make shared resources</id>
121                         <goals>
122                             <goal>single</goal>
123                         </goals>
124                         <phase>package</phase>
125                         <configuration>
126                             <descriptors>
127                                 <descriptor>src/main/assembly/resources.xml</descriptor>
128                             </descriptors>
129                         </configuration>
130                     </execution>
131                 </executions>
132             </plugin>
133
134
135             <plugin>
136                 <groupId>org.apache.maven.plugins</groupId>
137                 <artifactId>maven-shade-plugin</artifactId>
138                 <executions>
139                     <execution>
140                         <phase>package</phase>
141                         <goals>
142                             <goal>shade</goal>
143                         </goals>
144                     </execution>
145                 </executions>
146                 <configuration>
147                     <finalName>${project.artifactId}-uber-${project.version}</finalName>
148                     <shadedArtifactAttached>true</shadedArtifactAttached>
149                     <shadedClassifierName>editor</shadedClassifierName>
150                     <artifactSet>
151                         <includes>
152                             <include>*:*</include>
153                         </includes>
154                     </artifactSet>
155                     <filters>
156                         <filter>
157                             <artifact>*:*</artifact>
158                             <excludes>
159                                 <exclude>META-INF/*.SF</exclude>
160                                 <exclude>META-INF/*.DSA</exclude>
161                                 <exclude>META-INF/*.RSA</exclude>
162                             </excludes>
163                         </filter>
164                     </filters>
165                     <transformers>
166                         <transformer
167                             implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
168                         <transformer
169                             implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
170                             <resource>reference.conf</resource>
171                         </transformer>
172                         <transformer
173                             implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
174                             <resource>log4j.properties</resource>
175                         </transformer>
176                         <transformer
177                             implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
178                             <mainClass>org.onap.policy.apex.client.editor.rest.ApexEditorMain</mainClass>
179                         </transformer>
180                     </transformers>
181                 </configuration>
182             </plugin>
183             <plugin>
184                 <groupId>org.apache.maven.plugins</groupId>
185                 <artifactId>maven-war-plugin</artifactId>
186                 <configuration>
187                     <classifier>ui</classifier>
188                     <warSourceDirectory>src/main/resources/webapp</warSourceDirectory>
189                     <webXml>src/main/resources/webapp/WEB-INF/web.xml</webXml>
190                 </configuration>
191                 <executions>
192                     <execution>
193                         <phase>prepare-package</phase>
194                         <goals>
195                             <goal>war</goal>
196                         </goals>
197                     </execution>
198                 </executions>
199             </plugin>
200             <plugin>
201                 <groupId>org.codehaus.mojo</groupId>
202                 <artifactId>build-helper-maven-plugin</artifactId>
203                 <version>3.0.0</version>
204                 <executions>
205                     <execution>
206                         <id>attach-artifacts</id>
207                         <phase>package</phase>
208                         <goals>
209                             <goal>attach-artifact</goal>
210                         </goals>
211                         <configuration>
212                             <artifacts>
213                                 <artifact>
214                                     <file>${project.build.directory}/${project.artifactId}-${project.version}-ui.war</file>
215                                     <type>war</type>
216                                 </artifact>
217                                 <artifact>
218                                     <file>${project.build.directory}/${project.artifactId}-uber-${project.version}.jar</file>
219                                     <type>uber.jar</type>
220                                 </artifact>
221                             </artifacts>
222                         </configuration>
223                     </execution>
224                 </executions>
225             </plugin>
226         </plugins>
227     </build>
228
229     <profiles>
230         <profile>
231             <id>apexSite</id>
232             <activation>
233                 <property>
234                     <name>apexSite</name>
235                 </property>
236             </activation>
237             <distributionManagement>
238                 <site>
239                     <id>${project.artifactId}-site</id>
240                     <url>${apex.adsite.prefix}/modules/${project.parent.artifactId}/${project.artifactId}/</url>
241                 </site>
242             </distributionManagement>
243         </profile>
244     </profiles>
245 </project>