| <?xml version="1.0" encoding="UTF-8"?> |
| |
| <project name="mahout" default="dist" basedir="."> |
| <import file="common-build-deprecated.xml"/> |
| |
| |
| <target name="dist" description="Build the distribution"> |
| <ant dir="core" antfile="build-deprecated.xml" target="dist-jar"/> |
| <ant dir="examples" antfile="build-deprecated.xml" target="dist-jar"/> |
| </target> |
| |
| <target name="clean" description="Clean out the build output areas"> |
| <ant dir="core" antfile="build-deprecated.xml" target="clean"/> |
| <ant dir="examples" antfile="build-deprecated.xml" target="clean"/> |
| <delete dir="build"/> |
| <delete dir="dist"/> |
| </target> |
| |
| <path id="javadoc.classpath"> |
| <fileset dir="${shared-lib}"> |
| <include name="*.jar" /> |
| <exclude name="junit*.jar"/> |
| </fileset> |
| <fileset dir="core/lib"> |
| <include name="*.jar" /> |
| </fileset> |
| <fileset dir="examples/lib"> |
| <include name="*.jar" /> |
| </fileset> |
| </path> |
| |
| <property name="Name" value="Apache Mahout"/> |
| <target name="javadoc" description="Build the javadocs for the core, examples and both (combined)"> |
| <!-- build separate ones --> |
| <ant dir="core" antfile="build-deprecated.xml" target="javadoc"/> |
| <ant dir="examples" antfile="build-deprecated.xml" target="javadoc"/> |
| <!-- build a full one --> |
| <mkdir dir="${build.javadoc}"/> |
| |
| <javadoc |
| destdir="${build.javadoc}" |
| author="true" |
| version="true" |
| failonerror="true" |
| use="true" |
| encoding="utf8" |
| overview="core/src/main/java/overview.html" |
| access="${javadoc.access}" |
| windowtitle="${Name} ${version} API" |
| doctitle="${Name} ${version} API (${specversion})" |
| bottom="Copyright &copy; ${javadoc.years} The Apache Software Foundation" |
| > |
| <packageset dir="core/src/main/java"/> |
| <packageset dir="examples/src/main/java"/> |
| <link href="${javadoc.link.java}"/> |
| <link href="${javadoc.link.junit}"/> |
| <classpath refid="javadoc.classpath"/> |
| </javadoc> |
| |
| </target> |
| |
| <!-- make a distribution --> |
| <target name="package" |
| description="Packages the Mahout distribution files and documentation." |
| depends="clean, dist, javadoc"> |
| |
| <property name="fullname" value="apache-${ant.project.name}"/> |
| <property name="fullnamever" value="apache-${ant.project.name}-${version}"/> |
| |
| <property name="dist" value="dist"/> |
| |
| <mkdir dir="${dist}"/> |
| |
| <zip destfile="${dist}/${fullnamever}.zip"> |
| <zipfileset dir="." |
| prefix="${fullnamever}" |
| includes="KEYS LICENSE.txt NOTICE.txt README.txt build.xml pom.xml common-build.xml lib/" |
| excludes=""/> |
| <zipfileset dir="./core" |
| prefix="${fullnamever}/core" |
| includes="build.properties build.xml taste-build.xml pom.xml src/ lib/" |
| excludes="**/*.iml"/> |
| <zipfileset dir="./examples" |
| prefix="${fullnamever}/examples" |
| includes="build.properties build.xml pom.xml src/ lib/" |
| excludes="**/*.csv **/*.iml"/> |
| <zipfileset dir="./core/build/docs/api" |
| prefix="${fullnamever}/docs/core/api"/> |
| |
| <zipfileset dir="./examples/build/docs/api" |
| prefix="${fullnamever}/docs/examples/api"/> |
| <!-- full set of apis --> |
| <zipfileset dir="./build/docs/api" |
| prefix="${fullnamever}/docs/api"/> |
| |
| <zipfileset dir="./core/dist/" |
| prefix="${fullnamever}" |
| includes="*.jar"/> |
| </zip> |
| |
| <!-- pgp arm tgz and zip --> |
| <exec command="gpg --armor --output ${dist}/${fullnamever}.tgz.asc --detach-sig ${dist}/${fullnamever}.tgz"/> |
| <exec command="gpg --armor --output ${dist}/${fullnamever}.zip.asc --detach-sig ${dist}/${fullnamever}.zip"/> |
| |
| <!-- create md5 sum for tgz and zip --> |
| <!--<exec command="openssl dgst -md5 -out ${dist}/${fullnamever}.tgz.md5 ${dist}/${fullnamever}.tgz"/> |
| <exec command="openssl dgst -md5 -out ${dist}/${fullnamever}.zip.md5 ${dist}/${fullnamever}.zip"/>--> |
| <mahout-checksum file="${dist}/${fullnamever}.zip"/> |
| |
| <!-- create maven artifacts --> |
| <!--<exec command="mvn -Dtest=false deploy"/>--> |
| <input message="Enter the GPG Passphrase" addproperty="gpg.passphrase"/> |
| <exec executable="mvn"> |
| <arg value="-Dtest=false"/> |
| <arg value="install"/> |
| <arg value="-Dgpg.passphrase=${gpg.passphrase}"/> |
| </exec> |
| <exec executable="mvn"> |
| <arg value="-Dtest=false"/> |
| <arg value="deploy"/> |
| <arg value="-Dgpg.passphrase=${gpg.passphrase}"/> |
| </exec> |
| <mkdir dir="${dist}/maven"/> |
| <copy todir="${dist}/maven"> |
| <fileset dir="core/dist/maven"/> |
| </copy> |
| |
| |
| </target> |
| |
| <target name="-taskdef"> |
| <typedef resource="org/apache/rat/anttasks/antlib.xml" uri="antlib:rat.anttasks"> |
| <classpath> |
| <fileset dir="." includes="rat*.jar"/> |
| </classpath> |
| </typedef> |
| </target> |
| <target name="rat-sources" depends="-taskdef" |
| description="runs the tasks over src/java excluding the license directory"> |
| <rat:report xmlns:rat="antlib:org.apache.rat.anttasks"> |
| <fileset dir="core/src/main/java"> |
| <exclude name="**/CHANGES.*"/> |
| </fileset> |
| <fileset dir="examples/src/main/java"> |
| <exclude name="**/CHANGES.*"/> |
| </fileset> |
| </rat:report> |
| </target> |
| |
| </project> |
| |