build.xml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?xml version="1.0"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <project name="static-group-mapping" default="jar">
  17. <!-- Additional -->
  18. <property name="name" value="${ant.project.name}"/>
  19. <property name="build.encoding" value="ISO-8859-1"/>
  20. <property name="build.classes" location="${build.dir}/classes"/>
  21. <property name="src.dir" location="${basedir}/src"/>
  22. <property name="lib.dir" location="${build.dir}/lib" />
  23. <!-- this version number is provided by the invoker -->
  24. <property name="static-group-mapping.version" value="DEV" />
  25. <property name="test.available" value="true" />
  26. <property name="javac.debug" value="on"/>
  27. <property name="javac.optimize" value="on"/>
  28. <property name="javac.deprecation" value="on"/>
  29. <property name="javac.args.warnings" value="-Xlint:unchecked"/>
  30. <property name="javac.args" value=""/>
  31. <!-- create the list of files to add to the classpath -->
  32. <path id="build.classpath">
  33. <fileset dir="${hadoop.home}">
  34. <include name="hadoop*core*.jar" />
  35. </fileset>
  36. </path>
  37. <target name="init">
  38. <mkdir dir="${build.classes}"/>
  39. </target>
  40. <target name="compile" depends="init">
  41. <echo message="contrib: ${name}"/>
  42. <echo message="src dir: ${src.dir}"/>
  43. <javac
  44. encoding="${build.encoding}"
  45. srcdir="${src.dir}"
  46. includes="**/*.java"
  47. destdir="${build.classes}"
  48. debug="${javac.debug}"
  49. optimize="${javac.optimize}"
  50. deprecation="${javac.deprecation}">
  51. <classpath refid="build.classpath"/>
  52. <compilerarg line="${javac.args} ${javac.args.warnings}" />
  53. </javac>
  54. </target>
  55. <!-- Override jar target to specify main class, and to include default
  56. configuration file -->
  57. <target name="jar" depends="compile">
  58. <jar jarfile="${build.dir}/static-group-mapping-${static-group-mapping.version}.jar"
  59. basedir="${build.classes}">
  60. </jar>
  61. </target>
  62. </project>