-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.xml
142 lines (137 loc) · 6.27 KB
/
build.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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="build" name="clone-detector">
<property environment="env"/>
<property name="ECLIPSE_HOME" value="../../../../Applications/eclipse"/>
<property name="junit.output.dir" value="junit"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.7"/>
<property name="source" value="1.7"/>
<path id=".classpath">
<pathelement location="bin"/>
<!--
reproduce using
ls libs/*.jar | ruby -ne 'puts "<pathelement location=\"#{$_.gsub("\n","")}\"/>"'
This is necessary, because ant is FOS.
-->
<pathelement location="libs/aopalliance-1.0.jar"/>
<pathelement location="libs/automaton.jar"/>
<pathelement location="libs/commons-cli-1.2.jar"/>
<pathelement location="libs/commons-configuration-1.6.jar"/>
<pathelement location="libs/commons-logging-1.1.1.jar"/>
<pathelement location="libs/guava-14.0.1.jar"/>
<pathelement location="libs/guice-3.0.jar"/>
<pathelement location="libs/guice-assistedinject-3.0.jar"/>
<pathelement location="libs/guice-grapher-3.0.jar"/>
<pathelement location="libs/guice-jmx-3.0.jar"/>
<pathelement location="libs/guice-jndi-3.0.jar"/>
<pathelement location="libs/guice-multibindings-3.0.jar"/>
<pathelement location="libs/guice-persist-3.0.jar"/>
<pathelement location="libs/guice-throwingproviders-3.0.jar"/>
<pathelement location="libs/hadoop-auth-2.0.0-cdh4.5.0.jar"/>
<pathelement location="libs/hadoop-common-2.0.0-cdh4.5.0.jar"/>
<pathelement location="libs/hadoop-hdfs-2.0.0-cdh4.5.0.jar"/>
<pathelement location="libs/hadoop-mapreduce-client-app-2.0.0-cdh4.5.0.jar"/>
<pathelement location="libs/hadoop-mapreduce-client-common-2.0.0-cdh4.5.0.jar"/>
<pathelement location="libs/hadoop-mapreduce-client-core-2.0.0-cdh4.5.0.jar"/>
<pathelement location="libs/hadoop-mapreduce-client-jobclient-2.0.0-cdh4.5.0.jar"/>
<pathelement location="libs/hadoop-mapreduce-client-shuffle-2.0.0-cdh4.5.0.jar"/>
<pathelement location="libs/hadoop-yarn-api-2.0.0-cdh4.5.0.jar"/>
<pathelement location="libs/hadoop-yarn-client-2.0.0-cdh4.5.0.jar"/>
<pathelement location="libs/hadoop-yarn-common-2.0.0-cdh4.5.0.jar"/>
<pathelement location="libs/hadoop-yarn-server-common-2.0.0-cdh4.5.0.jar"/>
<pathelement location="libs/hamcrest-all-1.3.0RC2.jar"/>
<pathelement location="libs/junit-4.8.2.jar"/>
<pathelement location="libs/hbase-0.94.6-cdh4.5.0-security.jar"/>
<pathelement location="libs/javax.inject-1.jar"/>
<pathelement location="libs/jsch-0.1.42.jar"/>
<pathelement location="libs/juniversalchardet-1.0.3.jar"/>
<pathelement location="libs/mockito-all-1.9.0-rc1.jar"/>
<pathelement location="libs/org.eclipse.jgit-2.3.1.201302201838-r.jar"/>
<pathelement location="libs/protobuf-java-2.4.0a.jar"/>
</path>
<target name="init">
<mkdir dir="bin"/>
<mkdir dir="src-gen"/>
<copy includeemptydirs="false" todir="bin">
<fileset dir="src">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="bin"/>
<delete dir="src-gen"/>
<delete dir="cc"/>
</target>
<target name="jar" depends="build">
<property name="mainClass" value="ch.unibe.scg.cells.hadoop.JUnitRunner"/>
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask"
classpath="jarjar-1.4.jar"/>
<manifestclasspath jarfile="cc.jar" property="manifest.class.path">
<classpath refid=".classpath"/>
</manifestclasspath>
<jarjar destfile="cc.jar" basedir="bin">
<manifest>
<attribute name="Class-Path" value="${manifest.class.path}"/>
<attribute name="Main-Class" value="${mainClass}"/>
</manifest>
<!-- produce using
find libs -name '*.jar' -prune -type f | ruby -n -e 'puts "<zipfileset src=\"" + $_.gsub(/\n/,"") + "\"/>" \
unless /libs\/(dev-only|hbasetest-only|hadoop).*/ =~ $_'
-->
<zipfileset src="libs/aopalliance-1.0.jar"/>
<zipfileset src="libs/automaton.jar"/>
<zipfileset src="libs/commons-cli-1.2.jar"/>
<zipfileset src="libs/commons-configuration-1.6.jar"/>
<zipfileset src="libs/commons-logging-1.1.1.jar"/>
<zipfileset src="libs/guava-14.0.1.jar"/>
<zipfileset src="libs/guice-3.0.jar"/>
<zipfileset src="libs/guice-assistedinject-3.0.jar"/>
<zipfileset src="libs/guice-grapher-3.0.jar"/>
<zipfileset src="libs/guice-jmx-3.0.jar"/>
<zipfileset src="libs/guice-jndi-3.0.jar"/>
<zipfileset src="libs/guice-multibindings-3.0.jar"/>
<zipfileset src="libs/guice-persist-3.0.jar"/>
<zipfileset src="libs/guice-throwingproviders-3.0.jar"/>
<zipfileset src="libs/hamcrest-all-1.3.0RC2.jar"/>
<zipfileset src="libs/hbase-0.94.6-cdh4.5.0-security.jar"/>
<zipfileset src="libs/javax.inject-1.jar"/>
<zipfileset src="libs/jsch-0.1.42.jar"/>
<zipfileset src="libs/juniversalchardet-1.0.3.jar"/>
<zipfileset src="libs/mockito-all-1.9.0-rc1.jar"/>
<zipfileset src="libs/org.eclipse.jgit-2.3.1.201302201838-r.jar"/>
<zipfileset src="libs/protobuf-java-2.4.0a.jar"/>
<rule pattern="com.**" result="rcom.@1"/> <!-- Can only list ONE rule! -->
</jarjar>
</target>
<target name="uploadJar" depends="jar">
<!--
TODO: As long as we provide the hbase-jar in the cc.jar (with jarjar, see above),
we can provide an empty libjars property. When jarjar gets removed from the
build process, we need to set the libjars value again to something like this:
"-libjars /tmp/hbase-0.94.6-cdh4.5.0-security.jar"
-->
<property name="libjars" value=""/>
<scp file="cc.jar" todir="[email protected]:" password="" keyfile="${user.home}/.ssh/id_rsa"/>
<sshexec host="haddock.unibe.ch" username="deploy" password=""
keyfile="${user.home}/.ssh/id_rsa" command="hadoop jar cc.jar ${libjars} ${classArgument}"/>
</target>
<target depends="init" name="build">
<!--
If you are on Windows, comment the next line.
Before running this script run ./run-protoc-win.sh manually
-->
<exec logError="yes" executable="./run-protoc.sh"/>
<javac includeantruntime="false" debug="true" debuglevel="${debuglevel}"
destdir="bin" source="${source}" target="${target}">
<src path="src"/>
<src path="src-gen"/>
<classpath refid=".classpath"/>
</javac>
</target>
<target name="CC">
<java classname="ch.unibe.scg.cc.Main" failonerror="true" fork="yes">
<classpath refid="clone-detector.classpath"/>
</java>
</target>
</project>