brunomilitzer | d5fd117 | 2021-05-10 16:51:15 +0100 | [diff] [blame] | 1 | <!-- |
| 2 | ============LICENSE_START======================================================= |
| 3 | Copyright (C) 2021 Nordix Foundation. |
| 4 | ================================================================================ |
| 5 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | you may not use this file except in compliance with the License. |
| 7 | You may obtain a copy of the License at |
| 8 | |
| 9 | http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | |
| 11 | Unless required by applicable law or agreed to in writing, software |
| 12 | distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | See the License for the specific language governing permissions and |
| 15 | limitations under the License. |
| 16 | |
| 17 | SPDX-License-Identifier: Apache-2.0 |
| 18 | ============LICENSE_END========================================================= |
brunomilitzer | 87111ee | 2021-05-18 12:50:32 +0100 | [diff] [blame] | 19 | --> |
brunomilitzer | d5fd117 | 2021-05-10 16:51:15 +0100 | [diff] [blame] | 20 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
brunomilitzer | 87111ee | 2021-05-18 12:50:32 +0100 | [diff] [blame] | 21 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
brunomilitzer | d5fd117 | 2021-05-10 16:51:15 +0100 | [diff] [blame] | 22 | <modelVersion>4.0.0</modelVersion> |
| 23 | <parent> |
| 24 | <groupId>org.onap.policy.gui</groupId> |
| 25 | <artifactId>policy-gui</artifactId> |
liamfallon | aa93fed | 2021-10-14 12:43:16 +0100 | [diff] [blame] | 26 | <version>2.2.0-SNAPSHOT</version> |
brunomilitzer | d5fd117 | 2021-05-10 16:51:15 +0100 | [diff] [blame] | 27 | </parent> |
brunomilitzer | d5fd117 | 2021-05-10 16:51:15 +0100 | [diff] [blame] | 28 | <artifactId>gui-clamp</artifactId> |
| 29 | <packaging>pom</packaging> |
| 30 | <name>${project.artifactId}</name> |
| 31 | <description>This module contains the implementation code for the CLAMP GUIs in the Policy Framework</description> |
brunomilitzer | 87111ee | 2021-05-18 12:50:32 +0100 | [diff] [blame] | 32 | <properties> |
| 33 | <ui.react.src>ui-react</ui.react.src> |
| 34 | <ui.react.lib.src>ui-react-lib</ui.react.lib.src> |
arkadiusz.adamski | 392e5e2 | 2021-06-28 17:45:45 +0100 | [diff] [blame] | 35 | <npm.publish.url>https://nexus3.onap.org/repository/npm.snapshot/</npm.publish.url> |
saul.gill | 3ce3724 | 2021-11-01 15:12:48 +0000 | [diff] [blame^] | 36 | <sonar.nodejs.executable>${project.build.directory}/ui-react/node/node</sonar.nodejs.executable> |
| 37 | <sonar.sources>${project.basedir}/ui-react/src</sonar.sources> |
| 38 | <sonar.exclusions>**/*.test.js</sonar.exclusions> |
brunomilitzer | 87111ee | 2021-05-18 12:50:32 +0100 | [diff] [blame] | 39 | </properties> |
| 40 | <build> |
| 41 | <plugins> |
| 42 | <plugin> |
| 43 | <artifactId>maven-resources-plugin</artifactId> |
| 44 | <version>3.2.0</version> |
| 45 | <executions> |
| 46 | <execution> |
| 47 | <id>copy-resources-1</id> |
| 48 | <!-- here the phase you need --> |
| 49 | <phase>compile</phase> |
| 50 | <goals> |
| 51 | <goal>copy-resources</goal> |
| 52 | </goals> |
| 53 | <configuration> |
| 54 | <outputDirectory>${project.build.directory}/${ui.react.src}</outputDirectory> |
| 55 | <resources> |
| 56 | <resource> |
| 57 | <directory>${ui.react.src}</directory> |
| 58 | <excludes> |
| 59 | <exclude>node_modules</exclude> |
| 60 | </excludes> |
| 61 | <includes> |
| 62 | <include>src/**</include> |
| 63 | <include>public/**</include> |
| 64 | <include>package.json</include> |
| 65 | <include>package-lock.json</include> |
| 66 | </includes> |
| 67 | <filtering>true</filtering> |
| 68 | </resource> |
| 69 | </resources> |
| 70 | </configuration> |
| 71 | </execution> |
| 72 | <execution> |
| 73 | <id>copy-resources-2</id> |
| 74 | <!-- here the phase you need --> |
| 75 | <phase>compile</phase> |
| 76 | <goals> |
| 77 | <goal>copy-resources</goal> |
| 78 | </goals> |
| 79 | <configuration> |
| 80 | <outputDirectory>${project.build.directory}/${ui.react.src}</outputDirectory> |
| 81 | <resources> |
| 82 | <resource> |
| 83 | <directory>${ui.react.src}</directory> |
| 84 | <includes> |
| 85 | <include>src/**</include> |
| 86 | </includes> |
| 87 | <excludes> |
| 88 | <exclude>**/__snapshots__/**</exclude> |
| 89 | <exclude>**/**.test.js</exclude> |
| 90 | </excludes> |
| 91 | <filtering>true</filtering> |
| 92 | </resource> |
| 93 | </resources> |
| 94 | </configuration> |
| 95 | </execution> |
| 96 | <execution> |
| 97 | <id>copy-resources-3</id> |
| 98 | <!-- here the phase you need --> |
| 99 | <phase>compile</phase> |
| 100 | <goals> |
| 101 | <goal>copy-resources</goal> |
| 102 | </goals> |
| 103 | <configuration> |
| 104 | <outputDirectory>${project.build.directory}/${ui.react.lib.src}</outputDirectory> |
| 105 | <resources> |
| 106 | <resource> |
| 107 | <directory>${ui.react.lib.src}</directory> |
| 108 | <includes> |
| 109 | <include>**</include> |
| 110 | </includes> |
| 111 | <excludes> |
| 112 | <exclude>node_modules/**</exclude> |
| 113 | <exclude>package-lock.json</exclude> |
| 114 | </excludes> |
| 115 | <filtering>true</filtering> |
| 116 | </resource> |
| 117 | </resources> |
| 118 | </configuration> |
| 119 | </execution> |
| 120 | </executions> |
| 121 | </plugin> |
| 122 | <plugin> |
| 123 | <groupId>com.github.eirslett</groupId> |
| 124 | <artifactId>frontend-maven-plugin</artifactId> |
| 125 | <version>1.11.3</version> |
| 126 | <configuration> |
| 127 | <installDirectory>${project.build.directory}/${ui.react.src}</installDirectory> |
| 128 | <npmDownloadRoot>${repo.npm}</npmDownloadRoot> |
| 129 | </configuration> |
| 130 | <executions> |
| 131 | <execution> |
| 132 | <id>install node and npm</id> |
| 133 | <goals> |
| 134 | <goal>install-node-and-npm</goal> |
| 135 | </goals> |
| 136 | <phase>generate-sources</phase> |
| 137 | <configuration> |
| 138 | <nodeVersion>v14.17.0</nodeVersion> |
| 139 | </configuration> |
| 140 | </execution> |
| 141 | <execution> |
| 142 | <id>npm_install</id> |
| 143 | <goals> |
| 144 | <goal>npm</goal> |
| 145 | </goals> |
| 146 | <phase>compile</phase> |
| 147 | <configuration> |
| 148 | <workingDirectory>${project.build.directory}/${ui.react.src}</workingDirectory> |
| 149 | <arguments>install</arguments> |
| 150 | </configuration> |
| 151 | </execution> |
| 152 | <execution> |
danielhanrahan | 608e625 | 2021-08-20 16:55:19 +0100 | [diff] [blame] | 153 | <id>npm_build</id> |
| 154 | <goals> |
| 155 | <goal>npm</goal> |
| 156 | </goals> |
| 157 | <phase>package</phase> |
| 158 | <configuration> |
| 159 | <workingDirectory>${project.build.directory}/${ui.react.src}</workingDirectory> |
| 160 | <arguments>run build</arguments> |
| 161 | </configuration> |
| 162 | </execution> |
| 163 | <execution> |
brunomilitzer | 87111ee | 2021-05-18 12:50:32 +0100 | [diff] [blame] | 164 | <id>npm_test</id> |
| 165 | <goals> |
| 166 | <goal>npm</goal> |
| 167 | </goals> |
| 168 | <phase>test</phase> |
| 169 | <configuration> |
| 170 | <skip>${maven.test.skip}</skip> |
| 171 | <arguments>run-script test:coverage</arguments> |
| 172 | <workingDirectory>${project.build.directory}/${ui.react.src}</workingDirectory> |
| 173 | </configuration> |
| 174 | </execution> |
danielhanrahan | 608e625 | 2021-08-20 16:55:19 +0100 | [diff] [blame] | 175 | <!-- XXX Are these deploy steps using npm desirable given docker image generation? --> |
brunomilitzer | 87111ee | 2021-05-18 12:50:32 +0100 | [diff] [blame] | 176 | <execution> |
| 177 | <id>npm_install_lib</id> |
| 178 | <goals> |
| 179 | <goal>npm</goal> |
| 180 | </goals> |
| 181 | <phase>deploy</phase> |
| 182 | <configuration> |
| 183 | <workingDirectory>${project.build.directory}/${ui.react.lib.src}</workingDirectory> |
| 184 | <arguments>install</arguments> |
| 185 | </configuration> |
| 186 | </execution> |
| 187 | <execution> |
| 188 | <id>npm_build_lib</id> |
| 189 | <goals> |
| 190 | <goal>npm</goal> |
| 191 | </goals> |
| 192 | <phase>deploy</phase> |
| 193 | <configuration> |
| 194 | <workingDirectory>${project.build.directory}/${ui.react.lib.src}</workingDirectory> |
| 195 | <arguments>run build</arguments> |
| 196 | </configuration> |
| 197 | </execution> |
| 198 | <execution> |
| 199 | <id>npm_publish</id> |
| 200 | <goals> |
| 201 | <goal>npm</goal> |
| 202 | </goals> |
| 203 | <phase>deploy</phase> |
| 204 | <configuration> |
| 205 | <workingDirectory>${project.build.directory}/${ui.react.lib.src}</workingDirectory> |
| 206 | <arguments>publish</arguments> |
| 207 | </configuration> |
| 208 | </execution> |
| 209 | </executions> |
| 210 | </plugin> |
| 211 | <plugin> |
| 212 | <groupId>org.apache.maven.plugins</groupId> |
| 213 | <artifactId>maven-clean-plugin</artifactId> |
| 214 | <version>3.0.0</version> |
| 215 | <configuration> |
| 216 | <filesets> |
| 217 | <fileset> |
| 218 | <directory>${ui.react.lib.src}/node</directory> |
| 219 | </fileset> |
| 220 | <fileset> |
| 221 | <directory>${ui.react.src}/node</directory> |
| 222 | </fileset> |
| 223 | <fileset> |
| 224 | <directory>${ui.react.src}/node_modules</directory> |
| 225 | </fileset> |
| 226 | <fileset> |
| 227 | <directory>${ui.react.lib.src}/node_modules</directory> |
| 228 | </fileset> |
danielhanrahan | aa3754b | 2021-09-15 16:35:40 +0100 | [diff] [blame] | 229 | <fileset> |
| 230 | <directory>${basedir}</directory> |
| 231 | <includes>**/package-lock.json</includes> |
| 232 | </fileset> |
brunomilitzer | 87111ee | 2021-05-18 12:50:32 +0100 | [diff] [blame] | 233 | </filesets> |
| 234 | </configuration> |
| 235 | </plugin> |
| 236 | <plugin> |
| 237 | <groupId>org.apache.maven.plugins</groupId> |
| 238 | <artifactId>maven-compiler-plugin</artifactId> |
| 239 | <version>3.8.1</version> |
| 240 | <configuration> |
| 241 | <source>11</source> |
| 242 | <target>11</target> |
| 243 | </configuration> |
| 244 | </plugin> |
| 245 | <plugin> |
| 246 | <groupId>org.codehaus.mojo</groupId> |
| 247 | <artifactId>versions-maven-plugin</artifactId> |
| 248 | <version>1.3.1</version> |
| 249 | </plugin> |
danielhanrahan | 608e625 | 2021-08-20 16:55:19 +0100 | [diff] [blame] | 250 | <plugin> |
| 251 | <groupId>org.apache.maven.plugins</groupId> |
| 252 | <artifactId>maven-assembly-plugin</artifactId> |
| 253 | <executions> |
| 254 | <execution> |
| 255 | <id>generate-gui-clamp-tar</id> |
| 256 | <phase>package</phase> |
| 257 | <goals> |
| 258 | <goal>single</goal> |
| 259 | </goals> |
| 260 | <configuration> |
| 261 | <descriptors> |
| 262 | <descriptor>src/main/assembly/clamp-build.xml</descriptor> |
| 263 | </descriptors> |
| 264 | <finalName>${project.artifactId}-${project.version}</finalName> |
| 265 | </configuration> |
| 266 | </execution> |
| 267 | </executions> |
| 268 | </plugin> |
brunomilitzer | 87111ee | 2021-05-18 12:50:32 +0100 | [diff] [blame] | 269 | </plugins> |
| 270 | </build> |
brunomilitzer | d5fd117 | 2021-05-10 16:51:15 +0100 | [diff] [blame] | 271 | </project> |