This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
build.xml
70 lines (53 loc) · 2.23 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
<?xml version="1.0"?>
<!--
Build.xml
Description: Ant script used to fetch and unzip dependent data from ArcGIS Online
Requirements: Internet connectivity, Java JRE, Ant
-->
<project name="DataDownloadAndConfiguration" basedir="." default="config">
<!-- templatehome = military-feature-toolbox -->
<property name="dir.datadir" value="./" />
<target name="config" depends="get_data">
<echo message="Gets All Dependent Data used by this template" />
</target>
<!-- Create necessary folder structure (Github will not create empty folders) -->
<target name="make_dirs">
<echo message="No need to makedirs, unzip makes entire data folder" />
</target>
<!-- Get All Dependent Data -->
<target name="get_data">
<!-- Get Dependent Data from ArcGIS Online -->
<get src="http://www.arcgis.com/sharing/content/items/3a18f91b34d14a5aa72aa67f32c97497/data"
dest="${dir.datadir}/military_feature_toolbox_testdata.zip"
verbose="true"
usetimestamp="true"/>
<!-- Unzip Data Directory -->
<unzip src="${dir.datadir}/military_feature_toolbox_testdata.zip"
dest="${dir.datadir}">
</unzip>
<!-- Get Dependent Data from Github Repo -->
<!-- We may need to add a check for the existing zip here, since the
Date/Timestamp check doesn't seem to happen correctly for the Gtihub zips
(resulting in it getting downloaded each time) -->
<get src="https://github.com/Esri/military-features-data/archive/master.zip"
dest="${dir.datadir}/military-features-data-master.zip"
verbose="true"
usetimestamp="true" />
<unzip src="${dir.datadir}/military-features-data-master.zip"
dest="${dir.datadir}">
</unzip>
<copy todir="${dir.datadir}/data" overwrite="true">
<fileset dir="${dir.datadir}/military-features-data-master/data"/>
</copy>
</target>
<!-- Delete All Data Folders and Datasets -->
<!-- Normally only for testing from a clean configuration -->
<target name="clean">
<delete dir="${dir.datadir}/data" />
<echo message="Warning: deleting data dirs (only do this if you mean it)" />
<echo message="Deleting path: ${dir.datadir}/data" />
</target>
<target name="test">
<echo message="Test" />
</target>
</project>