| <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> |
| |
| <groupId>com.baidu.xbu-data</groupId> |
| <artifactId>hugegraph-tools</artifactId> |
| <version>1.0.2</version> |
| <packaging>jar</packaging> |
| <url>http://maven.apache.org</url> |
| <name>${project.artifactId}</name> |
| |
| <properties> |
| <junit.version>4.12</junit.version> |
| <java.version>1.8</java.version> |
| <source.encoding>UTF-8</source.encoding> |
| <release.version>${project.version}</release.version> |
| <maven.build.timestamp.format>yyyy-MM-dd HH:mm:ssZ</maven.build.timestamp.format> |
| <final.name>hugegraph-tools</final.name> |
| <assembly.dir>${project.basedir}/assembly</assembly.dir> |
| <assembly.descriptor.dir>${assembly.dir}/descriptor</assembly.descriptor.dir> |
| <shell-executable>bash</shell-executable> |
| <hugegraph-client-version>1.5.6</hugegraph-client-version> |
| <jcommand-version>1.72</jcommand-version> |
| </properties> |
| |
| <dependencyManagement> |
| <dependencies> |
| <dependency> |
| <groupId>junit</groupId> |
| <artifactId>junit</artifactId> |
| <version>${junit.version}</version> |
| <scope>test</scope> |
| </dependency> |
| </dependencies> |
| </dependencyManagement> |
| |
| <dependencies> |
| <dependency> |
| <groupId>junit</groupId> |
| <artifactId>junit</artifactId> |
| <scope>test</scope> |
| </dependency> |
| <dependency> |
| <groupId>com.baidu.hugegraph</groupId> |
| <artifactId>hugegraph-client</artifactId> |
| <version>${hugegraph-client-version}</version> |
| </dependency> |
| <dependency> |
| <groupId>com.beust</groupId> |
| <artifactId>jcommander</artifactId> |
| <version>${jcommand-version}</version> |
| </dependency> |
| </dependencies> |
| |
| <build> |
| <directory>output</directory> |
| <sourceDirectory>src/main/java</sourceDirectory> |
| <!--<testSourceDirectory>src/test/java</testSourceDirectory>--> |
| <outputDirectory>output/classes</outputDirectory> |
| <!--<testOutputDirectory>output/test-classes</testOutputDirectory>--> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-compiler-plugin</artifactId> |
| <version>3.7.0</version> |
| <configuration> |
| <source>${java.version}</source> |
| <target>${java.version}</target> |
| <encoding>${source.encoding}</encoding> |
| </configuration> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-assembly-plugin</artifactId> |
| <version>2.4</version> |
| <executions> |
| <execution> |
| <id>assembly-hugegraph</id> |
| <phase>package</phase> |
| <goals> |
| <goal>single</goal> |
| </goals> |
| <configuration> |
| <attach>false</attach> |
| <appendAssemblyId>false</appendAssemblyId> |
| <outputDirectory>${project.basedir}</outputDirectory> |
| <descriptor>${assembly.descriptor.dir}/assembly.xml</descriptor> |
| <finalName>${final.name}</finalName> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <artifactId>maven-antrun-plugin</artifactId> |
| <executions> |
| <execution> |
| <phase>package</phase> |
| <goals> |
| <goal>run</goal> |
| </goals> |
| <configuration> |
| <tasks> |
| <echo file="${project.basedir}/dist.sh"> |
| run() { |
| res=$? |
| if [ $res != 0 ]; then |
| echo "Failed!" |
| exit $res |
| fi |
| } |
| |
| tar -zcvf \ |
| ${project.basedir}/${final.name}-${release.version}.tar.gz ${final.name} |
| rm -f ${project.basedir}/dist.sh |
| echo -n "hugegraph-tools tar.gz available at: " |
| echo "${project.basedir}/${final.name}-${release.version}.tar.gz" |
| </echo> |
| <exec executable="${shell-executable}" |
| dir="${project.basedir}" failonerror="true"> |
| <arg line="./dist.sh"/> |
| </exec> |
| </tasks> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <artifactId>maven-clean-plugin</artifactId> |
| <version>3.0.0</version> |
| <configuration> |
| <filesets> |
| <fileset> |
| <directory>${project.basedir}</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> |
| |
| <profiles> |
| <!-- mvn clean install -Prelease --> |
| <profile> |
| <id>release</id> |
| <build> |
| <plugins> |
| <plugin> |
| <artifactId>maven-source-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>create-source-jar</id> |
| <goals> |
| <goal>jar</goal> |
| <goal>test-jar</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <artifactId>maven-jar-plugin</artifactId> |
| <executions> |
| <execution> |
| <goals> |
| <goal>test-jar</goal> |
| </goals> |
| <configuration> |
| <!-- Avoids an error when releasing the parent pom --> |
| <skipIfEmpty>true</skipIfEmpty> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <artifactId>maven-release-plugin</artifactId> |
| <configuration> |
| <!-- Pass these arguments to the deploy plugin. --> |
| <arguments>-Prelease</arguments> |
| </configuration> |
| </plugin> |
| <plugin> |
| <artifactId>maven-javadoc-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>create-javadoc-jar</id> |
| <goals> |
| <goal>javadoc</goal> |
| <goal>jar</goal> |
| </goals> |
| <phase>package</phase> |
| </execution> |
| </executions> |
| <configuration> |
| <source>${java.version}</source> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| </profiles> |
| </project> |