blob: b70e2b6b41b91e9136191aa42ec02904674e8c83 [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>
Suresh Charan930cc362023-04-26 10:23:23 -040029 <version>2.4.3-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>
liamfallon2de08a62020-07-16 10:24:08 +0100100 </dependencies>
101
102 <build>
liamfallon2de08a62020-07-16 10:24:08 +0100103 <plugins>
waynedunican483f0f82020-09-07 12:21:03 +0100104 <plugin>
105 <groupId>com.github.eirslett</groupId>
106 <artifactId>frontend-maven-plugin</artifactId>
saul.gill59fed502023-03-01 12:38:21 +0000107 <version>1.11.3</version>
waynedunican483f0f82020-09-07 12:21:03 +0100108 <configuration>
brunomilitzer87111ee2021-05-18 12:50:32 +0100109 <nodeVersion>v14.17.0</nodeVersion>
danielhanrahan770049e2022-02-15 18:02:23 +0000110 <npmVersion>6.14.5</npmVersion>
waynedunican483f0f82020-09-07 12:21:03 +0100111 <installDirectory>${webapp.dir}</installDirectory>
112 <workingDirectory>${webapp.dir}</workingDirectory>
Jim Hahn37f7cd92021-04-09 14:52:54 -0400113 <npmDownloadRoot>${repo.npm}</npmDownloadRoot>
waynedunican483f0f82020-09-07 12:21:03 +0100114 </configuration>
115 <executions>
116 <execution>
117 <id>install node</id>
118 <goals>
119 <goal>install-node-and-npm</goal>
120 </goals>
danielhanrahan770049e2022-02-15 18:02:23 +0000121 <phase>generate-resources</phase>
waynedunican483f0f82020-09-07 12:21:03 +0100122 </execution>
123 <execution>
124 <id>npm install</id>
125 <goals>
126 <goal>npm</goal>
127 </goals>
128 <configuration>
129 <arguments>install</arguments>
130 </configuration>
danielhanrahan770049e2022-02-15 18:02:23 +0000131 <phase>generate-resources</phase>
waynedunican483f0f82020-09-07 12:21:03 +0100132 </execution>
133 <execution>
134 <id>npm test</id>
135 <goals>
136 <goal>npm</goal>
137 </goals>
waynedunican483f0f82020-09-07 12:21:03 +0100138 <configuration>
139 <arguments>test</arguments>
140 </configuration>
danielhanrahan770049e2022-02-15 18:02:23 +0000141 <phase>test</phase>
waynedunican483f0f82020-09-07 12:21:03 +0100142 </execution>
143 <execution>
144 <id>webpack build</id>
145 <goals>
146 <goal>webpack</goal>
147 </goals>
danielhanrahan770049e2022-02-15 18:02:23 +0000148 <phase>generate-resources</phase>
waynedunican483f0f82020-09-07 12:21:03 +0100149 </execution>
150 </executions>
151 </plugin>
danielhanrahan770049e2022-02-15 18:02:23 +0000152
153 <plugin>
154 <artifactId>maven-resources-plugin</artifactId>
155 <executions>
156 <execution>
157 <id>copy frontend resources</id>
158 <phase>process-resources</phase>
159 <goals>
160 <goal>copy-resources</goal>
161 </goals>
162 <configuration>
danielhanrahan4a506042022-01-28 11:41:38 +0000163 <outputDirectory>${project.build.directory}/classes/static</outputDirectory>
danielhanrahan770049e2022-02-15 18:02:23 +0000164 <resources>
165 <resource>
166 <directory>${webapp.dir}/dist</directory>
167 </resource>
168 <resource>
169 <directory>${webapp.dir}</directory>
170 <includes>
171 <include>js/fileMenu.js</include>
172 </includes>
173 </resource>
174 </resources>
175 </configuration>
176 </execution>
177 </executions>
178 </plugin>
179
waynedunican483f0f82020-09-07 12:21:03 +0100180 <plugin>
181 <groupId>org.apache.maven.plugins</groupId>
waynedunican483f0f82020-09-07 12:21:03 +0100182 <artifactId>maven-clean-plugin</artifactId>
waynedunican483f0f82020-09-07 12:21:03 +0100183 <configuration>
184 <filesets>
185 <fileset>
186 <directory>${webapp.dir}/node</directory>
187 </fileset>
188 <fileset>
189 <directory>${webapp.dir}/node_modules</directory>
190 </fileset>
191 <fileset>
danielhanrahanaa3754b2021-09-15 16:35:40 +0100192 <directory>${webapp.dir}</directory>
193 <includes>
194 <include>package-lock.json</include>
195 <include>dist/bundle.js</include>
196 </includes>
waynedunican483f0f82020-09-07 12:21:03 +0100197 </fileset>
198 </filesets>
199 </configuration>
200 </plugin>
danielhanrahan770049e2022-02-15 18:02:23 +0000201
liamfallon2de08a62020-07-16 10:24:08 +0100202 <plugin>
danielhanrahan4a506042022-01-28 11:41:38 +0000203 <groupId>org.springframework.boot</groupId>
204 <artifactId>spring-boot-maven-plugin</artifactId>
andre.schmide76b61e2020-07-16 16:06:12 +0100205 <executions>
206 <execution>
danielhanrahan4a506042022-01-28 11:41:38 +0000207 <id>repackage</id>
andre.schmide76b61e2020-07-16 16:06:12 +0100208 <goals>
danielhanrahan4a506042022-01-28 11:41:38 +0000209 <goal>repackage</goal>
danielhanrahan608e6252021-08-20 16:55:19 +0100210 </goals>
211 <configuration>
danielhanrahan4a506042022-01-28 11:41:38 +0000212 <!-- By default, the repackage goal replaces the original artifact with the repackaged one.
213 By specifying a classifier here, we can retain both the original and repackaged jars.
214 Thus two jars are produced: a regular jar that we can include in other modules, and an
215 executable Spring Boot jar with the suffix 'exec'. -->
216 <classifier>exec</classifier>
danielhanrahan608e6252021-08-20 16:55:19 +0100217 </configuration>
218 </execution>
219 </executions>
220 </plugin>
liamfallon2de08a62020-07-16 10:24:08 +0100221 </plugins>
222 </build>
223</project>