blob: 45e5276313e8c6b3be880bbaf7d611ac194cf679 [file] [log] [blame]
liamfallon2de08a62020-07-16 10:24:08 +01001<!--
2 ============LICENSE_START=======================================================
3 Copyright (C) 2018 Ericsson. All rights reserved.
liamfallonaa303502023-02-17 19:16:12 +00004 Modifications Copyright (C) 2019-2023 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>
waynedunicanb84171a2024-02-19 13:56:03 +000029 <version>3.1.2-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>
danielhanrahan770049e2022-02-15 18:02:23 +000037 <webapp.dir>${project.basedir}/src/main/webapp</webapp.dir>
38 <sonar.nodejs.executable>${webapp.dir}/node/node</sonar.nodejs.executable>
39 <sonar.sources>${project.basedir}/src/main/java,${webapp.dir}/js</sonar.sources>
danielhanrahana1bdde32022-02-17 11:16:19 +000040 <sonar.exclusions>**/*.test.js</sonar.exclusions>
liamfallon2de08a62020-07-16 10:24:08 +010041 </properties>
42
43 <dependencies>
44 <dependency>
45 <groupId>org.onap.policy.common</groupId>
liamfallon2de08a62020-07-16 10:24:08 +010046 <artifactId>utils</artifactId>
danielhanrahan6f7ef142022-02-11 16:22:58 +000047 <version>${policy.common.version}</version>
liamfallon2de08a62020-07-16 10:24:08 +010048 <exclusions>
49 <exclusion>
50 <groupId>com.worldturner.medeia</groupId>
51 <artifactId>medeia-validator-gson</artifactId>
52 </exclusion>
53 </exclusions>
54 </dependency>
55 <dependency>
liamfallon9a9127b2020-09-11 14:28:32 +010056 <groupId>org.onap.policy.models</groupId>
57 <artifactId>policy-models-tosca</artifactId>
58 <version>${policy.models.version}</version>
danielhanrahan4a506042022-01-28 11:41:38 +000059 <exclusions>
60 <exclusion>
61 <groupId>org.json</groupId>
62 <artifactId>json</artifactId>
63 </exclusion>
64 </exclusions>
liamfallon9a9127b2020-09-11 14:28:32 +010065 </dependency>
66 <dependency>
liamfallon2de08a62020-07-16 10:24:08 +010067 <groupId>org.onap.policy.apex-pdp.model</groupId>
danielhanrahan93b55332022-03-10 14:39:42 +000068 <artifactId>model</artifactId>
liamfallon2de08a62020-07-16 10:24:08 +010069 <version>${policy.apex-pdp.version}</version>
70 </dependency>
71 <dependency>
danielhanrahan4a506042022-01-28 11:41:38 +000072 <groupId>org.springframework.boot</groupId>
73 <artifactId>spring-boot-starter-web</artifactId>
liamfallon2de08a62020-07-16 10:24:08 +010074 <exclusions>
75 <exclusion>
danielhanrahan4a506042022-01-28 11:41:38 +000076 <groupId>org.springframework.boot</groupId>
77 <artifactId>spring-boot-starter-json</artifactId>
liamfallon2de08a62020-07-16 10:24:08 +010078 </exclusion>
79 </exclusions>
80 </dependency>
81 <dependency>
danielhanrahan4a506042022-01-28 11:41:38 +000082 <groupId>com.google.code.gson</groupId>
83 <artifactId>gson</artifactId>
84 </dependency>
85 <dependency>
86 <groupId>org.springframework.boot</groupId>
87 <artifactId>spring-boot-starter-test</artifactId>
liamfallon2de08a62020-07-16 10:24:08 +010088 <scope>test</scope>
danielhanrahan4a506042022-01-28 11:41:38 +000089 <exclusions>
90 <exclusion>
91 <groupId>org.junit.vintage</groupId>
92 <artifactId>junit-vintage-engine</artifactId>
93 </exclusion>
94 </exclusions>
andre.schmidd4dd7792020-07-20 17:48:48 +010095 </dependency>
danielhanrahan93b55332022-03-10 14:39:42 +000096 <dependency>
97 <groupId>org.slf4j</groupId>
98 <artifactId>slf4j-ext</artifactId>
99 </dependency>
waynedunican57291732023-09-29 08:30:25 +0100100 <dependency>
101 <groupId>org.junit.jupiter</groupId>
102 <artifactId>junit-jupiter-engine</artifactId>
103 <scope>test</scope>
104 </dependency>
liamfallon2de08a62020-07-16 10:24:08 +0100105 </dependencies>
106
107 <build>
liamfallon2de08a62020-07-16 10:24:08 +0100108 <plugins>
waynedunican483f0f82020-09-07 12:21:03 +0100109 <plugin>
110 <groupId>com.github.eirslett</groupId>
111 <artifactId>frontend-maven-plugin</artifactId>
saul.gill59fed502023-03-01 12:38:21 +0000112 <version>1.11.3</version>
waynedunican483f0f82020-09-07 12:21:03 +0100113 <configuration>
brunomilitzer87111ee2021-05-18 12:50:32 +0100114 <nodeVersion>v14.17.0</nodeVersion>
danielhanrahan770049e2022-02-15 18:02:23 +0000115 <npmVersion>6.14.5</npmVersion>
waynedunican483f0f82020-09-07 12:21:03 +0100116 <installDirectory>${webapp.dir}</installDirectory>
117 <workingDirectory>${webapp.dir}</workingDirectory>
Jim Hahn37f7cd92021-04-09 14:52:54 -0400118 <npmDownloadRoot>${repo.npm}</npmDownloadRoot>
waynedunican483f0f82020-09-07 12:21:03 +0100119 </configuration>
120 <executions>
121 <execution>
122 <id>install node</id>
123 <goals>
124 <goal>install-node-and-npm</goal>
125 </goals>
danielhanrahan770049e2022-02-15 18:02:23 +0000126 <phase>generate-resources</phase>
waynedunican483f0f82020-09-07 12:21:03 +0100127 </execution>
128 <execution>
129 <id>npm install</id>
130 <goals>
131 <goal>npm</goal>
132 </goals>
133 <configuration>
134 <arguments>install</arguments>
135 </configuration>
danielhanrahan770049e2022-02-15 18:02:23 +0000136 <phase>generate-resources</phase>
waynedunican483f0f82020-09-07 12:21:03 +0100137 </execution>
138 <execution>
139 <id>npm test</id>
140 <goals>
141 <goal>npm</goal>
142 </goals>
waynedunican483f0f82020-09-07 12:21:03 +0100143 <configuration>
144 <arguments>test</arguments>
145 </configuration>
danielhanrahan770049e2022-02-15 18:02:23 +0000146 <phase>test</phase>
waynedunican483f0f82020-09-07 12:21:03 +0100147 </execution>
148 <execution>
149 <id>webpack build</id>
150 <goals>
151 <goal>webpack</goal>
152 </goals>
danielhanrahan770049e2022-02-15 18:02:23 +0000153 <phase>generate-resources</phase>
waynedunican483f0f82020-09-07 12:21:03 +0100154 </execution>
155 </executions>
156 </plugin>
danielhanrahan770049e2022-02-15 18:02:23 +0000157
158 <plugin>
159 <artifactId>maven-resources-plugin</artifactId>
160 <executions>
161 <execution>
162 <id>copy frontend resources</id>
163 <phase>process-resources</phase>
164 <goals>
165 <goal>copy-resources</goal>
166 </goals>
167 <configuration>
danielhanrahan4a506042022-01-28 11:41:38 +0000168 <outputDirectory>${project.build.directory}/classes/static</outputDirectory>
danielhanrahan770049e2022-02-15 18:02:23 +0000169 <resources>
170 <resource>
171 <directory>${webapp.dir}/dist</directory>
172 </resource>
173 <resource>
174 <directory>${webapp.dir}</directory>
175 <includes>
176 <include>js/fileMenu.js</include>
177 </includes>
178 </resource>
179 </resources>
180 </configuration>
181 </execution>
182 </executions>
183 </plugin>
184
waynedunican483f0f82020-09-07 12:21:03 +0100185 <plugin>
186 <groupId>org.apache.maven.plugins</groupId>
waynedunican483f0f82020-09-07 12:21:03 +0100187 <artifactId>maven-clean-plugin</artifactId>
waynedunican483f0f82020-09-07 12:21:03 +0100188 <configuration>
189 <filesets>
190 <fileset>
191 <directory>${webapp.dir}/node</directory>
192 </fileset>
193 <fileset>
194 <directory>${webapp.dir}/node_modules</directory>
195 </fileset>
196 <fileset>
danielhanrahanaa3754b2021-09-15 16:35:40 +0100197 <directory>${webapp.dir}</directory>
198 <includes>
199 <include>package-lock.json</include>
200 <include>dist/bundle.js</include>
201 </includes>
waynedunican483f0f82020-09-07 12:21:03 +0100202 </fileset>
203 </filesets>
204 </configuration>
205 </plugin>
danielhanrahan770049e2022-02-15 18:02:23 +0000206
liamfallon2de08a62020-07-16 10:24:08 +0100207 <plugin>
danielhanrahan4a506042022-01-28 11:41:38 +0000208 <groupId>org.springframework.boot</groupId>
209 <artifactId>spring-boot-maven-plugin</artifactId>
andre.schmide76b61e2020-07-16 16:06:12 +0100210 <executions>
211 <execution>
danielhanrahan4a506042022-01-28 11:41:38 +0000212 <id>repackage</id>
andre.schmide76b61e2020-07-16 16:06:12 +0100213 <goals>
danielhanrahan4a506042022-01-28 11:41:38 +0000214 <goal>repackage</goal>
danielhanrahan608e6252021-08-20 16:55:19 +0100215 </goals>
216 <configuration>
danielhanrahan4a506042022-01-28 11:41:38 +0000217 <!-- By default, the repackage goal replaces the original artifact with the repackaged one.
218 By specifying a classifier here, we can retain both the original and repackaged jars.
219 Thus two jars are produced: a regular jar that we can include in other modules, and an
220 executable Spring Boot jar with the suffix 'exec'. -->
221 <classifier>exec</classifier>
danielhanrahan608e6252021-08-20 16:55:19 +0100222 </configuration>
223 </execution>
224 </executions>
225 </plugin>
liamfallon2de08a62020-07-16 10:24:08 +0100226 </plugins>
227 </build>
228</project>