Lvbo163 | 091eb47 | 2017-09-15 17:36:41 +0800 | [diff] [blame] | 1 | <?xml version="1.0"?> |
| 2 | <!-- |
| 3 | /** |
| 4 | * Copyright (c) 2017 ZTE Corporation. |
| 5 | * All rights reserved. This program and the accompanying materials |
| 6 | * are made available under the terms of the Eclipse Public License v1.0 |
| 7 | * and the Apache License 2.0 which both accompany this distribution, |
| 8 | * and are available at http://www.eclipse.org/legal/epl-v10.html |
| 9 | * and http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | * |
| 11 | * Contributors: |
| 12 | * ZTE - initial API and implementation and/or initial documentation |
| 13 | */ |
| 14 | --> |
| 15 | <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"> |
| 16 | <parent> |
| 17 | <groupId>org.onap.sdc.sdc-workflow-designer</groupId> |
| 18 | <artifactId>sdc-workflow-designer</artifactId> |
| 19 | <version>1.0.0-SNAPSHOT</version> |
| 20 | </parent> |
| 21 | |
| 22 | <modelVersion>4.0.0</modelVersion> |
| 23 | <groupId>org.onap.sdc.sdc-workflow-designer</groupId> |
| 24 | <artifactId>distribution</artifactId> |
| 25 | <name>distribution</name> |
| 26 | <packaging>pom</packaging> |
| 27 | |
| 28 | <properties> |
| 29 | <packagename>sdc-workflow-designer</packagename> |
| 30 | <linux64id>linux64</linux64id> |
| 31 | <win64id>win64</win64id> |
| 32 | <linux64outputdir>target/assembly/${linux64id}</linux64outputdir> |
| 33 | <win64outputdir>target/assembly/${win64id}</win64outputdir> |
| 34 | <version.output>target/version</version.output> |
| 35 | </properties> |
| 36 | |
| 37 | <build> |
| 38 | <plugins> |
| 39 | <plugin> |
| 40 | <groupId>org.apache.maven.plugins</groupId> |
| 41 | <artifactId>maven-dependency-plugin</artifactId> |
| 42 | <executions> |
| 43 | <execution> |
| 44 | <id>unpack-tomcat-to-temporary-dir</id> |
| 45 | <phase>generate-resources</phase> |
| 46 | <goals> |
| 47 | <goal>unpack</goal> |
| 48 | </goals> |
| 49 | <configuration> |
| 50 | <artifactItems> |
| 51 | <artifactItem> |
| 52 | <groupId>org.apache.tomcat</groupId> |
| 53 | <artifactId>tomcat</artifactId> |
| 54 | <type>zip</type> |
| 55 | <outputDirectory>target/tomcat</outputDirectory> |
| 56 | </artifactItem> |
| 57 | </artifactItems> |
| 58 | </configuration> |
| 59 | </execution> |
| 60 | </executions> |
| 61 | </plugin> |
| 62 | <plugin> |
| 63 | <artifactId>maven-resources-plugin</artifactId> |
| 64 | <executions> |
| 65 | <execution> |
| 66 | <id>copy-resources-${linux64id}</id> |
| 67 | <phase>process-resources</phase> |
| 68 | <goals> |
| 69 | <goal>copy-resources</goal> |
| 70 | </goals> |
| 71 | <configuration> |
| 72 | <outputDirectory>${linux64outputdir}</outputDirectory> |
| 73 | <resources> |
| 74 | <resource> |
| 75 | <directory>src/main/assembly/</directory> |
| 76 | <filtering>false</filtering> |
| 77 | <includes> |
| 78 | <include>**/*</include> |
| 79 | </includes> |
| 80 | <excludes> |
| 81 | <exclude>**/*.bat</exclude> |
| 82 | </excludes> |
| 83 | </resource> |
| 84 | </resources> |
| 85 | <overwrite>true</overwrite> |
| 86 | </configuration> |
| 87 | </execution> |
| 88 | <execution> |
| 89 | <id>copy-tomcat-resources-${linux64id}</id> |
| 90 | <phase>process-resources</phase> |
| 91 | <goals> |
| 92 | <goal>copy-resources</goal> |
| 93 | </goals> |
| 94 | <configuration> |
| 95 | <outputDirectory>${linux64outputdir}/tomcat</outputDirectory> |
| 96 | <resources> |
| 97 | <resource> |
| 98 | <directory>${basedir}/target/tomcat/apache-tomcat-${tomcat.version}</directory> |
| 99 | <includes> |
| 100 | <include>**/*</include> |
| 101 | </includes> |
| 102 | <excludes> |
| 103 | <exclude>**/*.bat</exclude> |
| 104 | </excludes> |
| 105 | </resource> |
| 106 | </resources> |
| 107 | </configuration> |
| 108 | </execution> |
| 109 | <execution> |
| 110 | <id>copy-resources-${win64id}</id> |
| 111 | <phase>process-resources</phase> |
| 112 | <goals> |
| 113 | <goal>copy-resources</goal> |
| 114 | </goals> |
| 115 | <configuration> |
| 116 | <outputDirectory>${win64outputdir}</outputDirectory> |
| 117 | <resources> |
| 118 | <resource> |
| 119 | <directory>src/main/assembly/</directory> |
| 120 | <filtering>false</filtering> |
| 121 | <includes> |
| 122 | <include>**/*</include> |
| 123 | </includes> |
| 124 | <excludes> |
| 125 | <exclude>**/*.sh</exclude> |
| 126 | </excludes> |
| 127 | </resource> |
| 128 | </resources> |
| 129 | <overwrite>true</overwrite> |
| 130 | </configuration> |
| 131 | </execution> |
| 132 | <execution> |
| 133 | <id>copy-tomcat-resources-${win64id}</id> |
| 134 | <phase>process-resources</phase> |
| 135 | <goals> |
| 136 | <goal>copy-resources</goal> |
| 137 | </goals> |
| 138 | <configuration> |
| 139 | <outputDirectory>${win64outputdir}/tomcat</outputDirectory> |
| 140 | <resources> |
| 141 | <resource> |
| 142 | <directory>${basedir}/target/tomcat/apache-tomcat-${tomcat.version}</directory> |
| 143 | <includes> |
| 144 | <include>**/*</include> |
| 145 | </includes> |
| 146 | <excludes> |
| 147 | <exclude>**/*.sh</exclude> |
| 148 | </excludes> |
| 149 | </resource> |
| 150 | </resources> |
| 151 | </configuration> |
| 152 | </execution> |
| 153 | <execution> |
| 154 | <id>copy-dockerfile</id> |
| 155 | <phase>process-resources</phase> |
| 156 | <goals> |
| 157 | <goal>copy-resources</goal> |
| 158 | </goals> |
| 159 | <configuration> |
| 160 | <outputDirectory>${version.output}</outputDirectory> |
| 161 | <resources> |
| 162 | <resource> |
| 163 | <directory>src/main/assembly/</directory> |
| 164 | <filtering>false</filtering> |
| 165 | <includes> |
| 166 | <include>Dockerfile</include> |
| 167 | </includes> |
| 168 | </resource> |
| 169 | </resources> |
| 170 | <overwrite>true</overwrite> |
| 171 | </configuration> |
| 172 | </execution> |
| 173 | </executions> |
| 174 | </plugin> |
| 175 | |
| 176 | <plugin> |
| 177 | <groupId>org.apache.maven.plugins</groupId> |
| 178 | <artifactId>maven-antrun-plugin</artifactId> |
| 179 | <executions> |
| 180 | <execution> |
| 181 | <id>distribution</id> |
| 182 | <phase>package</phase> |
| 183 | <goals> |
| 184 | <goal>run</goal> |
| 185 | </goals> |
| 186 | <configuration> |
| 187 | <target name="distribution"> |
| 188 | <tar destfile="${version.output}/${packagename}-${project.version}-linux64.tar.gz" longfile="posix" compression="gzip"> |
| 189 | <tarfileset dir="target/assembly/linux64" filemode="0644" dirmode="0755"> |
| 190 | <exclude name="**/*.sh"/> |
| 191 | </tarfileset> |
| 192 | <tarfileset dir="target/assembly/linux64" filemode="0755" dirmode="0755"> |
| 193 | <include name="**/*.sh"/> |
| 194 | </tarfileset> |
| 195 | </tar> |
| 196 | <attachartifact file="${version.output}/${packagename}-${project.version}-linux64.tar.gz" classifier="linux64" type="tar.gz"/> |
| 197 | <zip destfile="${version.output}/${packagename}-${project.version}-win64.zip" update="true"> |
| 198 | <zipfileset dir="target/assembly/win64" includes="**"/> |
| 199 | </zip> |
| 200 | <attachartifact file="${version.output}/${packagename}-${project.version}-win64.zip" classifier="win64" type="zip"/> |
| 201 | </target> |
| 202 | </configuration> |
| 203 | </execution> |
| 204 | </executions> |
| 205 | </plugin> |
| 206 | </plugins> |
| 207 | </build> |
| 208 | |
| 209 | <profiles> |
| 210 | <profile> |
| 211 | <id>docker</id> |
| 212 | <build> |
| 213 | <plugins> |
| 214 | <plugin> |
| 215 | <groupId>io.fabric8</groupId> |
| 216 | <artifactId>docker-maven-plugin</artifactId> |
| 217 | <version>0.16.5</version> |
| 218 | <inherited>false</inherited> |
| 219 | <configuration> |
| 220 | <images> |
| 221 | <image> |
| 222 | <name>onap/sdc/sdc-workflow-designer</name> |
| 223 | <build> |
| 224 | <cleanup>try</cleanup> |
| 225 | <dockerFileDir>${basedir}/${version.output}</dockerFileDir> |
| 226 | <dockerFile>${basedir}/target/version/Dockerfile</dockerFile> |
| 227 | <tags> |
| 228 | <tag>${project.version}-STAGING-latest</tag> |
| 229 | </tags> |
| 230 | </build> |
| 231 | </image> |
| 232 | </images> |
| 233 | </configuration> |
| 234 | <executions> |
| 235 | <execution> |
| 236 | <id>generate-images</id> |
| 237 | <phase>package</phase> |
| 238 | <goals> |
| 239 | <goal>build</goal> |
| 240 | </goals> |
| 241 | </execution> |
| 242 | |
| 243 | <execution> |
| 244 | <id>push-images</id> |
| 245 | <phase>deploy</phase> |
| 246 | <goals> |
| 247 | <goal>build</goal> |
| 248 | <goal>push</goal> |
| 249 | </goals> |
| 250 | </execution> |
| 251 | </executions> |
| 252 | </plugin> |
| 253 | </plugins> |
| 254 | </build> |
| 255 | </profile> |
| 256 | </profiles> |
| 257 | |
| 258 | </project> |