| <?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-hubble</artifactId> |
| <version>${revision}</version> |
| </parent> |
| |
| <artifactId>hubble-dist</artifactId> |
| |
| <properties> |
| <release.name>${project.parent.artifactId}</release.name> |
| <final.name>apache-${release.name}-incubating-${project.version}</final.name> |
| <top.level.dir>${project.basedir}/..</top.level.dir> |
| <current.basedir>${project.basedir}</current.basedir> |
| <assembly.dir>${current.basedir}/assembly</assembly.dir> |
| <assembly.descriptor.dir>${assembly.dir}/descriptor</assembly.descriptor.dir> |
| <assembly.static.dir>${assembly.dir}/static</assembly.static.dir> |
| <hubble-fe.dir>${project.basedir}/../hubble-fe</hubble-fe.dir> |
| <build.node.version>v16.20.2</build.node.version> |
| <build.yarn.version>v1.22.21</build.yarn.version> |
| </properties> |
| |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.hugegraph</groupId> |
| <artifactId>hubble-be</artifactId> |
| <version>${revision}</version> |
| </dependency> |
| </dependencies> |
| |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-assembly-plugin</artifactId> |
| <version>2.4</version> |
| <executions> |
| <execution> |
| <id>assembly-hugegraph-hubble</id> |
| <phase>package</phase> |
| <goals> |
| <goal>single</goal> |
| </goals> |
| <configuration> |
| <attach>false</attach> |
| <appendAssemblyId>false</appendAssemblyId> |
| <outputDirectory>${top.level.dir}</outputDirectory> |
| <descriptor>${assembly.descriptor.dir}/assembly.xml</descriptor> |
| <finalName>${final.name}</finalName> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>com.github.eirslett</groupId> |
| <artifactId>frontend-maven-plugin</artifactId> |
| <version>1.14.2</version> |
| |
| <configuration> |
| <installDirectory>${hubble-fe.dir}</installDirectory> |
| <workingDirectory>${hubble-fe.dir}</workingDirectory> |
| </configuration> |
| |
| <executions> |
| <execution> |
| <id>install node and yarn</id> |
| <goals> |
| <goal>install-node-and-yarn</goal> |
| </goals> |
| <configuration> |
| <nodeVersion>${build.node.version}</nodeVersion> |
| <yarnVersion>${build.yarn.version}</yarnVersion> |
| <nodeDownloadRoot>https://mirrors.aliyun.com/nodejs-release/</nodeDownloadRoot> |
| <yarnDownloadRoot>https://repo.huaweicloud.com/yarn/</yarnDownloadRoot> |
| <npmRegistryURL>https://registry.npmmirror.com</npmRegistryURL> |
| </configuration> |
| </execution> |
| |
| <execution> |
| <id>yarn install</id> |
| <goals> |
| <goal>yarn</goal> |
| </goals> |
| <configuration> |
| <arguments>install --network-timeout 600000</arguments> |
| </configuration> |
| </execution> |
| |
| <execution> |
| <id>yarn build</id> |
| <goals> |
| <goal>yarn</goal> |
| </goals> |
| <configuration> |
| <arguments>build</arguments> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <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="${top.level.dir}/dist.sh"> |
| cd ${hubble-fe.dir} || exit 1 |
| export CI=false |
| |
| cd ${top.level.dir} && pwd |
| rm -rf ${final.name}/ui |
| cp -r ${hubble-fe.dir}/build ${final.name}/ui |
| |
| tar -zcvf ${top.level.dir}/target/${final.name}.tar.gz ${final.name} || exit 1 |
| cp -r ${final.name} ./hubble-dist |
| echo -n "${final.name} tar.gz available at: " |
| echo "${top.level.dir}/target/${final.name}.tar.gz" |
| rm -f ${top.level.dir}/dist.sh |
| </echo> |
| <exec executable="${shell-executable}" dir="${top.level.dir}" failonerror="true"> |
| <arg line="./dist.sh" /> |
| </exec> |
| </tasks> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <artifactId>maven-clean-plugin</artifactId> |
| <configuration> |
| <filesets> |
| <fileset> |
| <directory>${top.level.dir}</directory> |
| <includes> |
| <include>*.tar.gz</include> |
| <include>${final.name}/**</include> |
| </includes> |
| <followSymlinks>false</followSymlinks> |
| </fileset> |
| <fileset> |
| <directory>${final.name}</directory> |
| </fileset> |
| </filesets> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| </project> |