diff --git a/build.xml b/build.xml index 03e3bf672513f9dfc7271cfff897d5383bf0cc58..2cbc5646f7b7e79d45d1e77c22f290415eb9fd98 100644 --- a/build.xml +++ b/build.xml @@ -4,7 +4,7 @@ customized build.xml for each autogenerated X3D example archive build.xml --> <!-- - Copyright (c) 1995-2020 held by the author(s). All rights reserved. + Copyright (c) 1995-2021 held by the author(s). All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions @@ -19,7 +19,7 @@ are met: * The names of the Web3D Consortium (https://www.web3D.org), Naval Postgraduate School (NPS) (https://www.nps.edu), Modeling Virtual Environments and Simulation (MOVES) Institute - (https://www.MovesInstitute.org), and + (https://MovesInstitute.nps.edu) and the names of its contributors may not be used to endorse or promote products derived from this software without specific prior written permission. @@ -47,7 +47,7 @@ POSSIBILITY OF SUCH DAMAGE. <property name="archive.site" value="https://savage.nps.edu/"/> <property name="archive.path" location="."/> - <!-- Basic archive has single-section catalog structure, others have 2-section catalog structure --> + <!-- ConformanceNist and Savage* archives have 2-level catalog structure, others have single-directory catalog structure --> <property name="numberOfSections" location="2"/> <property name="subdir" location="*/*"/> @@ -63,7 +63,10 @@ POSSIBILITY OF SUCH DAMAGE. <!-- java jvmarg parameters ignored on server unless forked --> <!-- Xj3D converter tends to lock up Netbeans unless forked --> - <property name="fork" value="true"/> + <property name="fork" value="true"/> + + <!-- https://ant.apache.org/manual/Tasks/exec.html --> + <property name="timeout=" value="600000" description="600000 msec = 10 min"/> <!-- ignoreSetupDownloadErrors can be overridden by Jenkins configuration, ensure initialized by previous invocations --> <property name="ignoreSetupDownloadErrors" value="true"/> @@ -106,7 +109,7 @@ POSSIBILITY OF SUCH DAMAGE. <!-- https://mvnrepository.com/artifact/net.sf.saxon/Saxon-HE/9.8.0-5 --> <!-- https://www.saxonica.com/documentation9.5/using-xsl/commandline.html --> <property name="saxon.dir" location="../../../tools/jar" description="relative path from archive examples/Subdirectory"/> - <property name="saxon.jar" value="saxon9he.jar"/> + <property name="saxon.jar" value="saxon-he-10.6.jar"/><!-- saxon9he.jar --> <property name="saxononicaSA.dir" location="C:/java/saxonsa9-1-0-6j"/><!-- not actively used --> <property name="c14n.dir" value="../../../tools/canonical/dist/lib"/> @@ -133,7 +136,7 @@ POSSIBILITY OF SUCH DAMAGE. <property name="javadoc.dir" value="javadoc"/> <property name="javadoc.encoding" value="ISO-8859-1"/> <!-- TODO insert archive name in mailto subject line or body --> - <property name="javadoc.copyright" value="Copyright ©2005-2020 <a href='https://www.web3d.org'>Web3D Consortium</a> under an <a href='../../../../license.html'>open-source license</a>, free for any use. <a href='mailto:x3d-public@web3D.org,brutzman@nps.edu?subject=X3D%20Examples%20Archive%20X3DJSAIL%20feedback'>Feedback</a> is welcome."/> + <property name="javadoc.copyright" value="Copyright ©2005-2021 <a href='https://www.web3d.org'>Web3D Consortium</a> under an <a href='../../../../license.html'>open-source license</a>, free for any use. <a href='mailto:x3d-public@web3D.org,brutzman@nps.edu?subject=X3D%20Examples%20Archive%20X3DJSAIL%20feedback'>Feedback</a> is welcome."/> <property name="javadoc.noindex" value="false"/> <property name="javadoc.nonavbar" value="false"/> <property name="javadoc.notree" value="false"/> @@ -156,6 +159,8 @@ POSSIBILITY OF SUCH DAMAGE. <!-- xml.catalog.dir is found in ${X3dDtdsSchemas.dir} --> <property name="xml.catalog.file" value="OasisXmlCatalogX3D.xml"/> + <property name= "node.exe" value="node.exe"/> + <!-- ======================================== --> <!-- Xj3D internal paths for finding OS-specific /natives files, adapted from from NPS-branch build_nps.xml and build.properties --> @@ -255,7 +260,7 @@ POSSIBILITY OF SUCH DAMAGE. <!-- ======================================== --> <!-- Savage Developers Guide, Xj3D viewer: NPS source documentation https://savage.nps.edu/Savage/developers.html#Xj3D --> - <!-- Xj3D v2.2 git version-control source at https://gitlab.nps.edu/Savage/xj3d --> + <!-- Xj3D v2.3 git version-control source at https://gitlab.nps.edu/Savage/xj3d --> <!-- Xj3D v2.1 subversion version-control source at https://svn.code.sf.net/p/xj3d/code --> <!-- all Xj3D.nps jars need to be in same directory for fileset to work properly. --> @@ -263,11 +268,11 @@ POSSIBILITY OF SUCH DAMAGE. <!-- TODO in order for server-side jenkins to also work, they are retrieved to same directory --> <property name="xj3d.dir" location="C:/x-nps-gitlab/xj3d"/> <!-- formerly C:/xj3d-code/branches/NPS, C:/j3d-code/xj3d, C:/xj3d-code/xj3d --> <property name="xj3d.dir.jars" location="${xj3d.dir}/jars"/> <!-- C:/j3d-code/xj3d/jars --> - <property name="xj3d.3rdparty.jar" value="xj3d-2.2-3rdparty-nps.jar"/> <!-- C:/j3d-code/xj3d/jars --> - <property name="xj3d.jar" value="xj3d-2.2-nps.jar"/> <!-- C:/j3d-code/xj3d/jars --> - <property name="xj3d.browser.jar" value="xj3d.browser_2.2.0-nps.jar"/> <!-- C:/j3d-code/xj3d/jars --> - <property name="xj3d.cadfilter.jar" value="xj3d.cadfilter_2.2.0-nps.jar"/> <!-- C:/j3d-code/xj3d/jars --> - <property name="xj3d.replica.jar" value="xj3d.replica_2.2.0-nps.jar"/> <!-- C:/j3d-code/xj3d/jars --> + <property name="xj3d.3rdparty.jar" value="xj3d-2.3-3rdparty-nps.jar"/> <!-- C:/j3d-code/xj3d/jars --> + <property name="xj3d.jar" value="xj3d-2.3-nps.jar"/> <!-- C:/j3d-code/xj3d/jars --> + <property name="xj3d.browser.jar" value="xj3d.browser_2.3.0-nps.jar"/> <!-- C:/j3d-code/xj3d/jars --> + <property name="xj3d.cadfilter.jar" value="xj3d.cadfilter_2.3.0-nps.jar"/> <!-- C:/j3d-code/xj3d/jars --> + <property name="xj3d.replica.jar" value="xj3d.replica_2.3.0-nps.jar"/> <!-- C:/j3d-code/xj3d/jars --> <!-- see HelloWorld task for path diagnostic messages --> <fileset dir="${xj3d.dir.jars}" id="xj3d.jars.all"> <include name="${xj3d.jar}"/> @@ -343,7 +348,7 @@ Key references: <!-- excerpted/adapted from "SAXON XSLT Processing with Ant" by James Fuller, http://ablog.apress.com/?p=753 --> <!-- https:///www.saxonica.com/documentation9.0/using-xsl/commandline.html --> - <macrodef name="Saxon9" description="Invoke XSLT transformation on passed scene using passed stylesheet"> + <macrodef name="Saxon10" description="Invoke XSLT transformation on passed scene using passed stylesheet"> <attribute name="scene"/> <attribute name="stylesheet"/> <attribute name="suffix" default=""/> @@ -356,7 +361,7 @@ Key references: <attribute name="parameterPair3" default=""/> <sequential> <!-- - <echo message="Saxon9 processing @{scene}@{suffix}.@{extension} using @{stylesheet}, -catalog:${X3dDtdsSchemas.dir}/${xml.catalog.file}"/> + <echo message="Saxon10 processing @{scene}@{suffix}.@{extension} using @{stylesheet}, -catalog:${X3dDtdsSchemas.dir}/${xml.catalog.file}"/> <echo message="... -expand:'@{expand}' parameterPair1='@{parameterPair1}' parameterPair2='@{parameterPair2}' parameterPair3='@{parameterPair3}'"/> --> <java classname="net.sf.saxon.Transform" @@ -402,7 +407,7 @@ Key references: <java classname="org.web3d.x3d.tools.x3db.X3dCanonicalizer" classpath="${c14n.dir}/${c14n.jar}" fork="${fork}" - failonerror="false"> + failonerror="true"> <arg value="@{scene}.x3d"/> <arg value="@{scene}Canonical.xml"/> </java> @@ -448,8 +453,8 @@ Key references: <echo message="now canonicalize X3dTidy output:"/> <java classname="org.web3d.x3d.tools.x3db.X3dCanonicalizer" classpath="${c14n.dir}/${c14n.jar}" - fork="${fork}" - failonerror="false"> + fork="true" + failonerror="false"><!-- must have fork=true for failonerror to proceed --> <arg value="@{scene}Tidy.x3d"/> <arg value="@{scene}TidyCanonical.xml"/> </java> @@ -481,7 +486,7 @@ Key references: </macrodef> <!-- target tasks common to all build files ===================================================================== --> - <target name="all" depends="echo.timestamp,check.ant.java.versions,clean.backups,clean.duplicates,clean.RoundTrip,clean.X3dTidy,commonSetup,validate.full,build,upload" description="clean backups, build, zip and upload this X3D archive"> + <target name="all" depends="echo.timestamp,check.ant.java.versions,versions,clean.backups,clean.duplicates,clean.RoundTrip,clean.X3dTidy,commonSetup,validate.full,build,upload" description="clean backups, build, zip and upload this X3D archive"> <echo message="Copying latest build.log.txt to subdirectory ${archive.name}/_archive/"/> <copy file="build.log.txt" todir="_archive/" overwrite="true" failonerror="false"/> </target> @@ -1713,7 +1718,7 @@ ignoreSetupDownloadErrors=true </java> <echo>HelloWorld.json creation with X3dToJson.xslt</echo> <!-- JavaScript Object Notation (JSON) --> - <Saxon9 scene="HelloWorld" + <Saxon10 scene="HelloWorld" stylesheet="${stylesheet.dir}/X3dToJson" extension="json" expand="on"/> @@ -1740,7 +1745,7 @@ ignoreSetupDownloadErrors=true </java> <echo>HelloWorld.java creation with X3dToJava.xslt</echo> <!-- JavaScript Object Notation (JSON) --> - <Saxon9 scene="HelloWorld" + <Saxon10 scene="HelloWorld" stylesheet="${stylesheet.dir}/X3dToJava" extension="java" expand="on" @@ -1748,7 +1753,7 @@ ignoreSetupDownloadErrors=true <!-- expand:on since DTD defaults needed --> <echo>HelloWorld.py creation with X3dToPython.xslt</echo> <!-- JavaScript Object Notation (JSON) --> - <Saxon9 scene="HelloWorld" + <Saxon10 scene="HelloWorld" stylesheet="${stylesheet.dir}/X3dToPython" extension="py" expand="on" @@ -1756,14 +1761,14 @@ ignoreSetupDownloadErrors=true <!-- expand:on since DTD defaults needed --> <echo>HelloWorld.ttl creation with X3dToTurtle.xslt</echo> <!-- Turtle .ttl --> - <Saxon9 scene="HelloWorld" + <Saxon10 scene="HelloWorld" stylesheet="${stylesheet.dir}/X3dToTurtle" extension="ttl" expand="on" parameterPair1="defaultModelPrefix="/> <!-- expand:on since DTD defaults needed --> <echo message="${arq} --data ${semantics.dir}/ontologies/X3dOntology4.0.ttl --query ${semantics.dir}/queries/X3dHelloWorldQuery_03.rq --graph HelloWorld.ttl"/> - <exec executable="${arq}" dir="." vmlauncher="false"> + <exec executable="${arq}" dir="." vmlauncher="false" timeout="${timeout}"> <arg value="--graph"/> <arg value="HelloWorld.ttl"/> <arg value="--data"/> @@ -1888,7 +1893,7 @@ ignoreSetupDownloadErrors=true </java> <!-- JavaScript Object Notation (JSON) --> <echo>newScene.json creation with X3dToJson.xslt</echo> - <Saxon9 scene="newScene" + <Saxon10 scene="newScene" stylesheet="${stylesheet.dir}/X3dToJson" extension="json" expand="on"/> @@ -1916,7 +1921,7 @@ ignoreSetupDownloadErrors=true </java> <echo>newScene.java creation with X3dToJava.xslt</echo> <!-- JavaScript Object Notation (JSON) --> - <Saxon9 scene="newScene" + <Saxon10 scene="newScene" stylesheet="${stylesheet.dir}/X3dToJava" extension="java" expand="on" @@ -1924,7 +1929,7 @@ ignoreSetupDownloadErrors=true <!-- expand:on since DTD defaults needed --> <echo>newScene.py creation with X3dToPython.xslt</echo> <!-- JavaScript Object Notation (JSON) --> - <Saxon9 scene="newScene" + <Saxon10 scene="newScene" stylesheet="${stylesheet.dir}/X3dToPython" extension="py" expand="on" @@ -1932,14 +1937,14 @@ ignoreSetupDownloadErrors=true <!-- expand:on since DTD defaults needed --> <echo>HelloWorld.ttl creation with X3dToTurtle.xslt</echo> <!-- Turtle .ttl --> - <Saxon9 scene="newScene" + <Saxon10 scene="newScene" stylesheet="${stylesheet.dir}/X3dToTurtle" extension="ttl" expand="on" parameterPair1="defaultModelPrefix="/> <!-- expand:on since DTD defaults needed --> <echo message="${arq} --data ${semantics.dir}/ontologies/X3dOntology4.0.ttl --query ${semantics.dir}/queries/X3dHelloWorldQuery_03.rq --graph newScene.ttl"/> - <exec executable="${arq}" dir="." vmlauncher="false"> + <exec executable="${arq}" dir="." vmlauncher="false" timeout="${timeout}"> <arg value="--graph"/> <arg value="newScene.ttl"/> <arg value="--data"/> @@ -2125,10 +2130,35 @@ ignoreSetupDownloadErrors=true </for> </target> + <target name="validate.schematron.singleFile" description="validate one .x3d scene"> + <!-- TODO customize singleFilePath, singleFileName as desired --> + <property name="singleFilePath" location="AudioSpatialSound"/> + <property name="singleFileName" value="AllAudioGraphNodesTest"/><!-- no file extension --> + + <echo>${singleFilePath}/${singleFileName}.x3d validation using X3D Schematron rules</echo> + <java classname="net.sf.saxon.Transform" classpath="${saxon.dir}/${saxon.jar};." fork="false"> + <arg value="-warnings:recover"/> + <arg value="-s:${singleFilePath}"/> + <arg value="-o:${singleFilePath}/_schematron/${singleFileName}.svrl"/> <!-- ${archive.path}/ --> + <arg value="-xsl:${X3dSchematronValidityChecks.dir}/${X3dSchematronValidityChecks}.xslt"/> + </java> + <java classname="net.sf.saxon.Transform" classpath="${saxon.dir}/${saxon.jar};." fork="false"> + <arg value="-warnings:recover"/> + <arg value="-s:${singleFilePath}/_schematron/${singleFileName}.svrl"/> + <arg value="-o:${singleFilePath}/_schematron/${singleFileName}.svrl.txt"/> <!-- ${archive.path}/ --> + <arg value="-xsl:${X3dSchematronValidityChecks.dir}/${SvrlReportText}.xslt"/> + </java> + <concat> + <filelist dir="." files="${singleFilePath}/_schematron/${singleFileName}.svrl.txt"/> + </concat> + </target> + <target name="validate.schematron" description="validate each .x3d scene using X3D Schematron rules (caution: time consuming unless xmlcatalog points to local copy)" depends="get.saxon,clean.duplicates"> <echo message="Validate using X3D Schematron: ${archive.name} archive"/> + <echo message=" using ${X3dSchematronValidityChecks.dir}/${X3dSchematronValidityChecks}.xslt"/> <echo message="https://www.web3d.org/x3d/tools/schematron/X3dSchematron.html"/> + <echo>====================================================================================================================</echo> <for param="file.path.name"> <path> <fileset refid="x3dScenes"/> @@ -2201,6 +2231,7 @@ ignoreSetupDownloadErrors=true <concat> <filelist dir="." files="${relative.path1}/${relative.path2}/_schematron/${name.short}.svrl.txt"/> </concat> + <echo>====================================================================================================================</echo> </sequential> </outofdate> </sequential> @@ -2233,7 +2264,7 @@ ignoreSetupDownloadErrors=true regexp="([^\\]*\\)*([^\n]*)\.x3d" select="\2"/> <echo>Processing ${path.scene}/${filename.prefix}.x3d with xmllint</echo> - <exec executable="xmllint" vmlauncher="false" timeout="300000"><!-- 5 minute timeout in case process hangs --><!-- vmlauncher switch needed for netbeans invocation --> + <exec executable="xmllint" vmlauncher="false" timeout="${timeout}"><!-- timeout in case process hangs --><!-- vmlauncher switch needed for netbeans invocation --> <arg value="--version"/><!-- display the version of the XML library used --> <arg value="--valid"/> <!-- validate the document in addition to std well-formed check --> <arg value="--noout"/> <!-- don't output the result tree --> @@ -2245,7 +2276,7 @@ ignoreSetupDownloadErrors=true </for> </target> - <target name="refresh.local" depends="echo.timestamp,clean.backups,clean.duplicates,clean.RoundTrip,clean.X3dTidy,commonSetup,processScenes,catalog" description="quick master refresh of all .x3d examples: processScenes, catalog, zip"> + <target name="refresh.local" depends="echo.timestamp,versions,clean.backups,clean.duplicates,clean.RoundTrip,clean.X3dTidy,commonSetup,processScenes,catalog" description="quick master refresh of all .x3d examples: processScenes, catalog, zip"> <!-- unreliable when network delays occur: validate.DTD --> <antcall target="echo.timestamp"/> <echo message="${archive.name} refresh.local complete."/> @@ -2362,16 +2393,16 @@ ignoreSetupDownloadErrors=true <sequential> <!-- process individual files here. show full path to facilitate user loading, editing of reported files --> <echo>${archive.path}/${relative.path1}/${relative.path2}/${name.short}.x3d processing with X3dToXhtml stylesheet for pretty-print .html</echo> - <!-- Saxon9 is locally defined macro --> - <Saxon9 scene="${relative.path1}/${relative.path2}/${name.short}" + <!-- Saxon10 is locally defined macro --> + <Saxon10 scene="${relative.path1}/${relative.path2}/${name.short}" stylesheet="${stylesheet.dir}/X3dToXhtml" extension="html" parameterPair1="linkImages=true" expand="on"/> <!-- expand:on since DTD defaults needed --> <echo>${archive.path}/${relative.path1}/${relative.path2}/${name.short}.x3d processing with X3dExtrusionCrossSectionToSvg stylesheet for SVG diagrams (if Extrusion found)</echo> - <!-- Saxon9 is locally defined macro --> - <Saxon9 scene="${relative.path1}/${relative.path2}/${name.short}" + <!-- Saxon10 is locally defined macro --> + <Saxon10 scene="${relative.path1}/${relative.path2}/${name.short}" stylesheet="${stylesheet.dir}/X3dExtrusionCrossSectionToSvg" extension="svg" expand="on"/> @@ -2431,8 +2462,8 @@ ignoreSetupDownloadErrors=true <!-- process individual files here. show full path to facilitate user loading, editing of reported files --> <echo>${archive.path}/${relative.path1}/${relative.path2}/${name.short}.x3d processing with X3dToX3dom stylesheet:</echo> <echo>${archive.path}/${relative.path1}/${relative.path2}/${name.short}X3dom.xhtml</echo> - <!-- Saxon9 is locally defined macro --> - <Saxon9 scene="${relative.path1}/${relative.path2}/${name.short}" + <!-- Saxon10 is locally defined macro --> + <Saxon10 scene="${relative.path1}/${relative.path2}/${name.short}" stylesheet="${stylesheet.dir}/X3dToX3dom" parameterPair1="player=X3DOM" suffix="X3dom" @@ -2493,8 +2524,8 @@ ignoreSetupDownloadErrors=true <sequential> <!-- process individual files here. show full path to facilitate user loading, editing of reported files --> <echo>${archive.path}/${relative.path1}/${relative.path2}/${name.short}.x3d processing with X3dToX3dom(X_ITE) stylesheet: ${name.short}X_ITE.html</echo> - <!-- Saxon9 is locally defined macro --> - <Saxon9 scene="${relative.path1}/${relative.path2}/${name.short}" + <!-- Saxon10 is locally defined macro --> + <Saxon10 scene="${relative.path1}/${relative.path2}/${name.short}" stylesheet="${stylesheet.dir}/X3dToX3dom" parameterPair1="player=X_ITE" parameterPair2="urlScene=${name.short}.x3d" @@ -2556,8 +2587,8 @@ ignoreSetupDownloadErrors=true <sequential> <!-- process individual files here. show full path to facilitate user loading, editing of reported files --> <echo>${archive.path}/${relative.path1}/${relative.path2}/${name.short}.x3d processing with X3dToVrml97 stylesheet</echo> - <!-- Saxon9 is locally defined macro --> - <Saxon9 scene="${relative.path1}/${relative.path2}/${name.short}" + <!-- Saxon10 is locally defined macro --> + <Saxon10 scene="${relative.path1}/${relative.path2}/${name.short}" stylesheet="${stylesheet.dir}/X3dToVrml97" extension="wrl"/> </sequential> @@ -2786,8 +2817,8 @@ ignoreSetupDownloadErrors=true <sequential> <!-- process individual files here. show full path to facilitate user loading, editing of reported files --> <echo>${archive.path}/${relative.path1}/${relative.path2}/${name.short}.x3d processing with X3dToJson stylesheet</echo> - <!-- Saxon9 is locally defined macro --> - <Saxon9 scene="${relative.path1}/${relative.path2}/${name.short}" + <!-- Saxon10 is locally defined macro --> + <Saxon10 scene="${relative.path1}/${relative.path2}/${name.short}" stylesheet="${stylesheet.dir}/X3dToJson" extension="json" parameterPair1="traceEnabled=${traceEnabled}" @@ -2868,8 +2899,8 @@ ignoreSetupDownloadErrors=true <sequential> <!-- process individual files here. show full path to facilitate user loading, editing of reported files --> <echo>${archive.path}/${relative.path1}/${relative.path2}/${name.short}.x3d processing with X3dToX3dvClassicVrmlEncoding stylesheet</echo> - <!-- Saxon9 is locally defined macro --> - <Saxon9 scene="${relative.path1}/${relative.path2}/${name.short}" + <!-- Saxon10 is locally defined macro --> + <Saxon10 scene="${relative.path1}/${relative.path2}/${name.short}" stylesheet="${stylesheet.dir}/X3dToX3dvClassicVrmlEncoding" extension="x3dv"/> </sequential> @@ -3316,8 +3347,8 @@ app.replica.args=-mode scene -mipmaps -antialias 8 -anisotropicDegree 16 -verbos <!-- now that images are collected, restore file/timestamp by regenerating html --> <!-- X3dToXhtml.xslt process individual files here. show full path to facilitate user loading, editing of reported files --> <echo>${archive.path}/${relative.path1}/${relative.path2}/${name.short}.x3d processing with X3dToXhtml stylesheet pretty-print .html</echo> - <!-- Saxon9 is locally defined macro --> - <Saxon9 scene="${relative.path1}/${relative.path2}/${name.short}" + <!-- Saxon10 is locally defined macro --> + <Saxon10 scene="${relative.path1}/${relative.path2}/${name.short}" stylesheet="${stylesheet.dir}/X3dToXhtml" extension="html" parameterPair1="linkImages=true"/> @@ -3878,6 +3909,8 @@ app.replica.args=-mode scene -mipmaps -antialias 8 -anisotropicDegree 16 -verbos </sourcefiles> <mapper dir="." type="glob" from="*.x3d" to="*.html"/> <sequential> + <echo>==================================================</echo> + <echo message="@{file.path.name} "/> <echo message="check well-formedness of original model..."/> <xmlvalidate file="@{file.path.name}" failonerror="false" warn="true" lenient="true"/> <echo message="check DTD validation of original model..."/> @@ -3941,20 +3974,21 @@ app.replica.args=-mode scene -mipmaps -antialias 8 -anisotropicDegree 16 -verbos <!-- from processScenes.htmlPrettyPrintPages --> <!-- process individual files here. show full path to facilitate user loading, editing of reported files --> <echo>${archive.path}/${relative.path1}/${relative.path2}/${name.short}.x3d processing with X3dToXhtml stylesheet for pretty-print .html</echo> - <!-- Saxon9 is locally defined macro --> - <Saxon9 scene="${relative.path1}/${relative.path2}/${name.short}" + <!-- Saxon10 is locally defined macro --> + <Saxon10 scene="${relative.path1}/${relative.path2}/${name.short}" stylesheet="${stylesheet.dir}/X3dToXhtml" extension="html" parameterPair1="linkImages=true" - expand="on"/> - <!-- expand:on since DTD defaults needed --> + expand="on"/> + <!-- expand:on since DTD defaults needed --> <echo>${archive.path}/${relative.path1}/${relative.path2}/${name.short}.x3d processing with X3dExtrusionCrossSectionToSvg stylesheet for SVG diagrams (if Extrusion found)</echo> - <!-- Saxon9 is locally defined macro --> - <Saxon9 scene="${relative.path1}/${relative.path2}/${name.short}" + <!-- Saxon10 is locally defined macro --> + <Saxon10 scene="${relative.path1}/${relative.path2}/${name.short}" stylesheet="${stylesheet.dir}/X3dExtrusionCrossSectionToSvg" extension="svg" expand="on"/> <!-- expand:on since DTD defaults needed --> + <echo>==================================================</echo> </sequential> </outofdate> </sequential> @@ -4136,6 +4170,7 @@ app.replica.args=-mode scene -mipmaps -antialias 8 -anisotropicDegree 16 -verbos <target name="processScenes.java" description="generate java source, .class files, javadoc" depends="clean.RoundTrip"> <mkdir dir="${java.classes.dir}"/> <echo message="Verifying Apache Ant XML Catalog resolver classpath: ${resolver.dir}/${resolver.jar} (${resolver.jar.length} bytes)"/> + <ant target="versions"/> <for param="file.path.name"> <path> <fileset refid="x3dScenes"/> @@ -4183,8 +4218,8 @@ app.replica.args=-mode scene -mipmaps -antialias 8 -anisotropicDegree 16 -verbos <then> <!-- process individual files here. show full path to facilitate user loading, editing of reported files --> <echo>${archive.path}/${relative.path1}/${relative.path2}/${name.short}.x3d converted to ${name.short}.java</echo> - <!-- Saxon9 is locally defined macro --> - <Saxon9 scene="${relative.path1}/${relative.path2}/${name.short}" + <!-- Saxon10 is locally defined macro --> + <Saxon10 scene="${relative.path1}/${relative.path2}/${name.short}" stylesheet="${stylesheet.dir}/X3dToJava" parameterPair1="packageName=${archive.name}.${relative.path1}.${relative.path2}" parameterPair2= "className=${name.short}" @@ -4301,7 +4336,7 @@ app.replica.args=-mode scene -mipmaps -antialias 8 -anisotropicDegree 16 -verbos </exec> <!-- <echo message="pip install - -user - -upgrade x3d"/> - <exec executable="pip" dir="." vmlauncher="false"> + <exec executable="pip" dir="." vmlauncher="false" timeout="${timeout}"> <arg value="install"/> <arg value="- -user"/> <arg value="- -upgrade"/> @@ -4309,7 +4344,7 @@ app.replica.args=-mode scene -mipmaps -antialias 8 -anisotropicDegree 16 -verbos </exec> --> <echo message="pip show x3d"/> - <exec executable="pip" dir="." vmlauncher="false"> + <exec executable="pip" dir="." vmlauncher="false" timeout="${timeout}"> <arg value="show"/><!-- verbose --> <arg value="x3d"/> </exec> @@ -4376,8 +4411,8 @@ app.replica.args=-mode scene -mipmaps -antialias 8 -anisotropicDegree 16 -verbos <echo message="create python:"/> <!-- process individual files here. show full path to facilitate user loading, editing of reported files --> <echo>${archive.path}/${relative.path1}/${relative.path2}/${name.short}.x3d processing with X3dToPython stylesheet...</echo> - <!-- Saxon9 is locally defined macro --> - <Saxon9 scene="${relative.path1}/${relative.path2}/${name.short}" + <!-- Saxon10 is locally defined macro --> + <Saxon10 scene="${relative.path1}/${relative.path2}/${name.short}" stylesheet="${stylesheet.dir}/X3dToPython" extension="py" parameterPair1="insertPackagePrefix=false" @@ -4396,7 +4431,7 @@ app.replica.args=-mode scene -mipmaps -antialias 8 -anisotropicDegree 16 -verbos <else> <echo message="validate python:"/> <!--<echo message="PYTHONPATH=${env.PYTHONPATH}"/>--> - <exec executable="python" dir="." vmlauncher="false"> + <exec executable="python" dir="." vmlauncher="false" timeout="${timeout}"> <env key="PYTHONPATH" value="${env.PYTHONPATH}"/> <arg value="${relative.path1}/${relative.path2}/${name.short}.py"/> <!-- output-doc --> <arg value="-v"/><!-- verbose --> @@ -4415,7 +4450,7 @@ app.replica.args=-mode scene -mipmaps -antialias 8 -anisotropicDegree 16 -verbos <target name="processScenes.turtle" description="generate turtle source, run validation test" depends=""> <echo message="Verifying Apache Ant XML Catalog resolver classpath: ${resolver.dir}/${resolver.jar} (${resolver.jar.length} bytes)"/> - <echo message="==================================="/> + <echo message="==================================="/> <for param="file.path.name"> <path> <fileset refid="x3dScenes"/> @@ -4468,8 +4503,8 @@ app.replica.args=-mode scene -mipmaps -antialias 8 -anisotropicDegree 16 -verbos <echo message="Create ${name.short}.ttl turtle representation:"/> <!-- process individual files here. show full path to facilitate user loading, editing of reported files --> <echo>${archive.path}/${relative.path1}/${relative.path2}/${name.short}.x3d processing with X3dToTurtle stylesheet...</echo> - <!-- Saxon9 is locally defined macro --> - <Saxon9 scene="${relative.path1}/${relative.path2}/${name.short}" + <!-- Saxon10 is locally defined macro --> + <Saxon10 scene="${relative.path1}/${relative.path2}/${name.short}" stylesheet="${stylesheet.dir}/X3dToTurtle" extension="ttl" parameterPair1="defaultModelPrefix=" @@ -4492,9 +4527,9 @@ app.replica.args=-mode scene -mipmaps -antialias 8 -anisotropicDegree 16 -verbos <echo message="${turtleFileContents}" /> <echo /> --> <!-- create query output file --> - <copy file="${semantics.dir}/queries/X3dHelloWorldQuery_03.rq" tofile="${relative.path1}/${relative.path2}/${name.short}.rq.txt"/> + <copy file="${semantics.dir}/queries/X3dHelloWorldQuery_03.rq" tofile="${relative.path1}/${relative.path2}/${name.short}.rq.txt" overwrite="true"/> <echo message="${arq} --data ${semantics.dir}/ontologies/X3dOntology4.0.ttl --query ${semantics.dir}/queries/X3dHelloWorldQuery_03.rq --graph ${relative.path1}/${relative.path2}/${name.short}.ttl"/> - <exec executable="${arq}" dir="." vmlauncher="false"> + <exec executable="${arq}" dir="." vmlauncher="false" timeout="${timeout}"> <arg value="--graph"/> <arg value="${relative.path1}/${relative.path2}/${name.short}.ttl"/> <arg value="--data"/> @@ -4660,5 +4695,53 @@ app.replica.args=-mode scene -mipmaps -antialias 8 -anisotropicDegree 16 -verbos <classpath path="classes;lib/${jsai.full.archive.jar.name}"/> </java> </target> + + <target name="versions" description="show tool versions and environment values"> + <echo>ant -version</echo> + <exec executable="ant" dir="." vmlauncher="false"> + <arg value="-version"/> + </exec> + <echo>java -version</echo> + <exec executable="java" dir="." vmlauncher="false"> + <arg value="-version"/> + </exec> + <echo>python -version</echo> + <exec executable="python" dir="." vmlauncher="false"> + <arg value="--version"/> + </exec> + <!-- https://www.saxonica.com/documentation9.5/using-xsl/commandline.html --> + <echo>saxon -? help</echo> + <java classname="net.sf.saxon.Transform" classpath="${saxon.dir}/${saxon.jar};." failonerror="true"> + <arg value="-?" description="help information"/> + </java> + <echo></echo> + <!-- Ant environment variables https://ant.apache.org/manual/Tasks/property.html --> + <echo> ANT_HOME=${env.ANT_HOME}</echo> + <echo> JAVA_HOME=${env.JAVA_HOME}</echo> + <echo>PYTHONHOME=${env.PYTHONHOME}</echo> + <echo>PYTHONPATH=${env.PYTHONPATH}</echo> + <echo>Check for X3DJSAIL ${jsail.full.archive.jar.name} or ${jsai.classes.archive.jar.name}</echo> + <echo>CLASSPATH=${env.CLASSPATH}</echo> + <!--<echo>USER =${env.USER}</echo> --> + <!-- https://stackoverflow.com/questions/949678/ant-is-using-wrong-java-version --> + <echo>javac source/target $java.source=${java.source}</echo> + <echo>Java/JVM version $ant.java.version=${ant.java.version}</echo> + <echo>Java/JVM detail version $java.version=${java.version}</echo> + <echo>Ant version $ant.version=${ant.version}</echo> + <echo>Check for node.js installation from https://nodejs.org</echo> + <exec executable="${node.exe}"> + <arg value="--version"/> + </exec> + <echo >lib/X3DJSAIL.4.0.full.jar -version</echo> + <java jar="lib/X3DJSAIL.4.0.full.jar" fork="${fork}"> + <arg value="-version" description="log report"/> + </java> + <echo>Configuration settings: https://savage.nps.edu/Savage/developers.html</echo> + <!-- TODO Netbeans version --> + <!-- TODO Netbeans project version --> + <!-- DEBUG: to show all environment and local properties, add + <echoproperties/> --> + <echo message="==========================================="/> + </target> </project>