Fix package of apex examples and documents
[policy/apex-pdp.git] / client / client-editor / pom.xml
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-editor</artifactId>
30     <name>${project.artifactId}</name>
31     <description>Web client for editing Apex policies</description>
32
33     <dependencies>
34         <dependency>
35             <groupId>org.onap.policy.common</groupId>
36             <artifactId>utils</artifactId>
37         </dependency>
38         <dependency>
39             <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>
49             <groupId>org.onap.policy.apex-pdp.client</groupId>
50             <artifactId>client-common</artifactId>
51             <version>${project.version}</version>
52             <classifier>resources</classifier>
53             <type>zip</type>
54             <scope>provided</scope>
55         </dependency>
56         <dependency>
57             <groupId>org.glassfish.jersey.containers</groupId>
58             <artifactId>jersey-container-grizzly2-http</artifactId>
59             <version>${version.jersey}</version>
60         </dependency>
61         <dependency>
62             <groupId>org.glassfish.jersey.media</groupId>
63             <artifactId>jersey-media-moxy</artifactId>
64             <version>${version.jersey}</version>
65         </dependency>
66         <dependency>
67             <groupId>org.glassfish.jersey.containers</groupId>
68             <artifactId>jersey-container-servlet-core</artifactId>
69             <version>${version.jersey}</version>
70         </dependency>
71         <dependency>
72             <groupId>org.glassfish.jersey.inject</groupId>
73             <artifactId>jersey-hk2</artifactId>
74             <version>${version.jersey}</version>
75         </dependency>
76         <dependency>
77             <groupId>commons-cli</groupId>
78             <artifactId>commons-cli</artifactId>
79         </dependency>
80         <dependency>
81             <groupId>junit</groupId>
82             <artifactId>junit</artifactId>
83             <scope>test</scope>
84         </dependency>
85         <dependency>
86             <groupId>org.glassfish.jersey.test-framework</groupId>
87             <artifactId>jersey-test-framework-core</artifactId>
88             <version>${version.jersey}</version>
89             <scope>test</scope>
90         </dependency>
91         <dependency>
92             <groupId>org.glassfish.jersey.test-framework.providers</groupId>
93             <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
94             <version>${version.jersey}</version>
95             <scope>test</scope>
96         </dependency>
97     </dependencies>
98
99     <build>
100         <defaultGoal>install</defaultGoal>
101         <outputDirectory>${project.build.directory}/classes</outputDirectory>
102         <plugins>
103             <plugin>
104                 <groupId>org.apache.maven.plugins</groupId>
105                 <artifactId>maven-dependency-plugin</artifactId>
106                 <executions>
107                     <execution>
108                         <id>unpack-client-editor-shared-resources</id>
109                         <goals>
110                             <goal>unpack-dependencies</goal>
111                         </goals>
112                         <phase>validate</phase>
113                         <configuration>
114                             <outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}</outputDirectory>
115                             <includeArtifacIds>client-common</includeArtifacIds>
116                             <includeGroupIds>${project.groupId}</includeGroupIds>
117                             <excludeTransitive>true</excludeTransitive>
118                         </configuration>
119                     </execution>
120                 </executions>
121             </plugin>
122             <plugin>
123                 <groupId>org.apache.maven.plugins</groupId>
124                 <artifactId>maven-resources-plugin</artifactId>
125                 <version>3.1.0</version>
126                 <executions>
127                     <execution>
128                         <id>copy-common-resources-to-jar</id>
129                         <phase>initialize</phase>
130                         <goals>
131                             <goal>copy-resources</goal>
132                         </goals>
133                         <configuration>
134                             <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory>
135                             <filtering>false</filtering>
136                             <resources>
137                                 <resource>
138                                     <directory>../client-common/src/main/resources</directory>
139                                 </resource>
140                             </resources>
141                             <overwrite>true</overwrite>
142                         </configuration>
143                     </execution>
144                     <execution>
145                         <id>copy-local-resources-to-jar</id>
146                         <phase>generate-sources</phase>
147                         <goals>
148                             <goal>copy-resources</goal>
149                         </goals>
150                         <configuration>
151                             <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory>
152                             <filtering>false</filtering>
153                             <resources>
154                                 <resource>
155                                     <directory>src/main/resources/webapp</directory>
156                                 </resource>
157                             </resources>
158                             <overwrite>true</overwrite>
159                         </configuration>
160                     </execution>
161                 </executions>
162             </plugin>
163             <plugin>
164                 <groupId>org.apache.maven.plugins</groupId>
165                 <artifactId>maven-shade-plugin</artifactId>
166                 <version>2.4.3</version>
167                 <executions>
168                     <execution>
169                         <phase>package</phase>
170                         <goals>
171                             <goal>shade</goal>
172                         </goals>
173                     </execution>
174                 </executions>
175                 <configuration>
176                     <finalName>${project.artifactId}-uber-${project.version}</finalName>
177                     <shadedArtifactAttached>true</shadedArtifactAttached>
178                     <shadedClassifierName>editor</shadedClassifierName>
179                     <artifactSet>
180                         <includes>
181                             <include>*:*</include>
182                         </includes>
183                     </artifactSet>
184                     <filters>
185                         <filter>
186                             <artifact>*:*</artifact>
187                             <excludes>
188                                 <exclude>META-INF/*.SF</exclude>
189                                 <exclude>META-INF/*.DSA</exclude>
190                                 <exclude>META-INF/*.RSA</exclude>
191                             </excludes>
192                         </filter>
193                     </filters>
194                     <transformers>
195                         <transformer
196                             implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
197                         <transformer
198                             implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
199                             <resource>reference.conf</resource>
200                         </transformer>
201                         <transformer
202                             implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
203                             <resource>log4j.properties</resource>
204                         </transformer>
205                         <transformer
206                             implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
207                             <mainClass>org.onap.policy.apex.client.editor.rest.ApexEditorMain</mainClass>
208                         </transformer>
209                     </transformers>
210                 </configuration>
211             </plugin>
212             <plugin>
213                 <groupId>org.apache.maven.plugins</groupId>
214                 <artifactId>maven-war-plugin</artifactId>
215                 <version>2.6</version>
216                 <configuration>
217                     <classifier>ui</classifier>
218                     <warSourceDirectory>src/main/resources/webapp</warSourceDirectory>
219                     <webXml>src/main/resources/webapp/WEB-INF/web.xml</webXml>
220                 </configuration>
221                 <executions>
222                     <execution>
223                         <phase>prepare-package</phase>
224                         <goals>
225                             <goal>war</goal>
226                         </goals>
227                     </execution>
228                 </executions>
229             </plugin>
230             <plugin>
231                 <groupId>org.codehaus.mojo</groupId>
232                 <artifactId>build-helper-maven-plugin</artifactId>
233                 <version>3.0.0</version>
234                 <executions>
235                     <execution>
236                         <id>attach-artifacts</id>
237                         <phase>package</phase>
238                         <goals>
239                             <goal>attach-artifact</goal>
240                         </goals>
241                         <configuration>
242                             <artifacts>
243                                 <artifact>
244                                     <file>${project.build.directory}/${project.artifactId}-${project.version}-ui.war</file>
245                                     <type>war</type>
246                                 </artifact>
247                                 <artifact>
248                                     <file>${project.build.directory}/${project.artifactId}-uber-${project.version}.jar</file>
249                                     <type>uber.jar</type>
250                                 </artifact>
251                             </artifacts>
252                         </configuration>
253                     </execution>
254                 </executions>
255             </plugin>
256         </plugins>
257     </build>
258
259     <profiles>
260         <profile>
261             <id>apexSite</id>
262             <activation>
263                 <property>
264                     <name>apexSite</name>
265                 </property>
266             </activation>
267             <distributionManagement>
268                 <site>
269                     <id>${project.artifactId}-site</id>
270                     <url>${apex.adsite.prefix}/modules/${project.parent.artifactId}/${project.artifactId}/</url>
271                 </site>
272             </distributionManagement>
273         </profile>
274     </profiles>
275 </project>