| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <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"> |
| <modelVersion>4.0.0</modelVersion> |
| <parent> |
| <groupId>org.apache.hugegraph</groupId> |
| <artifactId>hugegraph</artifactId> |
| <version>${revision}</version> |
| <relativePath>../pom.xml</relativePath> |
| </parent> |
| <!-- TODO: rename to hugegraph-dist later --> |
| <artifactId>install-dist</artifactId> |
| |
| <properties> |
| <final.name>apache-${release.name}-${project.version}</final.name> |
| </properties> |
| |
| <build> |
| <plugins> |
| <plugin> |
| <artifactId>maven-antrun-plugin</artifactId> |
| <executions> |
| <execution> |
| <phase>package</phase> |
| <goals> |
| <goal>run</goal> |
| </goals> |
| <configuration> |
| <tasks> |
| <!-- TODO: change to assembly plugin in future --> |
| <echo file="${project.basedir}/dist.sh"> |
| root_path=$(cd $(dirname $0)/..; pwd) |
| cd $root_path || exit |
| |
| mkdir -p ${final.name} |
| cp -r -v $root_path/hugegraph-pd/apache-hugegraph-pd-${project.version} ${final.name}/ || exit |
| cp -r -v $root_path/hugegraph-store/apache-hugegraph-store-${project.version} ${final.name}/ || exit |
| cp -r -v $root_path/hugegraph-server/apache-hugegraph-server-${project.version} ${final.name}/ || exit |
| cp -r -v $root_path/install-dist/release-docs/* ${final.name}/ || exit |
| |
| tar zcvf $root_path/target/${final.name}.tar.gz ./${final.name} || exit 1 |
| |
| md5sum $root_path/target/${final.name}.tar.gz |
| echo -n "hugegraph tar.gz available at: " |
| echo "$root_path/target/${final.name}.tar.gz" |
| </echo> |
| <exec executable="${shell-executable}" dir="${project.basedir}" failonerror="true"> |
| <arg line="./dist.sh"/> |
| </exec> |
| <!-- Ensure dist.sh is always deleted after execution --> |
| <delete file="${project.basedir}/dist.sh" quiet="true"/> |
| </tasks> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <artifactId>maven-clean-plugin</artifactId> |
| <configuration> |
| <filesets> |
| <fileset> |
| <directory>${project.basedir}/..</directory> |
| <includes> |
| <include>${final.name}.tar.gz</include> |
| </includes> |
| <followSymlinks>false</followSymlinks> |
| </fileset> |
| <fileset> |
| <directory>${project.basedir}/../${final.name}</directory> |
| </fileset> |
| <!-- Clean up dist.sh if it exists --> |
| <fileset> |
| <directory>${project.basedir}</directory> |
| <includes> |
| <include>dist.sh</include> |
| </includes> |
| <followSymlinks>false</followSymlinks> |
| </fileset> |
| </filesets> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| </project> |