/[volute]/trunk/projects/dm/vo-dml-org/build_java.xml
ViewVC logotype

Contents of /trunk/projects/dm/vo-dml-org/build_java.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4146 - (show annotations)
Tue Jul 11 08:52:16 2017 UTC (3 years ago) by lmichel
File MIME type: text/xml
File size: 6301 byte(s)
Old folder renamed. Should be removed soon
1 <!--
2 build_java.xml file : specific targets for java code
3 -->
4 <target name="init.jaxb" >
5 <fail unless="jaxb.dir" message="Must specify jaxb.dir in build .properties before JAXB can be used"/>
6 <fileset id="jaxbfiles" dir="${jaxb.dir}" >
7
8 <!-- JAXB 2.2.3 reference implementation -->
9 <include name="jaxb-api.jar" />
10 <include name="jaxb-impl.jar" />
11 <!-- XJC includes (xml) catalog resolver : com.sun.org.apache.xml.internal.resolver -->
12 <include name="jaxb-xjc.jar" />
13 <!-- JAXB 2.2 RI dependencies -->
14 <include name="activation.jar" />
15 <include name="jsr173_1.0_api.jar" />
16 </fileset>
17 <taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask" >
18 <classpath>
19 <fileset dir="${jaxb.dir}" includes="*.jar" />
20 </classpath>
21 </taskdef>
22 </target>
23 <!-- libraries for base module -->
24
25
26 <path id="ext.class.path">
27 <fileset refid="jaxbfiles"/>
28 <fileset refid="jarfiles"/>
29 </path>
30
31
32 <path id="src.class.path">
33 <fileset refid="jarfiles"/>
34 <fileset refid="jaxbfiles"/>
35 <pathelement location="${build}/${build.jaxb.jar}"/>
36 </path>
37
38 <path id="gen.class.path">
39 <fileset refid="jarfiles"/>
40 <fileset refid="jaxbfiles"/>
41 <pathelement location="${build}/${build.jaxb.jar}"/>
42 <pathelement location="${build}/${build.src.jar}"/>
43 </path>
44
45
46 <!-- targets -->
47
48
49 <!-- target cleanJava : clean build files -->
50 <target name="cleanJava" >
51 <echo>cleaning directory : ${build} ...</echo>
52
53 <delete includeemptydirs="true" verbose="true">
54 <fileset dir="${build}">
55 <exclude name="README.txt" />
56 </fileset>
57 </delete>
58
59 <echo>cleaned directory : ${build} : done.</echo>
60 </target>
61
62 <!-- compiles java files and jar them and compiles MetaModel generated by JAXB 2.1 -->
63 <target name="compile" depends="cleanJava,init.jaxb">
64 <echo>compile VO-URP infrastructure support classes ...</echo>
65 <echo>compile from : ${sources}</echo>
66 <echo>compile to : ${build.src}</echo>
67 <echo> </echo>
68 <echo> </echo>
69 <echo> </echo>
70 <echo> NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE</echo>
71 <echo> NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE</echo>
72 <echo>Before building infrastructure, move generated classes from ivoa model to java/src !!!</echo>
73 <echo> NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE</echo>
74 <echo> NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE</echo>
75 <echo> </echo>
76 <echo> </echo>
77
78 <mkdir dir="${build}"/>
79 <mkdir dir="${build.jaxb}" />
80
81 <javac sourcepath="" srcdir="${jaxb}" destdir="${build.jaxb}" listfiles="false"
82 fork="true" verbose="false" encoding="UTF-8"
83 debug="on" deprecation="on" optimize="on" casesensitive="true"
84 source="1.6" target="1.6"
85 includeantruntime="false" >
86 <compilerarg value="-Djava.endorsed.dirs=${jaxb.dir}"/>
87 <classpath refid="ext.class.path" />
88
89 <include name="**/*.java"/>
90 </javac>
91
92 <!-- delete spurious package-info.class files generated in wrong directory by javacc -->
93 <delete includeemptydirs="true" verbose="false">
94 <fileset dir="${build.jaxb}">
95 <include name="src/**" />
96 </fileset>
97 </delete>
98
99 <jar jarfile="${build}/${build.jaxb.jar}" compress="true" roundup="true">
100 <fileset dir="${build.jaxb}" >
101 <exclude name="src/**"/>
102 </fileset>
103 </jar>
104
105 <mkdir dir="${build.src}"/>
106 <javac sourcepath="" srcdir="${sources}" destdir="${build.src}" listfiles="false"
107 fork="true" verbose="false" encoding="UTF-8"
108 debug="on" deprecation="on" optimize="on" casesensitive="true"
109 source="1.6" target="1.6"
110 includeantruntime="false" >
111
112 <classpath refid="src.class.path" />
113
114 <include name="**/*.java"/>
115 </javac>
116
117
118 <jar jarfile="${build}/vo-dml.src.jar" compress="true" roundup="true">
119 <fileset dir="${build.src}" />
120 </jar>
121
122 <echo>compile VO-URP infrastructure support classes : done.</echo>
123 </target>
124
125
126
127 <!-- Compile generated java files -->
128 <target name="compileOutput" depends="init.jaxb">
129 <echo>compile from : ${java.gen}/src</echo>
130 <echo>compile to : ${build.gen}</echo>
131
132 <mkdir dir="${build.gen}"/>
133
134 <javac sourcepath="" srcdir="${java.gen}/src" destdir="${build.gen}" listfiles="false"
135 fork="true" verbose="false" encoding="UTF-8"
136 debug="on" deprecation="on" optimize="on" casesensitive="true"
137 source="1.6" target="1.6"
138 includeantruntime="false" >
139
140 <classpath refid="gen.class.path" />
141
142 <include name="**/*.java"/>
143 </javac>
144
145
146 <jar jarfile="${build}/${build.gen.jar}" compress="true" roundup="true">
147 <fileset dir="${build.gen}" />
148 <fileset file="${mapping.file}" />
149 </jar>
150
151 </target>
152
153
154 <target name="interpretVOTable">
155
156 <java classname="org.ivoa.vodml.mapping.Main">
157 <classpath>
158 <pathelement path="${classpath}"/>
159 <fileset refid="jarfiles"/>
160 <fileset refid="jaxbfiles"/>
161 <fileset dir="${build}" includes="*.jar" />
162 </classpath>
163 <arg value="${in}"/>
164 <arg value="${mapping.file}"/>
165 <arg value="${in}.DM-I.xml"/>
166 <arg value="${mode}"/>
167 </java>
168 </target>
169
170
171 <target name="xjc-vo-dml_xsd" depends="init.jaxb">
172 <xjc schema="${xsd}/vo-dml-v1.0.xsd" destdir="${jaxb}/src" package="org.ivoa.vodml.jaxb"/>
173 </target>
174
175 <target name="xjc-other" depends="init.jaxb">
176 <xjc schema="${xsd}/vo-dml.mapping.xsd" destdir="${jaxb}/src" package="org.ivoa.vodml.mapping.jaxb"/>
177 <xjc schema="${xsd}/vo-dml-instance.xsd" destdir="${jaxb}/src" package="org.ivoa.vodml.instance.jaxb"
178 extension="true" binding="${jaxb}/vodmli_xjcConfig.xml"/>
179 <xjc schema="${xsd}/ext/VOTable-1.3_vodml.xsd" destdir="${jaxb}/ext-src" package="org.ivoa.votable.jaxb"
180 extension="true" binding="${jaxb}/votable_xjcConfig.xml"/>
181
182 </target>
183
184 <target name="xjc-reg" depends="init.jaxb">
185 <xjc schema="${xsd}/ext/vosi-v1.xml" destdir="${jaxb}/ext-src" package="org.ivoa.registry.jaxb"
186 extension="true"/><!-- binding="${jaxb}/vosi_xjcConfig.xml"/> -->
187 </target>
188
189
190 <!-- end of build_java.xml -->
191
192 &buildJalopy;
193

Properties

Name Value
svn:mime-type text/xml

msdemlei@ari.uni-heidelberg.de
ViewVC Help
Powered by ViewVC 1.1.26