From 46b1636d70f462f485d349d4145033874a49e5cf Mon Sep 17 00:00:00 2001 From: brutzman <brutzman@nps.edu> Date: Sun, 30 Apr 2023 12:45:38 -0700 Subject: [PATCH] custom javadoc headers for assignments, examples --- assignments/build.xml | 74 ++++++++++++++++++++++++++++++++++ assignments/src/overview.html | 40 +++++++++++++++++++ build.xml | 12 +++++- examples/build.xml | 75 +++++++++++++++++++++++++++++++++++ examples/src/overview.html | 40 +++++++++++++++++++ 5 files changed, 239 insertions(+), 2 deletions(-) create mode 100644 assignments/src/overview.html create mode 100644 examples/src/overview.html diff --git a/assignments/build.xml b/assignments/build.xml index c9eda60cd2..a0f287a7cc 100644 --- a/assignments/build.xml +++ b/assignments/build.xml @@ -118,4 +118,78 @@ POSSIBILITY OF SUCH DAMAGE. <echo message="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/tree/master/assignments"/> <nbbrowse url="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/tree/master/assignments"/> </target> + + <!-- ensure backwards compatibility of produced jar to specified version of Java, though project itself may be higher --> + <property name="java.source" value="17"/><!-- LTS --> + <property name="java.target" value="17"/><!-- LTS --> + <property name="dist.javadoc.dir" value="dist/javadoc"/> + + <property name="javadoc.additionalparam" value=""/> + <property name="javadoc.author" value="Don Brutzman brutzman@nps.edu"/> + <property name="javadoc.dir" value="${dist.javadoc.dir}"/> + <property name="javadoc.encoding" value="ISO-8859-1"/> + <property name="javadoc.copyright" value="Copyright ©1995-2023 held by the authors, <a href='https://www.nps.edu'>Naval Postgraduate School (NPS)</a> under an <a href='../license.html'>open-source license</a> and free for any use. <a href='mailto:brutzman@nps.edu?subject=opendis7-java%20feedback'>Feedback</a> is welcome."/> + <property name="javadoc.noindex" value="false"/> + <property name="javadoc.nonavbar" value="false"/> + <property name="javadoc.notree" value="false"/> + <property name="javadoc.private" value="false"/> + <property name="javadoc.source" value="${java.source}"/> + <property name="javadoc.splitindex" value="true"/> + <property name="javadoc.breakiterator" value="true"/> + <property name="javadoc.use" value="true"/><!-- Create class and package usage pages --> + <property name="javadoc.version" value="true"/> + <property name="javadoc.windowtitle" value="MV3500 Distributed Simulation Student Assignments Javadoc"/> + <property name="javadoc.doctitle" value="${javadoc.windowtitle}"/> + <!-- build.impl <javadoc additionalparam="-J-Dfile.encoding=${file.encoding} ${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}"> --> + + + <target name="javadoc.custom" description="Customized javadoc"> + + <copy file="images/OpenDisSurferDude.png" todir="${javadoc.dir}"/> + <javadoc destdir="${javadoc.dir}" + author="${javadoc.author}" + bottom="${javadoc.copyright}" + breakiterator="${javadoc.breakiterator}" + classpath="${x3djsail.stylesheets.dir}/${jsai.full.archive.jar.name};${run.test.classpath}" + Encoding="${javadoc.encoding}" + Doctitle="${javadoc.doctitle}" + Header="${javadoc.doctitle}" + maxmemory="4096m" + noindex="${javadoc.noindex}" + nonavbar="${javadoc.nonavbar}" + notree="${javadoc.notree}" + Overview="src/overview.html" + Private="${javadoc.private}" + source="${java.source}" + Splitindex="${javadoc.splitindex}" + Use="${javadoc.use}" + useexternalfile="yes" + verbose="true" + version="${javadoc.version}" + windowtitle="${javadoc.windowtitle}"> + <classpath> + <pathelement location="../lib/opendis7-full.jar"/> + <pathelement location="../lib/open-dis_4.16.jar"/> + <pathelement location="../lib/dis-enums-1.3.jar"/> + <pathelement location="../lib/simkit.jar"/> + </classpath> + <fileset dir="." defaultexcludes="yes"> + <include name="src/**/*.java"/> + </fileset> + </javadoc> + <antcall target="view.javadoc.local"/> + </target> + + <target name="view.javadoc.local" description="view local package javadoc in web browser (Netbeans only)"> + <echo message="view local javadoc in ${dist.javadoc.dir} subdirectory"/> + <nbbrowse file="${dist.javadoc.dir}/index.html" /> + <!-- TODO implementation-independent approach if possible, but note that other Ant approaches usually have to be customized for each OS. --> + </target> + + <target name="view.javadoc.online" description="view online package javadoc in web browser (Netbeans only)"> + <echo message="TODO DEPLOY - view online javadoc in dist/javadoc subdirectory"/> + <nbbrowse url="https://savage.nps.edu/opendis7-java/javadoc" /> + <!-- TODO implementation-independent approach if possible, but note that other Ant approaches usually have to be customized for each OS. --> + </target> + </project> diff --git a/assignments/src/overview.html b/assignments/src/overview.html new file mode 100644 index 0000000000..14aefa70f0 --- /dev/null +++ b/assignments/src/overview.html @@ -0,0 +1,40 @@ +<html> + <body> + <p> + <!-- Note that javadoc throws an incorrect error regarding title attribute, but resulting HTML works as expected --> + <a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/blob/master/assignments/README.md" target="_blank" title="Open-Dis Surfer Dude, Thanks Don McGregor!"><img src="OpenDisSurferDude.png" alt="Open-Dis Surfer Dude, Thanks Don McGregor!" style="float:right"/></a> + Examples, presentations and projects are provided in + <a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500" target="_blank">MV3500 Distributed Simulation Fundamentals</a> + course archive by the + <a href="https://nps.edu/web/moves" target="_blank">Modeling, Virtual Environments, Simulation (MOVES) Institute</a> + of the + <a href="https://www.nps.edu" target="_blank">Naval Postgraduate School (NPS)</a>. + </p> + + <h3> References </h3> + + <ul> + <li> + <a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/raw/master/MV3500DistributedSimulationSyllabus2023MarchJune.pdf" target="_blank">MV3500 Course Syllabus</a> + provides a hands-on programming introduction to distributed communications in simulation applications. + </li> + <li> + The + <a href="https://github.com/open-dis/opendis7-java" target="_blank">opendis7-java</a> + library provides a complete type-safe Java implementation of both + the DIS Protocol version 7 (IEEE 1278.1-2012) and SISO-REF-010 Enumerations specifications, + interfaces and objects, all as open source. + </li> + <li> + <a href="https://savage.nps.edu/Savage/developers.html" target="_blank">Savage Developers Guide</a> + describes system configuration supporting various software projects by the NPS MOVES Savage Research Group. + </li> + <li> + <a href="https://wireshark.org" target="_blank">Wireshark</a> network protocol analyzer, + and + <a href="https://www.youtube.com/watch?v=TkCSr30UojM" target="_blank">Wireshark Tutorial for Beginners video</a> by Anson Alexander + </li> + </ul> + + </body> +</html> \ No newline at end of file diff --git a/build.xml b/build.xml index e8ba1b0550..50363c0aae 100644 --- a/build.xml +++ b/build.xml @@ -47,10 +47,18 @@ POSSIBILITY OF SUCH DAMAGE. <property name="specificationsDirectory" location="specifications"/> <import file="specifications/build.xml"/> --> + <target name="all"> + <ant dir="examples" target="clean"/> + <ant dir="examples" target="jar"/> + <ant dir="assignments" target="clean"/> + <ant dir="assignments" target="jar"/> + <antcall target="javadoc.all"/> + </target> + <target name="javadoc.all"> <ant dir="examples" target="view.opendis7.javadoc"/> - <ant dir="assignments" target="javadoc"/> - <ant dir="examples" target="javadoc"/> + <ant dir="assignments" target="javadoc.custom"/> + <ant dir="examples" target="javadoc.custom"/> </target> <target name="view.gitlab.nps.edu.MV3500" description="view MV3500 gitlab site in web browser (via Netbeans only)"> diff --git a/examples/build.xml b/examples/build.xml index 1ffa49ebd0..a5ea15bb52 100644 --- a/examples/build.xml +++ b/examples/build.xml @@ -99,4 +99,79 @@ <echo message="https://savage.nps.edu/opendis7-java/javadoc"/> <nbbrowse url="https://savage.nps.edu/opendis7-java/javadoc"/> </target> + + <!-- ensure backwards compatibility of produced jar to specified version of Java, though project itself may be higher --> + <property name="java.source" value="17"/><!-- LTS --> + <property name="java.target" value="17"/><!-- LTS --> + <property name="dist.javadoc.dir" value="dist/javadoc"/> + + <property name="javadoc.additionalparam" value=""/> + <property name="javadoc.author" value="Don Brutzman brutzman@nps.edu"/> + <property name="javadoc.dir" value="${dist.javadoc.dir}"/> + <property name="javadoc.encoding" value="ISO-8859-1"/> + <property name="javadoc.copyright" value="Copyright ©1995-2023 held by the authors, <a href='https://www.nps.edu'>Naval Postgraduate School (NPS)</a> under an <a href='../license.html'>open-source license</a> and free for any use. <a href='mailto:brutzman@nps.edu?subject=opendis7-java%20feedback'>Feedback</a> is welcome."/> + <property name="javadoc.noindex" value="false"/> + <property name="javadoc.nonavbar" value="false"/> + <property name="javadoc.notree" value="false"/> + <property name="javadoc.private" value="false"/> + <property name="javadoc.source" value="${java.source}"/> + <property name="javadoc.splitindex" value="true"/> + <property name="javadoc.breakiterator" value="true"/> + <property name="javadoc.use" value="true"/><!-- Create class and package usage pages --> + <property name="javadoc.version" value="true"/> + <property name="javadoc.windowtitle" value="MV3500 Distributed Simulation Examples Javadoc"/> + <property name="javadoc.doctitle" value="${javadoc.windowtitle}"/> + <!-- build.impl <javadoc additionalparam="-J-Dfile.encoding=${file.encoding} ${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}"> --> + + + <target name="javadoc.custom" description="Customized javadoc"> + + <echo message="$javac.classpath=${javac.classpath}"/> + <copy file="images/OpenDisSurferDude.png" todir="${javadoc.dir}"/> + <javadoc destdir="${javadoc.dir}" + author="${javadoc.author}" + bottom="${javadoc.copyright}" + breakiterator="${javadoc.breakiterator}" + classpath="${x3djsail.stylesheets.dir}/${jsai.full.archive.jar.name};${run.test.classpath}" + Encoding="${javadoc.encoding}" + Doctitle="${javadoc.doctitle}" + Header="${javadoc.doctitle}" + maxmemory="4096m" + noindex="${javadoc.noindex}" + nonavbar="${javadoc.nonavbar}" + notree="${javadoc.notree}" + Overview="src/overview.html" + Private="${javadoc.private}" + source="${java.source}" + Splitindex="${javadoc.splitindex}" + Use="${javadoc.use}" + useexternalfile="yes" + verbose="true" + version="${javadoc.version}" + windowtitle="${javadoc.windowtitle}"> + <classpath> + <pathelement location="../lib/opendis7-full.jar"/> + <pathelement location="../lib/open-dis_4.16.jar"/> + <pathelement location="../lib/dis-enums-1.3.jar"/> + <pathelement location="../lib/simkit.jar"/> + </classpath> + <fileset dir="." defaultexcludes="yes"> + <include name="src/**/*.java"/> + </fileset> + </javadoc> + <antcall target="view.javadoc.local"/> + </target> + + <target name="view.javadoc.local" description="view local package javadoc in web browser (Netbeans only)"> + <echo message="view local javadoc in ${dist.javadoc.dir} subdirectory"/> + <nbbrowse file="${dist.javadoc.dir}/index.html" /> + <!-- TODO implementation-independent approach if possible, but note that other Ant approaches usually have to be customized for each OS. --> + </target> + + <target name="view.javadoc.online" description="view online package javadoc in web browser (Netbeans only)"> + <echo message="TODO DEPLOY - view online javadoc in dist/javadoc subdirectory"/> + <nbbrowse url="https://savage.nps.edu/opendis7-java/javadoc" /> + <!-- TODO implementation-independent approach if possible, but note that other Ant approaches usually have to be customized for each OS. --> + </target> + </project> diff --git a/examples/src/overview.html b/examples/src/overview.html new file mode 100644 index 0000000000..38e8622890 --- /dev/null +++ b/examples/src/overview.html @@ -0,0 +1,40 @@ +<html> + <body> + <p> + <!-- Note that javadoc throws an incorrect error regarding title attribute, but resulting HTML works as expected --> + <a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/blob/master/examples/README.md" target="_blank" title="Open-Dis Surfer Dude, Thanks Don McGregor!"><img src="OpenDisSurferDude.png" alt="Open-Dis Surfer Dude, Thanks Don McGregor!" style="float:right"/></a> + Examples, presentations and projects are provided in + <a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500" target="_blank">MV3500 Distributed Simulation Fundamentals</a> + course archive by the + <a href="https://nps.edu/web/moves" target="_blank">Modeling, Virtual Environments, Simulation (MOVES) Institute</a> + of the + <a href="https://www.nps.edu" target="_blank">Naval Postgraduate School (NPS)</a>. + </p> + + <h3> References </h3> + + <ul> + <li> + <a href="https://gitlab.nps.edu/Savage/NetworkedGraphicsMV3500/-/raw/master/MV3500DistributedSimulationSyllabus2023MarchJune.pdf" target="_blank">MV3500 Course Syllabus</a> + provides a hands-on programming introduction to distributed communications in simulation applications. + </li> + <li> + The + <a href="https://github.com/open-dis/opendis7-java" target="_blank">opendis7-java</a> + library provides a complete type-safe Java implementation of both + the DIS Protocol version 7 (IEEE 1278.1-2012) and SISO-REF-010 Enumerations specifications, + interfaces and objects, all as open source. + </li> + <li> + <a href="https://savage.nps.edu/Savage/developers.html" target="_blank">Savage Developers Guide</a> + describes system configuration supporting various software projects by the NPS MOVES Savage Research Group. + </li> + <li> + <a href="https://wireshark.org" target="_blank">Wireshark</a> network protocol analyzer, + and + <a href="https://www.youtube.com/watch?v=TkCSr30UojM" target="_blank">Wireshark Tutorial for Beginners video</a> by Anson Alexander + </li> + </ul> + + </body> +</html> \ No newline at end of file -- GitLab