forked from pentaho/pentaho-vertica-bulkloader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
188 lines (160 loc) · 6.71 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<project name="VerticaBulkLoader" default="default" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
<description>
VerticaBulkLoader plugin build file
</description>
<tstamp prefix="start"/>
<import file="build-res/subfloor-pkg.xml" />
<property name="basedir"
value="."
description="Base directory for all project artifacts (jar, zip, tar.gz, etc...)" />
<property name="dist.dir"
value="${basedir}/dist"
description="Dist dir"/>
<property name="bin.dir"
value="${basedir}/bin"
description="Base directory for all non-dist build output" />
<property name="lib.provided.dir" value="lib-provided" description="Ivy dependencies of 'provided' configuration are placed here"/>
<property name ="subfloor.resources.dir"
value ='${basedir}/.build'/>
<property name="antcontrib.build.cache.dir"
value="${subfloor.resources.dir}/ant-contrib"
description="Directory where the Ant-Contrib jar (and dependencies) is placed after it is auto-downloaded by the build" />
<property name="subfloor.tmp.dir"
value = "${subfloor.resources.dir}/tmp"/>
<property name="ivy.url"
value="http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.2.0/ivy-2.2.0.jar"
description="The URL to the current release of Apache IVY" />
<property name="ivy.settingsurl"
value="file:${basedir}/ivysettings.xml"
description="URL to the (common) ivysettings.xml. This file is required by the build to configure IVY. Note you must escape the ':' if this property exists in a .properties file" />
<property name="ivyfile"
value="ivy.xml"
description="The name of the IVY xml file defining your project's dependencies" />
<property name="ivy.artifact.group"
value="mycompanyname"
description="IVY metadata describing the originating company or organization" />
<property name="ivy.artifact.pomfile"
value="${dist.dir}/pom.xml"
description="The path to the Maven pom file to deploy with the artifact" />
<property name="ivy.artifact.ivyfilename"
value="ivy.xml"
description="The name of the IVY xml file to deploy with the artifact" />
<property name="ivy.artifact.ivypathname"
value="${dist.dir}/ivy.xml"
description="The full path to the IVY xml file to deploy with the artifact" />
<property name="ivy.reports.dir"
value="${bin.dir}/reports/ivy"
description="Base directory that holds all IVY dependency report files" />
<property name="ivy.configs" value="*" description="Set of configs used for IVY reporting and checking operations" />
<property file="override.properties"/>
<property file="build.properties"
description="Properties customized for your particular project belong in this file." />
<!-- system properties to use -->
<property name= "cr" value="${line.separator}"/>
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="lib" location="lib"/>
<property name="testlib" location="test-lib"/>
<property name="dist" location="dist"/>
<property name="libext.dir" location="${basedir}/libext"/>
<!-- Setup the compile classpath -->
<path id="classpath">
<fileset dir="${devlib.dir}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${lib.provided.dir}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${libext.dir}">
<include name="**/*.jar" />
</fileset>
</path>
<!-- Setup the classpath used for testing to include the provided jars -->
<path id="test.classpath">
<fileset dir="${lib.dir}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${lib.provided.dir}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${testlib.dir}">
<include name="**/*.jar" />
</fileset>
<pathelement path="${testclasses.dir}" />
<pathelement path="${classes.dir}" />
</path>
<target name="clean-jars" depends="subfloor.clean-jars">
<delete dir="${lib.provided.dir}"/>
</target>
<!-- ==========================
Copy additional files
==========================
-->
<target name="copy" depends="compile" description="copy images etc to classes directory" >
<echo>Copying images etc to classes directory...</echo>
<copy todir="${classes.dir}">
<fileset
dir="${src}"
includes="**/*.png,**/*.xml,**/*.properties"/>
</copy>
</target>
<!--
==========================
deploy to Kettle
==========================
-->
<target name="deploy" depends="dist" description="Deploy distribution..." >
<echo>deploying plugin...</echo>
<copy todir="${deploydir1}">
<fileset
dir="${distrib}"
includes="**/*.*"/>
<fileset
dir="${libext.dir}"
includes="**/*.*"/>
</copy>
<copy todir="${deploydir2}">
<fileset
dir="${distrib}"
includes="**/*.*"/>
<fileset
dir="${libext.dir}"
includes="**/*.*"/>
</copy>
</target>
<!--
==========================
Default target: all
==========================
-->
<target name="default" depends="deploy" description="default = build all"/>
<!-- Resolve provided dependencies to a separate directory -->
<target name="resolve-default" depends="subfloor.resolve-default">
<ivy:resolve file="${ivyfile}" conf="provided" />
<ivy:retrieve conf="provided" pattern="${lib.provided.dir}/[module]-[revision](-[classifier]).[ext]" symlink="${ivy.use.symlinks.internal}" />
</target>
<!-- Override assemble.copy-libs to put our jar in the root of the package -->
<target name="assemble.copy-libs">
<copy todir="${approot.stage.dir}/lib">
<fileset dir="${lib.dir}" />
</copy>
<copy todir="${approot.stage.dir}">
<fileset file="${dist.dir}/${ivy.artifact.id}-${project.revision}.jar" />
</copy>
</target>
<target name="assemble" depends="assemble.init,assemble.copy-libs">
<copy todir="${approot.stage.dir}" overwrite="true">
<fileset dir="${package.resdir}" excludes=".gitignore"/>
</copy>
<chmod perm="a+x" dir="${stage.dir}" includes="**/*.sh" />
<if>
<available file="bin/stage/${ivy.artifact.id}/version.xml" />
<then>
<replace file="bin/stage/${ivy.artifact.id}/version.xml" token="@TRUNK@" value="${project.revision}" />
</then>
</if>
</target>
</project>