iteralmind.templatefeather.0.1.1.2.source-code.build.xml Maven / Gradle / Ivy
<project name="templatefeather" default="help" basedir="."> <property environment="ENV"/> <!-- Global properties...START --> <!-- Read in the properties file. --> <property file="build.properties"/> <property name="project_name_fs" value="${project.name}/"/> <property name="project_name_with_version" value="${project.name}-${version.number}"/> <!-- com.github.xbn..., ignoring base directories --> <property name="com_github_alit" value="com/github/aliteralmind/"/> <property name="cg_alit_feather" value="${com_github_alit}${project.name}/"/> <property name="cgx_feather_examples" value="${cg_alit_feather}examples/"/> <property name="cgx_feather_test" value="${cg_alit_feather}test/"/> <!-- Using base directories --> <property name="dir_sandbox_parent" value="${sandbox.dir}/"/> <property name="dir_sandbox" value="${dir_sandbox_parent}${project_name_fs}"/> <property name="dir_sandbox_src" value="${dir_sandbox}src/"/> <property name="dir_src_feather" value="${dir_sandbox_src}${cg_alit_feather}"/> <property name="dir_sandbox_examples" value="${dir_sandbox}examples/"/> <property name="dir_sandbox_test" value="${dir_sandbox}test/"/> <property name="dir_sandbox_parent" value="${sandbox.dir}/"/> <property name="dir_sandbox" value="${dir_sandbox_parent}${project_name_fs}"/> <property name="dir_sandbox_src_xbn" value="${dir_sandbox}com/github/aliteralmind/"/> <property name="dir_sandbox_bldfiles" value="${dir_sandbox}z_build/"/> <property name="dir_sandbox_src_xbn_ant" value="${dir_sandbox_src_xbn}testdev/ant/"/> <property name="dir_sandbox_jar_dependencies" value="${dir_sandbox_bldfiles}jar_dependencies/"/> <property name="dir_classes_parent" value="${build.class.dir}/"/> <property name="dir_classes_xbn" value="${dir_classes_parent}com/github/aliteralmind/"/> <property name="dir_build_grandparent" value="${build.dir}/"/> <property name="dir_build_parent" value="${dir_build_grandparent}${project_name_with_version}/"/> <property name="dir_build" value="${dir_build_parent}${project_name_with_version}/"/> <property name="dir_build_logs" value="${dir_build}logs/"/> <property name="dir_build_download" value="${dir_build}download/"/> <property name="dir_build_download_templatefeather_all_jar" value="${dir_build_download}${project_name_with_version}-all.jar"/> <property name="dir_build_download_templatefeather_core_jar" value="${dir_build_download}${project_name_with_version}.jar"/> <property name="DIR_bld_src" value="${dir_build}com/github/aliteralmind/"/> <property name="DIR_bld_docs" value="${dir_build}documentation/"/> <property name="dir_build_docs_javadoc" value="${DIR_bld_docs}javadoc/"/> <property name="curr_redir_dir" value="${dir_build_parent}/redir_file_for_QcurrentQ_directory/"/> <property name="curr_redir_file" value="${curr_redir_dir}index.html"/> <property name="dir_working" value="${working.dir}/${project_name_fs}"/> <!-- Global properties...END --> <!-- See: http://stackoverflow.com/questions/5103384/ant-warning-includeantruntime-was-not-set --> <property name="includeantruntime" value="false"/> <!-- CLASSPATH and custom tasks...START --> <path id="project_classpath_id"> <pathelement location="${build.class.dir}"/> <pathelement location="${dir_build_download_templatefeather_all_jar}"/> <fileset dir="${dir_sandbox_jar_dependencies}" includes="*.jar"/> <!-- <fileset dir="${dir_sandbox_jar_dependencies}"> <include name="commons-collections4-4.0.jar"/> <include name="commons-io-2.4.jar"/> <include name="commons-lang3-3.3.2.jar"/> <include name="junit-4.8.2.jar"/> <include name="xbnjava_${xbnjava_project_version}.jar"/> <include name="codelet_${codelet_project_version}.jar"/> <include name="guava-16.0.1.jar"/> </fileset> --> </path> <pathconvert pathsep=";" property="project_classpath_str" refid="project_classpath_id"/> <taskdef name="propfromrplc" classname="com.github.xbn.testdev.ant.ATPropFromRplc" classpathref="project_classpath_id"/> <!-- CLASSPATH and custom tasks...END --> <target name="help" description="Getting started information"> <echo>This is the Ant build file for ${project.name}. Try ant -projecthelp Installation of the Template Feather build process is done in a single step: By changing 'base.dir', in build.properties, to your installation directory. --To do a full build of XBN-Java-- The *documentation* for Template Feather uses codelets. But Codelet itself is based on Template Feather. Hence, the rigamarole: -1- Build Template Feather (part 1 of 2): -1.a- ant refresh -1.b- ant pubprecodelet -2- Build Codelet: - ant publish -3- Finish building Template Feather (part 2 of 2): - ant pubpostcodelet Documentation for Template Feather can be generated before Codelet is built. The example codes will be excluded.</echo> </target> <!-- <property name="codelet_project_name_and_version" value="codelet-${codelet_project_version}"/> <target name="copycodeletjar" description="Duplicates Codelet's 'core' jar into the dependency directory"> <copy file="${base.dir}/build/${codelet_project_name_and_version}/download/${codelet_project_name_and_version}.jar" todir="${dir_sandbox_jar_dependencies}"/> </target> <target name="-autocopycodeletjar" if="do.auto.copy.codelet.jar"> <antcall target="copycodeletjar"/> </target> --> <property name="dir_sandbox_ant_subxml" value="${dir_sandbox_bldfiles}ant_sub_files/"/> <import file="${dir_sandbox_ant_subxml}backup.xml"/> <import file="${dir_sandbox_ant_subxml}compile_main.xml"/> <import file="${dir_sandbox_ant_subxml}compile_proper.xml"/> <import file="${dir_sandbox_ant_subxml}compile_tests.xml"/> <import file="${dir_sandbox_ant_subxml}compile_examples.xml"/> <import file="${dir_sandbox_ant_subxml}javadoc.xml"/> <import file="${dir_sandbox_ant_subxml}refresh.xml"/> <import file="${dir_sandbox_ant_subxml}zip.xml"/> <target name="publish" description="Full build of Template Featherweight."> <antcall target="pubprecodelet"/> <antcall target="pubpostcodelet"/> </target> <target name="prc" description="Shortcut for pubprecodelet."> <antcall target="pubprecodelet"/> </target> <target name="pubprecodelet" description="compileprecodelet, pubprecodelet2"> <antcall target="refresh"/> <record name="${dir_build_logs}build_log_pre_codelet.txt" action="start"/> <antcall target="compileprecodelet"/> <antcall target="pubprecodelet2"/> <record name="${dir_build_logs}build_log_pre_codelet.txt" action="stop"/> </target> <target name="pubprecodelet2" description="compileexamples, pubprecodelet3"> <antcall target="compileexamples"/> <antcall target="pubprecodelet3"/> </target> <target name="pubprecodelet3" description="compiletests, jar, unit"> <antcall target="compiletests"/> <antcall target="jar"/> <antcall target="unit"/> </target> <target name="poc" description="Shortcut for pubpostcodelet."> <antcall target="pubpostcodelet"/> </target> <target name="pubpostcodelet" description="compilepostcodelet, doczip, preppom"> <record name="${dir_build_logs}build_log_post_codelet.txt" action="start"/> <antcall target="compilepostcodelet"/> <!-- <antcall target="-autocopycodeletjar"/> --> <antcall target="doczip"/> <antcall target="currversionredirfile"/> <antcall target="preppom"/> <record name="${dir_build_logs}build_log_post_codelet.txt" action="stop"/> </target> <target name="currversionredirfile" description="Copies the 'current' directory redirect page to build, and updates its version number to the current."> <delete quiet="true" dir="${curr_redir_dir}"/> <mkdir dir="${curr_redir_dir}"/> <copy file="${dir_sandbox_bldfiles}other/redir_for_QcurrentQ_directory_on_aliteralmind_com.html" tofile="${curr_redir_file}"/> <replace file="${curr_redir_file}" summary="yes" token="^{current_project_version}" value="${version.number}"/> </target> <target name="dz" description="Shortcut for doczip."> <antcall target="doczip"/> </target> <target name="doczip" description="doc, doc2, zip, zip2"> <antcall target="doc"/> <antcall target="doc2"/> <antcall target="zip"/> <antcall target="zip2"/> </target> <target name="unit" description="Executes all unit tests"> <java classname="com.github.aliteralmind.templatefeather.test.UnitTestRunner" failonerror="true" classpathref="project_classpath_id"/> </target> <target name="pp" description="Shortcut for preppom."> <antcall target="preppom"/> </target> <target name="preppom" description="Moves z_build/pom_source_file.xml to pom.xml, and sets the proper version number."> <property name="pom_xml_dest" value="${dir_sandbox}pom.xml"/> <delete file="${pom_xml_dest}"/><!-- Originates in task preppom. Needed by task clean --> <copy file="${dir_sandbox_bldfiles}other/pom_source_file.xml" tofile="${pom_xml_dest}"/> <replace file="${pom_xml_dest}" summary="yes" token="^{project_version_for_jd}" value="${version.number}"/> <replace file="${pom_xml_dest}" summary="yes" token="^{project_build_dir}" value="${dir_build_parent}"/> <replace file="${pom_xml_dest}" summary="yes" token="^{xbnjava_project_version}" value="${xbnjava_project_version}"/> </target> <!-- See http://ant.apache.org/faq.html#propertyvalue-as-name-for-property --> <macrodef name="propertywithdynamicallynamedvalue"> <attribute name="propname"/> <attribute name="valuepropname"/> <sequential> <property name="@{propname}" value="${@{valuepropname}}"/> </sequential> </macrodef> <target name="linkchecker" description="Find and log all broken links in the generated JavaDoc. For manual calling only. Tested only on Windows, but the application is cross-platform."> <property name="output_file" value="${dir_build_grandparent}${project_name_with_version}-brokenlinks.txt"/> <echo>Writing output to ${output_file}...</echo> <exec executable="${link.checker.install.dir}linkchecker.exe" output="${output_file}"> <arg value="--config=${dir_sandbox_bldfiles_other}linkchecker_config.txt"/> <arg value="${dir_build_docs_javadoc}overview-summary.html"/> </exec> <echo>Duplicating log to ${dir_build_logs}</echo> <copy file="${output_file}" todir="${dir_build_logs}"/> <echo>(If you want the log on aliteralmind, re-run 'dupbuildtoalit'.)</echo> </target> <!-- FOR JEFF EPSTEIN'S USE ONLY...start --> <import file="${dir_sandbox_ant_subxml}for_jeff_epstein_only.xml" optional="true"/> <target name="prcj" description="FOR JEFF EPSTEIN'S USE ONLY. Shortcut for pubprecodelet, copyjartoxbnandcodelet."> <antcall target="pubprecodelet"/> <antcall target="copyjartoxbnandcodelet"/> </target> <target name="pocj" description="FOR JEFF EPSTEIN'S USE ONLY. Shortcut for pubpostcodelet, dupbuildtoalit."> <antcall target="pubpostcodelet"/> <antcall target="dupbuildtoalit"/> </target> <target name="jxc" description="FOR JEFF EPSTEIN'S USE ONLY. Shortcut for copyjartoxbnandcodelet"> <antcall target="copyjartoxbnandcodelet"/> </target> <target name="copyjartoxbnandcodelet" description="FOR JEFF EPSTEIN'S USE ONLY. Copies the TemplateFeather 'all' jar to the Codelet sandbox directory, and the 'core' (non-'all') jar to the XBN-Java sandbox. Old jars are deleted."> <property name="codelet_jar_dependencies_dir" value="${sandbox.dir}/codelet/z_build/jar_dependencies/"/> <delete quiet="true"> <fileset dir="${codelet_jar_dependencies_dir}"> <include name="${project.name}-*.jar"/> </fileset> </delete> <copy file="${dir_build_download_templatefeather_all_jar}" todir="${codelet_jar_dependencies_dir}"/> <property name="xbnjava_jar_dependencies_dir" value="${sandbox.dir}/xbnjava/z_build/jar_dependencies/"/> <delete quiet="true"> <fileset dir="${xbnjava_jar_dependencies_dir}"> <include name="${project.name}-*.jar"/> </fileset> </delete> <copy file="${dir_build_download_templatefeather_core_jar}" todir="${xbnjava_jar_dependencies_dir}"/> </target> <property name="alit_dir" value="C:\data_jeffy\jeffyepstein_com\jeffyepstein_com\docs\computer\programming\${project.name}\"/> <target name="dupbuildtoalit" description="FOR JEFF EPSTEIN'S USE ONLY. Copy all files to local aliteralmind.com directory"> <echo>Copying current-version redirect</echo> <copy file="${curr_redir_file}" todir="${alit_dir}current" overwrite="true"/> <echo>Copying entire build directory</echo> <delete quiet="true" dir="${alit_dir}${project_name_with_version}"/> <copy todir="${alit_dir}"> <fileset dir="${dir_build_parent}" includes="${project_name_with_version}/**"/> </copy> </target> <!-- FOR JEFF EPSTEIN'S USE ONLY...end --> </project>