Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 1 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 2 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 3 | |
| 4 | <modelVersion>4.0.0</modelVersion> |
| 5 | |
| 6 | <groupId>org.openecomp.sdc</groupId> |
| 7 | <artifactId>catalog-ui</artifactId> |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 8 | <packaging>pom</packaging> |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 9 | |
| 10 | |
| 11 | <parent> |
| 12 | <groupId>org.openecomp.sdc</groupId> |
| 13 | <artifactId>sdc-main</artifactId> |
Michael Lando | ebd7c8f | 2017-03-15 20:38:00 +0200 | [diff] [blame] | 14 | <version>1.1.0-SNAPSHOT</version> |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 15 | </parent> |
| 16 | |
| 17 | |
| 18 | |
| 19 | <build> |
| 20 | <plugins> |
| 21 | |
| 22 | <!-- ============================================= --> |
| 23 | <!-- Clean webapps folder --> |
| 24 | <!-- ============================================= --> |
| 25 | <plugin> |
| 26 | <artifactId>maven-clean-plugin</artifactId> |
| 27 | <version>2.6.1</version> |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 28 | <executions> |
| 29 | <execution> |
| 30 | <id>clean.fe.webapp.folder</id> |
| 31 | <phase>initialize</phase> |
| 32 | <goals> |
| 33 | <goal>clean</goal> |
| 34 | </goals> |
| 35 | <configuration> |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 36 | |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 37 | <filesets> |
| 38 | <fileset> |
| 39 | <directory>${project.parent.basedir}/catalog-fe/src/main/webapp</directory> |
| 40 | <includes> |
| 41 | <include>**/*</include> |
| 42 | <include>*</include> |
| 43 | </includes> |
| 44 | <excludes> |
| 45 | <exclude>META-INF/*</exclude> |
| 46 | <exclude>WEB-INF/*</exclude> |
| 47 | </excludes> |
| 48 | <followSymlinks>false</followSymlinks> |
| 49 | </fileset> |
Tal Gitelman | 153a358 | 2017-07-03 20:16:55 +0300 | [diff] [blame] | 50 | <fileset> |
| 51 | <directory>${basedir}/node_modules</directory> |
| 52 | </fileset> |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 53 | </filesets> |
| 54 | </configuration> |
| 55 | </execution> |
Tal Gitelman | 153a358 | 2017-07-03 20:16:55 +0300 | [diff] [blame] | 56 | <!-- <execution> |
| 57 | <id>clean.dist.folder</id> |
| 58 | <phase>clean</phase> |
| 59 | <goals> |
| 60 | <goal>clean</goal> |
| 61 | </goals> |
| 62 | <configuration> |
| 63 | <filesets> |
| 64 | <fileset> |
| 65 | <directory>${basedir}/node_modules</directory> |
| 66 | </fileset> |
| 67 | <fileset> |
| 68 | <directory>${basedir}/dist</directory> |
| 69 | </fileset> |
| 70 | </filesets> |
| 71 | </configuration> |
| 72 | </execution> --> |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 73 | </executions> |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 74 | </plugin> |
| 75 | |
ml636r | 0649e65 | 2017-02-20 21:10:54 +0200 | [diff] [blame] | 76 | |
ml636r | fdb69b5 | 2017-02-19 17:04:06 +0200 | [diff] [blame] | 77 | <plugin> |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 78 | <artifactId>maven-resources-plugin</artifactId> |
| 79 | <version>2.7</version> |
| 80 | <executions> |
| 81 | <execution> |
| 82 | <id>copy-resources</id> |
| 83 | <phase>package</phase> |
| 84 | <goals> |
| 85 | <goal>copy-resources</goal> |
| 86 | </goals> |
| 87 | <configuration> |
| 88 | <outputDirectory>${project.parent.basedir}/catalog-fe/src/main/webapp</outputDirectory> |
| 89 | <resources> |
| 90 | <resource> |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 91 | <directory>${project.basedir}/dist</directory> |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 92 | <filtering>false</filtering> |
| 93 | </resource> |
| 94 | </resources> |
| 95 | </configuration> |
| 96 | </execution> |
| 97 | </executions> |
| 98 | </plugin> |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 99 | <plugin> |
| 100 | <groupId>com.github.eirslett</groupId> |
| 101 | <artifactId>frontend-maven-plugin</artifactId> |
| 102 | <version>1.4</version> |
Tal Gitelman | 153a358 | 2017-07-03 20:16:55 +0300 | [diff] [blame] | 103 | |
| 104 | <configuration> |
| 105 | <installDirectory>${project.parent.basedir}</installDirectory> |
| 106 | </configuration> |
| 107 | |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 108 | <executions> |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 109 | <execution> |
| 110 | <id>install node and npm</id> |
| 111 | <goals> |
| 112 | <goal>install-node-and-npm</goal> |
| 113 | </goals> |
| 114 | <configuration> |
| 115 | <!-- See https://nodejs.org/en/download/ for latest node and npm (lts) versions --> |
| 116 | <nodeVersion>v6.9.5</nodeVersion> |
| 117 | <npmVersion>3.10.10</npmVersion> |
| 118 | </configuration> |
| 119 | </execution> |
Tal Gitelman | 153a358 | 2017-07-03 20:16:55 +0300 | [diff] [blame] | 120 | |
| 121 | <execution> |
| 122 | <id>npm set progress off</id> |
| 123 | <goals> |
| 124 | <goal>npm</goal> |
| 125 | </goals> |
| 126 | <configuration> |
| 127 | <arguments>set progress=false</arguments> |
| 128 | </configuration> |
| 129 | </execution> |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 130 | |
| 131 | <execution> |
| 132 | <id>npm install</id> |
| 133 | <goals> |
| 134 | <goal>npm</goal> |
| 135 | </goals> |
| 136 | <!-- Optional configuration which provides for running any npm command --> |
| 137 | <configuration> |
| 138 | <arguments>install</arguments> |
| 139 | </configuration> |
| 140 | </execution> |
| 141 | |
| 142 | <execution> |
| 143 | <id>npm run build</id> |
| 144 | <goals> |
| 145 | <goal>npm</goal> |
| 146 | </goals> |
| 147 | <configuration> |
| 148 | <arguments>run build:prod</arguments> |
| 149 | </configuration> |
| 150 | </execution> |
| 151 | </executions> |
| 152 | </plugin> |
| 153 | |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 154 | </plugins> |
| 155 | </build> |
| 156 | |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 157 | |
| 158 | |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 159 | <profiles> |
ml636r | fdb69b5 | 2017-02-19 17:04:06 +0200 | [diff] [blame] | 160 | <profile> |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 161 | <id>CI</id> |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 162 | <activation> |
| 163 | <activeByDefault>false</activeByDefault> |
| 164 | </activation> |
| 165 | |
| 166 | <build> |
| 167 | <plugins> |
| 168 | <plugin> |
| 169 | <artifactId>maven-resources-plugin</artifactId> |
| 170 | <version>2.7</version> |
| 171 | <executions> |
| 172 | <execution> |
| 173 | <id>copy-resources</id> |
| 174 | <phase>package</phase> |
| 175 | <goals> |
| 176 | <goal>copy-resources</goal> |
| 177 | </goals> |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 178 | |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 179 | <configuration> |
| 180 | <outputDirectory>${project.parent.basedir}/catalog-fe/src/main/webapp</outputDirectory> |
| 181 | <resources> |
| 182 | <resource> |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 183 | <directory>${project.basedir}/dist</directory> |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 184 | <filtering>false</filtering> |
| 185 | </resource> |
| 186 | </resources> |
| 187 | </configuration> |
| 188 | </execution> |
| 189 | </executions> |
| 190 | </plugin> |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 191 | |
| 192 | |
| 193 | |
| 194 | <!-- ============================================= --> |
| 195 | <!-- Build the UI module node code --> |
| 196 | <!-- ============================================= --> |
| 197 | <plugin> |
| 198 | <groupId>org.codehaus.mojo</groupId> |
| 199 | <artifactId>exec-maven-plugin</artifactId> |
| 200 | <version>1.4.0</version> |
| 201 | <executions> |
| 202 | |
| 203 | <!-- Set execution permissions for the build script --> |
| 204 | <execution> |
| 205 | <id>set.script.permissions</id> |
| 206 | <phase>generate-sources</phase> |
| 207 | <goals> |
| 208 | <goal>exec</goal> |
| 209 | </goals> |
| 210 | |
| 211 | <configuration> |
| 212 | <workingDirectory>${project.basedir}</workingDirectory> |
| 213 | <executable>/bin/chmod</executable> |
| 214 | <arguments> |
| 215 | <argument>755</argument> |
| 216 | <argument>./build_catalog_ui.sh</argument> |
| 217 | </arguments> |
| 218 | </configuration> |
| 219 | </execution> |
| 220 | |
| 221 | <!-- Run the build script --> |
| 222 | <execution> |
| 223 | <id>execute grant build</id> |
| 224 | <phase>generate-sources</phase> |
| 225 | <goals> |
| 226 | <goal>exec</goal> |
| 227 | </goals> |
| 228 | |
| 229 | <configuration> |
| 230 | <workingDirectory>${project.basedir}</workingDirectory> |
| 231 | <executable>./build_catalog_ui.sh</executable> |
| 232 | </configuration> |
| 233 | </execution> |
| 234 | |
| 235 | <!-- Undo checkout the build script --> |
| 236 | <execution> |
| 237 | <id>undo.checkout.script</id> |
| 238 | <phase>generate-sources</phase> |
| 239 | <goals> |
| 240 | <goal>exec</goal> |
| 241 | </goals> |
| 242 | |
| 243 | <configuration> |
| 244 | <workingDirectory>${project.basedir}</workingDirectory> |
| 245 | <executable>/usr/bin/git</executable> |
| 246 | <arguments> |
| 247 | <argument>checkout</argument> |
| 248 | <argument>--</argument> |
| 249 | <argument>./build_catalog_ui.sh</argument> |
| 250 | </arguments> |
| 251 | </configuration> |
| 252 | </execution> |
| 253 | </executions> |
| 254 | </plugin> |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 255 | </plugins> |
| 256 | </build> |
| 257 | </profile> |
Michael Lando | ed64b5e | 2017-06-09 03:19:04 +0300 | [diff] [blame] | 258 | |
| 259 | |
| 260 | <profile> |
| 261 | <id>Fortify</id> |
| 262 | <activation> |
| 263 | <activeByDefault>false</activeByDefault> |
| 264 | </activation> |
| 265 | |
| 266 | <build> |
| 267 | <plugins> |
| 268 | <plugin> |
| 269 | <groupId>com.fortify.ps.maven.plugin</groupId> |
| 270 | <artifactId>sca-maven-plugin</artifactId> |
| 271 | <version>4.30</version> |
| 272 | <configuration> |
| 273 | <source>1.8</source> |
| 274 | <buildId>${project.parent.artifactId}</buildId> |
| 275 | <toplevelArtifactId>${project.parent.artifactId}</toplevelArtifactId> |
| 276 | </configuration> |
| 277 | </plugin> |
| 278 | </plugins> |
| 279 | </build> |
| 280 | </profile> |
| 281 | |
| 282 | <profile> |
| 283 | <id>not-minified</id> |
| 284 | <activation> |
| 285 | <activeByDefault>false</activeByDefault> |
| 286 | </activation> |
| 287 | |
| 288 | <build> |
| 289 | <plugins> |
| 290 | <plugin> |
| 291 | <artifactId>maven-resources-plugin</artifactId> |
| 292 | <version>2.7</version> |
| 293 | <executions> |
| 294 | <execution> |
| 295 | <id>copy-resources</id> |
| 296 | <phase>package</phase> |
| 297 | <goals> |
| 298 | <goal>copy-resources</goal> |
| 299 | </goals> |
| 300 | <configuration> |
| 301 | <outputDirectory>${project.parent.basedir}/catalog-fe/src/main/webapp</outputDirectory> |
| 302 | <resources> |
| 303 | <resource> |
| 304 | <directory>${project.basedir}/app</directory> |
| 305 | <includes> |
| 306 | <include>languages/**</include> |
| 307 | <include>scripts/**</include> |
| 308 | <include>styles/**</include> |
| 309 | <include>third-party/**</include> |
| 310 | <include>index.html</include> |
| 311 | <include>robots.txt</include> |
| 312 | <include>favicon.png</include> |
| 313 | </includes> |
| 314 | <filtering>false</filtering> |
| 315 | </resource> |
| 316 | <resource> |
| 317 | <directory>${project.basedir}</directory> |
| 318 | <includes> |
| 319 | <include>bower_components/**</include> |
| 320 | </includes> |
| 321 | <filtering>false</filtering> |
| 322 | </resource> |
| 323 | </resources> |
| 324 | </configuration> |
| 325 | </execution> |
| 326 | </executions> |
| 327 | </plugin> |
| 328 | </plugins> |
| 329 | </build> |
| 330 | </profile> |
Michael Lando | 451a340 | 2017-02-19 10:28:42 +0200 | [diff] [blame] | 331 | </profiles> |
| 332 | </project> |
| 333 | |