forked from NASAWorldWind/WorldWindJava
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release-build.macros.xml
136 lines (125 loc) · 6.97 KB
/
release-build.macros.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
<!--
~ Copyright 2006-2009, 2017, 2020 United States Government, as represented by the
~ Administrator of the National Aeronautics and Space Administration.
~ All rights reserved.
~
~ The NASA World Wind Java (WWJ) platform is licensed under the Apache License,
~ Version 2.0 (the "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software distributed
~ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
~ CONDITIONS OF ANY KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations under the License.
~
~ NASA World Wind Java (WWJ) also contains the following 3rd party Open Source
~ software:
~
~ Jackson Parser – Licensed under Apache 2.0
~ GDAL – Licensed under MIT
~ JOGL – Licensed under Berkeley Software Distribution (BSD)
~ Gluegen – Licensed under Berkeley Software Distribution (BSD)
~
~ A complete listing of 3rd Party software notices and licenses included in
~ NASA World Wind Java (WWJ) can be found in the WorldWindJava-v2.2 3rd-party
~ notices and licenses PDF found in code directory.
-->
<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, all class files under the package com.zebraimaging, and optionally all
class files under the package org.codehaus.jackson (depending on the worldwind.exclude.jackson property).
The zebraimaging package includes an alternative input handler for the Zebra Imaging display controller. The
jackson package includes the Jackson JSON parsing library which is used by gov.nasa.worldwind.formats.geojson.
Requires 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="jogl-all.jar gluegen-rt.jar gdal.jar"/>
</manifest>
<fileset dir="@{classdir}">
<include name="gov/nasa/worldwind/**/*.class"/>
<include name="com/zebraimaging/**/*.class"/>
<include name="org/codehaus/jackson/**/*.class" unless="${worldwind.exclude.jackson}"/>
<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="org/codehaus/jackson/**/*.java" if="@{debug}"
unless="${worldwind.exclude.jackson}"/>
<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>