forked from WorldWindEarth/WorldWindJava
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.macros.xml
More file actions
109 lines (98 loc) · 5.36 KB
/
Copy pathbuild.macros.xml
File metadata and controls
109 lines (98 loc) · 5.36 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
108
109
<!--
~ Copyright (C) 2016 United States Government as represented by the Administrator of the
~ National Aeronautics and Space Administration.
~ All Rights Reserved.
-->
<project name="worldwind.macros" basedir=".">
<!-- Macros for compiling Java sources.
The javac attributes 'source' and 'target' are configured by the property worldwind.jdk.version in order to
explicitly define the Java compiler version. Without these attributes javac uses the latest compiler available
on the current machine, resulting in unpredictable class versions.
The javac compiler argument '-Xlint:unchecked' is specified in order to give more detail for unchecked
conversion warnings. This argument is specified in the WorldWind Java IntelliJ IDEA project. Its use here
keeps ANT compiled classes in sync with the IntelliJ IDEA compiled classes. -->
<macrodef name="compileJava">
<attribute name="srcdir"/>
<attribute name="classdir"/>
<attribute name="debug"/>
<attribute name="jdk"/>
<element name="pathelements"/>
<sequential>
<javac srcdir="@{srcdir}"
destdir="@{classdir}"
source="@{jdk}"
target="@{jdk}"
debug="@{debug}"
encoding="UTF-8"
fork="true"
includeantruntime="false"
memoryMaximumSize="512m">
<classpath>
<pathelements/>
</classpath>
<compilerarg value="-Xlint:unchecked"/>
</javac>
</sequential>
</macrodef>
<!-- Macros for bundling library JAR files.
The WorldWind core JAR file includes all class files, property files, configuration files, and image files
under the package gov.nasa.worldwind and all class files under the package com.zebraimaging.
The zebraimaging package includes an alternative input handler for the Zebra Imaging display controller.
Requires jackson-core-asl.jar, jogl-all.jar, gluegen-rt.jar, gdal.jar on the class path.
The WorldWind extensions JAR file includes all class files, configuration files, image files, and data
resource files under the package gov.nasa.worldwindx. Requires the WorldWind core JAR file on the class path.
All JAR files have the Permissions attribute set to "all-permissions". This attribute is ignored for locally
launched applications, but is required for signed Web Start Applications. This property must match the setting
specified in the JNLP file used to launch the application.
See http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/manifest.html#permissions -->
<macrodef name="bundleJarFiles">
<attribute name="srcdir"/>
<attribute name="classdir"/>
<attribute name="destdir"/>
<attribute name="debug"/>
<sequential>
<jar jarfile="@{destdir}/worldwind.jar">
<manifest>
<attribute name="Permissions" value="all-permissions"/>
<attribute name="Class-Path" value="jackson-core-asl.jar jogl-all.jar gluegen-rt.jar gdal.jar"/>
</manifest>
<fileset dir="@{classdir}">
<include name="gov/nasa/worldwind/**/*.class"/>
<include name="com/zebraimaging/**/*.class"/>
<type type="file"/>
</fileset>
<fileset dir="@{srcdir}">
<include name="gov/nasa/worldwind/**/*.java" if="@{debug}"/>
<include name="gov/nasa/worldwind/util/**/*.properties"/>
<include name="com/zebraimaging/**/*.java" if="@{debug}"/>
<include name="config/**"/>
<include name="images/**"/>
<type type="file"/>
</fileset>
</jar>
<jar jarfile="@{destdir}/worldwindx.jar">
<manifest>
<attribute name="Class-Path" value="worldwind.jar"/>
<attribute name="Main-Class" value="gov.nasa.worldwindx.examples.ApplicationTemplate"/>
<attribute name="Permissions" value="all-permissions"/>
</manifest>
<fileset dir="@{classdir}">
<include name="gov/nasa/worldwindx/**/*.class"/>
<type type="file"/>
</fileset>
<fileset dir="@{srcdir}">
<include name="gov/nasa/worldwindx/**/*.java" if="@{debug}"/>
<include name="gov/nasa/worldwindx/applications/sar/*.html"/>
<include name="gov/nasa/worldwindx/applications/sar/config/**"/>
<include name="gov/nasa/worldwindx/applications/sar/data/**"/>
<include name="gov/nasa/worldwindx/applications/sar/images/**"/>
<include name="gov/nasa/worldwindx/applications/worldwindow/config/**"/>
<include name="gov/nasa/worldwindx/applications/worldwindow/images/**"/>
<include name="gov/nasa/worldwindx/examples/data/**"/>
<include name="gov/nasa/worldwindx/examples/images/**"/>
<type type="file"/>
</fileset>
</jar>
</sequential>
</macrodef>
</project>