
iteralmind.codelet.0.1.4.1.source-code.build.xml Maven / Gradle / Ivy
<project name="codelet" default="help" basedir="."> <property environment="ENV"/> <!-- Global properties...START --> <!-- Read in the properties file. For each directory variable in the property file... xbn.dir.whatever=subdir ...copy it into this file, replacing the name's periods with underscores, and its value with the *entire* directory... xbn_dir_whatever=${xbn.dir.parent}\${xbn.dir.whatever} --> <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_codelet" value="${com_github_alit}${project.name}/"/> <property name="cga_codelet_examples" value="${cg_alit_codelet}examples/"/> <property name="cga_codelet_test" value="${cg_alit_codelet}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_codelet" value="${dir_sandbox_src}${cg_alit_codelet}"/> <property name="dir_sandbox_examples" value="${dir_sandbox}examples/"/> <property name="dir_sandbox_test" value="${dir_sandbox}test/"/> <property name="dir_sandbox_bldfiles" value="${dir_sandbox}z_build/"/> <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_alit" value="${build.class.dir}/${com_github_alit}"/> <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_codelet_all_jar" value="${dir_build_download}${project_name_with_version}-all.jar"/> <property name="dir_build_download_codelet_core_jar" value="${dir_build_download}${project_name_with_version}.jar"/> <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}"/> <property name="ant.regexp.regexpimpl" value="org.apache.tools.ant.util.regexp.JakartaOroRegexp"/> <property name="pom_xml_dest" value="${dir_sandbox}pom.xml"/> <!-- 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_codelet_all_jar}"/> <!-- <pathelement location="${dir_sandbox_jar_dependencies}xbnjava-0.1.5-all.jar"/> --> <!-- All jars at once: --> <!-- --> <fileset dir="${dir_sandbox_jar_dependencies}" includes="*.jar"/> <!-- Individual jars --> <!-- <fileset dir="${dir_sandbox_jar_dependencies}"> <include name="xbnjava-0.1.5-all.jar"/> <include name="apache-ant-1.9.4.jar"/> <include name="commons-io-2.4.jar"/> <include name="commons-lang3-3.3.2.jar"/> <include name="guava-16.0.1.jar"/> <include name="hamcrest-core-1.3.jar"/> <include name="jdk_751__tools__contains_com_sun.jar"/> <include name="junit-4.11.jar"/> <include name="templatefeather-0.1.1.2-all.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"/> <!-- <taskdef name="replaceindent" 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 Codelet 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 Codelet: ant publish</echo> </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_examples.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}javadoc.xml"/> <!-- <import file="${dir_sandbox_ant_subxml}javadoc_replace_headers_in_one_dir.xml"/> --> <import file="${dir_sandbox_ant_subxml}refresh.xml"/> <import file="${dir_sandbox_ant_subxml}zip.xml"/> <!-- <target name="copyxbnandtmpljars" description="Duplicates the 'core' jars files from the XBN-Java and Template Featherweight build directories."> <property name="xbnjava_project_name_and_version" value="xbnjava-${xbnjava_project_version}"/> <echo>xbnjava_project_name_and_version=${xbnjava_project_name_and_version}</echo> <copy file="${base.dir}/build/${xbnjava_project_name_and_version}/download/${xbnjava_project_name_and_version}-all.jar" todir="${dir_sandbox_jar_dependencies}"/> <property name="templatefeather_project_name_and_version" value="templatefeather-${templatefeather_project_version}"/> <copy file="${base.dir}/build/${templatefeather_project_name_and_version}/download/${templatefeather_project_name_and_version}-all.jar" todir="${dir_sandbox_jar_dependencies}"/> </target> <target name="-autocopyxbnandtmpljars" if="do.auto.copy.xbn.jars"> <antcall target="copyxbnandtmpljars"/> </target> --> <target name="cp" description="Shortcut for cleanpublish."> <antcall target="cleanpublish"/> </target> <target name="cleanpublish" description="refresh, publish"> <antcall target="refresh"/> <antcall target="publish"/> </target> <target name="publish" description="Publish Codelet: compileproper, publish2"> <record name="${dir_build_logs}build_log.txt" action="start"/> <!-- <antcall target="-autocopyxbnandtmpljars"/> --> <antcall target="compileproper"/> <antcall target="publish2"/> <record name="${dir_build_logs}build_log.txt" action="stop"/> </target> <target name="publish2" description="compileexamples, publish3"> <antcall target="compileexamples"/> <antcall target="publish3"/> </target> <target name="publish3" description="compiletests, unit, jar, delete_classes, doczip, preppom"> <antcall target="compiletests"/> <antcall target="unit"/> <antcall target="jar"/> <antcall target="delete_classes"/> <antcall target="doczip"/> <antcall target="currversionredirfile"/> <antcall target="preppom"/> </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="unit" description="Executes com.github.xbn.unittests.UnitTestRunner"> <java classname="com.github.aliteralmind.codelet.test.UnitTestRunner" failonerror="true" classpathref="project_classpath_id"/> </target> <target name="dz" description="Shortcut for doczip."> <antcall target="doczip"/> </target> <target name="doczip" description="doc, doc2, zip, zip2"> <record name="${dir_build_logs}javadoc_and_zip_log.txt" action="start"/> <antcall target="doc"/> <antcall target="doc2"/> <antcall target="zip"/> <antcall target="zip2"/> <record name="${dir_build_logs}javadoc_and_zip_log.txt" action="stop"/> </target> <target name="pp" description="Shortcut for preppom."> <antcall target="preppom"/> </target> <target name="preppom" description="Moves z_build/other/pom_source_file.xml to pom.xml, and sets the proper version number."> <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_number}" 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="^{templatefeather_project_version}" value="${templatefeather_project_version}"/> </target> <target name="jxt" description="Shortcut for copyjartoxbnandtmplfeather"> <antcall target="copyjartoxbnandtmplfeather"/> </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="cpj" description="FOR JEFF EPSTEIN'S USE ONLY. Shortcut for cleanpublish, copyjartoxbnandtmplfeather."> <antcall target="cleanpublish"/> <antcall target="copyjartoxbnandtmplfeather"/> <antcall target="dupbuildtoalit"/> </target> <target name="copyjartoxbnandtmplfeather" description="FOR JEFF EPSTEIN'S USE ONLY: Copies the Codelet 'core' jar to the TemplateFeather and XBN-Java sandbox directories. Old jars are deleted."> <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_codelet_core_jar}" todir="${xbnjava_jar_dependencies_dir}"/> <property name="tmplfeather_jar_dependencies_dir" value="${sandbox.dir}/templatefeather/z_build/jar_dependencies/"/> <delete quiet="true"> <fileset dir="${tmplfeather_jar_dependencies_dir}"> <include name="${project.name}-*.jar"/> </fileset> </delete> <copy file="${dir_build_download_codelet_core_jar}" todir="${tmplfeather_jar_dependencies_dir}"/> </target> <property name="alit_dir" value="C:\data_jeffy\jeffyepstein_com\jeffyepstein_com\docs\computer\programming\${project.name}\"/> <property name="alit_QcurrentQ_dir" value="${alit_dir}current\"/> <property name="alit_curr_version_dir" value="${alit_dir}${project_name_with_version}\"/> <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_QcurrentQ_dir}" overwrite="true"/> <echo>Copying entire build directory</echo> <delete quiet="true" dir="${alit_curr_version_dir}"/> <copy todir="${alit_dir}"> <fileset dir="${dir_build_parent}" includes="${project_name_with_version}/**"/> </copy> </target> <!-- FOR JEFF EPSTEIN'S USE ONLY...end --> </project>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy