-
Notifications
You must be signed in to change notification settings - Fork 3
/
zip-pom.xml
72 lines (64 loc) · 3.69 KB
/
zip-pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.civilizer</groupId>
<artifactId>cvz-zip</artifactId>
<version>1.0.0.CI-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
<maven.test.failure.ignore>true</maven.test.failure.ignore>
<app-name>civilizer</app-name>
<output-dir>target</output-dir>
<cvz-dir>${output-dir}/${app-name}-${project.version}</cvz-dir>
<extra-dir>${output-dir}/extra</extra-dir>
</properties>
<build>
<directory>${output-dir}</directory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>package</id>
<phase>package</phase>
<goals><goal>run</goal></goals>
<configuration>
<target>
<loadproperties srcFile="src/main/resources/core.properties">
</loadproperties>
<echo message="target version is ${civilizer.version}"/>
<echo message="${civilizer.version}" file="${output-dir}/info/version.txt"/>
<copy file="jetty.xml" todir="${output-dir}"/>
<echo message="copying documentations..."/>
<copy file="README.md" tofile="${output-dir}/info/readme.txt"/>
<copy todir="${output-dir}/info">
<fileset dir="./" includes="*.txt"/>
</copy>
<echo message="copying shell scripts..."/>
<copy todir="${output-dir}/shell-utils">
<fileset dir="tools/shell-utils"/>
</copy>
<copy todir="${output-dir}">
<fileset dir="tools/run"/>
<fileset dir="tools/data-management"/>
</copy>
<echo message="zipping all..."/>
<zip destfile="${output-dir}/${app-name}.${civilizer.version}.zip">
<zipfileset dir="${output-dir}/info" prefix="${app-name}/info"/>
<zipfileset filemode="744" dir="${output-dir}" includes="*.exe *.sh *.bat jetty.xml" prefix="${app-name}"/>
<zipfileset filemode="744" dir="${output-dir}/shell-utils" prefix="${app-name}/shell-utils"/>
<zipfileset dir="${cvz-dir}" prefix="${app-name}/${app-name}"/>
<zipfileset dir="${extra-dir}" prefix="${app-name}/extra"/>
</zip>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>