Murali-P | dd9444f | 2017-08-09 18:13:47 +0530 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!-- |
| 3 | Copyright (c) 2017, Huawei Technologies Co., Ltd. |
| 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 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 18 | <modelVersion>4.0.0</modelVersion> |
| 19 | <parent> |
| 20 | <groupId>org.onap.vnfsdk.refrepo</groupId> |
| 21 | <artifactId>vnf-sdk-marketplace-core-parent</artifactId> |
Avinash S | 60c8d06 | 2018-01-10 05:58:00 +0000 | [diff] [blame] | 22 | <version>1.0.0</version> |
Murali-P | dd9444f | 2017-08-09 18:13:47 +0530 | [diff] [blame] | 23 | </parent> |
| 24 | |
| 25 | <artifactId>vnf-sdk-marketplace-deployment</artifactId> |
Jessica Wagantall | 8ba804a | 2018-03-26 13:44:28 -0700 | [diff] [blame^] | 26 | <version>1.0.0</version> |
Murali-P | dd9444f | 2017-08-09 18:13:47 +0530 | [diff] [blame] | 27 | <name>vnf-sdk-marketplace/deployment</name> |
| 28 | <packaging>pom</packaging> |
| 29 | |
| 30 | <properties> |
| 31 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| 32 | </properties> |
| 33 | |
| 34 | <build> |
| 35 | <pluginManagement> |
| 36 | <plugins> |
| 37 | <plugin> |
| 38 | <groupId>org.codehaus.gmaven</groupId> |
| 39 | <artifactId>groovy-maven-plugin</artifactId> |
| 40 | <version>2.0</version> |
| 41 | </plugin> |
| 42 | </plugins> |
| 43 | </pluginManagement> |
| 44 | <plugins> |
| 45 | <plugin> |
| 46 | <groupId>org.codehaus.gmaven</groupId> |
| 47 | <artifactId>gmaven-plugin</artifactId> |
| 48 | <version>1.5</version> |
| 49 | <executions> |
| 50 | <execution> |
| 51 | <id>VnfSdkMarketplace package</id> |
| 52 | <phase>package</phase> |
| 53 | <goals> |
| 54 | <goal>execute</goal> |
| 55 | </goals> |
| 56 | <configuration> |
| 57 | <source> |
| 58 | System.out.println("******** Going to make release zip ********") |
| 59 | |
| 60 | deployFolder = "${project.build.directory}/deployoutput" |
| 61 | deployUnzip = "${project.build.directory}/deployunzip" |
| 62 | outfileName = "VnfSdkMarketplace-${project.version}.zip" |
| 63 | |
| 64 | ant.delete(dir: "${deployFolder}") |
| 65 | ant.mkdir(dir: "${deployFolder}") |
| 66 | |
| 67 | ant.delete(dir: "${deployUnzip}") |
| 68 | ant.mkdir(dir: "${deployUnzip}") |
| 69 | |
| 70 | ant.mkdir(dir: "${deployUnzip}/webapps/ROOT") |
Murali-P | 2a116ae | 2017-11-22 14:47:05 +0530 | [diff] [blame] | 71 | ant.mkdir(dir: "${deployUnzip}/webapps/onapui") |
Murali-P | dd9444f | 2017-08-09 18:13:47 +0530 | [diff] [blame] | 72 | |
| 73 | ant.copy(todir: "${deployUnzip}") { |
| 74 | fileset(dir: "${basedir}/src/main/release"){ |
| 75 | exclude(name: "**/.gitignore") |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | ant.copy(todir: "${deployUnzip}/webapps/ROOT") { |
| 80 | fileset(dir: "${project.build.directory}/../../../vnf-sdk-marketplace/target/ROOT") |
| 81 | } |
| 82 | |
Murali-P | 2a116ae | 2017-11-22 14:47:05 +0530 | [diff] [blame] | 83 | ant.copy(todir: "${deployUnzip}/webapps/onapui") { |
Murali-P | dd9444f | 2017-08-09 18:13:47 +0530 | [diff] [blame] | 84 | fileset(dir: "${project.build.directory}/../../../../vnfmarket/src/main/webapp") |
| 85 | } |
| 86 | |
| 87 | ant.zip(destfile: "${deployFolder}/${outfileName}") { |
| 88 | fileset(dir: "${deployUnzip}") |
| 89 | } |
| 90 | System.out.println("******** completed. ************") |
| 91 | </source> |
| 92 | </configuration> |
| 93 | </execution> |
| 94 | </executions> |
| 95 | </plugin> |
| 96 | <plugin> |
| 97 | <groupId>org.codehaus.mojo</groupId> |
| 98 | <artifactId>build-helper-maven-plugin</artifactId> |
| 99 | <executions> |
| 100 | <execution> |
| 101 | <id>attach-artifacts</id> |
| 102 | <phase>package</phase> |
| 103 | <goals> |
| 104 | <goal>attach-artifact</goal> |
| 105 | </goals> |
| 106 | <configuration> |
| 107 | <artifacts> |
| 108 | <artifact> |
| 109 | <file>${project.build.directory}/deployoutput/VnfSdkMarketplace-${project.version}.zip</file> |
| 110 | <type>zip</type> |
| 111 | </artifact> |
| 112 | </artifacts> |
| 113 | </configuration> |
| 114 | </execution> |
| 115 | </executions> |
| 116 | </plugin> |
| 117 | </plugins> |
| 118 | </build> |
| 119 | </project> |