forked from ogrisel/mahout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-deprecated.xml
151 lines (128 loc) · 5.36 KB
/
build-deprecated.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<?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>