- Timestamp:
- 08/22/13 15:26:57 (11 years ago)
- Location:
- SMC/trunk/SMC
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
SMC/trunk/SMC/build.xml
r2237 r3460 5 5 Date: 2011-10 6 6 Project: SMC 7 (based on Bruce Phillips: Coding_Actions_Struts2_Ant)8 7 ====================================================================== --> 9 8 … … 18 17 <property file="build.properties"/> 19 18 20 19 <import file="build_init.xml" /> 21 20 22 21 <!-- ==================== Clean Target ==================================== --> -
SMC/trunk/SMC/build_init.xml
r2481 r3460 4 4 <!-- ====================================================================== 5 5 Date: 2011-10 6 Project: SMC 7 (based on Bruce Phillips: Coding_Actions_Struts2_Ant) 6 Project: SMC 8 7 ====================================================================== --> 9 10 11 8 12 9 <project name="SMC init" default="init" basedir="."> 13 10 14 11 <description> 15 targets for initializing the SMC-module - i.e. fetching the source data 12 targets for 13 a) initializing the SMC-module, i.e. fetching the source data (init-data) 14 b) generating the output data (graph and statistics) (gen-out) 15 c) and for generating documentation for the code (gen-docs) 16 16 </description> 17 18 19 20 <property name="cache.dir" value="data2" /> 21 <property name="out.dir" value="output" /> 17 18 <property file="build_init.props"></property> 19 20 <property name="scripts.dir" value="." /> 21 <property name="cache.dir" value="data" /> 22 <property name="out.dir" value="output" /> 23 <property name="docs.dir" value="docs" /> 22 24 <property name="smc.config" value="src/smc_config.xml" /> 23 25 <property name="xsl.dir" value="src/xsl/" /> 24 25 26 <property name="scripts.dir" location="C:\Users\m\3\7utils"/> 26 <property name="dataset.xsl.dir" value="src/xsl/dataset" /> 27 27 28 <import file="${scripts.dir}\build.xml" /> 29 30 <target name="gen-build-info" > 31 <ant antfile="${scripts.dir}\build.xml" target="gen-build-info"> 32 <property name="in.dir" location="" /> 33 <property name="other.build" value="build_init"/> 34 <property name="out.dir" location="docs"/> 35 </ant> 36 </target> 37 38 39 <target name="gen-docs" > 40 <ant antfile="${scripts.dir}\build_docs.xml" target="gen-jsdoc"> 41 <!-- src/web/scripts/js/cmd-dep-graph.js --> 42 <property name="src.dir" location="src/web/scripts/js/cmd-dep-graph.js" /> 43 <property name="docs.dir" location="docs/jsdocs/"/> 44 </ant> 45 </target> 46 47 48 <target name="gen-userdocs" > 49 <ant antfile="${scripts.dir}\build_docs.xml" target="rst2html"> 50 <!-- src/web/scripts/js/cmd-dep-graph.js --> 51 <property name="src.file" location="docs/userdocs.rst" /> 52 <property name="out.file" location="docs/userdocs.html/"/> 53 <property name="stylesheet" value="scripts/css/cmds-ui.css"/> 54 </ant> 55 </target> 56 28 29 <import file="${scripts.dir}\build_defs.xml" /> 30 31 32 <target name="check" description="just for debugging, to check the acutal values of properties"> 33 <echoproperties regex=".*\.dir"></echoproperties> 34 <!-- <echoproperties srcfile="${scripts.dir}\build_defs.props" /> --> 35 <echo message="${saxon-libs.dir}" /> 36 </target> 57 37 58 38 <target name="init-data" description="run sequentially the initialization steps"> 59 39 <mkdir dir="${cache.dir}" /> 60 40 61 <property name="init-sequence" value="cmd-profiles-raw, cmd-terms,cmd-terms-nested,dcr-terms,isocat-languages,termsets,dcr-cmd-map,rr-relations,rr-terms" ></property>41 <property name="init-sequence" value="cmd-profiles-raw,load-profiles,cmd-terms,cmd-terms-nested,dcr-terms,isocat-languages,termsets,dcr-cmd-map,rr-relations,rr-terms" ></property> 62 42 <!-- <property name="init-sequence" value="cmd-profiles-raw,cmd-terms" ></property>--> 63 43 <foreach list="${init-sequence}" target="init-step" param="dataset.key" /> … … 77 57 --> 78 58 <target name="init-step" description="one initialization steps - parametrized with dataset.key"> 79 59 <!-- not used 60 <property name="cache.dir.resolved" location="${cache.dir}" ></property> 61 <propertyregex property="cache.uri" input="${cache.dir.resolved}" regexp="\\" 62 replace="/" defaultvalue="${cache.dir}" override="true"/> 63 --> 80 64 <echo message="generating: ${dataset.key}" /> 81 < saxon-xslt style="${xsl.dir}smc_init.xsl" in="${smc.config}"65 <xslt style="${xsl.dir}smc_init.xsl" in="${smc.config}" 82 66 out="${cache.dir}/${dataset.key}.xml" > 83 67 <param name="data_key" expression="${dataset.key}"/> 84 68 <param name="cache" expression="use"/> 85 <param name="cache_dir" expression="../../${cache.dir}"/> 69 <!-- cache.dir is used relative to the main-input document (which is src/smc_config.xml) --> 70 <param name="cache_dir" expression="../${cache.dir}"/> 86 71 <!-- <sysproperty key="ANT_OPTS" 87 72 value="-Xmx512m" 88 73 />--> 89 </saxon-xslt> 74 <factory name="net.sf.saxon.TransformerFactoryImpl"/> 75 <classpath refid="saxon-lib" /> 76 </xslt> 90 77 91 78 </target> … … 94 81 95 82 <target name="gen-out" description="generate various views on the data" 96 depends="init-out,smc-stats, smc-stats2,gen-cmd-dep-graph" >83 depends="init-out,smc-stats,gen-smc-graph,render-profiles" > 97 84 98 85 </target> … … 104 91 <fileset dir="src/web" /> 105 92 <fileset file="docs/userdocs.html" /> 93 <fileset file="docs/examples.html" /> 106 94 <fileset file="docs/graph_legend.svg" /> 107 95 </copy> 108 </target> 109 110 <target name="smc-stats" description="generate statistics - old - obsoleting by smc-stats2"> 111 112 <saxon-xslt style="${xsl.dir}smc_stats.xsl" in="${cache.dir}/dcr-cmd-map.xml" 113 out="${out.dir}/smc_stats.html" force="true"> 114 <param name="cache" expression="use"/> 96 <copy todir="${out.dir}/examples"> 97 <fileset dir="docs/examples" /> 98 </copy> 99 </target> 100 101 <target name="render-profiles" description="generate html-views for profiles, expects loaded profiles" 102 > 103 104 <!--<saxon-xslt style="${xsl.dir}comp2view.xsl" basedir="${cache.dir}/profiles" 105 destdir="${out.dir}/profiles" force="true"> 115 106 <param name="format" expression="htmlpage"/> 116 <param name="cache_dir" expression="../../${cache.dir}"/> 117 </saxon-xslt> 118 119 </target> 120 121 <target name="smc-stats2" description="generate statistics (via dataset-xml)"> 107 </saxon-xslt>--> 108 109 <xslt 110 style="${xsl.dir}comp2view.xsl" basedir="${cache.dir}/profiles" includes="*.xml" 111 destdir="${out.dir}/profiles" extension=".html" 112 processor="trax" force="true"> 113 <!-- with force="true" and no includes an error comes: 114 [xslt] : Fatal Error! Cannot write more than one result document to the sam 115 e URI, or write to a URI that has been read: file:/C:/Users/m/3/clarin/_repo/SMC 116 /output_20130126/profiles/clarin_eucr1p_1271859438161.html 117 [xslt] Failed to process null 118 --> 119 <factory name="net.sf.saxon.TransformerFactoryImpl"/> 120 <classpath refid="saxon-lib" /> 121 122 <param name="scripts_url" expression="../scripts"/> 123 <param name="format" expression="htmlpage"/> 124 </xslt> 125 126 </target> 127 128 <target name="smc-stats" description="generate statistics (via dataset-xml)"> 122 129 123 130 <saxon-xslt style="${xsl.dir}smc2stats_datasets.xsl" in="${cache.dir}/dcr-cmd-map.xml" 124 131 out="${out.dir}/smc_stats_dataset.xml" force="true"> 125 132 <param name="cache" expression="use"/> 126 <param name="cache_dir" expression="../ ../${cache.dir}"/>133 <param name="cache_dir" expression="../${cache.dir}"/> 127 134 </saxon-xslt> 128 135 129 <property name="amc.xsl.dir" value="C:/Users/m/3/corpus_shell/_repo/corpus_shell/xsl/amc" /> 130 <saxon-xslt style="${amc.xsl.dir}/dataset2html.xsl" in="${out.dir}/smc_stats_dataset.xml" 136 <saxon-xslt style="${dataset.xsl.dir}/dataset2html.xsl" in="${out.dir}/smc_stats_dataset.xml" 131 137 out="${out.dir}/smc_stats_detail.html" force="true"> 132 138 <param name="format" expression="html"/> … … 135 141 136 142 137 <saxon-xslt style="${ amc.xsl.dir}/dataset2html.xsl" in="${out.dir}/smc_stats_dataset.xml"143 <saxon-xslt style="${dataset.xsl.dir}/dataset2html.xsl" in="${out.dir}/smc_stats_dataset.xml" 138 144 out="${out.dir}/smc_stats.html" force="true"> 139 145 <param name="format" expression="htmlpage"/> 146 <param name="scripts_url" expression="scripts"/> 140 147 <param name="mode" expression=""/> 141 148 </saxon-xslt> … … 143 150 </target> 144 151 145 <target name="gen- cmd-dep-graph" description="generate graph of component dependencies (dot/svg/json)"146 depends="gen- cmd-dep-graph-dot,gen-cmd-dep-graph-json"152 <target name="gen-smc-graph" description="generate graph of component dependencies and concept links (dot/svg/json)" 153 depends="gen-smc-graph-dot,gen-smc-graph-json" 147 154 /> 148 155 149 <target name="gen- cmd-dep-graph-xml" description="generate graph of component dependencies (internal xml-format)" >150 <saxon-xslt style="${xsl.dir} cmd2graph.xsl" in="${cache.dir}/cmd-terms-nested.xml"151 out="${out.dir}/ cmd-dep-graph.xml" >156 <target name="gen-smc-graph-xml" description="generate graph of component dependencies (internal xml-format)" > 157 <saxon-xslt style="${xsl.dir}terms2graph.xsl" in="${cache.dir}/cmd-terms-nested.xml" 158 out="${out.dir}/smc-graph.xml" > 152 159 </saxon-xslt> 153 160 </target> 154 155 <target name="gen-cmd-dep-graph-dot" description="generate dot-graph of component dependencies (dot/svg)" 156 depends="gen-cmd-dep-graph-xml" > 161 162 <target name="gen-mdrepo-graph-xml" description="generate graph of mdrepo-stats (internal xml-format)" > 163 <saxon-xslt style="${xsl.dir}terms2graph.xsl" in="${cache.dir}/mdrepo-stats.xml" 164 out="${out.dir}/mdrepo-graph.xml" force="true" > 165 </saxon-xslt> 166 </target> 167 168 <target name="gen-smc-graph-dot" description="generate dot-graph of component dependencies (dot/svg)" 169 depends="gen-smc-graph-xml" > 157 170 158 <saxon-xslt style="${xsl.dir}graph2dot.xsl" in="${out.dir}/ cmd-dep-graph.xml"159 out="${out.dir}/ cmd-dep-graph.dot" >171 <saxon-xslt style="${xsl.dir}graph2dot.xsl" in="${out.dir}/smc-graph.xml" 172 out="${out.dir}/smc-graph.dot" > 160 173 </saxon-xslt> 161 174 162 175 <exec executable="dot"> 163 <arg value="${out.dir}/ cmd-dep-graph.dot" />164 <arg value="-o${out.dir}/ cmd-dep-graph.svg"/>176 <arg value="${out.dir}/smc-graph.dot" /> 177 <arg value="-o${out.dir}/smc-graph.svg"/> 165 178 <arg value="-Tsvg"/> 166 179 </exec> 167 180 </target> 168 181 169 <target name="gen- cmd-dep-graph-json" description="generate dot-graph of component dependencies (json-d3)"170 depends="gen- cmd-dep-graph-xml" >171 172 <saxon-xslt style="${xsl.dir}graph2json-d3.xsl" in="${out.dir}/ cmd-dep-graph.xml"173 out="${out.dir}/ cmd-dep-graph.d3.js" force="true">182 <target name="gen-smc-graph-json" description="generate dot-graph of component dependencies (json-d3)" 183 depends="gen-smc-graph-xml" > 184 185 <saxon-xslt style="${xsl.dir}graph2json-d3.xsl" in="${out.dir}/smc-graph.xml" 186 out="${out.dir}/smc-graph.d3.js" force="true"> 174 187 </saxon-xslt> 175 188 … … 177 190 178 191 179 <!-- 180 OBSOLETED by: gen-cmd-dep-graph-json <- gen-cmd-dep-graph-xml 181 182 <target name="gen-cmd-dep-graph-json-d3" description="generate graph of component dependencies (json/d3)" 183 > 184 <saxon-xslt style="${xsl.dir}cmd2graph-json-d3.xsl" in="${cache.dir}/cmd-terms-nested.xml" 185 out="${out.dir}/scripts/cmd-dep-graph-d3.json" force="true" > 186 <param name="profiles" expression="teiHeader" /> 187 </saxon-xslt> 188 189 </target> 190 --> 192 193 <target name="gen-docs" depends="gen-build-info,gen-jsdocs,gen-xsldocs" 194 description="generates automatic documentation for the build, js- and xsl-files"> 195 </target> 196 197 <target name="gen-jsdocs" > 198 <ant antfile="${scripts.dir}\build_docs.xml" target="gen-jsdoc"> 199 <!-- src/web/scripts/js/smc-graph.js --> 200 <property name="src.dir" location="src/web/scripts/js/smc-graph.js" /> 201 <property name="docs.dir" location="${docs.dir}/jsdocs/"/> 202 </ant> 203 </target> 204 205 <target name="gen-xsldocs" > 206 <property name="out.fn" value="smc-xsl"></property> 207 <ant antfile="${scripts.dir}\build_docs.xml" target="ay-xsl"> 208 <property name="in.dir" location="${xsl.dir}" /> 209 <property name="file.prefix" value="../../src" /> 210 <property name="title" value="smc-xsl" /> 211 <property name="parts" value="imports, params, templates, functions" /> 212 <property name="out.dir" location="${docs.dir}/xsltdocs"/> 213 <property name="out.fn" value="${out.fn}"/> 214 215 </ant> 216 <ant antfile="${scripts.dir}\build_docs.xml" target="gen-dep-graph"> 217 <property name="work.dir" location="${docs.dir}/xsltdocs" /> 218 <!-- <property name="in.file" value="${out.fn}.xml"/> --> 219 <property name="in.file" value="${docs.dir}/xsltdocs/${out.fn}.xml"/> 220 <property name="title" value="smc-xsl-imports" /> 221 <property name="parts" value="imports" /> 222 <property name="out.fn" value="smc-xsl-imports"/> 223 </ant> 224 225 226 <ant antfile="${scripts.dir}\build_docs.xml" target="gen-dep-graph-each"> 227 <property name="in.dir" location="${xsl.dir}" /> 228 <property name="parts" value="imports, params, templates, functions" /> 229 <property name="work.dir" location="${docs.dir}/xsltdocs/xslts"/> 230 </ant> 231 </target> 232 233 <target name="gen-build-info" > 234 <ant antfile="${scripts.dir}\build.xml" target="gen-build-info"> 235 <property name="in.dir" location="" /> 236 <property name="other.build" value="build_init"/> 237 <property name="out.dir" location="docs"/> 238 </ant> 239 </target> 240 241 242 <target name="gen-userdocs" > 243 <ant antfile="${scripts.dir}\build_docs.xml" target="rst2html"> 244 <!-- src/web/scripts/js/smc-graph.js --> 245 <property name="src.file" location="docs/userdocs.rst" /> 246 <property name="out.file" location="docs/userdocs.html/"/> 247 <property name="stylesheet" value="scripts/style/cmds-ui.css"/> 248 </ant> 249 <ant antfile="${scripts.dir}\build_docs.xml" target="rst2html"> 250 <!-- src/web/scripts/js/smc-graph.js --> 251 <property name="src.file" location="docs/examples.rst" /> 252 <property name="out.file" location="docs/examples.html/"/> 253 <property name="stylesheet" value="scripts/style/cmds-ui.css"/> 254 </ant> 255 <ant antfile="${scripts.dir}\build_docs.xml" target="rst2html"> 256 <property name="src.file" location="docs/examples2.rst" /> 257 <property name="out.file" location="docs/examples2.html/"/> 258 <property name="stylesheet" value="scripts/style/cmds-ui.css"/> 259 </ant> 260 </target> 261 191 262 </project> 192 263
Note: See TracChangeset
for help on using the changeset viewer.