Description: Don't use BND to create OSGi metadata to avoid dependencies hell.
 Use simple ant <jar/> tasks with pre-generated OSGi metadata.
Author: Damien Raude-Morvan <drazzib@debian.org>
Last-Update: 2013-01-08
Forwarded: not-needed
--- a/archive/asm-all.xml
+++ b/archive/asm-all.xml
@@ -34,6 +34,7 @@
 
   <target name="build-jar">
     <mkdir dir="${out.dist.lib}/all"/>
+<!--
     <taskdef resource="aQute/bnd/ant/taskdef.properties" classpath="${config}/biz.aQute.bnd.jar"/>
     <bnd
             classpath="${out.build}"
@@ -42,7 +43,10 @@
             exceptions="true"
             files="archive/asm-all.bnd"
             output="${out.dist.lib}/all/${ant.project.name}-${product.artifact}.jar"/>
-
+-->
+    <jar destfile="${out.dist.lib}/all/${ant.project.name}-${product.artifact}.jar"
+         basedir="${out.build}" manifest="debian/osgi/${ant.project.name}.osgi"
+         excludes="tmp/**,org/objectweb/asm/optimizer**"/>
     <copy file="${archive}/asm-all.pom" toFile="${out.dist.lib}/all/${ant.project.name}-${product.artifact}.pom"/>
     <replace file="${out.dist.lib}/all/${ant.project.name}-${product.artifact}.pom" token="@product.name@" value="${ant.project.name}"/>
     <replace file="${out.dist.lib}/all/${ant.project.name}-${product.artifact}.pom" token="@product.artifact@" value="${product.artifact}"/>
@@ -59,4 +63,4 @@
     <echo file="${out.dist.lib}/all/${ant.project.name}-snapshot-version" message="${product.build.time}"/>
   </target>
 
-</project>
\ No newline at end of file
+</project>
--- a/archive/asm-analysis.xml
+++ b/archive/asm-analysis.xml
@@ -33,6 +33,7 @@
   <target name="dist" depends="build-jar,build-snapshot"/>
 
   <target name="build-jar">
+<!--
     <taskdef resource="aQute/bnd/ant/taskdef.properties" classpath="${config}/biz.aQute.bnd.jar"/>
     <bnd
             classpath="${out.build}"
@@ -41,7 +42,11 @@
             exceptions="true"
             files="archive/asm-analysis.bnd"
             output="${out.dist.lib}/${ant.project.name}-${product.artifact}.jar"/>
-
+-->
+    <jar destfile="${out.dist.lib}/${ant.project.name}-${product.artifact}.jar"
+         basedir="${out.build}" manifest="debian/osgi/${ant.project.name}.osgi"
+         includes="org/objectweb/asm/tree/analysis/*"
+         excludes="tmp/**"/>
     <copy file="${archive}/asm-analysis.pom" toFile="${out.dist.lib}/${ant.project.name}-${product.artifact}.pom"/>
     <replace file="${out.dist.lib}/${ant.project.name}-${product.artifact}.pom" token="@product.name@" value="${ant.project.name}"/>
     <replace file="${out.dist.lib}/${ant.project.name}-${product.artifact}.pom" token="@product.artifact@" value="${product.artifact}"/>
--- a/archive/asm-commons.xml
+++ b/archive/asm-commons.xml
@@ -33,6 +33,7 @@
   <target name="dist" depends="build-jar,build-snapshot"/>
 
   <target name="build-jar">
+<!--
     <taskdef resource="aQute/bnd/ant/taskdef.properties" classpath="${config}/biz.aQute.bnd.jar"/>
     <bnd
             classpath="${out.build}"
@@ -41,7 +42,11 @@
             exceptions="true"
             files="archive/asm-commons.bnd"
             output="${out.dist.lib}/${ant.project.name}-${product.artifact}.jar"/>
-
+-->
+    <jar destfile="${out.dist.lib}/${ant.project.name}-${product.artifact}.jar"
+         basedir="${out.build}" manifest="debian/osgi/${ant.project.name}.osgi"
+         includes="org/objectweb/asm/commons/*"
+         excludes="tmp/**"/>
     <copy file="${archive}/asm-commons.pom" toFile="${out.dist.lib}/${ant.project.name}-${product.artifact}.pom"/>
     <replace file="${out.dist.lib}/${ant.project.name}-${product.artifact}.pom" token="@product.name@" value="${ant.project.name}"/>
     <replace file="${out.dist.lib}/${ant.project.name}-${product.artifact}.pom" token="@product.artifact@" value="${product.artifact}"/>
--- a/archive/asm-debug-all.xml
+++ b/archive/asm-debug-all.xml
@@ -34,6 +34,7 @@
 
   <target name="build-jar">
     <mkdir dir="${out.dist.lib}/all"/>
+<!--
     <taskdef resource="aQute/bnd/ant/taskdef.properties" classpath="${config}/biz.aQute.bnd.jar"/>
     <bnd
       classpath="${out.build}/tmp"
@@ -42,7 +43,10 @@
       exceptions="true"
       files="archive/asm-debug-all.bnd"
       output="${out.dist.lib}/all/${ant.project.name}-${product.artifact}.jar"/>
-
+-->
+	<jar destfile="${out.dist.lib}/all/${ant.project.name}-${product.artifact}.jar"
+         basedir="${out.build}" manifest="debian/osgi/${ant.project.name}.osgi"
+         excludes="tmp/**,org/objectweb/asm/optimizer**"/>
     <copy file="${archive}/asm-debug-all.pom" toFile="${out.dist.lib}/all/${ant.project.name}-${product.artifact}.pom"/>
     <replace file="${out.dist.lib}/all/${ant.project.name}-${product.artifact}.pom" token="@product.name@" value="${ant.project.name}"/>
     <replace file="${out.dist.lib}/all/${ant.project.name}-${product.artifact}.pom" token="@product.artifact@" value="${product.artifact}"/>
