forked from rticommunity/dds-rpc-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
175 lines (157 loc) · 6.04 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
<?xml version="1.0"?>
<!--
Copyright 2014, Object Management Group, Inc.
Copyright 2014, Real-Time Innovations, Inc.
All rights reserved.
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.
-->
<project name="omg-dds-rpc" default="package-all">
<!-- Initialize variables used by multiple targets -->
<target name="init">
<property name="src.dir" value="src" />
<property name="class.dir" value="class" />
<property name="example.dir" value="example" />
<property name="lib.dir" value="lib" />
<property name="jar.file" value="${lib.dir}/omg-dds-rpc-java.jar" />
<property name="src.zipfile" value="${lib.dir}/omg-dds-rpc-java-src.zip" />
<property name="omgdds.jar.path" value="../datadistrib4j/trunk/lib" />
</target>
<!-- Remove files from staging areas -->
<target name="clean" depends="init">
<delete dir="${class.dir}" />
<delete dir="${lib.dir}" />
</target>
<!-- Build jar file of compiled sources -->
<target name="build-jar" depends="init">
<fail message="Can't find omgdds.jar at ${omgdds.jar.path}">
<condition>
<not>
<resourcecount count="1">
<fileset id="omgdds" dir="${omgdds.jar.path}" includes="omgdds.jar"/>
</resourcecount>
</not>
</condition>
</fail>
<!-- Clean destination directory -->
<delete dir="${class.dir}" />
<mkdir dir="${class.dir}" />
<path id="external.classpath">
<pathelement location="${omgdds.jar.path}/omgdds.jar"/>
</path>
<!-- Compile Java sources -->
<javac fork="yes"
compiler="javac1.5"
source="1.5"
target="1.5"
debug="false"
deprecation="true"
optimize="true"
srcdir="${src.dir}"
destdir="${class.dir}"
excludes="**/CVS/*"
classpath="${src.dir}"
includeantruntime="false">
<classpath>
<path refid="external.classpath" />
</classpath>
</javac>
<!-- Include license and copyright information -->
<copy todir="${class.dir}">
<fileset dir=".">
<include name="LICENSE" />
<include name="NOTICE" />
</fileset>
</copy>
<!-- Create JAR file -->
<mkdir dir="${lib.dir}" />
<jar basedir="${class.dir}"
destfile="${jar.file}"
/>
</target>
<!-- Build jar file of compiled sources -->
<target name="build-example" depends="build-jar">
<delete dir="${example.dir}/class" />
<mkdir dir="${example.dir}/class" />
<path id="external.classpath">
<pathelement location="${omgdds.jar.path}/omgdds.jar"/>
<pathelement location="${jar.file}"/>
</path>
<!-- Compile Java sources -->
<javac fork="yes"
compiler="javac1.5"
source="1.5"
target="1.5"
debug="false"
deprecation="true"
optimize="true"
srcdir="${example.dir}"
destdir="${example.dir}/class"
excludes="**/CVS/*"
classpath="${example.dir}"
includeantruntime="false">
<classpath>
<path refid="external.classpath" />
</classpath>
</javac>
</target>
<!-- Build zip file of Eclipse project source -->
<target name="zip-source" depends="init">
<property name="staging.dir" value="${class.dir}/omg-dds-rpc-java" />
<property name="javadoc.dir" value="${staging.dir}/doc" />
<!-- Clean destination directory -->
<delete dir="${class.dir}" />
<mkdir dir="${staging.dir}"/>
<!-- Copy stuff we're going to zip -->
<copy todir="${staging.dir}">
<fileset dir=".">
<include name="LICENSE" />
<include name="NOTICE" />
<include name="${src.dir}/**/*.java"/>
<include name="build.xml" />
<!--include name=".classpath" /-->
<include name=".externalToolBuilders" />
<!--include name=".project" /-->
<include name=".settings" />
</fileset>
</copy>
<!-- Build JavaDoc -->
<!--javadoc sourcepath="${src.dir}"
destdir="${javadoc.dir}"
windowtitle="OMG RPC over DDS"
version="true"
use="true"
overview="${src.dir}/overview.html"
failonerror="true">
<doctitle><![CDATA[
<h1>OMG RPC over DDS<br/>
API Specification</h1>
]]></doctitle>
<bottom><![CDATA[
<p align="left"><small>
Copyright © 2014 Real-Time Innovations, Inc. (RTI)<br/>
Copyright © 2014 Object Management Group, Inc. (OMG)<br/>
All Rights Reserved.
</small></p>
]]></bottom>
</javadoc-->
<!-- Zip it -->
<mkdir dir="${lib.dir}" />
<zip basedir="${class.dir}"
includes="omg-dds-rpc-java/**"
destfile="${src.zipfile}"
duplicate="fail"
whenempty="fail"
/>
</target>
<!-- Build jar and zip files -->
<!--target name="package-all" depends="build-jar, zip-source" /-->
<target name="package-all" depends="build-example" />
</project>