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> |
| 26 | <version>2.1.0-SNAPSHOT</version> |
| 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> |
| 35 | </properties> |
| 36 | <build> |
| 37 | <plugins> |
| 38 | <plugin> |
| 39 | <artifactId>maven-resources-plugin</artifactId> |
| 40 | <version>3.2.0</version> |
| 41 | <executions> |
| 42 | <execution> |
| 43 | <id>copy-resources-1</id> |
| 44 | <!-- here the phase you need --> |
| 45 | <phase>compile</phase> |
| 46 | <goals> |
| 47 | <goal>copy-resources</goal> |
| 48 | </goals> |
| 49 | <configuration> |
| 50 | <outputDirectory>${project.build.directory}/${ui.react.src}</outputDirectory> |
| 51 | <resources> |
| 52 | <resource> |
| 53 | <directory>${ui.react.src}</directory> |
| 54 | <excludes> |
| 55 | <exclude>node_modules</exclude> |
| 56 | </excludes> |
| 57 | <includes> |
| 58 | <include>src/**</include> |
| 59 | <include>public/**</include> |
| 60 | <include>package.json</include> |
| 61 | <include>package-lock.json</include> |
| 62 | </includes> |
| 63 | <filtering>true</filtering> |
| 64 | </resource> |
| 65 | </resources> |
| 66 | </configuration> |
| 67 | </execution> |
| 68 | <execution> |
| 69 | <id>copy-resources-2</id> |
| 70 | <!-- here the phase you need --> |
| 71 | <phase>compile</phase> |
| 72 | <goals> |
| 73 | <goal>copy-resources</goal> |
| 74 | </goals> |
| 75 | <configuration> |
| 76 | <outputDirectory>${project.build.directory}/${ui.react.src}</outputDirectory> |
| 77 | <resources> |
| 78 | <resource> |
| 79 | <directory>${ui.react.src}</directory> |
| 80 | <includes> |
| 81 | <include>src/**</include> |
| 82 | </includes> |
| 83 | <excludes> |
| 84 | <exclude>**/__snapshots__/**</exclude> |
| 85 | <exclude>**/**.test.js</exclude> |
| 86 | </excludes> |
| 87 | <filtering>true</filtering> |
| 88 | </resource> |
| 89 | </resources> |
| 90 | </configuration> |
| 91 | </execution> |
| 92 | <execution> |
| 93 | <id>copy-resources-3</id> |
| 94 | <!-- here the phase you need --> |
| 95 | <phase>compile</phase> |
| 96 | <goals> |
| 97 | <goal>copy-resources</goal> |
| 98 | </goals> |
| 99 | <configuration> |
| 100 | <outputDirectory>${project.build.directory}/${ui.react.lib.src}</outputDirectory> |
| 101 | <resources> |
| 102 | <resource> |
| 103 | <directory>${ui.react.lib.src}</directory> |
| 104 | <includes> |
| 105 | <include>**</include> |
| 106 | </includes> |
| 107 | <excludes> |
| 108 | <exclude>node_modules/**</exclude> |
| 109 | <exclude>package-lock.json</exclude> |
| 110 | </excludes> |
| 111 | <filtering>true</filtering> |
| 112 | </resource> |
| 113 | </resources> |
| 114 | </configuration> |
| 115 | </execution> |
| 116 | </executions> |
| 117 | </plugin> |
| 118 | <plugin> |
| 119 | <groupId>com.github.eirslett</groupId> |
| 120 | <artifactId>frontend-maven-plugin</artifactId> |
| 121 | <version>1.11.3</version> |
| 122 | <configuration> |
| 123 | <installDirectory>${project.build.directory}/${ui.react.src}</installDirectory> |
| 124 | <npmDownloadRoot>${repo.npm}</npmDownloadRoot> |
| 125 | </configuration> |
| 126 | <executions> |
| 127 | <execution> |
| 128 | <id>install node and npm</id> |
| 129 | <goals> |
| 130 | <goal>install-node-and-npm</goal> |
| 131 | </goals> |
| 132 | <phase>generate-sources</phase> |
| 133 | <configuration> |
| 134 | <nodeVersion>v14.17.0</nodeVersion> |
| 135 | </configuration> |
| 136 | </execution> |
| 137 | <execution> |
| 138 | <id>npm_install</id> |
| 139 | <goals> |
| 140 | <goal>npm</goal> |
| 141 | </goals> |
| 142 | <phase>compile</phase> |
| 143 | <configuration> |
| 144 | <workingDirectory>${project.build.directory}/${ui.react.src}</workingDirectory> |
| 145 | <arguments>install</arguments> |
| 146 | </configuration> |
| 147 | </execution> |
| 148 | <execution> |
| 149 | <id>npm_test</id> |
| 150 | <goals> |
| 151 | <goal>npm</goal> |
| 152 | </goals> |
| 153 | <phase>test</phase> |
| 154 | <configuration> |
| 155 | <skip>${maven.test.skip}</skip> |
| 156 | <arguments>run-script test:coverage</arguments> |
| 157 | <workingDirectory>${project.build.directory}/${ui.react.src}</workingDirectory> |
| 158 | </configuration> |
| 159 | </execution> |
| 160 | <execution> |
| 161 | <id>npm_install_lib</id> |
| 162 | <goals> |
| 163 | <goal>npm</goal> |
| 164 | </goals> |
| 165 | <phase>deploy</phase> |
| 166 | <configuration> |
| 167 | <workingDirectory>${project.build.directory}/${ui.react.lib.src}</workingDirectory> |
| 168 | <arguments>install</arguments> |
| 169 | </configuration> |
| 170 | </execution> |
| 171 | <execution> |
| 172 | <id>npm_build_lib</id> |
| 173 | <goals> |
| 174 | <goal>npm</goal> |
| 175 | </goals> |
| 176 | <phase>deploy</phase> |
| 177 | <configuration> |
| 178 | <workingDirectory>${project.build.directory}/${ui.react.lib.src}</workingDirectory> |
| 179 | <arguments>run build</arguments> |
| 180 | </configuration> |
| 181 | </execution> |
| 182 | <execution> |
| 183 | <id>npm_publish</id> |
| 184 | <goals> |
| 185 | <goal>npm</goal> |
| 186 | </goals> |
| 187 | <phase>deploy</phase> |
| 188 | <configuration> |
| 189 | <workingDirectory>${project.build.directory}/${ui.react.lib.src}</workingDirectory> |
| 190 | <arguments>publish</arguments> |
| 191 | </configuration> |
| 192 | </execution> |
| 193 | </executions> |
| 194 | </plugin> |
| 195 | <plugin> |
| 196 | <groupId>org.apache.maven.plugins</groupId> |
| 197 | <artifactId>maven-clean-plugin</artifactId> |
| 198 | <version>3.0.0</version> |
| 199 | <configuration> |
| 200 | <filesets> |
| 201 | <fileset> |
| 202 | <directory>${ui.react.lib.src}/node</directory> |
| 203 | </fileset> |
| 204 | <fileset> |
| 205 | <directory>${ui.react.src}/node</directory> |
| 206 | </fileset> |
| 207 | <fileset> |
| 208 | <directory>${ui.react.src}/node_modules</directory> |
| 209 | </fileset> |
| 210 | <fileset> |
| 211 | <directory>${ui.react.lib.src}/node_modules</directory> |
| 212 | </fileset> |
| 213 | </filesets> |
| 214 | </configuration> |
| 215 | </plugin> |
| 216 | <plugin> |
| 217 | <groupId>org.apache.maven.plugins</groupId> |
| 218 | <artifactId>maven-compiler-plugin</artifactId> |
| 219 | <version>3.8.1</version> |
| 220 | <configuration> |
| 221 | <source>11</source> |
| 222 | <target>11</target> |
| 223 | </configuration> |
| 224 | </plugin> |
| 225 | <plugin> |
| 226 | <groupId>org.codehaus.mojo</groupId> |
| 227 | <artifactId>versions-maven-plugin</artifactId> |
| 228 | <version>1.3.1</version> |
| 229 | </plugin> |
| 230 | </plugins> |
| 231 | </build> |
brunomilitzer | d5fd117 | 2021-05-10 16:51:15 +0100 | [diff] [blame] | 232 | </project> |