/[volute]/trunk/projects/theory/snapdm/build.xml
ViewVC logotype

Diff of /trunk/projects/theory/snapdm/build.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 188 by gerard.lemson, Thu Apr 3 16:43:45 2008 UTC revision 189 by bourges.laurent, Wed Apr 9 16:18:25 2008 UTC
# Line 30  Line 30 
30    <property name="snap_source_intermediate" value="SNAP_Simulation_DM_INTERMEDIATE.xml" />    <property name="snap_source_intermediate" value="SNAP_Simulation_DM_INTERMEDIATE.xml" />
31    <property name="out_schema" value="SNAP-xmi.xsd" />    <property name="out_schema" value="SNAP-xmi.xsd" />
32    <property name="out_xhtml" value="SNAP-xsd.html" />    <property name="out_xhtml" value="SNAP-xsd.html" />
     
         <!-- schema genertation parameters -->  
         <property name="schemalocation_root" value="http://volute.googlecode.com/svn/trunk/projects/theory/snapdm/xsd/"/>  
   <property name="target_rootdirectory" location="./output"/>  
   <property name="targetnamespace_root" value="http://www.ivoa.net/xml/SNAP/v0.1"/>  
33    
34                    
35    <!-- paths -->    <!-- paths -->
# Line 52  Line 47 
47    <property name="sources.gen" location="${outputJava}/src"/>    <property name="sources.gen" location="${outputJava}/src"/>
48        
49    <property name="sources.gen.docs" location="${outputJava}/doc"/>    <property name="sources.gen.docs" location="${outputJava}/doc"/>
50      <property name="sources.gen.dist" location="${outputJava}/dist"/>
51    
52        
53    <property name="libs" location="./libs"/>    <property name="libs" location="./libs"/>
54        
55      <property name="dist" location="./dist"/>
56      
57      
58    <!-- compile Sources -->    <!-- compile Sources -->
59    <property name="build" location="./build"/>    <property name="build" location="./build"/>
60    <property name="build.src" location="${build}/src"/>    <property name="build.src" location="${build}/src"/>
# Line 69  Line 69 
69    </path>    </path>
70        
71    <path id="infrastructure.class.path">    <path id="infrastructure.class.path">
72      <pathelement location="${root}/${build.file}"/>      <pathelement location="${dist}/${build.file}"/>
73    </path>    </path>
74        
75        
# Line 77  Line 77 
77    <property name="root_package" value="org.ivoa"/>                  <property name="root_package" value="org.ivoa"/>              
78    <property name="model_package" value="org.ivoa.dm.model"/>                <property name="model_package" value="org.ivoa.dm.model"/>            
79        
80            <!-- schema generation parameters -->
81            <property name="schemalocation_root" value="http://volute.googlecode.com/svn/trunk/projects/theory/snapdm/xsd/"/>
82      <property name="target_rootdirectory" location="./output"/>
83      <property name="targetnamespace_root" value="http://www.ivoa.net/xml/SNAP/v0.1"/>
84    
85      
86      <!-- checks if input & xslt are modified compare to intermediate document -->
87      <uptodate property="intermediate.notRequired">
88        <srcfiles dir= "${input}" includes="${snap_source}"/>
89        <srcfiles dir= "${res}" includes="xmiCheck.xsl"/>
90        <srcfiles dir= "${res}" includes="xmiFilter.xsl"/>
91        <srcfiles dir= "${res}" includes="xmi2intermediate.xsl"/>
92        <mapper type="merge" to="${output}/${snap_source_intermediate}"/>
93      </uptodate>  
94    
95      <!-- checks if input & xslt are modified compare to intermediate document -->
96      <uptodate property="java.notRequired">
97        <srcfiles dir= "${output}" includes="${snap_source_intermediate}"/>
98        <srcfiles dir= "${res}" includes="intermediate2java.xsl"/>
99        <mapper type="merge" to="${sources.gen.dist}/${build.gen.file}"/>
100      </uptodate>  
101        
102    
103        
104        
105    <!-- presets -->    <!-- presets -->
# Line 86  Line 108 
108    <presetdef name="xslt2">    <presetdef name="xslt2">
109      <!-- The processor=SaxonLiaison setting causes our custom XSLTLiaison class to be used. -->      <!-- The processor=SaxonLiaison setting causes our custom XSLTLiaison class to be used. -->
110      <!-- This works around bug #41314: http://issues.apache.org/bugzilla/show_bug.cgi?id=41314 -->      <!-- This works around bug #41314: http://issues.apache.org/bugzilla/show_bug.cgi?id=41314 -->
111      <xslt classpath="${libs}/saxon9.jar:${libs}/anthack/" processor="SaxonLiaison">      <xslt force="true" classpath="${libs}/saxon9.jar:${libs}/anthack/" processor="SaxonLiaison">
112        <outputproperty name="{http://saxon.sf.net/}indent-spaces" value="2" />        <outputproperty name="{http://saxon.sf.net/}indent-spaces" value="2" />
113      </xslt>      </xslt>
114            
# Line 105  Line 127 
127            
128      <echo>-------------------------------------------------------------------------------</echo>      <echo>-------------------------------------------------------------------------------</echo>
129      <echo>  ${vendor} </echo>      <echo>  ${vendor} </echo>
130      <echo>  ${title} - ${version} </echo>      <echo>  ${projectTitle} - ${version} </echo>
131      <echo>-------------------------------------------------------------------------------</echo>      <echo>-------------------------------------------------------------------------------</echo>
132      <echo> Build File </echo>      <echo> Build File </echo>
133      <echo>-------------------------------------------------------------------------------</echo>      <echo>-------------------------------------------------------------------------------</echo>
134      <echo> contacts    : ${build.by}  </echo>      <echo> contacts    : ${build.by}  </echo>
135      <echo> build date : ${build.date} </echo>      <echo> build date  : ${build.date} </echo>
136      <echo>-------------------------------------------------------------------------------</echo>      <echo>-------------------------------------------------------------------------------</echo>
137    </target>      </target>  
138        
# Line 138  Line 160 
160        
161    <!-- target cleanOutput : clean output java files -->    <!-- target cleanOutput : clean output java files -->
162    <target name="cleanOutput">    <target name="cleanOutput">
     <delete verbose="true">  
       <fileset dir="${root}" includes="*.log"/>  
     </delete>  