@@ -59,4 +63,4 @@
     <echo file="${out.dist.lib}/all/${ant.project.name}-snapshot-version" message="${product.build.time}"/>
   </target>
 
-</project>
\ No newline at end of file
+</project>
--- a/archive/asm-tree.xml
+++ b/archive/asm-tree.xml
@@ -33,6 +33,7 @@
   <target name="dist" depends="build-jar,build-snapshot"/>
 
   <target name="build-jar">
+<!--
     <taskdef resource="aQute/bnd/ant/taskdef.properties" classpath="${config}/biz.aQute.bnd.jar"/>
     <bnd
             classpath="${out.build}"
@@ -41,7 +42,11 @@
             exceptions="true"
             files="archive/asm-tree.bnd"
             output="${out.dist.lib}/${ant.project.name}-${product.artifact}.jar"/>
-
+-->
+    <jar destfile="${out.dist.lib}/${ant.project.name}-${product.artifact}.jar"
+         basedir="${out.build}" manifest="debian/osgi/${ant.project.name}.osgi"
+         includes="org/objectweb/asm/tree/*"
+         excludes="tmp/**"/>
     <copy file="${archive}/asm-tree.pom" toFile="${out.dist.lib}/${ant.project.name}-${product.artifact}.pom"/>
     <replace file="${out.dist.lib}/${ant.project.name}-${product.artifact}.pom" token="@product.name@" value="${ant.project.name}"/>
     <replace file="${out.dist.lib}/${ant.project.name}-${product.artifact}.pom" token="@product.artifact@" value="${product.artifact}"/>
--- a/archive/asm-util.xml
+++ b/archive/asm-util.xml
@@ -33,6 +33,7 @@
   <target name="dist" depends="build-jar,build-snapshot"/>
 
   <target name="build-jar">
+<!--
     <taskdef resource="aQute/bnd/ant/taskdef.properties" classpath="${config}/biz.aQute.bnd.jar"/>
     <bnd
             classpath="${out.build}"
@@ -41,7 +42,11 @@
             exceptions="true"
             files="archive/asm-util.bnd"
             output="${out.dist.lib}/${ant.project.name}-${product.artifact}.jar"/>
-
+-->
+    <jar destfile="${out.dist.lib}/${ant.project.name}-${product.artifact}.jar"
+         basedir="${out.build}" manifest="debian/osgi/${ant.project.name}.osgi"
+         includes="org/objectweb/asm/util/*"
+         excludes="tmp/**"/>
     <copy file="${archive}/asm-util.pom" toFile="${out.dist.lib}/${ant.project.name}-${product.artifact}.pom"/>
     <replace file="${out.dist.lib}/${ant.project.name}-${product.artifact}.pom" token="@product.name@" value="${ant.project.name}"/>
     <replace file="${out.dist.lib}/${ant.project.name}-${product.artifact}.pom" token="@product.artifact@" value="${product.artifact}"/>
--- a/archive/asm-xml.xml
+++ b/archive/asm-xml.xml
@@ -33,6 +33,7 @@
   <target name="dist" depends="build-jar,build-snapshot"/>
 
   <target name="build-jar">
+<!--
     <taskdef resource="aQute/bnd/ant/taskdef.properties" classpath="${config}/biz.aQute.bnd.jar"/>
     <bnd
             classpath="${out.build}"
@@ -41,7 +42,11 @@
             exceptions="true"
             files="archive/asm-xml.bnd"
             output="${out.dist.lib}/${ant.project.name}-${product.artifact}.jar"/>
-
+-->
+    <jar destfile="${out.dist.lib}/${ant.project.name}-${product.artifact}.jar"
+         basedir="${out.build}" manifest="debian/osgi/${ant.project.name}.osgi"
+         includes="org/objectweb/asm/xml/*"
+         excludes="tmp/**"/>
     <copy file="${archive}/asm-xml.pom" toFile="${out.dist.lib}/${ant.project.name}-${product.artifact}.pom"/>
     <replace file="${out.dist.lib}/${ant.project.name}-${product.artifact}.pom" token="@product.name@" value="${ant.project.name}"/>
     <replace file="${out.dist.lib}/${ant.project.name}-${product.artifact}.pom" token="@product.artifact@" value="${product.artifact}"/>
--- a/archive/asm.xml
+++ b/archive/asm.xml
@@ -33,6 +33,7 @@
   <target name="dist" depends="build-jar,build-snapshot"/>
 
   <target name="build-jar">
+<!--
     <taskdef resource="aQute/bnd/ant/taskdef.properties" classpath="${config}/biz.aQute.bnd.jar"/>
     <bnd
             classpath="${out.build}"
@@ -41,7 +42,11 @@
             exceptions="true"
             files="archive/asm.bnd"
             output="${out.dist.lib}/${ant.project.name}-${product.artifact}.jar"/>
-
+-->
+    <jar destfile="${out.dist.lib}/${ant.project.name}-${product.artifact}.jar"
+         basedir="${out.build}" manifest="debian/osgi/${ant.project.name}.osgi"
+         includes="org/objectweb/asm/*,org/objectweb/asm/signature/*"
+         excludes="tmp/**"/>
     <copy file="${archive}/asm.pom" toFile="${out.dist.lib}/${ant.project.name}-${product.artifact}.pom"/>
     <replace file="${out.dist.lib}/${ant.project.name}-${product.artifact}.pom" token="@product.name@" value="${ant.project.name}"/>
     <replace file="${out.dist.lib}/${ant.project.name}-${product.artifact}.pom" token="@product.artifact@" value="${product.artifact}"/>
