j180240 | d089cf2 | 2016-09-14 15:00:54 +0800 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
j180240 | 05fe705 | 2016-09-20 17:32:25 +0800 | [diff] [blame] | 2 | <!-- |
| 3 | Copyright 2016 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 | --> |
j180240 | d089cf2 | 2016-09-14 15:00:54 +0800 | [diff] [blame] | 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.openo.gso.gui</groupId> |
j00302280 | 4aa52a7 | 2016-09-26 12:56:23 +0800 | [diff] [blame] | 21 | <artifactId>service-gateway-root</artifactId> |
j180240 | d089cf2 | 2016-09-14 15:00:54 +0800 | [diff] [blame] | 22 | <version>1.0.0-SNAPSHOT</version> |
| 23 | </parent> |
| 24 | |
j00302280 | 4aa52a7 | 2016-09-26 12:56:23 +0800 | [diff] [blame] | 25 | <artifactId>service-gateway-deployment</artifactId> |
| 26 | <name>ServiceGatewayRootDeployment</name> |
| 27 | <packaging>pom</packaging> |
j180240 | d089cf2 | 2016-09-14 15:00:54 +0800 | [diff] [blame] | 28 | |
| 29 | <properties> |
| 30 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| 31 | </properties> |
j00302280 | 4aa52a7 | 2016-09-26 12:56:23 +0800 | [diff] [blame] | 32 | |
| 33 | <build> |
| 34 | <pluginManagement> |
| 35 | <plugins> |
| 36 | <plugin> |
| 37 | <groupId>org.codehaus.gmaven</groupId> |
| 38 | <artifactId>groovy-maven-plugin</artifactId> |
| 39 | <version>2.0</version> |
| 40 | </plugin> |
| 41 | </plugins> |
| 42 | </pluginManagement> |
| 43 | <plugins> |
| 44 | <plugin> |
| 45 | <groupId>org.codehaus.gmaven</groupId> |
| 46 | <artifactId>gmaven-plugin</artifactId> |
| 47 | <version>1.5</version> |
| 48 | <executions> |
| 49 | <execution> |
| 50 | <id>ServiceGateway package</id> |
| 51 | <phase>package</phase> |
| 52 | <goals> |
| 53 | <goal>execute</goal> |
| 54 | </goals> |
| 55 | <configuration> |
| 56 | <source> |
| 57 | System.out.println("******** Going to make release zip ********") |
| 58 | |
| 59 | deployFolder = "${project.build.directory}/deployoutput" |
| 60 | deployUnzip = "${project.build.directory}/deployunzip" |
| 61 | outfileName = "ServiceGateway-.${project.version}.zip" |
| 62 | |
| 63 | ant.delete(dir: "${deployFolder}") |
| 64 | ant.mkdir(dir: "${deployFolder}") |
| 65 | |
| 66 | ant.delete(dir: "${deployUnzip}") |
| 67 | ant.mkdir(dir: "${deployUnzip}") |
| 68 | |
| 69 | ant.mkdir(dir: "${deployUnzip}/webapps/ROOT") |
| 70 | ant.mkdir(dir: "${deployUnzip}/webapps/openoui#servicegateway#v1") |
| 71 | |
| 72 | ant.copy(todir: "${deployUnzip}") { |
| 73 | fileset(dir: "${basedir}/src/main/release"){ |
| 74 | exclude(name: "**/.gitignore") |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | ant.copy(todir: "${deployUnzip}/webapps/ROOT") { |
| 79 | fileset(dir: "${project.build.directory}/../../service/target/ROOT") |
| 80 | } |
| 81 | |
| 82 | ant.zip(destfile: "${deployFolder}/${outfileName}") { |
| 83 | fileset(dir: "${deployUnzip}") |
| 84 | } |
| 85 | System.out.println("******** completed. ************") |
| 86 | </source> |
| 87 | </configuration> |
| 88 | </execution> |
| 89 | </executions> |
| 90 | </plugin> |
| 91 | <plugin> |
| 92 | <groupId>org.codehaus.mojo</groupId> |
| 93 | <artifactId>build-helper-maven-plugin</artifactId> |
| 94 | <executions> |
| 95 | <execution> |
| 96 | <id>attach-artifacts</id> |
| 97 | <phase>package</phase> |
| 98 | <goals> |
| 99 | <goal>attach-artifact</goal> |
| 100 | </goals> |
| 101 | <configuration> |
| 102 | <artifacts> |
| 103 | <artifact> |
| 104 | <file>${project.build.directory}/deployoutput/ServiceGateway-.${project.version}.zip</file> |
| 105 | <type>zip</type> |
| 106 | </artifact> |
| 107 | </artifacts> |
| 108 | </configuration> |
| 109 | </execution> |
| 110 | </executions> |
| 111 | </plugin> |
| 112 | </plugins> |
| 113 | </build> |
j180240 | d089cf2 | 2016-09-14 15:00:54 +0800 | [diff] [blame] | 114 | </project> |