blob: 10f53926f62519f762a5bd06f551e5e9622d968b [file] [log] [blame]
liamfallon2de08a62020-07-16 10:24:08 +01001<!--
2 ============LICENSE_START=======================================================
3 Copyright (C) 2018 Ericsson. All rights reserved.
arkadiusz.adamski4ea0f912021-05-20 17:33:18 +01004 Modifications Copyright (C) 2019-2021 Nordix Foundation.
liamfallon2de08a62020-07-16 10:24:08 +01005 Modifications Copyright (C) 2020 Bell Canada.
Jim Hahn37f7cd92021-04-09 14:52:54 -04006 Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
liamfallon2de08a62020-07-16 10:24:08 +01007 ================================================================================
8 Licensed under the Apache License, Version 2.0 (the "License");
9 you may not use this file except in compliance with the License.
10 You may obtain a copy of the License at
11
12 http://www.apache.org/licenses/LICENSE-2.0
13
14 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an "AS IS" BASIS,
16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 See the License for the specific language governing permissions and
18 limitations under the License.
19
20 SPDX-License-Identifier: Apache-2.0
21 ============LICENSE_END=========================================================
22-->
23<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
25 <modelVersion>4.0.0</modelVersion>
26 <parent>
27 <groupId>org.onap.policy.gui.editors</groupId>
28 <artifactId>editors</artifactId>
liamfallon48808f22021-09-15 21:55:59 +010029 <version>2.1.1-SNAPSHOT</version>
liamfallon2de08a62020-07-16 10:24:08 +010030 </parent>
31
32 <artifactId>gui-editor-apex</artifactId>
33 <name>${project.artifactId}</name>
34 <description>Web client for editing Apex policies</description>
35
36 <properties>
37 <policy.apex-pdp.version>2.4.0</policy.apex-pdp.version>
waynedunican483f0f82020-09-07 12:21:03 +010038 <webapp.dir>src/main/resources/webapp</webapp.dir>
39 <sonar.nodejs.executable>${project.basedir}/src/main/resources/webapp/node/node</sonar.nodejs.executable>
40 <sonar.sources>${project.basedir}/src/main/java,${project.basedir}/src/main/resources/webapp/js</sonar.sources>
41 <sonar.exclusions>src/main/resources/webapp/js/__test__/**,src/main/resources/webapp/js/jquery/**,src/main/resources/webapp/js/edit_area/**,src/main/resources/webapp/js/jquery-ui-1.12.1/**,src/main/resources/webapp/js/lib/**</sonar.exclusions>
liamfallon2de08a62020-07-16 10:24:08 +010042 </properties>
43
44 <dependencies>
45 <dependency>
46 <groupId>org.onap.policy.common</groupId>
47 <artifactId>policy-endpoints</artifactId>
48 <exclusions>
49 <exclusion>
50 <groupId>org.onap.aaf.authz</groupId>
51 <artifactId>aaf-cadi-aaf</artifactId>
52 </exclusion>
53 <exclusion>
54 <groupId>com.att.nsa</groupId>
55 <artifactId>cambriaClient</artifactId>
56 </exclusion>
57 <exclusion>
58 <groupId>org.onap.dmaap.messagerouter.dmaapclient</groupId>
59 <artifactId>dmaapClient</artifactId>
60 </exclusion>
61 </exclusions>
62 </dependency>
63 <dependency>
64 <groupId>org.onap.policy.common</groupId>
65 <artifactId>utils</artifactId>
66 <exclusions>
67 <exclusion>
68 <groupId>com.worldturner.medeia</groupId>
69 <artifactId>medeia-validator-gson</artifactId>
70 </exclusion>
71 </exclusions>
72 </dependency>
73 <dependency>
liamfallon9a9127b2020-09-11 14:28:32 +010074 <groupId>org.onap.policy.models</groupId>
75 <artifactId>policy-models-tosca</artifactId>
76 <version>${policy.models.version}</version>
77 </dependency>
78 <dependency>
liamfallon2de08a62020-07-16 10:24:08 +010079 <groupId>org.onap.policy.apex-pdp.model</groupId>
80 <artifactId>model-api</artifactId>
81 <version>${policy.apex-pdp.version}</version>
82 </dependency>
83 <dependency>
84 <groupId>org.glassfish.jersey.containers</groupId>
85 <artifactId>jersey-container-grizzly2-http</artifactId>
86 </dependency>
87 <dependency>
88 <groupId>org.glassfish.jersey.media</groupId>
89 <artifactId>jersey-media-moxy</artifactId>
90 <exclusions>
91 <exclusion>
92 <groupId>org.eclipse.persistence</groupId>
93 <artifactId>org.eclipse.persistence.moxy</artifactId>
94 </exclusion>
95 </exclusions>
96 </dependency>
97 <dependency>
98 <groupId>org.glassfish.jersey.test-framework.providers</groupId>
99 <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
100 <scope>test</scope>
101 </dependency>
102 <dependency>
103 <groupId>commons-cli</groupId>
104 <artifactId>commons-cli</artifactId>
105 </dependency>
106 <dependency>
liamfallon9a9127b2020-09-11 14:28:32 +0100107 <groupId>org.apache.commons</groupId>
108 <artifactId>commons-text</artifactId>
109 <version>1.9</version>
110 </dependency>
111 <dependency>
liamfallon2de08a62020-07-16 10:24:08 +0100112 <groupId>org.onap.policy.apex-pdp.client</groupId>
113 <artifactId>apex-client-common</artifactId>
114 <version>${policy.apex-pdp.version}</version>
115 <classifier>resources</classifier>
116 <type>zip</type>
117 <scope>provided</scope>
118 </dependency>
andre.schmidd4dd7792020-07-20 17:48:48 +0100119 <dependency>
120 <groupId>org.glassfish.jersey.media</groupId>
121 <artifactId>jersey-media-multipart</artifactId>
andre.schmidd4dd7792020-07-20 17:48:48 +0100122 </dependency>
123 <dependency>
124 <groupId>org.mockito</groupId>
arkadiusz.adamski61bb4222021-06-03 13:47:15 +0100125 <artifactId>mockito-inline</artifactId>
126 <version>3.10.0</version>
andre.schmidd4dd7792020-07-20 17:48:48 +0100127 <scope>test</scope>
128 </dependency>
129 <dependency>
130 <groupId>commons-io</groupId>
131 <artifactId>commons-io</artifactId>
132 </dependency>
liamfallon2de08a62020-07-16 10:24:08 +0100133
134 </dependencies>
135
136 <build>
137 <defaultGoal>install</defaultGoal>
138 <outputDirectory>${project.build.directory}/classes</outputDirectory>
Jim Hahn34eabe42021-04-13 14:02:37 -0400139 <resources>
140 <resource>
141 <directory>src/main/resources</directory>
142 <excludes>
143 <exclude>webapp/node/**</exclude>
144 <exclude>webapp/node_modules/**</exclude>
145 <exclude>webapp/webpack.config.js</exclude>
146 <exclude>webapp/package.json</exclude>
147 <exclude>webapp/package-lock.json</exclude>
arkadiusz.adamski4ea0f912021-05-20 17:33:18 +0100148 <exclude>webapp/dist/**</exclude>
Jim Hahn34eabe42021-04-13 14:02:37 -0400149 </excludes>
150 </resource>
arkadiusz.adamski4ea0f912021-05-20 17:33:18 +0100151 <resource>
danielhanrahanaa3754b2021-09-15 16:35:40 +0100152 <directory>${webapp.dir}/dist/</directory>
arkadiusz.adamski4ea0f912021-05-20 17:33:18 +0100153 <targetPath>webapp/</targetPath>
154 </resource>
Jim Hahn34eabe42021-04-13 14:02:37 -0400155 </resources>
liamfallon2de08a62020-07-16 10:24:08 +0100156 <plugins>
waynedunican483f0f82020-09-07 12:21:03 +0100157 <plugin>
158 <groupId>com.github.eirslett</groupId>
159 <artifactId>frontend-maven-plugin</artifactId>
160 <version>1.9.1</version>
161 <configuration>
brunomilitzer87111ee2021-05-18 12:50:32 +0100162 <nodeVersion>v14.17.0</nodeVersion>
waynedunican483f0f82020-09-07 12:21:03 +0100163 <installDirectory>${webapp.dir}</installDirectory>
164 <workingDirectory>${webapp.dir}</workingDirectory>
Jim Hahn37f7cd92021-04-09 14:52:54 -0400165 <npmDownloadRoot>${repo.npm}</npmDownloadRoot>
waynedunican483f0f82020-09-07 12:21:03 +0100166 </configuration>
167 <executions>
168 <execution>
169 <id>install node</id>
170 <goals>
171 <goal>install-node-and-npm</goal>
172 </goals>
173 <configuration>
Jim Hahn37f7cd92021-04-09 14:52:54 -0400174 <npmVersion>6.14.5</npmVersion>
waynedunican483f0f82020-09-07 12:21:03 +0100175 </configuration>
176 </execution>
177 <execution>
178 <id>npm install</id>
179 <goals>
180 <goal>npm</goal>
181 </goals>
182 <configuration>
183 <arguments>install</arguments>
184 </configuration>
185 </execution>
186 <execution>
187 <id>npm test</id>
188 <goals>
189 <goal>npm</goal>
190 </goals>
191 <phase>test</phase>
192 <configuration>
193 <arguments>test</arguments>
194 </configuration>
195 </execution>
196 <execution>
197 <id>webpack build</id>
198 <goals>
199 <goal>webpack</goal>
200 </goals>
201 </execution>
202 </executions>
203 </plugin>
204 <plugin>
205 <groupId>org.apache.maven.plugins</groupId>
waynedunican483f0f82020-09-07 12:21:03 +0100206 <artifactId>maven-clean-plugin</artifactId>
207 <version>3.0.0</version>
208 <configuration>
209 <filesets>
210 <fileset>
211 <directory>${webapp.dir}/node</directory>
212 </fileset>
213 <fileset>
214 <directory>${webapp.dir}/node_modules</directory>
215 </fileset>
216 <fileset>
danielhanrahanaa3754b2021-09-15 16:35:40 +0100217 <directory>${webapp.dir}</directory>
218 <includes>
219 <include>package-lock.json</include>
220 <include>dist/bundle.js</include>
221 </includes>
waynedunican483f0f82020-09-07 12:21:03 +0100222 </fileset>
223 </filesets>
224 </configuration>
225 </plugin>
liamfallon2de08a62020-07-16 10:24:08 +0100226 <plugin>
227 <groupId>org.apache.maven.plugins</groupId>
liamfallon4ca637b2020-09-15 16:13:54 +0100228 <artifactId>maven-jar-plugin</artifactId>
229 <configuration>
230 <excludes>
231 <exclude>**/node/**</exclude>
232 <exclude>**/node_modules/**</exclude>
233 <exclude>webapp/webpack.config.js</exclude>
234 <exclude>webapp/package.json</exclude>
235 <exclude>webapp/package-lock.json</exclude>
236 </excludes>
237 </configuration>
238 </plugin>
239 <plugin>
240 <groupId>org.apache.maven.plugins</groupId>
liamfallon2de08a62020-07-16 10:24:08 +0100241 <artifactId>maven-assembly-plugin</artifactId>
242 <executions>
243 <execution>
244 <id>make shared resources</id>
245 <goals>
246 <goal>single</goal>
247 </goals>
248 <phase>package</phase>
249 <configuration>
250 <descriptors>
251 <descriptor>src/main/assembly/resources.xml</descriptor>
252 </descriptors>
253 </configuration>
254 </execution>
255 </executions>
256 </plugin>
andre.schmide76b61e2020-07-16 16:06:12 +0100257 <plugin>
258 <groupId>org.apache.maven.plugins</groupId>
259 <artifactId>maven-shade-plugin</artifactId>
260 <executions>
261 <execution>
262 <id>build-uber-jar</id>
263 <phase>package</phase>
264 <goals>
265 <goal>shade</goal>
266 </goals>
267 </execution>
268 </executions>
269 <configuration>
270 <finalName>${project.artifactId}-uber-${project.version}</finalName>
271 <shadedArtifactAttached>true</shadedArtifactAttached>
272 <shadedClassifierName>full</shadedClassifierName>
273 <artifactSet>
274 <includes>
275 <include>*:*</include>
276 </includes>
277 </artifactSet>
278 <filters>
279 <filter>
280 <artifact>*:*</artifact>
281 <excludes>
282 <exclude>META-INF/*.SF</exclude>
283 <exclude>META-INF/*.DSA</exclude>
284 <exclude>META-INF/*.RSA</exclude>
waynedunican51b0c6c2020-09-21 09:19:42 +0100285 <exclude>webapp/package-lock.json</exclude>
286 <exclude>webapp/package.json</exclude>
287 <exclude>webapp/.babelrc</exclude>
288 <exclude>webapp/.gitignore</exclude>
289 <exclude>webapp/webpack.config.js</exclude>
290 <exclude>webapp/dist/</exclude>
291 <exclude>webapp/js/Apex*.js</exclude>
292 <exclude>webapp/js/__test__/</exclude>
andre.schmide76b61e2020-07-16 16:06:12 +0100293 </excludes>
294 </filter>
295 </filters>
296 <transformers>
andre.schmide76b61e2020-07-16 16:06:12 +0100297 <transformer
liamfallon9a9127b2020-09-11 14:28:32 +0100298 implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
299 <transformer
300 implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
andre.schmide76b61e2020-07-16 16:06:12 +0100301 <mainClass>org.onap.policy.gui.editors.apex.rest.ApexEditorMain</mainClass>
302 </transformer>
303 </transformers>
304 </configuration>
305 </plugin>
danielhanrahan608e6252021-08-20 16:55:19 +0100306 <plugin>
307 <groupId>org.codehaus.mojo</groupId>
308 <artifactId>build-helper-maven-plugin</artifactId>
309 <version>3.0.0</version>
310 <executions>
311 <execution>
312 <id>attach-artifacts</id>
313 <phase>package</phase>
314 <goals>
315 <goal>attach-artifact</goal>
316 </goals>
317 <configuration>
318 <artifacts>
319 <artifact>
320 <file>${project.build.directory}/${project.artifactId}-uber-${project.version}.jar</file>
321 <type>uber.jar</type>
322 </artifact>
323 </artifacts>
324 </configuration>
325 </execution>
326 </executions>
327 </plugin>
liamfallon2de08a62020-07-16 10:24:08 +0100328 </plugins>
329 </build>
330</project>