root/jmatter-complet/trunk/build.xml

Revision 1819, 5.8 kB (checked in by eitan, 3 years ago)

fixed main build file erroneous reference to echovm module

  • Property svn:executable set to
Line 
1 <project name="jmatter-distributor" default="make-distro-and-checksums">
2
3   <description>This build file produces official JMatter distributions</description>
4
5   <property name="build.dir" location="build" />
6   <property name="dist.dir" location="dist" />
7   <property name="build.target.dir" location="${build.dir}/jmatter" />
8  
9   <property name="jmatter.dir" location="${basedir}/jmatter" />
10   <property name="demo.dir" location="${basedir}/demo-apps" />
11   <property name="modules.dir" location="${basedir}/modules" />
12   <property name="appbrowser.dir" location="${basedir}/AppBrowser" />
13
14   <!-- TARGETS -->
15
16   <target name="init">
17     <tstamp />
18     <mkdir dir="${build.target.dir}" />
19     <mkdir dir="${dist.dir}" />
20     <uptodate property="pdfdoc-exists" srcfile="${jmatter.dir}/doc/guide.lyx" targetfile="${jmatter.dir}/doc/guide.pdf" />
21   </target>
22  
23   <target name="clean">
24     <delete dir="${build.dir}" />
25   </target>
26
27   <target name="make-distribution"
28           depends="clean, init, include-demoapps, include-modules, include-appbrowser, make-jmatter-jar, makedoc-pdf"
29           description="Produce jmatter distribution">
30      
31    <copy todir="${build.target.dir}">
32      <fileset dir="${jmatter.dir}" includes="doc/Changes*,doc/Credits,doc/guide.pdf,doc/jMatter-license" />
33      <fileset dir="${jmatter.dir}" includes="build.xml" />
34      <fileset dir="${jmatter.dir}" includes="src/**/*" />
35      <fileset dir="${jmatter.dir}" includes="test/**/*" />
36      <fileset dir="${jmatter.dir}" includes="lib/**/*.jar" />
37      <fileset dir="${jmatter.dir}" includes="resources/**/*" />
38      <fileset dir="${jmatter.dir}" includes="tools/**/*" />
39      <fileset dir="${jmatter.dir}" includes="dist/**/*" /> <!-- precompiled binary -->
40    </copy>
41      
42    <exec dir="${jmatter.dir}/doc" executable="markdown" output="${build.target.dir}/doc/jMatter-License.html">
43      <arg line="jMatter-License" />
44    </exec>
45
46    <copy tofile="${build.dir}/Release_notes">
47      <fileset dir="${jmatter.dir}/doc" includes="Changes" />
48    </copy>
49    <exec dir="${build.dir}" executable="markdown" output="${build.dir}/Release_notes.html">
50      <arg line="Release_notes" />
51    </exec>
52
53    <!-- how can i create a property whose
54         name is dynamically computed based on ${DSTAMP}? -->
55    <mkdir dir="${build.dir}/jmatter-${DSTAMP}" />
56    <move todir="${build.dir}/jmatter-${DSTAMP}">
57       <fileset dir="${build.dir}" excludes="jmatter-${DSTAMP}" />
58    </move>
59    <zip basedir="${build.dir}" destfile="${dist.dir}/jmatter-${DSTAMP}.zip" />
60    <tar basedir="${build.dir}" destfile="${dist.dir}/jmatter-${DSTAMP}.tgz" compression="gzip" />
61
62   </target>
63
64
65    <target name="make-jmatter-jar">
66       <!-- ensure to produce and include a binary in the distribution -->
67       <ant antfile="${jmatter.dir}/build.xml" inheritAll="false" target="cleanjar"/>
68       <!-- then get rid of artifacts -->
69       <ant antfile="${jmatter.dir}/build.xml" inheritAll="false" target="clean"/>
70    </target>
71
72    <target name="makedoc-pdf" unless="pdfdoc-exists"
73           description="produce pdf documentation (if necessary)">
74     <exec dir="${jmatter.dir}/doc" executable="lyx">
75       <arg line="--export pdf2 guide.lyx" /> <!-- pdf2 is lyx to pdflatex option -->
76     </exec>
77   </target>
78    
79    
80    <!--    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  -->
81    
82    <target name="include-demoapps" depends="clean-demoapps">
83       <copy todir="${build.dir}">
84         <fileset dir="${basedir}" includes="demo-apps/**/*" />
85       </copy>
86    </target>
87    
88    <target name="clean-demoapps">
89       <ant antfile="${demo.dir}/ContactMgr/build.xml" inheritAll="false" target="clean"/>
90       <ant antfile="${demo.dir}/IssueMgr/build.xml" inheritAll="false" target="clean"/>
91       <ant antfile="${demo.dir}/Sympster/build.xml" inheritAll="false" target="clean"/>
92       <ant antfile="${demo.dir}/MovieLib/build.xml" inheritAll="false" target="clean"/>
93       <ant antfile="${demo.dir}/MyTunes/build.xml" inheritAll="false" target="clean"/>
94       <ant antfile="${demo.dir}/CustomUI/build.xml" inheritAll="false" target="clean"/>
95    </target>
96    
97    <target name="include-appbrowser">
98       <ant antfile="${appbrowser.dir}/build.xml" inheritAll="false" target="clean"/>
99       <copy todir="${build.dir}">
100         <fileset dir="${basedir}" includes="AppBrowser/**/*" />
101       </copy>
102    </target>
103    
104    <!--    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  -->
105
106    <target name="include-modules" depends="clean-modules">
107       <copy todir="${build.dir}">
108          <fileset dir="${basedir}" includes="modules/**/*" />
109       </copy>
110    </target>
111    
112    <target name="clean-modules">
113       <ant antfile="modules/ds-swing/build.xml" inheritAll="false" target="clean" />
114       <ant antfile="modules/ds-wizard/build.xml" inheritAll="false" target="clean" />
115       <ant antfile="modules/echovm/build.xml" inheritAll="false" target="clean" />
116       <ant antfile="modules/jmatter-tools/build.xml" inheritAll="false" target="clean" />
117       <ant antfile="modules/swingvm/build.xml" inheritAll="false" target="clean" />
118       <ant antfile="modules/wingsvm/build.xml" inheritAll="false" target="clean" />
119    </target>
120    
121    <!--    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  -->
122
123    <target name="checksum-distributions" depends="make-distribution"
124            description="generate checksum files for distributions">
125      <antcall target="checksum">
126        <param name="algorithm" value="MD5" />
127      </antcall>
128      <antcall target="checksum">
129        <param name="algorithm" value="SHA-1" />
130      </antcall>
131    </target>
132
133    <target name="checksum">
134      <checksum algorithm="${algorithm}">
135        <fileset dir="${dist.dir}" includes="*.tgz, *.zip" />
136      </checksum>
137    </target>
138  
139    <target name="make-distro-and-checksums" depends="checksum-distributions"
140       description="construct jmatter distributions and corresponding checksums" />
141
142    <!--    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  -->
143    
144    
145    
146 </project>
147
Note: See TracBrowser for help on using the browser.