Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
280 lines (255 sloc) 12.5 KB
<?xml version="1.0" encoding="utf-8"?>
<!--
// Parliament is licensed under the BSD License from the Open Source
// Initiative, http://www.opensource.org/licenses/bsd-license.php
//
// Copyright (c) 2001-2019, BBN Technologies, Inc.
// All rights reserved.
-->
<project name="KBMasterBuild" default="runTests" xmlns:ivy="antlib:org.apache.ivy.ant">
<description>Master build script for the KB repository.</description>
<import file="${basedir}/build-common.xml"/>
<property name="distroDir" value="${targetDir}/distro"/>
<property name="javadocDir" value="${targetDir}/bin/javadoc"/>
<property name ="javadocCompleteFlag" value="${targetDir}/bin/javadoc-created.txt"/>
<property name="windowsReleaseDir" value="${artifactsDir}/msvc-14.1/release"/>
<property name="macosReleaseDir" value="${artifactsDir}/clang/release/universal"/>
<target name="clean" description="Cleans up after the ant build">
<echo message="Using JDK ${ant.java.version}"/>
<delete dir="${targetDir}" deleteonexit="true"/>
<delete file="${basedir}/Parliament/Test/ParliamentKbConfig.txt"/>
<delete file="${basedir}/Parliament/Test/ParliamentLogConfig.txt"/>
<delete dir="${basedir}/Parliament/Test/kb-data"/>
<delete dir="${basedir}/indexes"/>
<delete dir="${basedir}/log"/>
<delete dir="${basedir}/Parliament/log"/>
<delete dir="${basedir}/Parliament/Test/log"/>
<delete dir="${basedir}/jena/JenaGraph/log"/>
<delete dir="${basedir}/jena/TemporalIndexProcessor/log"/>
<delete dir="${basedir}/jena/JenaGraph/lib"/>
<delete dir="${basedir}/jena/JenaGraph/union-test-kb-data"/>
<delete dir="${basedir}/jena/JosekiExtensions/lib"/>
<delete dir="${basedir}/jena/JosekiParliamentClient/lib"/>
<delete dir="${basedir}/jena/NumericIndex/lib"/>
<delete dir="${basedir}/jena/SpatialIndexProcessor/lib"/>
<delete dir="${basedir}/jena/TemporalIndexProcessor/lib"/>
<delete dir="${basedir}/jena/TemporalIndexProcessor_old/lib"/>
<delete dir="${basedir}/Parliament/lib"/>
<delete dir="${basedir}/Parliament/KbCore/parliament/generated"/>
<delete dir="${basedir}/Sesame/CSameAsSail/lib"/>
<delete dir="${basedir}/Sesame/LuceneSail/lib"/>
<delete dir="${basedir}/Sesame/ParliamentSail/lib"/>
<delete dir="${basedir}/Sesame/SameAsSail/lib"/>
<delete dir="${basedir}/Sesame/Swrl2Sesame/lib"/>
<ant dir="${basedir}/jena/JosekiExtensions" target="clean" inheritAll="false"/>
</target>
<target name="cleanEclipseBuild" description="Cleans up the Eclipse build directories">
<delete dir="${basedir}/jena/JenaGraph/bin"/>
<delete dir="${basedir}/jena/JosekiExtensions/bin"/>
<delete file="${basedir}/jena/JosekiExtensions/build.log"/>
<delete dir="${basedir}/jena/JosekiParliamentClient/bin"/>
<delete dir="${basedir}/jena/NumericIndex/bin"/>
<delete dir="${basedir}/jena/SpatialIndexProcessor/bin"/>
<delete dir="${basedir}/jena/TemporalIndexProcessor/bin"/>
<delete dir="${basedir}/jena/TemporalIndexProcessor_old/bin"/>
<delete dir="${basedir}/Parliament/bin"/>
<delete dir="${basedir}/Parliament/JniAssessments/bin"/>
<delete file="${basedir}/Parliament/AdminClient/.settings/language.settings.xml"/>
<delete file="${basedir}/Parliament/KbCore/.settings/language.settings.xml"/>
<delete file="${basedir}/Parliament/Test/.settings/language.settings.xml"/>
<delete dir="${basedir}/Sesame/CSameAsSail/bin"/>
<delete dir="${basedir}/Sesame/LuceneSail/bin"/>
<delete dir="${basedir}/Sesame/ParliamentSail/bin"/>
<delete dir="${basedir}/Sesame/SameAsSail/bin"/>
<delete dir="${basedir}/Sesame/Swrl2Sesame/bin"/>
<delete includeemptydirs="true">
<fileset dir="${basedir}/Parliament" includes="**/Debug_with_*/"/>
<fileset dir="${basedir}/Parliament" includes="**/Release_with_*/"/>
</delete>
</target>
<target name="reportAll" depends="init" description="Runs ivy reports (and resolve) on all projects">
<ant dir="${basedir}/Parliament" target="report" inheritAll="false"/>
<ant dir="${basedir}/jena/JosekiParliamentClient" target="report" inheritAll="false"/>
<ant dir="${basedir}/jena/JenaGraph" target="report" inheritAll="false"/>
<ant dir="${basedir}/jena/JosekiExtensions" target="report" inheritAll="false"/>
<ant dir="${basedir}/jena/NumericIndex" target="report" inheritAll="false"/>
<ant dir="${basedir}/jena/SpatialIndexProcessor" target="report" inheritAll="false"/>
<ant dir="${basedir}/jena/TemporalIndexProcessor" target="report" inheritAll="false"/>
<ant dir="${basedir}/Sesame/ParliamentSail" target="report" inheritAll="false"/>
<ant dir="${basedir}/Sesame/CSameAsSail" target="report" inheritAll="false"/>
<ant dir="${basedir}/Sesame/LuceneSail" target="report" inheritAll="false"/>
<ant dir="${basedir}/Sesame/SameAsSail" target="report" inheritAll="false"/>
<ant dir="${basedir}/Sesame/Swrl2Sesame" target="report" inheritAll="false"/>
</target>
<target name="runTests" depends="createDistro" description="Runs extended unit and integration tests">
<ant dir="${basedir}/jena/JosekiParliamentClient" target="runTests" inheritAll="false"/>
<ant dir="${basedir}/jena/JenaGraph" target="runTests" inheritAll="false"/>
<ant dir="${basedir}/jena/JosekiExtensions" target="runTests" inheritAll="false"/>
<ant dir="${basedir}/jena/NumericIndex" target="runTests" inheritAll="false"/>
<ant dir="${basedir}/jena/TemporalIndexProcessor" target="runTests" inheritAll="false"/>
<ant dir="${basedir}/jena/SpatialIndexProcessor" target="runTests" inheritAll="false"/>
<!--
<ant dir="${basedir}/Sesame/CSameAsSail" target="runTests" inheritAll="false"/>
<ant dir="${basedir}/Sesame/ParliamentSail" target="runTests" inheritAll="false"/>
<ant dir="${basedir}/Sesame/LuceneSail" target="runTests" inheritAll="false"/>
<ant dir="${basedir}/Sesame/SameAsSail" target="runTests" inheritAll="false"/>
<ant dir="${basedir}/Sesame/Swrl2Sesame" target="runTests" inheritAll="false"/>
-->
</target>
<target name="createDistro" description="Create the binary distribution"
depends="buildCode,compileJavadoc,buildDeployableServerList">
<foreach target="copyDocs" param="toDir" list="${deployableServerList}"
delimiter="|" inheritall="true"/>
<foreach target="zipDeployableServer" param="srcDir" list="${deployableServerList}"
delimiter="|" inheritall="true"/>
</target>
<target name="buildCode" depends="init">
<ant dir="${basedir}/Parliament" target="deliverArtifacts" inheritAll="false"/>
<ant dir="${basedir}/jena/JosekiParliamentClient" target="jar" inheritAll="false"/>
<ant dir="${basedir}/jena/JenaGraph" target="jar" inheritAll="false"/>
<ant dir="${basedir}/jena/JosekiExtensions" target="prepareDeployableServers" inheritAll="false"/>
<ant dir="${basedir}/jena/NumericIndex" target="jar" inheritAll="false"/>
<ant dir="${basedir}/jena/SpatialIndexProcessor" target="jar" inheritAll="false"/>
<ant dir="${basedir}/jena/TemporalIndexProcessor" target="jar" inheritAll="false"/>
<ant dir="${basedir}/Sesame/CSameAsSail" target="jar" inheritAll="false"/>
<ant dir="${basedir}/Sesame/ParliamentSail" target="jar" inheritAll="false"/>
<ant dir="${basedir}/Sesame/LuceneSail" target="jar" inheritAll="false"/>
<ant dir="${basedir}/Sesame/SameAsSail" target="jar" inheritAll="false"/>
<ant dir="${basedir}/Sesame/Swrl2Sesame" target="jar" inheritAll="false"/>
</target>
<!-- Copy docs to the ${toDir} directory. Expects parameter toDir. -->
<target name="copyDocs">
<copy todir="${toDir}" file="${kbRootDir}/doc/UserGuide/ParliamentUserGuide.pdf"/>
<copy todir="${toDir}/License">
<fileset dir="${basedir}/License" includes="*.html,*.md,*.txt"/>
</copy>
<copy tofile="${toDir}/License/Parliament-License.md" file="${basedir}/LICENSE.md"/>
<copy todir="${toDir}/javadoc">
<fileset dir="${javadocDir}"/>
</copy>
</target>
<!-- Copy docs to the ${srcDir} directory. Expects parameter srcDir. -->
<target name="zipDeployableServer">
<basename property="zipName" file="${srcDir}"/>
<delete file="${distroDir}/${zipName}.zip"/>
<mkdir dir="${distroDir}"/>
<zip destfile="${distroDir}/${zipName}.zip" encoding="UTF8" level="9">
<zipfileset dir="${srcDir}" prefix="${zipName}">
<exclude name="*.sh"/>
<exclude name="bin/jsvc"/>
<exclude name="bin/ParliamentAdmin"/>
</zipfileset>
<zipfileset dir="${srcDir}" prefix="${zipName}" filemode="755">
<include name="*.sh"/>
<include name="bin/jsvc"/>
<include name="bin/ParliamentAdmin"/>
</zipfileset>
</zip>
</target>
<target name="generateTestReport" depends="testSummaryUpToDateCheck"
unless="isTestSummaryUpToDate" description="Generates test summary">
<xslt destdir="${reportsDir}/junit-summaries" style="junit-test-outcomes.xsl"
filedirparameter="fileDir">
<fileset dir="${reportsDir}" includes="**/TEST-*.xml"/>
<mapper>
<chainedmapper>
<flattenmapper/>
<globmapper from="TEST-*.xml" to="*.txt"/>
</chainedmapper>
</mapper>
</xslt>
<echo file="${reportsDir}/junit-summaries/column-headers.txt" append="false"
message="AAA Project,Class,Tests,Failures,Errors,Skipped,Time (sec)${line.separator}"/>
<concat destfile="${reportsDir}/junit-summary.csv">
<fileset dir="${reportsDir}/junit-summaries" includes="*.txt"/>
<filterchain>
<sortfilter/>
</filterchain>
</concat>
<delete dir="${reportsDir}/junit-summaries"/>
</target>
<target name="testSummaryUpToDateCheck">
<uptodate property="isTestSummaryUpToDate" targetfile="${reportsDir}/junit-summary.csv">
<srcfiles dir="${reportsDir}" includes="**/TEST-*.xml"/>
</uptodate>
</target>
<fileset id="javadocSrcPath" dir="${kbRootDir}">
<include name="Parliament/java/**/*.java"/>
<!--include name="Parliament/JniAssessments/**/*.java"/-->
<include name="jena/JenaGraph/src/**/*.java"/>
<include name="jena/JosekiExtensions/src/**/*.java"/>
<include name="jena/JosekiParliamentClient/src/**/*.java"/>
<include name="jena/NumericIndex/src/**/*.java"/>
<include name="jena/SpatialIndexProcessor/src/**/*.java"/>
<include name="jena/TemporalIndexProcessor/src/**/*.java"/>
<!-- include name="Sesame/CSameAsSail/src/**/*.java"/>
<include name="Sesame/LuceneSail/src/**/*.java"/>
<include name="Sesame/ParliamentSail/src/**/*.java"/>
<include name="Sesame/SameAsSail/src/**/*.java"/>
<include name="Sesame/Swrl2Sesame/src/**/*.java"/ -->
</fileset>
<target name="javadocUpToDateCheck">
<uptodate property="javadocUpToDate" targetfile="${javadocCompleteFlag}">
<srcfiles refid="javadocSrcPath"/>
</uptodate>
</target>
<target name="compileJavadoc" depends="init,javadocUpToDateCheck" unless="javadocUpToDate" description="Builds the javadocs">
<delete dir="${javadocDir}"/>
<mkdir dir="${javadocDir}"/>
<javadoc
destdir="${javadocDir}"
defaultexcludes="yes"
author="true"
version="true"
use="true"
windowtitle="Parliament API Documentation"
doctitle="Parliament&amp;trade; API Documentation"
header="Parliament&amp;trade;"
footer="Parliament&amp;trade;"
encoding="UTF-8"
charset="UTF-8"
docencoding="UTF-8"
verbose="false"
additionalparam="-Xdoclint:all"
noqualifier="java.lang:java.util:java.io"
useexternalfile="yes">
<bottom>
Copyright &amp;copy; 2001-2009 by BBN Technologies, Inc.&amp;nbsp;
All rights reserved.&amp;nbsp;
Use is subject to &lt;a
href=&quot;http://opensource.org/licenses/bsd-license.php&quot;
&gt;license terms&lt;/a&gt;.&amp;nbsp;
BBN&amp;reg; is a registered trademark of BBN Technologies, Inc.&amp;nbsp;
Parliament&amp;trade; is a trademark of BBN Technologies, Inc.
</bottom>
<sourcefiles>
<fileset refid="javadocSrcPath"/>
</sourcefiles>
<classpath>
<fileset dir="${basedir}/jena/JosekiExtensions/lib/bridge" includes="**/*.jar"/>
<fileset dir="${basedir}/jena/JosekiExtensions/lib/server" includes="**/*.jar"/>
<fileset dir="${parliamentDependenciesDir}/deegree" includes="**/*.jar"/>
<fileset dir="${parliamentDependenciesDir}/joseki" includes="**/*.jar"/>
<fileset dir="${parliamentDependenciesDir}/openmap" includes="**/*.jar"/>
<fileset dir="${parliamentDependenciesDir}/swrl-jaxb" includes="swrl-jaxb*.jar"/>
<!-- fileset dir="${basedir}/Sesame/LuceneSail/lib" includes="**/*.jar"/ -->
</classpath>
<arg value="-quiet"/>
<arg value="-Xdoclint:all,-missing"/>
</javadoc>
<touch file="${javadocCompleteFlag}"/>
</target>
<target name="init">
<echo message="Using JDK ${ant.java.version}"/>
<mkdir dir="${artifactsDir}"/>
<mkdir dir="${reportsDir}"/>
</target>
<target name="continuous-build" depends="git-pull, runTests"
description="Performs the continuous build"/>
<target name="git-pull" depends="clean">
<echo message="Pulling from git ..."/>
<exec executable="git">
<arg line="pull"/>
</exec>
</target>
</project>
You can’t perform that action at this time.