liamfallon | 2de08a6 | 2020-07-16 10:24:08 +0100 | [diff] [blame] | 1 | <!-- |
| 2 | ============LICENSE_START======================================================= |
| 3 | Copyright (C) 2018 Ericsson. All rights reserved. |
| 4 | Modifications Copyright (C) 2019-2020 Nordix Foundation. |
| 5 | Modifications Copyright (C) 2020 Bell Canada. |
| 6 | ================================================================================ |
| 7 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | you may not use this file except in compliance with the License. |
| 9 | You may obtain a copy of the License at |
| 10 | |
| 11 | http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | |
| 13 | Unless required by applicable law or agreed to in writing, software |
| 14 | distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | See the License for the specific language governing permissions and |
| 17 | limitations under the License. |
| 18 | |
| 19 | SPDX-License-Identifier: Apache-2.0 |
| 20 | ============LICENSE_END========================================================= |
| 21 | --> |
| 22 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 23 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 24 | <modelVersion>4.0.0</modelVersion> |
| 25 | <parent> |
| 26 | <groupId>org.onap.policy.gui.editors</groupId> |
| 27 | <artifactId>editors</artifactId> |
| 28 | <version>2.1.0-SNAPSHOT</version> |
| 29 | </parent> |
| 30 | |
| 31 | <artifactId>gui-editor-apex</artifactId> |
| 32 | <name>${project.artifactId}</name> |
| 33 | <description>Web client for editing Apex policies</description> |
| 34 | |
| 35 | <properties> |
| 36 | <policy.apex-pdp.version>2.4.0</policy.apex-pdp.version> |
waynedunican | 483f0f8 | 2020-09-07 12:21:03 +0100 | [diff] [blame] | 37 | <webapp.dir>src/main/resources/webapp</webapp.dir> |
| 38 | <sonar.nodejs.executable>${project.basedir}/src/main/resources/webapp/node/node</sonar.nodejs.executable> |
| 39 | <sonar.sources>${project.basedir}/src/main/java,${project.basedir}/src/main/resources/webapp/js</sonar.sources> |
| 40 | <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] | 41 | </properties> |
| 42 | |
| 43 | <dependencies> |
| 44 | <dependency> |
| 45 | <groupId>org.onap.policy.common</groupId> |
| 46 | <artifactId>policy-endpoints</artifactId> |
| 47 | <exclusions> |
| 48 | <exclusion> |
| 49 | <groupId>org.onap.aaf.authz</groupId> |
| 50 | <artifactId>aaf-cadi-aaf</artifactId> |
| 51 | </exclusion> |
| 52 | <exclusion> |
| 53 | <groupId>com.att.nsa</groupId> |
| 54 | <artifactId>cambriaClient</artifactId> |
| 55 | </exclusion> |
| 56 | <exclusion> |
| 57 | <groupId>org.onap.dmaap.messagerouter.dmaapclient</groupId> |
| 58 | <artifactId>dmaapClient</artifactId> |
| 59 | </exclusion> |
| 60 | </exclusions> |
| 61 | </dependency> |
| 62 | <dependency> |
| 63 | <groupId>org.onap.policy.common</groupId> |
| 64 | <artifactId>utils</artifactId> |
| 65 | <exclusions> |
| 66 | <exclusion> |
| 67 | <groupId>com.worldturner.medeia</groupId> |
| 68 | <artifactId>medeia-validator-gson</artifactId> |
| 69 | </exclusion> |
| 70 | </exclusions> |
| 71 | </dependency> |
| 72 | <dependency> |
liamfallon | 9a9127b | 2020-09-11 14:28:32 +0100 | [diff] [blame^] | 73 | <groupId>org.onap.policy.models</groupId> |
| 74 | <artifactId>policy-models-tosca</artifactId> |
| 75 | <version>${policy.models.version}</version> |
| 76 | </dependency> |
| 77 | <dependency> |
liamfallon | 2de08a6 | 2020-07-16 10:24:08 +0100 | [diff] [blame] | 78 | <groupId>org.onap.policy.apex-pdp.model</groupId> |
| 79 | <artifactId>model-api</artifactId> |
| 80 | <version>${policy.apex-pdp.version}</version> |
| 81 | </dependency> |
| 82 | <dependency> |
| 83 | <groupId>org.glassfish.jersey.containers</groupId> |
| 84 | <artifactId>jersey-container-grizzly2-http</artifactId> |
| 85 | </dependency> |
| 86 | <dependency> |
| 87 | <groupId>org.glassfish.jersey.media</groupId> |
| 88 | <artifactId>jersey-media-moxy</artifactId> |
| 89 | <exclusions> |
| 90 | <exclusion> |
| 91 | <groupId>org.eclipse.persistence</groupId> |
| 92 | <artifactId>org.eclipse.persistence.moxy</artifactId> |
| 93 | </exclusion> |
| 94 | </exclusions> |
| 95 | </dependency> |
| 96 | <dependency> |
| 97 | <groupId>org.glassfish.jersey.test-framework.providers</groupId> |
| 98 | <artifactId>jersey-test-framework-provider-grizzly2</artifactId> |
| 99 | <scope>test</scope> |
| 100 | </dependency> |
| 101 | <dependency> |
| 102 | <groupId>commons-cli</groupId> |
| 103 | <artifactId>commons-cli</artifactId> |
| 104 | </dependency> |
| 105 | <dependency> |
liamfallon | 9a9127b | 2020-09-11 14:28:32 +0100 | [diff] [blame^] | 106 | <groupId>org.apache.commons</groupId> |
| 107 | <artifactId>commons-text</artifactId> |
| 108 | <version>1.9</version> |
| 109 | </dependency> |
| 110 | <dependency> |
liamfallon | 2de08a6 | 2020-07-16 10:24:08 +0100 | [diff] [blame] | 111 | <groupId>org.onap.policy.apex-pdp.client</groupId> |
| 112 | <artifactId>apex-client-common</artifactId> |
| 113 | <version>${policy.apex-pdp.version}</version> |
| 114 | <classifier>resources</classifier> |
| 115 | <type>zip</type> |
| 116 | <scope>provided</scope> |
| 117 | </dependency> |
andre.schmid | d4dd779 | 2020-07-20 17:48:48 +0100 | [diff] [blame] | 118 | <dependency> |
| 119 | <groupId>org.glassfish.jersey.media</groupId> |
| 120 | <artifactId>jersey-media-multipart</artifactId> |
andre.schmid | d4dd779 | 2020-07-20 17:48:48 +0100 | [diff] [blame] | 121 | </dependency> |
| 122 | <dependency> |
| 123 | <groupId>org.mockito</groupId> |
| 124 | <artifactId>mockito-core</artifactId> |
| 125 | <scope>test</scope> |
| 126 | </dependency> |
| 127 | <dependency> |
| 128 | <groupId>commons-io</groupId> |
| 129 | <artifactId>commons-io</artifactId> |
| 130 | </dependency> |
liamfallon | 2de08a6 | 2020-07-16 10:24:08 +0100 | [diff] [blame] | 131 | |
| 132 | </dependencies> |
| 133 | |
| 134 | <build> |
| 135 | <defaultGoal>install</defaultGoal> |
| 136 | <outputDirectory>${project.build.directory}/classes</outputDirectory> |
| 137 | <plugins> |
waynedunican | 483f0f8 | 2020-09-07 12:21:03 +0100 | [diff] [blame] | 138 | <plugin> |
| 139 | <groupId>com.github.eirslett</groupId> |
| 140 | <artifactId>frontend-maven-plugin</artifactId> |
| 141 | <version>1.9.1</version> |
| 142 | <configuration> |
| 143 | <nodeVersion>v9.9.0</nodeVersion> |
| 144 | <installDirectory>${webapp.dir}</installDirectory> |
| 145 | <workingDirectory>${webapp.dir}</workingDirectory> |
| 146 | </configuration> |
| 147 | <executions> |
| 148 | <execution> |
| 149 | <id>install node</id> |
| 150 | <goals> |
| 151 | <goal>install-node-and-npm</goal> |
| 152 | </goals> |
| 153 | <configuration> |
| 154 | <nodeVersion>v10.16.0</nodeVersion> |
| 155 | <npmVersion>6.9.0</npmVersion> |
| 156 | </configuration> |
| 157 | </execution> |
| 158 | <execution> |
| 159 | <id>npm install</id> |
| 160 | <goals> |
| 161 | <goal>npm</goal> |
| 162 | </goals> |
| 163 | <configuration> |
| 164 | <arguments>install</arguments> |
| 165 | </configuration> |
| 166 | </execution> |
| 167 | <execution> |
| 168 | <id>npm test</id> |
| 169 | <goals> |
| 170 | <goal>npm</goal> |
| 171 | </goals> |
| 172 | <phase>test</phase> |
| 173 | <configuration> |
| 174 | <arguments>test</arguments> |
| 175 | </configuration> |
| 176 | </execution> |
| 177 | <execution> |
| 178 | <id>webpack build</id> |
| 179 | <goals> |
| 180 | <goal>webpack</goal> |
| 181 | </goals> |
| 182 | </execution> |
| 183 | </executions> |
| 184 | </plugin> |
| 185 | <plugin> |
| 186 | <groupId>org.apache.maven.plugins</groupId> |
| 187 | <artifactId>maven-resources-plugin</artifactId> |
| 188 | <executions> |
| 189 | <execution> |
| 190 | <id>Copy frontend build to target</id> |
| 191 | <phase>prepare-package</phase> |
| 192 | <goals> |
| 193 | <goal>copy-resources</goal> |
| 194 | </goals> |
| 195 | <configuration> |
| 196 | <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory> |
| 197 | <resources> |
| 198 | <resource> |
| 199 | <directory>${webapp.dir}/dist</directory> |
| 200 | <filtering>false</filtering> |
| 201 | </resource> |
| 202 | </resources> |
| 203 | </configuration> |
| 204 | </execution> |
| 205 | </executions> |
| 206 | </plugin> |
| 207 | <plugin> |
| 208 | <groupId>org.apache.maven.plugins</groupId> |
| 209 | <artifactId>maven-clean-plugin</artifactId> |
| 210 | <version>3.0.0</version> |
| 211 | <configuration> |
| 212 | <filesets> |
| 213 | <fileset> |
| 214 | <directory>${webapp.dir}/node</directory> |
| 215 | </fileset> |
| 216 | <fileset> |
| 217 | <directory>${webapp.dir}/node_modules</directory> |
| 218 | </fileset> |
| 219 | <fileset> |
| 220 | <directory>${webapp.dir}/dist/</directory> |
| 221 | <includes>bundle.js</includes> |
| 222 | </fileset> |
| 223 | </filesets> |
| 224 | </configuration> |
| 225 | </plugin> |
liamfallon | 2de08a6 | 2020-07-16 10:24:08 +0100 | [diff] [blame] | 226 | <!-- https://blog.sonatype.com/2008/04/how-to-share-resources-across-projects-in-maven/ --> |
| 227 | <plugin> |
| 228 | <groupId>org.apache.maven.plugins</groupId> |
| 229 | <artifactId>maven-dependency-plugin</artifactId> |
| 230 | <executions> |
| 231 | <execution> |
| 232 | <id>unpack-shared-resources</id> |
| 233 | <goals> |
| 234 | <goal>unpack-dependencies</goal> |
| 235 | </goals> |
| 236 | <phase>generate-resources</phase> |
| 237 | <configuration> |
| 238 | <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory> |
| 239 | <!--use as much as needed to be specific...also scope,type,classifier etc--> |
| 240 | <includeArtifacIds>apex-client-common</includeArtifacIds> |
| 241 | <includeGroupIds>org.onap.policy.apex-pdp.client</includeGroupIds> |
| 242 | <excludeTransitive>true</excludeTransitive> |
| 243 | <excludeTransitive>true</excludeTransitive> |
| 244 | <excludeTypes>jar</excludeTypes> |
| 245 | <includeTypes>zip</includeTypes> |
| 246 | </configuration> |
| 247 | </execution> |
| 248 | </executions> |
| 249 | </plugin> |
| 250 | <!-- Editor's css overrides common css --> |
| 251 | <plugin> |
| 252 | <groupId>org.apache.maven.plugins</groupId> |
| 253 | <artifactId>maven-resources-plugin</artifactId> |
| 254 | <configuration> |
| 255 | <overwrite>true</overwrite> |
| 256 | </configuration> |
| 257 | </plugin> |
| 258 | <plugin> |
| 259 | <groupId>org.apache.maven.plugins</groupId> |
| 260 | <artifactId>maven-assembly-plugin</artifactId> |
| 261 | <executions> |
| 262 | <execution> |
| 263 | <id>make shared resources</id> |
| 264 | <goals> |
| 265 | <goal>single</goal> |
| 266 | </goals> |
| 267 | <phase>package</phase> |
| 268 | <configuration> |
| 269 | <descriptors> |
| 270 | <descriptor>src/main/assembly/resources.xml</descriptor> |
| 271 | </descriptors> |
| 272 | </configuration> |
| 273 | </execution> |
| 274 | </executions> |
| 275 | </plugin> |
andre.schmid | e76b61e | 2020-07-16 16:06:12 +0100 | [diff] [blame] | 276 | <plugin> |
| 277 | <groupId>org.apache.maven.plugins</groupId> |
| 278 | <artifactId>maven-shade-plugin</artifactId> |
| 279 | <executions> |
| 280 | <execution> |
| 281 | <id>build-uber-jar</id> |
| 282 | <phase>package</phase> |
| 283 | <goals> |
| 284 | <goal>shade</goal> |
| 285 | </goals> |
| 286 | </execution> |
| 287 | </executions> |
| 288 | <configuration> |
| 289 | <finalName>${project.artifactId}-uber-${project.version}</finalName> |
| 290 | <shadedArtifactAttached>true</shadedArtifactAttached> |
| 291 | <shadedClassifierName>full</shadedClassifierName> |
| 292 | <artifactSet> |
| 293 | <includes> |
| 294 | <include>*:*</include> |
| 295 | </includes> |
| 296 | </artifactSet> |
| 297 | <filters> |
| 298 | <filter> |
| 299 | <artifact>*:*</artifact> |
| 300 | <excludes> |
| 301 | <exclude>META-INF/*.SF</exclude> |
| 302 | <exclude>META-INF/*.DSA</exclude> |
| 303 | <exclude>META-INF/*.RSA</exclude> |
| 304 | </excludes> |
| 305 | </filter> |
| 306 | </filters> |
| 307 | <transformers> |
andre.schmid | e76b61e | 2020-07-16 16:06:12 +0100 | [diff] [blame] | 308 | <transformer |
liamfallon | 9a9127b | 2020-09-11 14:28:32 +0100 | [diff] [blame^] | 309 | implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" /> |
| 310 | <transformer |
| 311 | implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> |
andre.schmid | e76b61e | 2020-07-16 16:06:12 +0100 | [diff] [blame] | 312 | <mainClass>org.onap.policy.gui.editors.apex.rest.ApexEditorMain</mainClass> |
| 313 | </transformer> |
| 314 | </transformers> |
| 315 | </configuration> |
| 316 | </plugin> |
liamfallon | 2de08a6 | 2020-07-16 10:24:08 +0100 | [diff] [blame] | 317 | </plugins> |
| 318 | </build> |
| 319 | </project> |