-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.xml
50 lines (45 loc) · 1.93 KB
/
build.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
<?xml version="1.0" encoding="UTF-8"?>
<project name="Package" basedir="." default="zip">
<basename property="prj.name" file="${basedir}" />
<property name="prj.zip-name" value="../${prj.name}.zip"/>
<target name="clean" description="Remove all downloaded files">
<delete includeEmptyDirs="true" defaultexcludes="false" quiet="true">
<!-- NPM -->
<fileset dir="JavaScript/node_modules" />
<!-- Maven -->
<fileset dir="Java/target" />
<!-- Eclipse files -->
<fileset dir="Java/.settings" />
<fileset dir="Java" includes=".*" />
<!-- Generated dependencies -->
<fileset dir="Java/lib" />
</delete>
</target>
<target name="rewrite" description="Rewrite Eclipse classpath">
<replace file="Java/.classpath" token="M2_REPO" value="lib" />
<replace file="Java/.classpath" token='kind="var"' value='kind="lib"' />
</target>
<target name="zip" description="Create package">
<delete file="${prj.zip-name}" />
<zip destfile="${prj.zip-name}">
<zipfileset dir="." prefix="${prj.name}">
<!-- ignore build script -->
<exclude name="build.bat" />
<exclude name="build.sh" />
<exclude name="build.xml" />
<exclude name="**/*.bak" />
<!-- ignore classes -->
<exclude name="Java/target/" />
<!-- ignore git -->
<exclude name=".git" />
<exclude name="**/.gitignore" />
<!-- ignore idea -->
<exclude name="**/.idea/" />
<exclude name="**/*.iml" />
<!-- ignore JavaScript build outputs -->
<exclude name="JavaScript/coverage/" />
<exclude name="JavaScript/.nyc_output/" />
</zipfileset>
</zip>
</target>
</project>