Hengye | 7fa12fd | 2020-02-25 09:15:58 +0800 | [diff] [blame] | 1 | <!-- |
| 2 | ============LICENSE_START======================================================= |
| 3 | Copyright (C) 2020 Nordix Foundation. |
Jim Hahn | 37f7cd9 | 2021-04-09 14:52:54 -0400 | [diff] [blame] | 4 | Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. |
Hengye | 7fa12fd | 2020-02-25 09:15:58 +0800 | [diff] [blame] | 5 | ================================================================================ |
| 6 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | you may not use this file except in compliance with the License. |
| 8 | You may obtain a copy of the License at |
| 9 | |
| 10 | http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | |
| 12 | Unless required by applicable law or agreed to in writing, software |
| 13 | distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | See the License for the specific language governing permissions and |
| 16 | limitations under the License. |
| 17 | |
| 18 | SPDX-License-Identifier: Apache-2.0 |
| 19 | ============LICENSE_END========================================================= |
| 20 | --> |
| 21 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 22 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 23 | <modelVersion>4.0.0</modelVersion> |
| 24 | <parent> |
| 25 | <groupId>org.onap.policy.gui</groupId> |
| 26 | <artifactId>policy-gui</artifactId> |
liamfallon | ee41415 | 2020-07-17 09:22:46 +0100 | [diff] [blame] | 27 | <version>2.1.0-SNAPSHOT</version> |
Hengye | 7fa12fd | 2020-02-25 09:15:58 +0800 | [diff] [blame] | 28 | </parent> |
| 29 | |
| 30 | <artifactId>gui-pdp-monitoring</artifactId> |
| 31 | <name>${project.artifactId}</name> |
liamfallon | 2de08a6 | 2020-07-16 10:24:08 +0100 | [diff] [blame] | 32 | <description>GUI for monitoring PDP Statistics</description> |
Hengye | 7fa12fd | 2020-02-25 09:15:58 +0800 | [diff] [blame] | 33 | |
huaxing | 4d4f41c | 2020-03-11 09:50:37 +0800 | [diff] [blame] | 34 | <properties> |
| 35 | <webapp.dir>src/webapp</webapp.dir> |
waynedunican | 0bdca95 | 2020-08-24 13:36:15 +0100 | [diff] [blame] | 36 | <sonar.nodejs.executable>${project.basedir}/src/webapp/node/node</sonar.nodejs.executable> |
waynedunican | 483f0f8 | 2020-09-07 12:21:03 +0100 | [diff] [blame] | 37 | <sonar.sources>${project.basedir}/src/main/java,${project.basedir}/src/webapp/js</sonar.sources> |
waynedunican | 0bdca95 | 2020-08-24 13:36:15 +0100 | [diff] [blame] | 38 | <sonar.exclusions>src/webapp/js/__test__/**</sonar.exclusions> |
huaxing | 4d4f41c | 2020-03-11 09:50:37 +0800 | [diff] [blame] | 39 | </properties> |
| 40 | |
Hengye | 7fa12fd | 2020-02-25 09:15:58 +0800 | [diff] [blame] | 41 | <dependencies> |
| 42 | <dependency> |
| 43 | <groupId>org.onap.policy.common</groupId> |
| 44 | <artifactId>policy-endpoints</artifactId> |
Hengye | 7fa12fd | 2020-02-25 09:15:58 +0800 | [diff] [blame] | 45 | </dependency> |
| 46 | <dependency> |
| 47 | <groupId>org.onap.policy.common</groupId> |
| 48 | <artifactId>utils-test</artifactId> |
| 49 | <version>${policy.common.version}</version> |
| 50 | <scope>test</scope> |
| 51 | </dependency> |
| 52 | <dependency> |
| 53 | <groupId>org.onap.policy.models</groupId> |
| 54 | <artifactId>policy-models-pdp</artifactId> |
| 55 | <version>${policy.models.version}</version> |
| 56 | </dependency> |
| 57 | <dependency> |
| 58 | <groupId>commons-cli</groupId> |
| 59 | <artifactId>commons-cli</artifactId> |
| 60 | </dependency> |
| 61 | <dependency> |
| 62 | <groupId>org.mockito</groupId> |
| 63 | <artifactId>mockito-all</artifactId> |
| 64 | <scope>test</scope> |
| 65 | </dependency> |
| 66 | <dependency> |
| 67 | <groupId>org.assertj</groupId> |
| 68 | <artifactId>assertj-core</artifactId> |
| 69 | <scope>test</scope> |
| 70 | </dependency> |
| 71 | <dependency> |
| 72 | <groupId>org.onap.policy.gui</groupId> |
| 73 | <artifactId>gui-common</artifactId> |
| 74 | <version>${project.version}</version> |
| 75 | <classifier>resources</classifier> |
| 76 | <type>zip</type> |
| 77 | <scope>provided</scope> |
| 78 | </dependency> |
| 79 | </dependencies> |
| 80 | |
| 81 | <build> |
| 82 | <defaultGoal>install</defaultGoal> |
| 83 | <outputDirectory>${project.build.directory}/classes</outputDirectory> |
| 84 | <plugins> |
| 85 | <plugin> |
huaxing | 4d4f41c | 2020-03-11 09:50:37 +0800 | [diff] [blame] | 86 | <groupId>com.github.eirslett</groupId> |
| 87 | <artifactId>frontend-maven-plugin</artifactId> |
| 88 | <version>1.9.1</version> |
| 89 | <configuration> |
brunomilitzer | 87111ee | 2021-05-18 12:50:32 +0100 | [diff] [blame^] | 90 | <nodeVersion>v14.17.0</nodeVersion> |
huaxing | 4d4f41c | 2020-03-11 09:50:37 +0800 | [diff] [blame] | 91 | <installDirectory>${webapp.dir}</installDirectory> |
| 92 | <workingDirectory>${webapp.dir}</workingDirectory> |
Jim Hahn | 37f7cd9 | 2021-04-09 14:52:54 -0400 | [diff] [blame] | 93 | <npmDownloadRoot>${repo.npm}</npmDownloadRoot> |
huaxing | 4d4f41c | 2020-03-11 09:50:37 +0800 | [diff] [blame] | 94 | </configuration> |
| 95 | <executions> |
| 96 | <execution> |
| 97 | <id>install node</id> |
| 98 | <goals> |
| 99 | <goal>install-node-and-npm</goal> |
| 100 | </goals> |
| 101 | <configuration> |
Jim Hahn | 37f7cd9 | 2021-04-09 14:52:54 -0400 | [diff] [blame] | 102 | <npmVersion>6.14.5</npmVersion> |
huaxing | 4d4f41c | 2020-03-11 09:50:37 +0800 | [diff] [blame] | 103 | </configuration> |
| 104 | </execution> |
| 105 | <execution> |
| 106 | <id>npm install</id> |
| 107 | <goals> |
| 108 | <goal>npm</goal> |
| 109 | </goals> |
waynedunican | 0bdca95 | 2020-08-24 13:36:15 +0100 | [diff] [blame] | 110 | <configuration> |
| 111 | <arguments>install</arguments> |
| 112 | </configuration> |
huaxing | 4d4f41c | 2020-03-11 09:50:37 +0800 | [diff] [blame] | 113 | </execution> |
| 114 | <execution> |
| 115 | <id>npm test</id> |
| 116 | <goals> |
| 117 | <goal>npm</goal> |
| 118 | </goals> |
waynedunican | 0bdca95 | 2020-08-24 13:36:15 +0100 | [diff] [blame] | 119 | <phase>test</phase> |
huaxing | 4d4f41c | 2020-03-11 09:50:37 +0800 | [diff] [blame] | 120 | <configuration> |
| 121 | <arguments>test</arguments> |
| 122 | </configuration> |
| 123 | </execution> |
| 124 | <execution> |
| 125 | <id>webpack build</id> |
| 126 | <goals> |
| 127 | <goal>webpack</goal> |
| 128 | </goals> |
| 129 | </execution> |
| 130 | </executions> |
| 131 | </plugin> |
| 132 | <plugin> |
| 133 | <groupId>org.apache.maven.plugins</groupId> |
| 134 | <artifactId>maven-resources-plugin</artifactId> |
| 135 | <executions> |
| 136 | <execution> |
| 137 | <id>Copy frontend build to target</id> |
| 138 | <phase>prepare-package</phase> |
| 139 | <goals> |
| 140 | <goal>copy-resources</goal> |
| 141 | </goals> |
| 142 | <configuration> |
| 143 | <outputDirectory>${project.build.directory}/classes/webapp</outputDirectory> |
| 144 | <resources> |
| 145 | <resource> |
| 146 | <directory>${webapp.dir}/dist</directory> |
| 147 | <filtering>false</filtering> |
| 148 | </resource> |
| 149 | </resources> |
| 150 | </configuration> |
| 151 | </execution> |
| 152 | </executions> |
| 153 | </plugin> |
| 154 | <plugin> |
| 155 | <groupId>org.apache.maven.plugins</groupId> |
| 156 | <artifactId>maven-clean-plugin</artifactId> |
| 157 | <version>3.0.0</version> |
| 158 | <configuration> |
| 159 | <filesets> |
| 160 | <fileset> |
| 161 | <directory>${webapp.dir}/node</directory> |
| 162 | </fileset> |
| 163 | <fileset> |
| 164 | <directory>${webapp.dir}/node_modules</directory> |
| 165 | </fileset> |
| 166 | <fileset> |
| 167 | <directory>${webapp.dir}/dist/</directory> |
| 168 | <includes>bundle.js</includes> |
| 169 | </fileset> |
| 170 | </filesets> |
| 171 | </configuration> |
| 172 | </plugin> |
| 173 | <plugin> |
Hengye | 7fa12fd | 2020-02-25 09:15:58 +0800 | [diff] [blame] | 174 | <groupId>org.apache.maven.plugins</groupId> |
| 175 | <artifactId>maven-shade-plugin</artifactId> |
| 176 | <executions> |
| 177 | <execution> |
| 178 | <phase>package</phase> |
| 179 | <goals> |
| 180 | <goal>shade</goal> |
| 181 | </goals> |
| 182 | </execution> |
| 183 | </executions> |
| 184 | <configuration> |
| 185 | <finalName>${project.artifactId}-uber-${project.version}</finalName> |
| 186 | <shadedArtifactAttached>true</shadedArtifactAttached> |
| 187 | <shadedClassifierName>monitoring</shadedClassifierName> |
| 188 | <artifactSet> |
| 189 | <includes> |
| 190 | <include>*:*</include> |
| 191 | </includes> |
| 192 | </artifactSet> |
| 193 | <filters> |
| 194 | <filter> |
| 195 | <artifact>*:*</artifact> |
| 196 | <excludes> |
| 197 | <exclude>META-INF/*.SF</exclude> |
| 198 | <exclude>META-INF/*.DSA</exclude> |
| 199 | <exclude>META-INF/*.RSA</exclude> |
| 200 | </excludes> |
| 201 | </filter> |
| 202 | </filters> |
| 203 | <transformers> |
| 204 | <transformer |
| 205 | implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" /> |
| 206 | <transformer |
| 207 | implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> |
| 208 | <resource>reference.conf</resource> |
| 209 | </transformer> |
| 210 | <transformer |
| 211 | implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer"> |
| 212 | <resource>log4j.properties</resource> |
| 213 | </transformer> |
| 214 | <transformer |
| 215 | implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> |
| 216 | <mainClass>org.onap.policy.gui.pdp.monitoring.PdpMonitoringMain</mainClass> |
| 217 | </transformer> |
| 218 | </transformers> |
| 219 | </configuration> |
| 220 | </plugin> |
| 221 | <plugin> |
| 222 | <groupId>org.codehaus.mojo</groupId> |
| 223 | <artifactId>build-helper-maven-plugin</artifactId> |
| 224 | <version>3.0.0</version> |
| 225 | <executions> |
| 226 | <execution> |
| 227 | <id>attach-artifacts</id> |
| 228 | <phase>package</phase> |
| 229 | <goals> |
| 230 | <goal>attach-artifact</goal> |
| 231 | </goals> |
| 232 | <configuration> |
| 233 | <artifacts> |
| 234 | <artifact> |
| 235 | <file>${project.build.directory}/${project.artifactId}-uber-${project.version}.jar</file> |
| 236 | <type>uber.jar</type> |
| 237 | </artifact> |
| 238 | </artifacts> |
| 239 | </configuration> |
| 240 | </execution> |
| 241 | </executions> |
| 242 | </plugin> |
| 243 | </plugins> |
| 244 | </build> |
liamfallon | ee41415 | 2020-07-17 09:22:46 +0100 | [diff] [blame] | 245 | </project> |