123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444 |
- <?xml version="1.0" encoding="UTF-8"?>
- <project name="ARX" default="release" basedir=".">
- <!-- **This ant file need to be executed using a JDK** -->
- <description>Builds, tests, and runs the project.</description>
- <!-- defines the version number -->
- <property name="arx.version" value="3.7.0" />
-
- <!-- add extra parameter to javadoc generation if Java 1.8 is used -->
- <condition property="javadoc.additionalparam" value="-notimestamp -Xdoclint:none" else="-notimestamp">
- <equals arg1="${ant.java.version}" arg2="1.8" />
- </condition>
- <!-- defines the to be included libraries -->
- <fileset id="lib.jars" dir="lib">
- <or>
- <filename name="**/colt-1.2.0.jar" />
- <filename name="**/commons-lang-2.6.jar" />
- <filename name="**/commons-math3-3.6.1.jar" />
- <filename name="**/objectselector-0.1-lib.jar" />
- <filename name="**/commons-io-2.4.jar" />
- <filename name="**/commons-codec-1.5.jar" />
- <filename name="**/commons-logging-1.1.jar" />
- <filename name="**/commons-validator-1.4.1.jar" />
- <filename name="**/dom4j-1.6.1.jar" />
- <filename name="**/stax-api-1.0.1.jar" />
- <filename name="**/xmlbeans-2.3.0.jar" />
- <filename name="**/poi-3.10-FINAL-20140208.jar" />
- <filename name="**/poi-ooxml-3.10-FINAL-20140208.jar" />
- <filename name="**/poi-ooxml-schemas-3.10-FINAL-20140208.jar" />
- <filename name="**/hppc-0.6.0.jar" />
- <filename name="**/univocity-parsers-2.4.1.jar" />
- <filename name="**/newtonraphson-0.0.1.jar" />
- <filename name="**/jhpl-0.0.1.jar" />
- <filename name="**/mahout-core-0.9.jar" />
- <filename name="**/mahout-math-0.11.1.jar" />
- <filename name="**/hadoop-core-1.2.1.jar" />
- <filename name="**/guava-18.0.jar" />
- <filename name="**/slf4j-api-1.7.13.jar" />
- <filename name="**/pdfbox-app-2.0.1.jar" />
- <filename name="**/pdfbox-layout.jar" />
- <filename name="**/exp4j-0.4.8.jar" />
- <filename name="**/smile-1.3.1-java7.jar" />
- </or>
- </fileset>
- <fileset id="gui.jars" dir="lib">
- <or>
- <filename name="**/org.eclipse.draw2d_3.8.1.201301141834.jar" />
- <filename name="**/org.eclipse.core.commands_3.6.2.v20130123-162658.jar" />
- <filename name="**/org.eclipse.core.runtime_3.8.0.v20120912-155025.jar" />
- <filename name="**/org.eclipse.equinox.common_3.6.100.v20120522-1841.jar" />
- <filename name="**/org.eclipse.jface_3.8.102.v20130123-162658.jar" />
- <filename name="**/libjhc-1.0.0-swt.jar" />
- <filename name="**/junit-4.11.jar" />
- <filename name="**/log4j-1.2.17.jar" />
- <filename name="**/swtknob-1.0.0.jar" />
- <filename name="**/org.eclipse.nebula.widgets.nattable.core_1.1.0.201405012245.jar" />
- <filename name="**/org.swtchart_0.8.0.v20120301.jar" />
- <filename name="**/swttable-0.0.1.jar" />
- <filename name="**/swtchoicesdialog-0.0.1.jar" />
- <filename name="**/swtrangeslider-0.0.1.jar" />
- <filename name="**/swttiles-0.0.1.jar" />
- <filename name="**/swtpreferences-0.0.1.jar" />
- <filename name="**/swtsimplebrowser-0.0.1.jar" />
- <filename name="**/jtds-1.3.1.jar" />
- <filename name="**/mysql-connector-java-5.1.38-bin.jar" />
- <filename name="**/postgresql-9.3-1101.jdbc41.jar" />
- <filename name="**/sqlite-jdbc-3.7.2.jar" />
- <filename name="**/ojdbc7.jar" />
- <filename name="**/org.eclipse.nebula.visualization.widgets_1.0.0.201511041902.jar" />
- <filename name="**/org.eclipse.nebula.visualization.xygraph_1.0.0.201511041902.jar" />
- </or>
- </fileset>
- <fileset id="test.jars" dir="lib">
- <or>
- <filename name="**/junit-4.11.jar" />
- <filename name="**/hamcrest-core-1.3.jar" />
- </or>
- </fileset>
- <echo message="Java version ${ant.java.version}"/>
- <available file=".git" type="dir" property="git.present" />
- <!-- https://stackoverflow.com/questions/2974106/how-to-lookup-the-latest-git-commit-hash-from-an-ant-build-script -->
- <target name="git.revision" description="Store git revision in ${repository.version}" if="git.present">
- <exec executable="git" outputproperty="git.revision" failifexecutionfails="false" errorproperty="">
- <arg value="describe" />
- <arg value="--tags" />
- <arg value="--always" />
- <arg value="HEAD" />
- </exec>
- <condition property="repository.version" value="${git.revision}" else="unknown">
- <and>
- <isset property="git.revision" />
- <length string="${git.revision}" trim="yes" length="0" when="greater" />
- </and>
- </condition>
- </target>
- <target name="compileTest">
- <delete dir="build/test" failonerror="true" />
- <mkdir dir="build/test" />
- <mkdir dir="build/junitReports" />
- <javac includeantruntime="false" srcdir="src/main:src/gui:src/example:src/test/" destdir="build/test" source="1.8">
- <classpath>
- <fileset refid="lib.jars" />
- <fileset refid="gui.jars" />
- <fileset refid="test.jars" />
- <path path="lib/swt/swt-4.2.1-gtk-linux-x86.jar" />
- </classpath>
- </javac>
- <copy todir="build/test/org/deidentifier/arx/gui/resources" overwrite="true">
- <fileset dir="src/gui/org/deidentifier/arx/gui/resources" defaultexcludes="yes">
- <exclude name="**/*.java" />
- </fileset>
- </copy>
- <copy todir="build/test/org/deidentifier/arx/risk/resources/us" overwrite="true">
- <fileset dir="src/main/org/deidentifier/arx/risk/resources/us" defaultexcludes="yes">
- <exclude name="**/*.java" />
- <exclude name="**/*.txt" />
- </fileset>
- </copy>
- <copy todir="build/test/org/deidentifier/arx/certificate/resources" overwrite="true">
- <fileset dir="src/main/org/deidentifier/arx/certificate/resources" defaultexcludes="yes">
- <exclude name="**/*.java" />
- <exclude name="**/*.txt" />
- </fileset>
- </copy>
- </target>
- <target name="benchmark" depends="git.revision,compileTest">
- <junit showoutput="yes" fork="yes">
- <jvmarg value="-DBenchmark=build/junitReports" />
- <jvmarg value="-DVersion=${git.revision}" />
- <classpath>
- <fileset refid="lib.jars" />
- <fileset refid="test.jars" />
- <path path="build/test" />
- <path path="lib/log4j/log4j-1.2.17.jar" />
- <path path="lib/sqlite/sqlite-jdbc-3.7.2.jar" />
- <path path="lib/swt/swt-4.2.1-gtk-linux-x86.jar" />
- </classpath>
- <batchtest todir="build/junitReports">
- <fileset dir="src/test/">
- <include name="**/TestAnonymizationKAnonymity.java" />
- <include name="**/TestAnonymizationLDiversity.java" />
- <include name="**/TestAnonymizationDPresence.java" />
- <include name="**/TestAnonymizationTCloseness.java" />
- <include name="**/TestAnonymizationCombinations.java" />
- <include name="**/TestAnonymizationDifferentialPrivacy.java" />
- <include name="**/TestAnonymizationKMap.java" />
- <include name="**/TestAnonymizationRiskBased.java" />
- <include name="**/TestAnonymizationLocalRecoding.java" />
- <include name="**/TestAnonymizationOrderedDistanceTCloseness.java" />
- <include name="**/TestAnonymizationEntropyLDiversity.java" />
- <include name="**/TestAnonymizationProfitability.java" />
- </fileset>
- <formatter type="plain" usefile="false" />
- <formatter type="xml" />
- </batchtest>
- </junit>
- <antcall target="analyse-benchmark" />
- </target>
- <target name="analyse-benchmark">
- <java jar="arx-analyse.jar" fork="true">
- </java>
- </target>
- <target name="test" depends="compileTest">
- <junit showoutput="yes">
- <classpath>
- <fileset refid="lib.jars" />
- <fileset refid="test.jars" />
- <path path="build/test" />
- <path path="lib/log4j/log4j-1.2.17.jar" />
- <path path="lib/sqlite/sqlite-jdbc-3.7.2.jar" />
- <path path="lib/swt/swt-4.2.1-gtk-linux-x86.jar" />
- </classpath>
- <batchtest todir="build/junitReports" fork="yes">
- <fileset dir="src/test/" includes="**/Test*.java" />
- <formatter type="plain" usefile="false" />
- <formatter type="xml" />
- </batchtest>
- </junit>
- </target>
- <target name="release" depends="jars">
- </target>
- <target name="clean" depends="end-clean">
- <delete dir="jars" failonerror="true" />
- </target>
- <target name="end-clean">
- <delete dir="build/lib" failonerror="true" />
- <delete dir="build/gui" failonerror="true" />
- <delete dir="build/extLibs" failonerror="true" />
- <delete dir="build" failonerror="true" />
- </target>
- <target name="prepare" depends="clean">
- <mkdir dir="build" />
- <mkdir dir="build/extLibs" />
- <mkdir dir="build/lib" />
- <mkdir dir="build/gui" />
- <mkdir dir="jars" />
- </target>
- <target name="clean-javadoc">
- <delete includeEmptyDirs="true" failonerror="false">
- <fileset dir="doc/api" includes="**/*" defaultexcludes="yes">
- <exclude name="doc/api/.svn" />
- </fileset>
- </delete>
- <delete includeEmptyDirs="true" failonerror="false">
- <fileset dir="doc/gui" includes="**/*" defaultexcludes="yes">
- <exclude name="doc/gui/.svn" />
- </fileset>
- </delete>
- <delete includeEmptyDirs="true" failonerror="false">
- <fileset dir="doc/dev" includes="**/*" defaultexcludes="yes">
- <exclude name="doc/dev/.svn" />
- </fileset>
- </delete>
- </target>
- <target name="javadoc-api" depends="clean-javadoc">
- <mkdir dir="doc/api" />
- <javadoc overview="doc/overview-api.html" destdir="doc/api" notree="false" nonavbar="false" noindex="false" splitindex="true" access="public" use="true" author="Florian Kohlmayer and Fabian Praßer" version="${arx.version}" windowtitle="ARX API Documentation" private="false" failonerror="true" additionalparam="${javadoc.additionalparam}">
- <classpath>
- <fileset refid="lib.jars" />
- <path path="src/main" />
- </classpath>
- <packageset dir="src/main/" defaultexcludes="yes">
- <exclude name="org/deidentifier/arx/algorithm/" />
- <exclude name="org/deidentifier/arx/framework/" />
- </packageset>
- </javadoc>
- </target>
- <target name="javadoc-dev" depends="clean-javadoc">
- <mkdir dir="doc/dev" />
- <javadoc overview="doc/overview-dev.html" destdir="doc/dev" notree="false" use="true" nonavbar="false" noindex="false" splitindex="false" author="Florian Kohlmayer and Fabian Praßer" version="${arx.version}" windowtitle="ARX Developer Documentation" private="false" failonerror="true" additionalparam="${javadoc.additionalparam}">
- <classpath>
- <fileset refid="lib.jars" />
- <path path="src/main" />
- </classpath>
- <packageset dir="src/main/" defaultexcludes="yes">
- </packageset>
- </javadoc>
- </target>
- <target name="javadoc-gui" depends="clean-javadoc">
- <mkdir dir="doc/gui" />
- <javadoc overview="doc/overview-gui.html" destdir="doc/gui" notree="false" use="true" nonavbar="false" noindex="false" splitindex="false" author="Florian Kohlmayer and Fabian Praßer" version="${arx.version}" windowtitle="ARX GUI Documentation" private="false" failonerror="true" additionalparam="${javadoc.additionalparam}">
- <classpath>
- <fileset refid="lib.jars" />
- <fileset refid="gui.jars" />
- <path path="lib/swt/swt-4.2.1-gtk-linux-x86.jar" />
- <path path="src/main" />
- </classpath>
- <packageset dir="src/main/" defaultexcludes="yes">
- <exclude name="org/deidentifier/arx/algorithm/" />
- <exclude name="org/deidentifier/arx/framework/" />
- </packageset>
- <packageset dir="src/gui/" defaultexcludes="yes">
- </packageset>
- </javadoc>
- </target>
- <target name="javadoc" depends="javadoc-api,javadoc-gui,javadoc-dev">
- </target>
- <target name="compile" depends="prepare" description="compile the source ">
- <javac includeantruntime="false" srcdir="src/main/" destdir="build/lib" source="1.8">
- <classpath>
- <fileset refid="lib.jars" />
- <path path="src/main" />
- </classpath>
- </javac>
- <javac includeantruntime="false" srcdir="src/main:src/gui/" destdir="build/gui" source="1.8">
- <classpath>
- <fileset refid="lib.jars" />
- <fileset refid="gui.jars" />
- <path path="lib/swt/swt-4.2.1-gtk-linux-x86.jar" />
- <path path="src/main" />
- </classpath>
- </javac>
- <copy todir="build/gui/org/deidentifier/arx/gui/resources" overwrite="true">
- <fileset dir="src/gui/org/deidentifier/arx/gui/resources" defaultexcludes="yes">
- <exclude name="**/*.java" />
- </fileset>
- </copy>
- <copy todir="build/main/org/deidentifier/arx/risk/resources/us" overwrite="true">
- <fileset dir="src/main/org/deidentifier/arx/risk/resources/us" defaultexcludes="yes">
- <exclude name="**/*.java" />
- <exclude name="**/*.txt" />
- </fileset>
- </copy>
- <copy todir="build/main/org/deidentifier/arx/certificate/resources" overwrite="true">
- <fileset dir="src/main/org/deidentifier/arx/certificate/resources" defaultexcludes="yes">
- <exclude name="**/*.java" />
- <exclude name="**/*.txt" />
- </fileset>
- </copy>
- <copy todir="build/gui/org/deidentifier/arx/risk/resources/us" overwrite="true">
- <fileset dir="src/main/org/deidentifier/arx/risk/resources/us" defaultexcludes="yes">
- <exclude name="**/*.java" />
- <exclude name="**/*.txt" />
- </fileset>
- </copy>
- <copy todir="build/gui/org/deidentifier/arx/certificate/resources" overwrite="true">
- <fileset dir="src/main/org/deidentifier/arx/certificate/resources" defaultexcludes="yes">
- <exclude name="**/*.java" />
- <exclude name="**/*.txt" />
- </fileset>
- </copy>
- </target>
- <target name="buildExternalLibs">
- <jar jarfile="build/extLibs/lib.jar">
- <zipgroupfileset refid="lib.jars" />
- </jar>
- <jar jarfile="build/extLibs/gui.jar">
- <zipgroupfileset refid="gui.jars" />
- </jar>
- </target>
- <target name="jar-win" depends="compile, buildExternalLibs">
- <jar destfile="jars/arx-${arx.version}-win.jar">
- <fileset dir="build/gui" defaultexcludes="no" />
- <zipfileset src="build/extLibs/lib.jar" excludes="META-INF/*.RSA,META-INF/*.SF,META-INF/*.DSA" />
- <zipfileset src="build/extLibs/gui.jar" excludes="META-INF/*.RSA,META-INF/*.SF,META-INF/*.DSA" />
- <zipfileset src="lib/swt/swt-4.2.1-win32-win32-x86.jar" excludes="META-INF/*.RSA,META-INF/*.SF,META-INF/*.DSA" />
- <manifest>
- <attribute name="Main-Class" value="org.deidentifier.arx.gui.Main" />
- </manifest>
- </jar>
- <jar destfile="jars/arx-${arx.version}-win-64.jar">
- <fileset dir="build/gui" defaultexcludes="no" />
- <zipfileset src="build/extLibs/lib.jar" excludes="META-INF/*.RSA,META-INF/*.SF,META-INF/*.DSA" />
- <zipfileset src="build/extLibs/gui.jar" excludes="META-INF/*.RSA,META-INF/*.SF,META-INF/*.DSA" />
- <zipfileset src="lib/swt/swt-4.2.1-win32-win32-x86_64.jar" excludes="META-INF/*.RSA,META-INF/*.SF,META-INF/*.DSA" />
- <manifest>
- <attribute name="Main-Class" value="org.deidentifier.arx.gui.Main" />
- </manifest>
- </jar>
- </target>
- <target name="jar-linux" depends="compile, buildExternalLibs">
- <jar destfile="jars/arx-${arx.version}-gtk.jar">
- <fileset dir="build/gui" defaultexcludes="no" />
- <zipfileset src="build/extLibs/lib.jar" excludes="META-INF/*.RSA,META-INF/*.SF,META-INF/*.DSA" />
- <zipfileset src="build/extLibs/gui.jar" excludes="META-INF/*.RSA,META-INF/*.SF,META-INF/*.DSA" />
- <zipfileset src="lib/swt/swt-4.2.1-gtk-linux-x86.jar" excludes="META-INF/*.RSA,META-INF/*.SF,META-INF/*.DSA" />
- <manifest>
- <attribute name="Main-Class" value="org.deidentifier.arx.gui.Main" />
- </manifest>
- </jar>
- <jar destfile="jars/arx-${arx.version}-gtk-64.jar">
- <fileset dir="build/gui" defaultexcludes="no" />
- <zipfileset src="build/extLibs/lib.jar" excludes="META-INF/*.RSA,META-INF/*.SF,META-INF/*.DSA" />
- <zipfileset src="build/extLibs/gui.jar" excludes="META-INF/*.RSA,META-INF/*.SF,META-INF/*.DSA" />
- <zipfileset src="lib/swt/swt-4.2.1-gtk-linux-x86_64.jar" excludes="META-INF/*.RSA,META-INF/*.SF,META-INF/*.DSA" />
- <manifest>
- <attribute name="Main-Class" value="org.deidentifier.arx.gui.Main" />
- </manifest>
- </jar>
- </target>
- <target name="jar-osx" depends="compile, buildExternalLibs">
- <jar destfile="jars/arx-${arx.version}-osx.jar">
- <fileset dir="build/gui" defaultexcludes="no" />
- <zipfileset src="build/extLibs/lib.jar" excludes="META-INF/*.RSA,META-INF/*.SF,META-INF/*.DSA" />
- <zipfileset src="build/extLibs/gui.jar" excludes="META-INF/*.RSA,META-INF/*.SF,META-INF/*.DSA" />
- <zipfileset src="lib/swt/swt-4.2.1-cocoa-macosx.jar" excludes="META-INF/*.RSA,META-INF/*.SF,META-INF/*.DSA" />
- <manifest>
- <attribute name="Main-Class" value="org.deidentifier.arx.gui.Main" />
- </manifest>
- </jar>
- <jar destfile="jars/arx-${arx.version}-osx-64.jar">
- <fileset dir="build/gui" defaultexcludes="no" />
- <zipfileset src="build/extLibs/lib.jar" excludes="META-INF/*.RSA,META-INF/*.SF,META-INF/*.DSA" />
- <zipfileset src="build/extLibs/gui.jar" excludes="META-INF/*.RSA,META-INF/*.SF,META-INF/*.DSA" />
- <zipfileset src="lib/swt/swt-4.2.1-cocoa-macosx-x86_64.jar" excludes="META-INF/*.RSA,META-INF/*.SF,META-INF/*.DSA" />
- <manifest>
- <attribute name="Main-Class" value="org.deidentifier.arx.gui.Main" />
- </manifest>
- </jar>
- </target>
- <target name="jar-libs" depends="compile, buildExternalLibs">
- <jar destfile="jars/arx-${arx.version}-src.jar">
- <fileset dir="src/gui" defaultexcludes="no" />
- <fileset dir="src/main" defaultexcludes="no" />
- </jar>
- <jar destfile="jars/libarx-${arx.version}-src.jar">
- <fileset dir="src/main" defaultexcludes="no" />
- <fileset dir="src/test" defaultexcludes="no" />
- <fileset dir="src/example" defaultexcludes="no" />
- </jar>
- <jar destfile="jars/libarx-${arx.version}.jar">
- <fileset dir="build/lib" defaultexcludes="no" />
- <zipfileset src="build/extLibs/lib.jar" excludes="META-INF/*.RSA,META-INF/*.SF,META-INF/*.DSA" />
- </jar>
- <jar destfile="jars/libarx-${arx.version}-min.jar">
- <fileset dir="build/lib" defaultexcludes="no" />
- <zipfileset src="lib/objectselector/objectselector-0.1-lib.jar" excludes="META-INF/*.RSA,META-INF/*.SF,META-INF/*.DSA" />
- </jar>
- </target>
- <target name="jar-docs" depends="compile, javadoc">
- <jar destfile="jars/libarx-${arx.version}-doc.jar">
- <fileset dir="doc/api" defaultexcludes="no" />
- </jar>
- <jar destfile="jars/libarx-${arx.version}-dev-doc.jar">
- <fileset dir="doc/dev" defaultexcludes="no" />
- </jar>
- <jar destfile="jars/arx-${arx.version}-doc.jar">
- <fileset dir="doc/gui" defaultexcludes="no" />
- </jar>
- </target>
- <target name="jars" depends="jar-win, jar-linux, jar-osx, jar-libs, jar-docs">
- <antcall target="end-clean" />
- </target>
- </project>
|