source: proiecte/HadoopJUnit/hadoop-0.20.1/contrib/hdfsproxy/build.xml @ 155

Last change on this file since 155 was 120, checked in by (none), 14 years ago

Added the mail files for the Hadoop JUNit Project

  • Property svn:executable set to *
File size: 7.2 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4   Licensed to the Apache Software Foundation (ASF) under one or more
5   contributor license agreements.  See the NOTICE file distributed with
6   this work for additional information regarding copyright ownership.
7   The ASF licenses this file to You under the Apache License, Version 2.0
8   (the "License"); you may not use this file except in compliance with
9   the License.  You may obtain a copy of the License at
10
11       http://www.apache.org/licenses/LICENSE-2.0
12
13   Unless required by applicable law or agreed to in writing, software
14   distributed under the License is distributed on an "AS IS" BASIS,
15   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16   See the License for the specific language governing permissions and
17   limitations under the License.
18-->
19
20<project name="hdfsproxy" default="jar">
21        <property name="hdfsproxyVersion" value="1.0"/>
22        <property name="final.name" value="${ant.project.name}-${hdfsproxyVersion}"/>
23        <property name="bin.dir" value="${basedir}/bin"/>
24        <property name="lib.dir" value="${basedir}/lib"/>
25        <property name="conf.dir" value="${basedir}/conf"/>
26        <property name="docs.dir" value="${basedir}/docs"/>
27        <import file="../build-contrib.xml"/>
28
29        <target name="jar" depends="compile" description="Create jar">
30                <echo>
31            Building the .jar files.
32        </echo>
33                <jar jarfile="${build.dir}/${final.name}.jar" basedir="${build.classes}" includes="org/apache/hadoop/hdfsproxy/**/*.class" >
34                        <manifest>
35                            <section name="org/apache/hadoop/hdfsproxy">
36                                <attribute name="Implementation-Title" value="HdfsProxy"/>
37                                <attribute name="Implementation-Version" value="${hdfsproxyVersion}"/>
38                                <attribute name="Implementation-Vendor" value="Apache"/>
39                            </section>
40                        </manifest>
41
42                </jar>
43        </target>
44
45        <!-- ====================================================== -->
46        <!-- Macro definitions                                      -->
47        <!-- ====================================================== -->
48        <macrodef name="macro_tar" description="Worker Macro for tar">
49                <attribute name="param.destfile"/>
50                <element name="param.listofitems"/>
51                <sequential>
52                        <tar compression="gzip" longfile="gnu"
53          destfile="@{param.destfile}">
54                                <param.listofitems/>
55                        </tar>
56                </sequential>
57        </macrodef>
58
59        <!-- ================================================================== -->
60        <!-- D I S T R I B U T I O N                                            -->
61        <!-- ================================================================== -->
62        <!--                                                                    -->
63        <!-- ================================================================== -->
64        <target name="local-package" depends="jar" description="Package in local build directory">
65                <mkdir dir="${build.dir}/${final.name}"/>
66                <mkdir dir="${build.dir}/${final.name}/logs"/>
67                <copy todir="${build.dir}/${final.name}" includeEmptyDirs="false">
68                        <fileset dir="${build.dir}">
69                                <include name="*.jar" />
70                                <include name="*.war" />
71                        </fileset>
72                </copy>
73                <copy todir="${build.dir}/${final.name}/lib" includeEmptyDirs="false">
74                        <fileset dir="${common.ivy.lib.dir}">
75        <include name="commons-logging-${commons-logging.version}"/>
76        <include name="commons-logging-api-${commons-logging-api.version}.jar"/>
77        <include name="junit-${junit.version}.jar"/>
78        <include name="log4j-${log4j.version}.jar"/>
79        <include name="slf4j-api-${slf4j-api.version}.jar"/>
80        <include name="slf4j-log4j${slf4j-log4j.version}.jar"/>
81        <include name="xmlenc-${xmlenc.version}.jar"/>
82        <include name="jetty-${jetty.version}.jar"/>
83        <include name="servlet-api-${servlet-api-2.5.version}.jar"/>
84        <include name="core-${core.vesion}"/> 
85                       </fileset>
86                       <fileset dir="${hadoop.root}/lib/jsp-${jsp.version}">
87        <include name="jsp-${jsp.version}"/> 
88        <include name="jsp-api-${jsp-api.vesion}"/> 
89                        </fileset>
90                </copy>
91
92                <copy todir="${build.dir}/${final.name}/lib" includeEmptyDirs="false">
93                        <fileset dir="${hadoop.root}/build">
94                                <include name="*-core.jar"/>
95                                <include name="*-tools.jar"/>
96                        </fileset>
97                </copy>
98
99                <copy todir="${build.dir}/${final.name}/bin">
100                        <fileset dir="${bin.dir}"/>
101                </copy>
102
103                <copy todir="${build.dir}/${final.name}/conf">
104                        <fileset dir="${conf.dir}"/>
105                </copy>
106
107                <copy todir="${build.dir}/${final.name}">
108                        <fileset dir="${basedir}">
109                                <include name="README" />
110                                <include name="build.xml" />
111                                <include name="*.txt" />
112                        </fileset>
113                </copy>
114
115                <copy todir="${build.dir}/${final.name}/src" includeEmptyDirs="true">
116                        <fileset dir="${src.dir}" excludes="**/*.template **/docs/build/**/*"/>
117                </copy>
118
119                <chmod perm="ugo+x" type="file" parallel="false">
120                        <fileset dir="${build.dir}/${final.name}/bin"/>
121                </chmod>
122
123        </target>
124       
125        <target name="package" depends="local-package" description="Build distribution">
126    <mkdir dir="${dist.dir}/contrib/${name}"/>
127    <copy todir="${dist.dir}/contrib/${name}">
128      <fileset dir="${build.dir}/${final.name}">
129        <exclude name="**/lib/**" />
130        <exclude name="**/src/**" />
131      </fileset>
132    </copy>
133    <chmod dir="${dist.dir}/contrib/${name}/bin" perm="a+x" includes="*"/>               
134        </target>
135
136        <!-- ================================================================== -->
137        <!-- Make release tarball                                               -->
138        <!-- ================================================================== -->
139        <target name="tar" depends="local-package" description="Make release tarball">
140                <macro_tar param.destfile="${build.dir}/${final.name}.tar.gz">
141                        <param.listofitems>
142                                <tarfileset dir="${build.dir}" mode="664">
143                                        <exclude name="${final.name}/bin/*" />
144                                        <include name="${final.name}/**" />
145                                </tarfileset>
146                                <tarfileset dir="${build.dir}" mode="755">
147                                        <include name="${final.name}/bin/*" />
148                                </tarfileset>
149                        </param.listofitems>
150                </macro_tar>
151        </target>
152
153        <target name="binary" depends="local-package" description="Make tarball without source and documentation">
154                <macro_tar param.destfile="${build.dir}/${final.name}-bin.tar.gz">
155                        <param.listofitems>
156                                <tarfileset dir="${build.dir}" mode="664">
157                                        <exclude name="${final.name}/bin/*" />
158                                        <exclude name="${final.name}/src/**" />
159                                        <exclude name="${final.name}/docs/**" />
160                                        <include name="${final.name}/**" />
161                                </tarfileset>
162                                <tarfileset dir="${build.dir}" mode="755">
163                                        <include name="${final.name}/bin/*" />
164                                </tarfileset>
165                        </param.listofitems>
166                </macro_tar>
167        </target>
168
169  <!-- the unit test classpath -->
170  <path id="test.classpath">
171    <pathelement location="${build.test}" />
172    <pathelement location="${hadoop.root}/build/test/classes"/>
173    <pathelement location="${hadoop.root}/src/contrib/test"/>
174    <pathelement location="${hadoop.root}/conf"/>
175    <pathelement location="${hadoop.root}/build"/>
176    <pathelement location="${hadoop.root}/build/classes"/>
177    <pathelement location="${hadoop.root}/build/tools"/>
178    <pathelement location="${build.examples}"/>
179    <path refid="contrib-classpath"/>
180  </path>
181
182
183</project>
Note: See TracBrowser for help on using the repository browser.