add LICENSE and NOTICE to flex-messaging-common
[flex-blazeds.git] / modules / common / build.xml
index 6644d335db826d32a493eb1c026dffadc6ac9c4a..dee8c33d63c281a25b7c839a42f88cf88566431c 100755 (executable)
@@ -28,7 +28,9 @@
     <property name="module.src" value="${module.dir}/src"/>\r
     <property name="module.classes" value="${module.dir}/classes"/>\r
     <property name="module.jar" value="${lib.dir}/flex-messaging-common.jar"/>\r
-\r
+    <property name="license.file" value="${basedir}/LICENSE" />\r
+    <property name="notice.file" value="${basedir}/NOTICE" />\r
+    \r
     <property name="build.number" value=""/>\r
     \r
     <!-- j2ee apis required to compile -->\r
         <copy todir="${module.classes}/flex/messaging" overwrite="true">\r
             <fileset dir="${module.src}/flex/messaging" includes="*.properties"/>\r
         </copy>\r
+        <delete dir="${module.classes}/meta-inf" quiet="true"/>\r
+        \r
+        <mkdir dir="${module.classes}/META-INF"/>\r
+        <copy file="${license.file}" tofile="${module.classes}/META-INF/LICENSE"/>\r
+        <copy file="${notice.file}" tofile="${module.classes}/META-INF/NOTICE"/>\r
+        \r
         <jar destfile="${module.jar}" basedir="${module.classes}">\r
+            <include name="META-INF/LICENSE"/>\r
+            <include name="META-INF/NOTICE"/>\r
             <include name="flex/**"/>\r
             <exclude name=".dependency-info/**"/>\r
                <manifest>\r
@@ -73,6 +83,7 @@
         <delete failonerror="false">\r
             <fileset dir="${module.classes}/flex/messaging" includes="*.properties"/>\r
         </delete>\r
+        <delete dir="${module.classes}/META-INF"/>\r
     </target>\r
 \r
     <target name="clean" description="clean">\r