163            
164      <echo>cleaning directory : ${outputJava} ...</echo>      <echo>cleaning directory : ${outputJava} ...</echo>
165            
# Line 150  Line 169 
169      </delete>      </delete>
170            
171      <echo>cleaned directory : ${outputJava} : done.</echo>      <echo>cleaned directory : ${outputJava} : done.</echo>
       
     <mkdir dir="${sources.gen}/"/>  
172    </target>    </target>
173        
174        
# Line 166  Line 183 
183        
184    
185        
186      
187    <target name="processSnap">    <target name="processSnap">
188      <property name="source" value="${snap_source}" />      <property name="source" value="${snap_source}" />
     <ant target="checkSource">  
       <property name="source_checked" value="${snap_source_checked}" />  
     </ant>        
       
189      <property name="source_filtered" value="${snap_source_filtered}" />      <property name="source_filtered" value="${snap_source_filtered}" />
190            
191      <ant target="filterSource" />      <ant target="processXMI2Intermediate" />
     <ant target="run_xmi2intermediate" />  
192    
 <!--  
193      <ant target="run_intermediate2xsd" />      <ant target="run_intermediate2xsd" />
194      <ant target="genXHTML" />      <ant target="genXHTML" />
  -->      
195            
196      <ant target="run_intermediate2java"/>      <ant target="processIntermediate2Java"/>
         <ant target="compileOutput" />  
     <ant target="makeJavaDoc" />  
197    </target>    </target>
198        
199        
200        
201        
202      <target name="processXMI2Intermediate" unless="intermediate.notRequired">
203        <ant target="checkSource">
204          <property name="source_checked" value="${snap_source_checked}" />
205        </ant>      
206        <ant target="filterSource" />
207        <ant target="run_xmi2intermediate" />
208      </target>
209    
210      
211      
212      
213      <target name="processIntermediate2Java" unless="java.notRequired">
214        <ant target="run_intermediate2java"/>
215            <ant target="makeOutput" />
216      </target>
217    
218      
219      
220      
221    <target name="run_xmi2intermediate">    <target name="run_xmi2intermediate">
222      <ant target="xmi2intermediate">      <ant target="xmi2intermediate">
223        <property name="source" value="${snap_source_filtered}" />        <property name="source" value="${snap_source_filtered}" />
# Line 203  Line 231 
231    <target name="run_intermediate2java">    <target name="run_intermediate2java">
232      <echo>run_intermediate2java : starting filter on file ${output}/${source}</echo>      <echo>run_intermediate2java : starting filter on file ${output}/${source}</echo>
233            
234      <xslt2 force="true" reloadstylesheet="true"      <mkdir dir="${sources.gen}/"/>
235            in="${output}/${snap_source_intermediate}"      
236            out="${sources.gen}/javagen.log"      <xslt2 in="${output}/${snap_source_intermediate}"
237            style="${res}/intermediate2java.xsl">             out="${sources.gen}/javagen.log"
238               style="${res}/intermediate2java.xsl">
239        <param name="root_package" expression="${root_package}"/>        <param name="root_package" expression="${root_package}"/>
240        <param name="model_package" expression="${model_package}"/>        <param name="model_package" expression="${model_package}"/>
241      </xslt2>      </xslt2>
# Line 217  Line 246 
246        
247        
248        
     
