-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.xml
88 lines (77 loc) · 4.44 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<?xml version="1.0" encoding="UTF-8"?>
<project name="Constellation Adaptors" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
<description>Builds the Constellation Adaptors module suite</description>
<import file="nbproject/build-impl.xml"/>
<property name="ivy.jar.file" value="${user.home}/.ivy2/ivy-2.5.0.jar"/>
<property name="dependency.dir" value="AdaptorsDependencies"/>
<property name="help.deploy.dir" value="dist/constellation/constellation"/>
<property name="help.docs.dir" value="**/docs"/>
<property name="help.docs.resources.dir" value="**/docs/resources"/>
<property name="help.type.md" value="**.md"/>
<property name="help.type.png" value="**.png"/>
<property name="help.type.jpg" value="**.jpg"/>
<property name="help.bootstrap.dir" value="bootstrap/**"/>
<property name="help.toc.file" value="toc.md"/>
<target name="update-dependencies-clean-build"
description="Download dependencies and build all modules in the suite.">
<ant target="clean"/>
<ant target="build">
<property name="update.dependencies" value="true"/>
<property name="ivy.lib.dir" value="${basedir}/${dependency.dir}/release/modules/ext"/>
<property name="projectupdater.dir" value="${basedir}/../constellation/ProjectUpdater/"/>
</ant>
</target>
<target name="update-dependencies-clean-build-no-debug"
description="Download dependencies and build all modules in the suite and exclude debugging.">
<ant target="clean"/>
<ant target="build">
<property name="update.dependencies" value="true"/>
<property name="ivy.lib.dir" value="${basedir}/${dependency.dir}/release/modules/ext"/>
<property name="build.compiler.debug" value="false"/>
<property name="projectupdater.dir" value="${basedir}/../constellation/ProjectUpdater/"/>
</ant>
</target>
<!-- Unzips the release from build-zip and places relevant help resources for deployment and rezips -->
<target name="build-zip-with-help" depends="build-zip" description="Deploy help files for release">
<unzip src="${basedir}/dist/constellation.zip" dest="${basedir}/dist"/>
<copy todir="${help.deploy.dir}" overwrite="true" includeEmptyDirs="false">
<fileset dir="${basedir}">
<include name="${help.toc.file}"/>
<include name="${help.bootstrap.dir}"/>
<include name="${help.docs.dir}/${help.type.md}"/>
<include name="${help.docs.dir}/${help.type.png}"/>
<include name="${help.docs.dir}/${help.type.jpg}"/>
<include name="${help.docs.resources.dir}/${help.type.md}"/>
<include name="${help.docs.resources.dir}/${help.type.png}"/>
<include name="${help.docs.resources.dir}/${help.type.jpg}"/>
<exclude name="docs/**"/>
<exclude name="**/build/**"/>
<exclude name="${help.deploy.dir}/**"/>
</fileset>
</copy>
<zip destfile="${basedir}/dist/constellation.zip" basedir="${basedir}/dist/constellation"/>
<delete dir="${basedir}/dist/constellation" failonerror="false"/>
</target>
<!-- Useful Dependency Utilities -->
<target name="check-latest-version" depends="-load-ivy-tasks"
description="Check whether there is a new release of a dependency.">
<ivy:checkdepsupdate showTransitive="false" revisionToCheck="latest.release"/>
</target>
<target name="dependency-tree" depends="-load-ivy-tasks"
description="Output the dependencies in a tree layout to the console.">
<ivy:dependencytree/>
</target>
<target name="dependency-report-html" depends="-load-ivy-tasks"
description="Generate a detailed dependency report">
<delete dir="./ivy-reports"/>
<mkdir dir="./ivy-reports" />
<ivy:report todir="./ivy-reports" graph="false" xml="false"/>
</target>
<target name="-load-ivy-tasks">
<path id="ivy.lib.path">
<pathelement location="${ivy.jar.file}"/>
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
<ivy:resolve file="./${dependency.dir}/src/ivy.xml" />
</target>
</project>