liamfallon | 2de08a6 | 2020-07-16 10:24:08 +0100 | [diff] [blame] | 1 | <!-- |
| 2 | ============LICENSE_START======================================================= |
| 3 | Copyright (C) 2018 Ericsson. All rights reserved. |
arkadiusz.adamski | 4ea0f91 | 2021-05-20 17:33:18 +0100 | [diff] [blame] | 4 | Modifications Copyright (C) 2019-2021 Nordix Foundation. |
liamfallon | 2de08a6 | 2020-07-16 10:24:08 +0100 | [diff] [blame] | 5 | Modifications Copyright (C) 2020 Bell Canada. |
Jim Hahn | 37f7cd9 | 2021-04-09 14:52:54 -0400 | [diff] [blame] | 6 | Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. |
liamfallon | 2de08a6 | 2020-07-16 10:24:08 +0100 | [diff] [blame] | 7 | ================================================================================ |
| 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> |
liamfallon | 48808f2 | 2021-09-15 21:55:59 +0100 | [diff] [blame] | 29 | <version>2.1.1-SNAPSHOT</version> |
liamfallon | 2de08a6 | 2020-07-16 10:24:08 +0100 | [diff] [blame] | 30 | </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> |
waynedunican | 483f0f8 | 2020-09-07 12:21:03 +0100 | [diff] [blame] | 38 | <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> |
liamfallon | 2de08a6 | 2020-07-16 10:24:08 +0100 | [diff] [blame] | 42 | </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> |
liamfallon | 9a9127b | 2020-09-11 14:28:32 +0100 | [diff] [blame] | 74 | <groupId>org.onap.policy.models</groupId> |
| 75 | <artifactId>policy-models-tosca</artifactId> |
| 76 | <version>${policy.models.version}</version> |
| 77 | </dependency> |
| 78 | <dependency> |
liamfallon | 2de08a6 | 2020-07-16 10:24:08 +0100 | [diff] [blame] | 79 | <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> |
liamfallon | 9a9127b | 2020-09-11 14:28:32 +0100 | [diff] [blame] | 107 | <groupId>org.apache.commons</groupId> |
| 108 | <artifactId>commons-text</artifactId> |
| 109 | <version>1.9</version> |
| 110 | </dependency> |
| 111 | <dependency> |
liamfallon | 2de08a6 | 2020-07-16 10:24:08 +0100 | [diff] [blame] | 112 | <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.schmid | d4dd779 | 2020-07-20 17:48:48 +0100 | [diff] [blame] | 119 | <dependency> |
| 120 | <groupId>org.glassfish.jersey.media</groupId> |
| 121 | <artifactId>jersey-media-multipart</artifactId> |
andre.schmid | d4dd779 | 2020-07-20 17:48:48 +0100 | [diff] [blame] | 122 | </dependency> |
| 123 | <dependency> |
| 124 | <groupId>org.mockito</groupId> |
arkadiusz.adamski | 61bb422 | 2021-06-03 13:47:15 +0100 | [diff] [blame] | 125 | <artifactId>mockito-inline</artifactId> |
| 126 | <version>3.10.0</version> |
andre.schmid | d4dd779 | 2020-07-20 17:48:48 +0100 | [diff] [blame] | 127 | <scope>test</scope> |
| 128 | </dependency> |
| 129 | <dependency> |
| 130 | <groupId>commons-io</groupId> |
| 131 | <artifactId>commons-io</artifactId> |
| 132 | </dependency> |
liamfallon | 2de08a6 | 2020-07-16 10:24:08 +0100 | [diff] [blame] | 133 | |
| 134 | </dependencies> |
| 135 | |
| 136 | <build> |
| 137 | <defaultGoal>install</defaultGoal> |
| 138 | <outputDirectory>${project.build.directory}/classes</outputDirectory> |
Jim Hahn | 34eabe4 | 2021-04-13 14:02:37 -0400 | [diff] [blame] | 139 | <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.adamski | 4ea0f91 | 2021-05-20 17:33:18 +0100 | [diff] [blame] | 148 | <exclude>webapp/dist/**</exclude> |
Jim Hahn | 34eabe4 | 2021-04-13 14:02:37 -0400 | [diff] [blame] | 149 | </excludes> |
| 150 | </resource> |
arkadiusz.adamski | 4ea0f91 | 2021-05-20 17:33:18 +0100 | [diff] [blame] | 151 | <resource> |
danielhanrahan | aa3754b | 2021-09-15 16:35:40 +0100 | [diff] [blame^] | 152 | <directory>${webapp.dir}/dist/</directory> |
arkadiusz.adamski | 4ea0f91 | 2021-05-20 17:33:18 +0100 | [diff] [blame] | 153 | <targetPath>webapp/</targetPath> |
| 154 | </resource> |
Jim Hahn | 34eabe4 | 2021-04-13 14:02:37 -0400 | [diff] [blame] | 155 | </resources> |
liamfallon | 2de08a6 | 2020-07-16 10:24:08 +0100 | [diff] [blame] | 156 | <plugins> |
waynedunican | 483f0f8 | 2020-09-07 12:21:03 +0100 | [diff] [blame] | 157 | <plugin> |
| 158 | <groupId>com.github.eirslett</groupId> |
| 159 | <artifactId>frontend-maven-plugin</artifactId> |
| 160 | <version>1.9.1</version> |
| 161 | <configuration> |
brunomilitzer | 87111ee | 2021-05-18 12:50:32 +0100 | [diff] [blame] | 162 | <nodeVersion>v14.17.0</nodeVersion> |
waynedunican | 483f0f8 | 2020-09-07 12:21:03 +0100 | [diff] [blame] | 163 | <installDirectory>${webapp.dir}</installDirectory> |
| 164 | <workingDirectory>${webapp.dir}</workingDirectory> |
Jim Hahn | 37f7cd9 | 2021-04-09 14:52:54 -0400 | [diff] [blame] | 165 | <npmDownloadRoot>${repo.npm}</npmDownloadRoot> |
waynedunican | 483f0f8 | 2020-09-07 12:21:03 +0100 | [diff] [blame] | 166 | </configuration> |
| 167 | <executions> |
| 168 | <execution> |
| 169 | <id>install node</id> |
| 170 | <goals> |
| 171 | <goal>install-node-and-npm</goal> |
| 172 | </goals> |
| 173 | <configuration> |
Jim Hahn | 37f7cd9 | 2021-04-09 14:52:54 -0400 | [diff] [blame] | 174 | <npmVersion>6.14.5</npmVersion> |
waynedunican | 483f0f8 | 2020-09-07 12:21:03 +0100 | [diff] [blame] | 175 | </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> |
waynedunican | 483f0f8 | 2020-09-07 12:21:03 +0100 | [diff] [blame] | 206 | <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> |
danielhanrahan | aa3754b | 2021-09-15 16:35:40 +0100 | [diff] [blame^] | 217 | <directory>${webapp.dir}</directory> |
| 218 | <includes> |
| 219 | <include>package-lock.json</include> |
| 220 | <include>dist/bundle.js</include> |
| 221 | </includes> |
waynedunican | 483f0f8 | 2020-09-07 12:21:03 +0100 | [diff] [blame] | 222 | </fileset> |
| 223 | </filesets> |
| 224 | </configuration> |
| 225 | </plugin> |
liamfallon | 2de08a6 | 2020-07-16 10:24:08 +0100 | [diff] [blame] | 226 | <plugin> |
| 227 | <groupId>org.apache.maven.plugins</groupId> |
liamfallon | 4ca637b | 2020-09-15 16:13:54 +0100 | [diff] [blame] | 228 | <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> |
liamfallon | 2de08a6 | 2020-07-16 10:24:08 +0100 | [diff] [blame] | 241 | <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.schmid | e76b61e | 2020-07-16 16:06:12 +0100 | [diff] [blame] | 257 | <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> |
waynedunican | 51b0c6c | 2020-09-21 09:19:42 +0100 | [diff] [blame] | 285 | <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.schmid | e76b61e | 2020-07-16 16:06:12 +0100 | [diff] [blame] | 293 | </excludes> |
| 294 | </filter> |
| 295 | </filters> |
| 296 | <transformers> |
andre.schmid | e76b61e | 2020-07-16 16:06:12 +0100 | [diff] [blame] | 297 | <transformer |
liamfallon | 9a9127b | 2020-09-11 14:28:32 +0100 | [diff] [blame] | 298 | implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" /> |
| 299 | <transformer |
| 300 | implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> |
andre.schmid | e76b61e | 2020-07-16 16:06:12 +0100 | [diff] [blame] | 301 | <mainClass>org.onap.policy.gui.editors.apex.rest.ApexEditorMain</mainClass> |
| 302 | </transformer> |
| 303 | </transformers> |
| 304 | </configuration> |
| 305 | </plugin> |
danielhanrahan | 608e625 | 2021-08-20 16:55:19 +0100 | [diff] [blame] | 306 | <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> |
liamfallon | 2de08a6 | 2020-07-16 10:24:08 +0100 | [diff] [blame] | 328 | </plugins> |
| 329 | </build> |
| 330 | </project> |