Revision 2175
Added by Jing Tao about 20 years ago
build.xml | ||
---|---|---|
53 | 53 |
<property name="jdbc" value="${jdbc_base}/classes111.zip" /> |
54 | 54 |
<!-- Property to indicate is not MSSQL installation--> |
55 | 55 |
<property name="other" value="yes"/> |
56 |
<property name="install-sql"
|
|
56 |
<property name="install-sql" |
|
57 | 57 |
value="xmltables.sql" /> |
58 |
<property name="upgrade-1.2-sql"
|
|
58 |
<property name="upgrade-1.2-sql" |
|
59 | 59 |
value="upgrade-db-to-1.2.sql" /> |
60 |
<property name="upgrade-1.3-sql"
|
|
60 |
<property name="upgrade-1.3-sql" |
|
61 | 61 |
value="upgrade-db-to-1.3.sql" /> |
62 |
<property name="upgrade-1.4-sql"
|
|
62 |
<property name="upgrade-1.4-sql" |
|
63 | 63 |
value="upgrade-db-to-1.4.sql" /> |
64 | 64 |
</target> |
65 | 65 |
|
... | ... | |
72 | 72 |
<property name="jdbc" value="lib/jdbc7.1-1.2.jar" /> |
73 | 73 |
<!-- Property to indicate is not MSSQL installation--> |
74 | 74 |
<property name="other" value="yes"/> |
75 |
<property name="install-sql"
|
|
75 |
<property name="install-sql" |
|
76 | 76 |
value="xmltables_postgres.sql" /> |
77 |
<property name="upgrade-1.2-sql"
|
|
77 |
<property name="upgrade-1.2-sql" |
|
78 | 78 |
value="upgrade-db-to-1.2_postgres.sql" /> |
79 |
<property name="upgrade-1.3-sql"
|
|
79 |
<property name="upgrade-1.3-sql" |
|
80 | 80 |
value="upgrade-db-to-1.3_postgres.sql" /> |
81 |
<property name="upgrade-1.4-sql"
|
|
81 |
<property name="upgrade-1.4-sql" |
|
82 | 82 |
value="upgrade-db-to-1.4_postgres.sql" /> |
83 | 83 |
</target> |
84 |
|
|
84 |
|
|
85 | 85 |
<target name="sqlserver" if="use-sqlserver"> |
86 | 86 |
<!-- Customize these properties if you are using SQL server --> |
87 | 87 |
<echo message="Using SQL Server..."/> |
... | ... | |
93 | 93 |
<property name="jdbc-add2" value="${jdbc-base}/mssqlserver.jar" /> |
94 | 94 |
<!-- Property to indicate is a MSSQL installation--> |
95 | 95 |
<property name="MSSQL" value="yes"/> |
96 |
<property name="install-sql"
|
|
96 |
<property name="install-sql" |
|
97 | 97 |
value="xmltables-sqlserver.sql" /> |
98 | 98 |
</target> |
99 | 99 |
|
... | ... | |
110 | 110 |
<property name="morphosourcedir" value="../morpho" /> |
111 | 111 |
<property name="defaultcontenttype" value="application/octet-stream" /> |
112 | 112 |
<property name="utilitiesdir" value="../utilities" /> |
113 |
|
|
113 |
|
|
114 | 114 |
<!-- Make sure these paths match the location of the jar files |
115 | 115 |
on your system, the defaults should usually work --> |
116 | 116 |
<condition property="jsdk" value="${tomcat}/lib/common/servlet.jar"> |
... | ... | |
143 | 143 |
<property name="itislib" |
144 | 144 |
value="lib/itislib.jar" /> |
145 | 145 |
<property name="emlparser" |
146 |
|
|
146 |
|
|
147 | 147 |
value="lib/eml.jar" /> |
148 | 148 |
<property name="util" |
149 | 149 |
value="lib/utilities.jar" /> |
... | ... | |
162 | 162 |
<property name="servlet-path" value="/${context}/metacat"/> |
163 | 163 |
<property name="html-path" value="/${context}"/> |
164 | 164 |
<property name="systemidserver" value="http://${server}"/> |
165 |
<property name="style-common-relpath"
|
|
165 |
<property name="style-common-relpath" |
|
166 | 166 |
value="/style/common"/> |
167 |
<property name="style-common-cvsrelpath"
|
|
167 |
<property name="style-common-cvsrelpath" |
|
168 | 168 |
value="lib${style-common-relpath}"/> |
169 |
<property name="style-common-fullpath"
|
|
169 |
<property name="style-common-fullpath" |
|
170 | 170 |
value="/${installdir}${style-common-relpath}"/> |
171 |
<property name="style-common-path"
|
|
171 |
<property name="style-common-path" |
|
172 | 172 |
value="/${context}${style-common-relpath}"/> |
173 | 173 |
<property name="style-skins-relpath" value="/style/skins"/> |
174 | 174 |
<property name="style-skins-path" value="/${context}${style-skins-relpath}"/> |
... | ... | |
179 | 179 |
<property name="eml-version" value="2.0.0beta6" /> |
180 | 180 |
<property name="eml-tag" value="EML_2_0_0_BETA_6_FOR_METACAT" /> |
181 | 181 |
<property name="eml2-tag" value="EML_2_0_0_FOR_METACAT" /> |
182 |
<property name="eml2namespace" value="eml://ecoinformatics.org/eml-2.0.0" /> |
|
182 |
<property name="eml2_0_0namespace" value="eml://ecoinformatics.org/eml-2.0.0" /> |
|
183 |
<property name="eml2_1_0namespace" value="eml://ecoinformatics.org/eml-2.1.0" /> |
|
183 | 184 |
<property name="stmmlnamespace" value="http://www.xml-cml.org/schema/stmml" /> |
184 | 185 |
<property name="eml-css" value="eml_xsl.css"/> |
185 | 186 |
<property name="eml-module.default.css" |
... | ... | |
200 | 201 |
<filter token="scope" value="${scope}"/> |
201 | 202 |
<filter token="responseForm" value="${responseForm}"/> |
202 | 203 |
<filter token="entryForm" value="${entryForm}"/> |
203 |
<filter token="guide" value="${guide}"/>
|
|
204 |
<filter token="guide" value="${guide}"/> |
|
204 | 205 |
<filter token="confirmData" value="${confirmData}"/> |
205 | 206 |
<filter token="deleteData" value="${deleteData}"/> |
206 | 207 |
<filter token="genericHeader" value="${genericHeader}"/> |
... | ... | |
245 | 246 |
<filter token="config-dir" value="${config-dir}"/> |
246 | 247 |
<filter token="default-style" value="${default-style}"/> |
247 | 248 |
<filter token="eml-version" value="${eml-version}"/> |
248 |
<filter token="eml2namespace" value="${eml2namespace}"/> |
|
249 |
<filter token="eml2_0_0namespace" value="${eml2_0_0namespace}"/> |
|
250 |
<filter token="eml2_1_0namespace" value="${eml2_1_0namespace}"/> |
|
249 | 251 |
<filter token="stmmlnamespace" value="${stmmlnamespace}"/> |
250 | 252 |
<filter token="context" value="${context}"/> |
251 | 253 |
<filter token="forcereplicationwaitingtime" value="${forcereplicationwaitingtime}" /> |
... | ... | |
296 | 298 |
<exclude name="**/.#*"/> |
297 | 299 |
</fileset> |
298 | 300 |
</copy> |
299 |
<available file="build/tmp/${conversion-module}" type="dir"
|
|
301 |
<available file="build/tmp/${conversion-module}" type="dir" |
|
300 | 302 |
property="styles.not.needed"/> |
301 | 303 |
</target> |
302 | 304 |
|
... | ... | |
363 | 365 |
includes="**/metacat/harvesterClient/" /> |
364 | 366 |
</target> |
365 | 367 |
|
366 |
<target name="geteml" depends="getemlpre2,geteml2+"
|
|
368 |
<target name="geteml" depends="getemlpre2,geteml2+" |
|
367 | 369 |
description="Calls getemlpre2 and geteml2+ targets" /> |
368 | 370 |
|
369 | 371 |
<target name="getemlpre2" depends="prepare" |
... | ... | |
397 | 399 |
<fileset dir="${build.tmp}/eml_${eml2-tag}/${eml-module}"> |
398 | 400 |
<include name="*.xsd"/> |
399 | 401 |
</fileset> |
400 |
|
|
402 |
|
|
401 | 403 |
<!-- shouldn't we have a mapper here like this?? |
402 | 404 |
<mapper type="glob" from="eml-*.xsd" to="eml-*-${eml-version}.xsd" /> |
403 |
|
|
404 |
Jing's code didn't nave one - does it need to be added?
|
|
405 |
|
|
406 |
Jing's code didn't nave one - does it need to be added? |
|
405 | 407 |
NOTE that eml-version is set to beta 6, so this would need changing --> |
406 |
|
|
408 |
|
|
407 | 409 |
</copy> |
408 | 410 |
<antcall target="copyxsl"> |
409 | 411 |
<param name="cvs.tagname" value="${eml2-tag}" /> |
410 | 412 |
</antcall> |
411 | 413 |
</target> |
412 |
|
|
413 |
|
|
414 | 414 |
|
415 |
<target name="copyxsl" |
|
415 |
|
|
416 |
|
|
417 |
<target name="copyxsl" |
|
416 | 418 |
description="Copies xsl stylesheets from checkout in build/tmp to your metacat cvs sandbox"> |
417 | 419 |
|
418 | 420 |
<delete file="${style-common-cvsrelpath}/${eml-css}"/> |
419 |
|
|
421 |
|
|
420 | 422 |
<copy todir="${style-common-cvsrelpath}" filtering="yes"> |
421 | 423 |
<fileset dir="${build.tmp}/eml_${cvs.tagname}/${eml-module}/style"> |
422 | 424 |
<include name="**/*.xsl"/> |
423 | 425 |
</fileset> |
424 | 426 |
</copy> |
425 |
|
|
426 | 427 |
|
427 |
<!-- now copy default css from eml module and put it in style-common-path |
|
428 |
|
|
429 |
<!-- now copy default css from eml module and put it in style-common-path |
|
428 | 430 |
dir with a new name, so other skin-specific css can import it if reqd --> |
429 | 431 |
<copy file="${build.tmp}/eml_${cvs.tagname}/${eml-module}/${eml-module.default.css}" |
430 | 432 |
tofile="${style-common-cvsrelpath}/${eml-css}" /> |
431 | 433 |
|
432 | 434 |
</target> |
433 |
|
|
434 |
|
|
435 |
|
|
435 |
|
|
436 |
|
|
437 |
|
|
436 | 438 |
<target name="dtdschemasql" depends="prepare" |
437 | 439 |
description="Registers the DTDs with the new Metacat instance"> |
438 | 440 |
<echo/> |
... | ... | |
456 | 458 |
password="${password}" |
457 | 459 |
src="${build.src}/loadschema.sql" /> |
458 | 460 |
</target> |
459 |
|
|
461 |
|
|
460 | 462 |
<target name="installdb" depends="prepare" |
461 | 463 |
description="Installs the database tables"> |
462 | 464 |
<echo/> |
... | ... | |
513 | 515 |
<chmod dir="${temp-dir}" perm="ug+w" /> |
514 | 516 |
<copy file="${build.dir}/${context}.war" todir="${webapps}"/> |
515 | 517 |
</target> |
516 |
|
|
517 |
<target name="upgrade" depends="install"
|
|
518 |
|
|
519 |
<target name="upgrade" depends="install" |
|
518 | 520 |
description="* Upgrade an existing metacat installation with a new version *"> |
519 | 521 |
<unwar src="${webapps}/${context}.war" dest="${webapps}/${context}" /> |
520 | 522 |
</target> |
521 | 523 |
|
522 |
<target name="install-registry" depends="init,getConversionXSL"
|
|
524 |
<target name="install-registry" depends="init,getConversionXSL" |
|
523 | 525 |
description="Install Registry"> |
524 |
|
|
526 |
|
|
525 | 527 |
<copy file="${srcdir}/perl/register-dataset.cgi" |
526 | 528 |
todir="${inst.cgi.dir}" filtering="yes"/> |
527 | 529 |
<chmod file="${inst.cgi.dir}/register-dataset.cgi" perm="ugo+x" /> |
528 |
|
|
530 |
|
|
529 | 531 |
<mkdir dir="${temp-dir}" /> |
530 | 532 |
<copy todir="${temp-dir}" filtering="yes"> |
531 | 533 |
<fileset dir="${build.tmp}/${conversion-module}/lib/style"> |
... | ... | |
537 | 539 |
<echo message="Install Registry completed." /> |
538 | 540 |
</target> |
539 | 541 |
|
540 |
<target name="install-skin" depends="init"
|
|
542 |
<target name="install-skin" depends="init" |
|
541 | 543 |
description="Install a Skin"> |
542 | 544 |
|
543 |
<input message="Please enter name of the skin"
|
|
545 |
<input message="Please enter name of the skin" |
|
544 | 546 |
addproperty="skin-name"/> |
545 | 547 |
|
546 | 548 |
<mkdir dir="${installdir}/style/skins/${skin-name}" /> |
... | ... | |
563 | 565 |
|
564 | 566 |
<target name="war" depends="warPrepare,warMSSQL" |
565 | 567 |
description="Create a web archive (WAR) for servlet deployment"> |
566 |
<war destfile="${build.dir}/${context}.war"
|
|
568 |
<war destfile="${build.dir}/${context}.war" |
|
567 | 569 |
webxml="${build.war}/web.xml"> |
568 | 570 |
<fileset dir="${war.context}"/> |
569 | 571 |
<lib dir="${war.lib}"/> |
... | ... | |
628 | 630 |
<copy file="${jdbc-add2}" tofile="${war.lib}/mssqlserver.jar" /> |
629 | 631 |
</target> |
630 | 632 |
|
631 |
<target name="getConversionXSL" depends="prepare"
|
|
633 |
<target name="getConversionXSL" depends="prepare" |
|
632 | 634 |
unless="styles.not.needed" |
633 | 635 |
description="Gets the conversion stylesheets for eml2 beta 6 to eml 2.0.0"> |
634 | 636 |
<echo>Enter CVS password: </echo> |
... | ... | |
700 | 702 |
</junit> |
701 | 703 |
</target> |
702 | 704 |
|
703 |
<target name="testharvester"
|
|
705 |
<target name="testharvester" |
|
704 | 706 |
depends="testprep" |
705 | 707 |
description="Uses the ant junit task to test only the Harvester code"> |
706 |
<junit printsummary="yes"
|
|
707 |
haltonfailure="off"
|
|
708 |
<junit printsummary="yes" |
|
709 |
haltonfailure="off" |
|
708 | 710 |
fork="yes" |
709 | 711 |
haltonerror="off"> |
710 | 712 |
<classpath> |
... | ... | |
731 | 733 |
<!-- run this target, we need to check out a another morpho souce dir was checked out. --> |
732 | 734 |
<target name="nettest" depends="install" |
733 | 735 |
description="compiles and runs the metacatnettest code"> |
734 |
|
|
736 |
|
|
735 | 737 |
<echo>*********************************** |
736 | 738 |
Please run ant gethttpclient first! |
737 | 739 |
*********************************** |
... | ... | |
865 | 867 |
<outputproperty name="indent" value="yes"/> |
866 | 868 |
</xslt> |
867 | 869 |
</target> |
868 |
|
|
870 |
|
|
869 | 871 |
<target name="gridinit" depends="init"> |
870 | 872 |
<property name="java2wsdl.tool" value="org.apache.axis.wsdl.Java2WSDL" /> |
871 | 873 |
<property name="wsdldecorator.tool" value="org.globus.ogsa.tools.wsdl.DecorateWSDL" /> |
... | ... | |
883 | 885 |
</target> |
884 | 886 |
|
885 | 887 |
<target name="gridprepare" depends="gridinit, prepare"> |
886 |
</target>
|
|
887 |
|
|
888 |
</target> |
|
889 |
|
|
888 | 890 |
<target name="compileinterface" depends="clean, gridprepare"> |
889 | 891 |
<javac srcdir="${build.src}" destdir="${build.dest}" includes="**/${interface.name}.java" /> |
890 | 892 |
</target> |
891 |
|
|
893 |
|
|
892 | 894 |
<target name="generateWSDL" depends="compileinterface"> |
893 | 895 |
<echo message="Generating wsdl from ${interface.name} interface"/> |
894 | 896 |
<java classname="${java2wsdl.tool}" |
... | ... | |
909 | 911 |
<arg value="${interface.package}.${interface.name}"/> |
910 | 912 |
</java> |
911 | 913 |
</target> |
912 |
|
|
914 |
|
|
913 | 915 |
<target name="decorateWSDL" depends="generateWSDL"> |
914 | 916 |
<property name="wsdl.file" value="${interface.name}Service.wsdl"/> |
915 | 917 |
<java classname="${wsdldecorator.tool}" dir="${build.src}" |
... | ... | |
919 | 921 |
<arg value="${wsdl.file}"/> |
920 | 922 |
</java> |
921 | 923 |
</target> |
922 |
|
|
924 |
|
|
923 | 925 |
<target name="generatestubs" depends="decorateWSDL"> |
924 | 926 |
<echo message=" Generating stubs " /> |
925 | 927 |
<echo message="wsdl file is ${wsdl.file}"/> |
... | ... | |
929 | 931 |
<arg value="${wsdl.file}"/> |
930 | 932 |
</java> |
931 | 933 |
</target> |
932 |
|
|
934 |
|
|
933 | 935 |
<target name="compileStubsAndImpl" depends="generatestubs, utilities"> |
934 | 936 |
<echo message=" Compiling stubs " /> |
935 | 937 |
<javac srcdir="${build.src}" destdir="${build.dest}" classpathref="webservicepath" includes="**/${interface.name}/*.java" /> |
936 | 938 |
<echo message=" Compiling impl " /> |
937 | 939 |
<javac srcdir="${build.src}" destdir="${build.dest}" classpathref="webservicepath" classpath="./lib/utilities.jar" includes="**/impl/*.java" /> |
938 | 940 |
</target> |
939 |
|
|
941 |
|
|
940 | 942 |
<target name="jarStubsAndImpl" depends="compileStubsAndImpl"> |
941 | 943 |
<echo message=" jar stubs classes " /> |
942 | 944 |
<jar destfile="${build.dir}/${interface.name}-stubs.jar" basedir="${build.dest}" includes="**/${interface.name}/*.class" /> |
943 | 945 |
<echo message=" jar impl classes " /> |
944 | 946 |
<jar destfile="${build.dir}/${interface.name}.jar" basedir="${build.dest}" includes="**/impl/*.class" /> |
945 | 947 |
</target> |
946 |
|
|
948 |
|
|
947 | 949 |
<target name="gar" depends="jarStubsAndImpl"> |
948 | 950 |
<echo message=" jar the gar file"/> |
949 | 951 |
<mkdir dir="${build.dir}/gar"/> |
... | ... | |
955 | 957 |
<copy file="${build.src}/${interface.name}Service.wsdl" todir="${build.dir}/gar/schema/edu" /> |
956 | 958 |
<jar destfile="lib/${interface.name}.gar" basedir="${build.dir}/gar"/> |
957 | 959 |
</target> |
958 |
|
|
960 |
|
|
959 | 961 |
<target name="compilewebclient" depends="prepare"> |
960 | 962 |
<javac srcdir="${build.src}" destdir="${build.dest}" includes="**/application/*.java" classpathref="webservicepath" /> |
961 | 963 |
</target> |
962 |
|
|
964 |
|
|
963 | 965 |
<target name="runwebclient" depends="compilewebclient"> |
964 |
<java classname="edu.ucsb.nceas.metacat.stringclient.application.MetacatStringServiceApplication"
|
|
966 |
<java classname="edu.ucsb.nceas.metacat.stringclient.application.MetacatStringServiceApplication" |
|
965 | 967 |
dir="${build.dest}" fork="yes" |
966 | 968 |
classpathref="webservicepath" classpath="./lib/utilities.jar" failonerror="true"> |
967 | 969 |
<arg value="${serviceUrl}"/> |
Also available in: Unified diff
Add eml200 and eml210 namespace here.