249    <!-- generic targets -->    <!-- generic targets -->
250    
251    <!-- target checkSource : check xmi well formed tags in source document -->    <!-- target checkSource : check xmi well formed tags in source document -->
252    <target name="checkSource" description="check that xmi is well formed">    <target name="checkSource" description="check that xmi is well formed">
253      <echo>checkSource : starting checks on file ${input}/${source}</echo>      <echo>checkSource : starting checks on file ${input}/${source}</echo>
254            
255      <xslt2 force="true" reloadstylesheet="true"      <xslt2 in="${input}/${source}"
256             in="${input}/${source}" out="${output}/${source_checked}"             out="${output}/${source_checked}"
257             style="${res}/xmiCheck.xsl" />             style="${res}/xmiCheck.xsl" />
258            
259      <echo>checkSource : done.</echo>      <echo>checkSource : done.</echo>
# Line 233  Line 261 
261        
262        
263        
264      
265    <!-- target filterSource : remove all xmi:Extension tags in source document -->    <!-- target filterSource : remove all xmi:Extension tags in source document -->
266    <target name="filterSource" description="remove all xmi:Extension tags in source document">    <target name="filterSource" description="remove all xmi:Extension tags in source document">
267      <echo>filterSource : starting filter on file ${input}/${source}</echo>      <echo>filterSource : starting filter on file ${input}/${source}</echo>
268            
269      <xslt2 force="true" reloadstylesheet="true"      <xslt2 in="${input}/${source}"
270             in="${input}/${source}" out="${output}/${source_filtered}"             out="${output}/${source_filtered}"
271             style="${res}/xmiFilter.xsl" />             style="${res}/xmiFilter.xsl" />
272            
273      <echo>filterSource : done.</echo>      <echo>filterSource : done.</echo>
# Line 247  Line 276 
276        
277        
278        
     
     
279    <!-- target xmi2intermediate : GenTool preprocessor generating accordint to ivoaDMMetamodel.xsd -->    <!-- target xmi2intermediate : GenTool preprocessor generating accordint to ivoaDMMetamodel.xsd -->
280    <target name="xmi2intermediate" description="remove more tags in source document">    <target name="xmi2intermediate" description="remove more tags in source document">
281      <echo>xmi2intermediate : starting UML to MetaModel on file ${output}/${source}</echo>      <echo>xmi2intermediate : starting UML to MetaModel on file ${output}/${source}</echo>
282            
283      <xslt2 force="true" reloadstylesheet="true"      <xslt2 in="${output}/${source}"
284            in="${output}/${source}" out="${output}/${source_filtered}"             out="${output}/${source_filtered}"
285            style="${res}/xmi2intermediate.xsl" >             style="${res}/xmi2intermediate.xsl" >
286        <param name="root_package" expression="${root_package}"/>        <param name="root_package" expression="${root_package}"/>
287        <param name="model_package" expression="${model_package}"/>        <param name="model_package" expression="${model_package}"/>
288      </xslt2>      </xslt2>
# Line 270  Line 297 
297    <target name="run_intermediate2xsd">    <target name="run_intermediate2xsd">
298      <echo>run_intermediate2xsd : starting generate XSD from file ${output}/${snap_source_intermediate}</echo>      <echo>run_intermediate2xsd : starting generate XSD from file ${output}/${snap_source_intermediate}</echo>
299            
300      <xslt2 force="true" reloadstylesheet="true"      <xslt2 in="${output}/${snap_source_intermediate}"
301             in="${output}/${snap_source_intermediate}" out="${output}/schema/log.txt"             out="${output}/schema/log.txt"
302             style="${res}/intermediate2xsd.xsl">             style="${res}/intermediate2xsd.xsl">
303        <param name="targetnamespace_root" expression="${targetnamespace_root}"/>        <param name="targetnamespace_root" expression="${targetnamespace_root}"/>
304        <param name="schemalocation_root" expression="${schemalocation_root}"/>        <param name="schemalocation_root" expression="${schemalocation_root}"/>
# Line 287  Line 314 
314    <target name="genXHTML" description="generates XHTML documentation the XSD file created by genXSD">    <target name="genXHTML" description="generates XHTML documentation the XSD file created by genXSD">
315      <echo>genXTHML : starting generate XHTML docs from file ${output}/${out_schema}</echo>      <echo>genXTHML : starting generate XHTML docs from file ${output}/${out_schema}</echo>
316            
317      <xslt2 force="true" reloadstylesheet="true"      <xslt2 in="${output}/${out_schema}"
318             in="${output}/${out_schema}" out="${output}/${out_xhtml}"             out="${output}/${out_xhtml}"
319             style="${res}/schema2xhtml.xsl" />             style="${res}/schema2xhtml.xsl" />
320            
321      <echo>genXHTML : done.</echo>      <echo>genXHTML : done.</echo>

Legend:
Removed from v.188  
changed lines
  Added in v.189

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