THRIFT-566. java: jar file should contain copies of LICENSE and NOTICE files

LICENSE and NOTICE are now included in the jar file by the build process. 



git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@806013 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/java/build.xml b/lib/java/build.xml
index 6bd5e89..de9b018 100644
--- a/lib/java/build.xml
+++ b/lib/java/build.xml
@@ -34,6 +34,7 @@
   <property name="src.test" location="test" />
   <property name="build.test" location="${build}/test" />
   <property name="test.thrift.home" location="../../test"/>
+  <property name="thrift.root" location="../../"/>
 
   <property file="${user.home}/.thrift-build.properties" />
 
@@ -123,9 +124,13 @@
   </target>
 
   <target name="dist" depends="compile">
+    <mkdir dir="${build}/META-INF"/>
+    <copy file="${thrift.root}/LICENSE" tofile="${build}/META-INF/LICENSE.txt"/>
+    <copy file="${thrift.root}/NOTICE" tofile="${build}/META-INF/NOTICE.txt"/>
     <jar jarfile="libthrift.jar">
       <fileset dir="${build}">
         <include name="**/*.class" />
+        <include name="META-INF/*.txt" />
       </fileset>
       <fileset dir="src">
         <include name="**/*.java" />