-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
108 lines (85 loc) · 3.74 KB
/
build.xml
File metadata and controls
108 lines (85 loc) · 3.74 KB
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<!--
/**
* © Copyright IBM Corporation 2014.
* This is licensed under the following license.
* The Eclipse Public 1.0 License (http://www.eclipse.org/legal/epl-v10.html)
* U.S. Government Users Restricted Rights: Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
*/
-->
<project name="NodeREDdeployplugin" default="main" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
<dirname property="com.ibm.rational.raf.deploy.plugin.build.project" file="${ant.file.com.ibm.rational.raf.deploy.plugin}" />
<dirname property="workspace" file="${com.ibm.rational.raf.deploy.plugin.build.project}" />
<!-- assumes the build.properties is set via the command line ANT invocation -->
<property name="build.properties" value="build.properties" />
<property file="${workspace}/builder/ant-common/${build.properties}" />
<!-- bring in common_build_tokens filterset -->
<property name="DISPLAY_VERSION" value="dev" />
<tstamp>
<format property="TODAY_X" pattern="yyMMdd" locale="en" />
</tstamp>
<property name="project" value="" />
<property name="deployPluginArchiveName" value="releases/Node-RED-UCD-v${DISPLAY_VERSION}.zip" />
<property name="src.dir" value="${basedir}/src" />
<property name="build.dir" value="${basedir}/build" />
<property name="plugin.dir" value="${basedir}/plugin" />
<property name="license.dir" value="${basedir}/license" />
<property name="doc.dir" value="${basedir}/doc" />
<property name="lib.dir" value="${basedir}/lib" />
<target name="main" depends="clean, resolve, build, dist" />
<!-- Copy in the dependencies -->
<target name="build" depends="resolve">
<!-- inputs (info, upgrade) -->
<copy todir="${build.dir}">
<fileset dir="${plugin.dir}">
<include name="info.xml" />
<include name="upgrade.xml" />
<include name="plugin.xml" />
</fileset>
<fileset dir="${src.dir}">
</fileset>
</copy>
<mkdir dir="${build.dir}/license"/>
<!-- copy license -->
<copy todir="${build.dir}/license">
<fileset dir="${license.dir}">
<include name="EPL.txt" />
</fileset>
</copy>
<mkdir dir="${build.dir}/doc"/>
<!-- copy doc -->
<copy todir="${build.dir}/doc">
<fileset dir="${doc.dir}">
<include name="HowTo.html" />
</fileset>
</copy>
<!-- Copy Libaries -->
<mkdir dir="${build.dir}/lib"/>
<copy todir="${build.dir}/lib">
<fileset dir="${lib.dir}">
<exclude name="**javadoc.jar" />
<exclude name="**sources.jar" />
</fileset>
</copy>
</target>
<!-- Build the actual zip file that gets uploaded to uDeploy -->
<target name="dist" depends="resolve">
<zip destfile="${deployPluginArchiveName}" basedir="${build.dir}" update="false"/>
</target>
<!-- Clean up the build directory -->
<target name="clean">
<delete dir="build" />
<mkdir dir="build" />
<delete file="${deployPluginArchiveName}" />
</target>
<target name="resolve" depends="install-ivy" unless="resolve.no" description="Resolve all dependencies">
<mkdir dir="${lib.dir}"/>
<ivy:retrieve conf="default" pattern="${lib.dir}/[artifact]-[revision](-[classifier]).[ext]"/>
</target>
<!-- Install Ivy -->
<available classname="org.apache.ivy.Main" property="ivy.installed"/>
<target name="install-ivy" description="Install ivy" unless="ivy.installed">
<mkdir dir="${user.home}/.ant/lib"/>
<get dest="${user.home}/.ant/lib/ivy.jar" src="http://search.maven.org/remotecontent?filepath=org/apache/ivy/ivy/2.3.0/ivy-2.3.0.jar"/>
<fail message="Ivy has been installed. Run the build again"/>
</target>
</project>