Antwrap 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +69 -0
- data/LICENSE +201 -0
- data/Manifest.txt +16 -0
- data/README.txt +344 -0
- data/Rakefile +85 -0
- data/lib/ant_project.rb +124 -116
- data/lib/ant_task.rb +111 -103
- data/lib/antwrap.rb +28 -19
- data/lib/antwrap_utilities.rb +34 -26
- data/lib/jruby_modules.rb +28 -20
- data/lib/rjb_modules.rb +28 -20
- metadata +60 -64
- data/COPYING +0 -504
- data/README +0 -15
- data/test/antwrap_test.rb +0 -256
- data/test/build.xml +0 -15
- data/test/output/META-INF/MANIFEST.MF +0 -3
- data/test/output/parent/FooBarParent.class +0 -0
- data/test/test-resources/build.xml +0 -340
- data/test/test-resources/foo.txt +0 -0
- data/test/test-resources/foo.zip +0 -0
- data/test/test-resources/parent-src/parent/FooBarParent.java +0 -19
- data/test/test-resources/parent.jar +0 -0
- data/test/test-resources/src/foo/bar/FooBar.java +0 -26
- data/test/test-resources/src/foo/bar/baz/FooBarBaz.java +0 -7
data/README
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
# antwrap
|
2
|
-
#
|
3
|
-
# Copyright Caleb Powell 2007
|
4
|
-
# Licensed under the LGPL, see the file COPYING in the distribution
|
5
|
-
#
|
6
|
-
|
7
|
-
https://rubyforge.org/projects/antwrap/
|
8
|
-
|
9
|
-
Please see the docs/index.html file for usage instructions.
|
10
|
-
|
11
|
-
Questions?
|
12
|
-
Contact: caleb.powell@gmail.com
|
13
|
-
|
14
|
-
|
15
|
-
|
data/test/antwrap_test.rb
DELETED
@@ -1,256 +0,0 @@
|
|
1
|
-
# antwrap
|
2
|
-
#
|
3
|
-
# Copyright Caleb Powell 2007
|
4
|
-
#
|
5
|
-
# Licensed under the LGPL, see the file COPYING in the distribution
|
6
|
-
#
|
7
|
-
|
8
|
-
require 'test/unit'
|
9
|
-
require 'fileutils'
|
10
|
-
$LOAD_PATH.push(FileUtils::pwd + '/lib')
|
11
|
-
require 'antwrap'
|
12
|
-
require 'logger'
|
13
|
-
|
14
|
-
class AntwrapTest < Test::Unit::TestCase
|
15
|
-
|
16
|
-
def setup
|
17
|
-
@output_dir = FileUtils::pwd + File::SEPARATOR + 'test' + File::SEPARATOR + 'output'
|
18
|
-
@resource_dir = FileUtils::pwd + File::SEPARATOR + 'test' + File::SEPARATOR + 'test-resources'
|
19
|
-
|
20
|
-
@ant_home = @resource_dir + File::SEPARATOR + "apache-ant-1.7.0"
|
21
|
-
# @ant_home = "/Users/caleb/tools/apache-ant-1.6.5"
|
22
|
-
# @ant_home = "/Users/caleb/tools/apache-ant-1.5.4"
|
23
|
-
@ant_proj_props = {:name=>"testProject", :basedir=>FileUtils::pwd, :declarative=>true,
|
24
|
-
:logger=>Logger.new(STDOUT), :loglevel=>Logger::DEBUG, :ant_home => @ant_home}
|
25
|
-
@ant = AntProject.new(@ant_proj_props)
|
26
|
-
|
27
|
-
if File.exists?(@output_dir)
|
28
|
-
FileUtils.remove_dir(@output_dir)
|
29
|
-
end
|
30
|
-
FileUtils.mkdir(@output_dir, :mode => 0775)
|
31
|
-
end
|
32
|
-
|
33
|
-
def test_antproject_init
|
34
|
-
@ant_proj_props = {:name=>"testProject", :declarative=>true,
|
35
|
-
:logger=>Logger.new(STDOUT), :loglevel=>Logger::ERROR}
|
36
|
-
ant_proj = AntProject.new(@ant_proj_props)
|
37
|
-
assert(@ant_proj_props[:name] == ant_proj.name())
|
38
|
-
# assert(FileUtils::pwd == ant_proj.basedir())
|
39
|
-
assert(@ant_proj_props[:declarative] == ant_proj.declarative())
|
40
|
-
assert(@ant_proj_props[:logger] == ant_proj.logger())
|
41
|
-
end
|
42
|
-
|
43
|
-
def test_unzip_task
|
44
|
-
assert_absent @output_dir + '/parent/FooBarParent.class'
|
45
|
-
@ant.unzip(:src => @resource_dir + '/parent.jar', :dest => @output_dir)
|
46
|
-
assert_exists @output_dir + '/parent/FooBarParent.class'
|
47
|
-
end
|
48
|
-
|
49
|
-
def test_copyanddelete_task
|
50
|
-
file = @output_dir + '/foo.txt'
|
51
|
-
assert_absent file
|
52
|
-
@ant.copy(:file => @resource_dir + '/foo.txt',
|
53
|
-
:todir => @output_dir)
|
54
|
-
assert_exists file
|
55
|
-
|
56
|
-
@ant.delete(:file => file)
|
57
|
-
assert_absent file
|
58
|
-
end
|
59
|
-
|
60
|
-
def test_javac_task
|
61
|
-
FileUtils.mkdir(@output_dir + '/classes', :mode => 0775)
|
62
|
-
|
63
|
-
assert_absent @output_dir + '/classes/foo/bar/FooBar.class'
|
64
|
-
|
65
|
-
@ant.javac(:srcdir => @resource_dir + '/src',
|
66
|
-
:destdir => @output_dir + '/classes',
|
67
|
-
:debug => 'on',
|
68
|
-
:verbose => 'no',
|
69
|
-
:fork => 'no',
|
70
|
-
:failonerror => 'yes',
|
71
|
-
:includes => 'foo/bar/**',
|
72
|
-
:excludes => 'foo/bar/baz/**',
|
73
|
-
:classpath => @resource_dir + '/parent.jar')
|
74
|
-
|
75
|
-
assert_exists @output_dir + '/classes/foo/bar/FooBar.class'
|
76
|
-
assert_absent @output_dir + '/classes/foo/bar/baz/FooBarBaz.class'
|
77
|
-
end
|
78
|
-
|
79
|
-
def test_javac_task_with_property
|
80
|
-
FileUtils.mkdir(@output_dir + '/classes', :mode => 0775)
|
81
|
-
|
82
|
-
assert_absent @output_dir + '/classes/foo/bar/FooBar.class'
|
83
|
-
@ant.property(:name => 'pattern', :value => '**/*.jar')
|
84
|
-
@ant.property(:name => 'resource_dir', :value => @resource_dir)
|
85
|
-
@ant.path(:id => 'common.class.path'){
|
86
|
-
@ant.fileset(:dir => '${resource_dir}'){
|
87
|
-
@ant.include(:name => '${pattern}')
|
88
|
-
}
|
89
|
-
}
|
90
|
-
puts "Resource dir: #{@resource_dir}"
|
91
|
-
@ant.javac(:srcdir => @resource_dir + '/src',
|
92
|
-
:destdir => @output_dir + '/classes',
|
93
|
-
:debug => true,
|
94
|
-
:verbose => true,
|
95
|
-
:fork => 'no',
|
96
|
-
:failonerror => 'blahblahblah',
|
97
|
-
:includes => 'foo/bar/**',
|
98
|
-
:excludes => 'foo/bar/baz/**',
|
99
|
-
:classpathref => 'common.class.path')
|
100
|
-
|
101
|
-
assert_exists @output_dir + '/classes/foo/bar/FooBar.class'
|
102
|
-
assert_absent @output_dir + '/classes/foo/bar/baz/FooBarBaz.class'
|
103
|
-
end
|
104
|
-
|
105
|
-
def test_jar_task
|
106
|
-
assert_absent @output_dir + '/Foo.jar'
|
107
|
-
@ant.property(:name => 'outputdir', :value => @output_dir)
|
108
|
-
@ant.property(:name => 'destfile', :value => '${outputdir}/Foo.jar')
|
109
|
-
@ant.jar( :destfile => "${destfile}",
|
110
|
-
:basedir => @resource_dir + '/src',
|
111
|
-
:duplicate => 'preserve')
|
112
|
-
|
113
|
-
assert_exists @output_dir + '/Foo.jar'
|
114
|
-
end
|
115
|
-
|
116
|
-
def test_java_task
|
117
|
-
|
118
|
-
return if @ant.ant_version < 1.7
|
119
|
-
puts "executing java task"
|
120
|
-
FileUtils.mkdir(@output_dir + '/classes', :mode => 0775)
|
121
|
-
@ant.javac(:srcdir => @resource_dir + '/src',
|
122
|
-
:destdir => @output_dir + '/classes',
|
123
|
-
:debug => 'on',
|
124
|
-
:verbose => 'no',
|
125
|
-
:fork => 'no',
|
126
|
-
:failonerror => 'yes',
|
127
|
-
:includes => 'foo/bar/**',
|
128
|
-
:excludes => 'foo/bar/baz/**',
|
129
|
-
:classpath => @resource_dir + '/parent.jar')
|
130
|
-
|
131
|
-
@ant.property(:name => 'output_dir', :value => @output_dir)
|
132
|
-
@ant.property(:name => 'resource_dir', :value =>@resource_dir)
|
133
|
-
@ant.java(:classname => 'foo.bar.FooBar', :fork => 'false') {|ant|
|
134
|
-
ant.arg(:value => 'argOne')
|
135
|
-
ant.classpath(){
|
136
|
-
ant.pathelement(:location => '${output_dir}/classes')
|
137
|
-
ant.pathelement(:location => '${resource_dir}/parent.jar')
|
138
|
-
}
|
139
|
-
ant.arg(:value => 'argTwo')
|
140
|
-
ant.jvmarg(:value => 'client')
|
141
|
-
ant.sysproperty(:key=> 'antwrap', :value => 'coolio')
|
142
|
-
}
|
143
|
-
end
|
144
|
-
|
145
|
-
def test_echo_task
|
146
|
-
msg = "Antwrap is running an Echo task"
|
147
|
-
@ant.echo(:message => msg, :level => 'info')
|
148
|
-
@ant.echo(:message => 100000, :level => 'info')
|
149
|
-
@ant.echo(:pcdata => 1000)
|
150
|
-
end
|
151
|
-
|
152
|
-
def test_mkdir_task
|
153
|
-
dir = @output_dir + '/foo'
|
154
|
-
|
155
|
-
assert_absent dir
|
156
|
-
|
157
|
-
@ant.mkdir(:dir => dir)
|
158
|
-
|
159
|
-
assert_exists dir
|
160
|
-
end
|
161
|
-
|
162
|
-
def test_mkdir_task_with_property
|
163
|
-
dir = @output_dir + '/foo'
|
164
|
-
|
165
|
-
assert_absent dir
|
166
|
-
|
167
|
-
@ant.property(:name => 'outputProperty', :value => dir)
|
168
|
-
@ant.mkdir(:dir => "${outputProperty}")
|
169
|
-
|
170
|
-
assert_exists dir
|
171
|
-
end
|
172
|
-
|
173
|
-
def test_macrodef_task
|
174
|
-
|
175
|
-
return if @ant.ant_version < 1.6
|
176
|
-
|
177
|
-
dir = @output_dir + '/foo'
|
178
|
-
|
179
|
-
assert_absent dir
|
180
|
-
|
181
|
-
@ant.macrodef(:name => 'testmacrodef'){|ant|
|
182
|
-
ant.attribute(:name => 'destination')
|
183
|
-
ant.sequential(){
|
184
|
-
ant.echo(:message => "Creating @{destination}")
|
185
|
-
ant._mkdir(:dir => "@{destination}")
|
186
|
-
}
|
187
|
-
}
|
188
|
-
@ant.testmacrodef(:destination => dir)
|
189
|
-
assert_exists dir
|
190
|
-
end
|
191
|
-
|
192
|
-
def test_cdata
|
193
|
-
@ant.echo(:pcdata => "Foobar & <><><>")
|
194
|
-
end
|
195
|
-
|
196
|
-
def test_ant_contrib
|
197
|
-
|
198
|
-
return if @ant.ant_version() < 1.6
|
199
|
-
|
200
|
-
@ant.taskdef(:resource => "net/sf/antcontrib/antlib.xml")
|
201
|
-
|
202
|
-
@ant.property(:name => "bar", :value => "bar")
|
203
|
-
@ant._if(){|ant|
|
204
|
-
ant._equals(:arg1 => "${bar}", :arg2 => "bar")
|
205
|
-
ant._then(){
|
206
|
-
ant.echo(:message => "if 1 is equal")
|
207
|
-
}
|
208
|
-
ant._else(){
|
209
|
-
ant.echo(:message => "if 1 is not equal")
|
210
|
-
}
|
211
|
-
}
|
212
|
-
|
213
|
-
@ant.property(:name => "baz", :value => "foo")
|
214
|
-
@ant._if(){|ant|
|
215
|
-
ant._equals(:arg1 => "${baz}", :arg2 => "bar")
|
216
|
-
ant._then(){
|
217
|
-
ant.echo(:message => "if 2 is equal")
|
218
|
-
}
|
219
|
-
ant._else(){
|
220
|
-
ant.echo(:message => "if 2 is not equal")
|
221
|
-
}
|
222
|
-
}
|
223
|
-
|
224
|
-
end
|
225
|
-
|
226
|
-
def test_tstamp
|
227
|
-
@ant.tstamp
|
228
|
-
end
|
229
|
-
|
230
|
-
def test_array_argument
|
231
|
-
begin
|
232
|
-
@ant.echo(:message => ['This', 'should', 'fail', 'because', 'Arrays', 'are', 'not', 'supported'])
|
233
|
-
add_failure "Arrays not permitted"
|
234
|
-
rescue ArgumentError
|
235
|
-
end
|
236
|
-
end
|
237
|
-
|
238
|
-
def test_declarative
|
239
|
-
@ant = AntProject.new({:declarative=>false,:loglevel=>Logger::DEBUG, :ant_home => @ant_home})
|
240
|
-
echo = @ant.echo(:message => "Echo")
|
241
|
-
assert_not_nil(echo)
|
242
|
-
|
243
|
-
@ant = AntProject.new({:declarative=>true,:loglevel=>Logger::DEBUG, :ant_home => @ant_home})
|
244
|
-
echo = @ant.echo(:message => "Echo")
|
245
|
-
assert_nil(echo)
|
246
|
-
end
|
247
|
-
|
248
|
-
private
|
249
|
-
def assert_exists(file_path)
|
250
|
-
assert(File.exists?(file_path), "Does not exist[#{file_path}]")
|
251
|
-
end
|
252
|
-
|
253
|
-
def assert_absent(file_path)
|
254
|
-
assert(!File.exists?(file_path), "Should not exist[#{file_path}]")
|
255
|
-
end
|
256
|
-
end
|
data/test/build.xml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
<project name="antwrap" default="run-java" basedir=".">
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
<target name="run-java" description="Antwrap: run a trivial Java class">
|
6
|
-
<java classpath="output/classes:test-resources/parent.jar" classname="foo.bar.FooBar" fork="true">
|
7
|
-
<jvmarg value="-Dantwrap=coolio"/>
|
8
|
-
<arg value="argOne"/>
|
9
|
-
<arg value="argTwo"/>
|
10
|
-
</java>
|
11
|
-
</target>
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
</project>
|
Binary file
|
@@ -1,340 +0,0 @@
|
|
1
|
-
<project name="kidsspace" default="compile" basedir=".">
|
2
|
-
|
3
|
-
|
4
|
-
<property name="common.dir" value="/Users/caleb/projects/svn/common"/>
|
5
|
-
<property name="common.classes" value="${common.dir}/classes"/>
|
6
|
-
<property name="common.lib.dir" value="${common.dir}/lib"/>
|
7
|
-
<property name="output.dir" value="gen-output"/>
|
8
|
-
<property name="outputjar" value="kidsspace.jar"/>
|
9
|
-
<property name="distro.dir" value="distro"/>
|
10
|
-
<property name="manifest.file" value="MANIFEST.MF"/>
|
11
|
-
<property name="file" value=""/>
|
12
|
-
<property name="build.compiler" value="javac1.4"/>
|
13
|
-
|
14
|
-
|
15
|
-
<patternset id="common.jars">
|
16
|
-
<include name="standard.jar"/>
|
17
|
-
<include name="jstl.jar"/>
|
18
|
-
<include name="mail.jar"/>
|
19
|
-
<include name="ojdbc14.jar"/>
|
20
|
-
<include name="ssce.jar"/>
|
21
|
-
<include name="ultrasearch_query.jar"/>
|
22
|
-
<include name="xercesImpl.jar"/>
|
23
|
-
<include name="xml-apis.jar"/>
|
24
|
-
<include name="log4j-1.2.13.jar"/>
|
25
|
-
</patternset>
|
26
|
-
|
27
|
-
<target name="init">
|
28
|
-
<mkdir dir="classes"/>
|
29
|
-
<mkdir dir="lib"/>
|
30
|
-
</target>
|
31
|
-
|
32
|
-
<target name="clean">
|
33
|
-
<delete dir="classes" failonerror="false"/>
|
34
|
-
<delete dir="${distro.dir}"/>
|
35
|
-
<delete file="${outputjar}"/>
|
36
|
-
<delete file="${output.dir}"/>
|
37
|
-
</target>
|
38
|
-
|
39
|
-
<path id="common.class.path">
|
40
|
-
<fileset dir="${common.dir}/lib">
|
41
|
-
<include name="**/*.jar"/>
|
42
|
-
</fileset>
|
43
|
-
<pathelement location="${common.classes}"/>
|
44
|
-
</path>
|
45
|
-
|
46
|
-
<path id="kidsspace.class.path">
|
47
|
-
<pathelement location="classes"/>
|
48
|
-
<pathelement location="config"/>
|
49
|
-
</path>
|
50
|
-
|
51
|
-
<path id="testing.class.path">
|
52
|
-
<pathelement location="test/testresources"/>
|
53
|
-
<pathelement location="${common.dir}/test/testresources"/>
|
54
|
-
</path>
|
55
|
-
|
56
|
-
<target name="compile.common">
|
57
|
-
<ant dir="${common.dir}" target="compile"/>
|
58
|
-
</target>
|
59
|
-
|
60
|
-
<target name="compile" depends="clean, init, compile.common">
|
61
|
-
<javac verbose="no" srcdir="src" destdir="classes" classpathref="common.class.path"/>
|
62
|
-
</target>
|
63
|
-
|
64
|
-
<target name="compile-tests" depends="compile">
|
65
|
-
|
66
|
-
<javac srcdir="test" destdir="classes">
|
67
|
-
<classpath refid="common.class.path"/>
|
68
|
-
<classpath refid="kidsspace.class.path"/>
|
69
|
-
</javac>
|
70
|
-
<ant dir="${common.dir}" target="compile-tests"/>
|
71
|
-
</target>
|
72
|
-
|
73
|
-
<target name="manifest" unless="manfist.generated">
|
74
|
-
<tstamp/>
|
75
|
-
<manifest file="${manifest.file}">
|
76
|
-
<attribute name="Built-By" value="${user.name}"/>
|
77
|
-
<attribute name="Built-On" value="${TODAY}"/>
|
78
|
-
</manifest>
|
79
|
-
<property name="manfist.generated" value="true"/>
|
80
|
-
</target>
|
81
|
-
|
82
|
-
<target name="make-jar" depends="compile, manifest">
|
83
|
-
<jar destfile="${outputjar}">
|
84
|
-
<fileset dir="classes" excludes="**/*Test.class"/>
|
85
|
-
<fileset dir="${common.classes}"/>
|
86
|
-
</jar>
|
87
|
-
</target>
|
88
|
-
|
89
|
-
<target name="distro">
|
90
|
-
<mkdir dir="${distro.dir}"/>
|
91
|
-
</target>
|
92
|
-
|
93
|
-
<target name="scientist-distro" depends="clean, distro, make-jar">
|
94
|
-
<tstamp/>
|
95
|
-
<copy file="scripts/runScientistDBConverter.sh" todir="${distro.dir}" overwrite="true"/>
|
96
|
-
<copy file="config/log4j.properties" todir="${distro.dir}" overwrite="true"/>
|
97
|
-
<copy file="config/kidsspace/development.db.properties" tofile="${distro.dir}/db.properties" overwrite="true"/>
|
98
|
-
<copy todir="${distro.dir}/lib" overwrite="true">
|
99
|
-
<fileset dir="${common.lib.dir}">
|
100
|
-
<include name="log4j-1.2.13.jar"/>
|
101
|
-
<include name="ojdbc14.jar"/>
|
102
|
-
</fileset>
|
103
|
-
</copy>
|
104
|
-
<copy todir="${distro.dir}" overwrite="true">
|
105
|
-
<fileset dir="sql">
|
106
|
-
<include name="SciInv*.csv"/>
|
107
|
-
</fileset>
|
108
|
-
</copy>
|
109
|
-
<copy file="${outputjar}" todir="${distro.dir}/lib" overwrite="true"/>
|
110
|
-
<zip destfile="scientistconverter.zip">
|
111
|
-
<zipfileset dir="${distro.dir}" prefix="scientistconverter"/>
|
112
|
-
</zip>
|
113
|
-
<antcall target="clean"/>
|
114
|
-
</target>
|
115
|
-
|
116
|
-
|
117
|
-
<target name="proddistro" depends="webdistro, distro">
|
118
|
-
<copy tofile="${distro.dir}/WEB-INF/web.xml" file="config/kidsspace/production.web.xml"/>
|
119
|
-
<copy tofile="${distro.dir}/WEB-INF/spellchecker.properties"
|
120
|
-
file="config/kidsspace/production.spellchecker.properties"/>
|
121
|
-
</target>
|
122
|
-
|
123
|
-
<target name="devdistro" depends="webdistro, distro">
|
124
|
-
<copy tofile="${distro.dir}/WEB-INF/web.xml" file="config/kidsspace/development.web.xml"/>
|
125
|
-
<copy tofile="${distro.dir}/WEB-INF/spellchecker.properties"
|
126
|
-
file="config/kidsspace/development.spellchecker.properties"/>
|
127
|
-
</target>
|
128
|
-
|
129
|
-
<target name="webdistro" depends="clean, make-jar, distro">
|
130
|
-
|
131
|
-
<mkdir dir="${distro.dir}/WEB-INF/lib"/>
|
132
|
-
<copy overwrite="true" todir="${distro.dir}/WEB-INF/lib">
|
133
|
-
<fileset dir="${common.lib.dir}">
|
134
|
-
<patternset refid="common.jars"/>
|
135
|
-
</fileset>
|
136
|
-
<fileset file="${outputjar}"/>
|
137
|
-
</copy>
|
138
|
-
|
139
|
-
<mkdir dir="${distro.dir}/WEB-INF/lex"/>
|
140
|
-
<copy overwrite="true" todir="${distro.dir}/WEB-INF/lex">
|
141
|
-
<fileset dir="config/kidsspace/lex/">
|
142
|
-
<include name="*.tlx"/>
|
143
|
-
<include name="*.clx"/>
|
144
|
-
</fileset>
|
145
|
-
</copy>
|
146
|
-
|
147
|
-
</target>
|
148
|
-
|
149
|
-
<target name="scientist-conversion-development"
|
150
|
-
description="Inserts data from the specified csv files into the development database">
|
151
|
-
<property name="database.properties" value="config/kidsspace/development.db.properties"/>
|
152
|
-
<antcall target="scientist-conversion"/>
|
153
|
-
</target>
|
154
|
-
|
155
|
-
<target name="scientist-conversion-production"
|
156
|
-
description="Inserts data from the specified csv files into the production database">
|
157
|
-
<property name="database.properties" value="config/kidsspace/production.db.properties"/>
|
158
|
-
<antcall target="scientist-conversion"/>
|
159
|
-
</target>
|
160
|
-
|
161
|
-
<target name="scientist-conversion" depends="compile" if="database.properties"
|
162
|
-
description="Inserts data from the specified csv files into the database. Cannot be run in isolation. The 'database.properties' property must be set.">
|
163
|
-
<java classname="com.zincroe.kidsspace.util.ScientistInventorDBConverter" fork="true">
|
164
|
-
<classpath refid="common.class.path"/>
|
165
|
-
<classpath refid="kidsspace.class.path"/>
|
166
|
-
<jvmarg value="-Dlog4j.configuration=log4j.properties"/>
|
167
|
-
<arg value="books=sql/SciInvBooks.csv"/>
|
168
|
-
<arg value="bios=sql/SciInvAuthors.csv"/>
|
169
|
-
<arg value="fields=sql/SciInvFields.csv"/>
|
170
|
-
<arg value="dbprops=${database.properties}"/>
|
171
|
-
<arg value="audience=Children"/>
|
172
|
-
</java>
|
173
|
-
</target>
|
174
|
-
|
175
|
-
<target name="alltests" depends="compile-tests">
|
176
|
-
<junit printsummary="yes" haltonfailure="no">
|
177
|
-
<classpath refid="common.class.path"/>
|
178
|
-
<classpath refid="kidsspace.class.path"/>
|
179
|
-
<classpath refid="testing.class.path"/>
|
180
|
-
|
181
|
-
|
182
|
-
<batchtest fork="yes">
|
183
|
-
<fileset dir="test">
|
184
|
-
<include name="**/*Test*.java"/>
|
185
|
-
</fileset>
|
186
|
-
<fileset dir="${common.dir}/test">
|
187
|
-
<include name="**/*Test*.java"/>
|
188
|
-
</fileset>
|
189
|
-
</batchtest>
|
190
|
-
</junit>
|
191
|
-
</target>
|
192
|
-
|
193
|
-
<target name="upload-dev-server" depends="devdistro">
|
194
|
-
<ftp server="tpltst01.tpl.toronto.on.ca" userid="root" password=";vwebinfra;"
|
195
|
-
remotedir="/opt/bea3/user_projects/zincroe/ksDomain/applications/kidsEAR/kidsWEB"
|
196
|
-
verbose="no" action="send" passive="yes">
|
197
|
-
<fileset dir="${distro.dir}"/>
|
198
|
-
</ftp>
|
199
|
-
</target>
|
200
|
-
|
201
|
-
<target name="upload-prod-server" depends="proddistro">
|
202
|
-
<!-- Production webapp runs in a cluster so we need to upload to 2 machines -->
|
203
|
-
<ftp server="tplapp01.tpl.toronto.on.ca" userid="weblogic" password="password"
|
204
|
-
remotedir="/u01/bea/applications/tpldomain/kidsspace/kidsWEB"
|
205
|
-
verbose="no" action="send" passive="yes">
|
206
|
-
<fileset dir="${distro.dir}"/>
|
207
|
-
</ftp>
|
208
|
-
<ftp server="tplapp02.tpl.toronto.on.ca" userid="weblogic" password="password"
|
209
|
-
remotedir="/u01/bea/applications/tpldomain/kidsspace/kidsWEB"
|
210
|
-
verbose="yes" action="send" passive="yes">
|
211
|
-
<fileset dir="${distro.dir}"/>
|
212
|
-
</ftp>
|
213
|
-
</target>
|
214
|
-
|
215
|
-
<target name="gen-dev-pf" depends="clean, compile">
|
216
|
-
<mkdir dir="${output.dir}"/>
|
217
|
-
<java classname="com.zincroe.kidsspace.data.KidsSpaceCategoryFetcher"
|
218
|
-
fork="true" failonerror="true">
|
219
|
-
<classpath refid="common.class.path"/>
|
220
|
-
<classpath refid="kidsspace.class.path"/>
|
221
|
-
<jvmarg value="-Xdebug" />
|
222
|
-
<jvmarg value="-Xnoagent"/>
|
223
|
-
<jvmarg value="-Djava.compiler=NONE"/>
|
224
|
-
<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"/>
|
225
|
-
<jvmarg value="-DlogLevel=#{$debuglevel}"/>
|
226
|
-
<jvmarg value="-Dtemplate.scheme=master"/>
|
227
|
-
<jvmarg value="-Ddisplay.hidden=true"/>
|
228
|
-
<!--<jvmarg value="-Dinteractive"/>-->
|
229
|
-
<jvmarg value="-Drun.mode=development"/>
|
230
|
-
<jvmarg value="-Dvelocity.props=config/kidsspace/velocity.properties"/>
|
231
|
-
<jvmarg value="-Xms512m"/>
|
232
|
-
<jvmarg value="-Xmx1024m"/>
|
233
|
-
<jvmarg value="-Dlog4j.configuration=log4j.properties" />
|
234
|
-
<arg value="${output.dir}"/>
|
235
|
-
<arg value="${basedir}/images"/>
|
236
|
-
<arg value="${basedir}/config/kidsspace/development.db.properties"/>
|
237
|
-
</java>
|
238
|
-
</target>
|
239
|
-
<target name="gen-prod-pf" depends="clean, compile">
|
240
|
-
<mkdir dir="${output.dir}"/>
|
241
|
-
<java classname="com.zincroe.kidsspace.data.KidsSpaceCategoryFetcher"
|
242
|
-
fork="true" failonerror="true">
|
243
|
-
<classpath refid="common.class.path"/>
|
244
|
-
<classpath refid="kidsspace.class.path"/>
|
245
|
-
<jvmarg value="-Xdebug" />
|
246
|
-
<jvmarg value="-Xnoagent" />
|
247
|
-
<jvmarg value="-Djava.compiler=NONE" />
|
248
|
-
<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005" />
|
249
|
-
<jvmarg value="-DlogLevel=debug" />
|
250
|
-
<jvmarg value="-Ddisplay.hidden=true" />
|
251
|
-
<jvmarg value="-Dtemplate.scheme=master"/>
|
252
|
-
<jvmarg value="-Dinteractive" />
|
253
|
-
<jvmarg value="-Dvelocity.props=config/kidsspace/velocity.properties" />
|
254
|
-
<jvmarg value="-Xms512m" />
|
255
|
-
<jvmarg value="-Xmx1024m" />
|
256
|
-
<jvmarg value="-Dlog4j.configuration=log4j.properties" />
|
257
|
-
|
258
|
-
<arg value="${output.dir}"/>
|
259
|
-
<arg value="${basedir}/images"/>
|
260
|
-
<arg value="${basedir}/config/kidsspace/production.db.properties"/>
|
261
|
-
</java>
|
262
|
-
</target>
|
263
|
-
|
264
|
-
<target name="upload-dev-jar" depends="make-jar">
|
265
|
-
<upload-jar-OHQ/>
|
266
|
-
<telnet.and.copy.jar destination="/u01/bea/collagebin/kidslib/development"/>
|
267
|
-
</target>
|
268
|
-
|
269
|
-
<target name="upload-prod-jar" depends="make-jar">
|
270
|
-
<upload-jar-OHQ/>
|
271
|
-
<telnet.and.copy.jar destination="/u01/bea/collagebin/kidslib/production"/>
|
272
|
-
</target>
|
273
|
-
|
274
|
-
<target name="upload">
|
275
|
-
<upload-jar-OHQ jarfile="${file}" />
|
276
|
-
</target>
|
277
|
-
|
278
|
-
<macrodef name="upload-jar-OHQ">
|
279
|
-
<attribute name="jarfile" default="${outputjar}"/>
|
280
|
-
<attribute name="remotedir" default="/u01/OHQ"/>
|
281
|
-
<attribute name="server" default="tpltst01.tpl.toronto.on.ca"/>
|
282
|
-
<attribute name="userid" default="zincroe"/>
|
283
|
-
<attribute name="password" default="z1ncr0e"/>
|
284
|
-
|
285
|
-
<sequential>
|
286
|
-
<ftp server="@{server}" userid="@{userid}" password="@{password}"
|
287
|
-
remotedir="@{remotedir}"
|
288
|
-
verbose="yes" action="send" passive="yes">
|
289
|
-
<fileset file="@{jarfile}"/>
|
290
|
-
</ftp>
|
291
|
-
</sequential>
|
292
|
-
</macrodef>
|
293
|
-
|
294
|
-
<macrodef name="telnet.and.copy.jar">
|
295
|
-
<attribute name="jarfile" default="${outputjar}"/>
|
296
|
-
<attribute name="destination"/>
|
297
|
-
<attribute name="server" default="tplapp10.tpl.toronto.on.ca"/>
|
298
|
-
<attribute name="userid" default="root"/>
|
299
|
-
<attribute name="password" default=";vwebinfra;"/>
|
300
|
-
<sequential>
|
301
|
-
<telnet server="@{server}" userid="@{userid}" password="@{password}">
|
302
|
-
<read>#</read>
|
303
|
-
<write>cp /u01/OHQ/@{jarfile} @{destination}</write>
|
304
|
-
<read>#</read>
|
305
|
-
<write>exit</write>
|
306
|
-
</telnet>
|
307
|
-
</sequential>
|
308
|
-
</macrodef>
|
309
|
-
|
310
|
-
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
|
311
|
-
<target name="ant-contrib">
|
312
|
-
<if>
|
313
|
-
<equals arg1="bar" arg2="bar" />
|
314
|
-
<then>
|
315
|
-
<echo message="if 1 is equal" />
|
316
|
-
</then>
|
317
|
-
<else>
|
318
|
-
<echo message="if 1 is not equal" />
|
319
|
-
</else>
|
320
|
-
</if>
|
321
|
-
<if>
|
322
|
-
<equals arg1="${foo}" arg2="bar" />
|
323
|
-
<then>
|
324
|
-
<echo message="if 2 is equal" />
|
325
|
-
</then>
|
326
|
-
|
327
|
-
<elseif>
|
328
|
-
<equals arg1="foo" arg2="foo" />
|
329
|
-
<then>
|
330
|
-
<echo message="if 2.1 is equal" />
|
331
|
-
</then>
|
332
|
-
</elseif>
|
333
|
-
<else>
|
334
|
-
<echo message="The value of property foo is not 'foo' or 'bar'" />
|
335
|
-
</else>
|
336
|
-
</if>
|
337
|
-
|
338
|
-
</target>
|
339
|
-
|
340
|
-
</project>
|