diff --git a/objectweb-asm.spec b/objectweb-asm.spec
index bd4b7db..351806f 100644
--- a/objectweb-asm.spec
+++ b/objectweb-asm.spec
@@ -4,7 +4,7 @@
Name: objectweb-asm
Version: 6.1.1
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Java bytecode manipulation and analysis framework
License: BSD
URL: http://asm.ow2.org/
@@ -35,6 +35,11 @@ BuildRequires: mvn(org.junit.jupiter:junit-jupiter-params)
BuildRequires: mvn(org.junit.platform:junit-platform-surefire-provider)
%endif
+# asm-all needs to be in pluginpath for BND. If this self-dependency
+# becomes a problem then ASM core will have to be build from source
+# with javac before main maven build, just like bnd-module-plugin
+BuildRequires: objectweb-asm >= 6.1.1
+
%description
ASM is an all purpose Java bytecode manipulation and analysis
framework. It can be used to modify existing classes or dynamically
@@ -87,7 +92,7 @@ for pom in asm asm-analysis asm-commons asm-test asm-tree asm-util asm-xml; do
$bsn
JavaSE-1.8
<_removeheaders>Bnd-LastModified,Build-By,Created-By,Include-Resource,Require-Capability,Tool
- <_pluginpath>$(pwd)/tools/bnd-module-plugin/bnd-module-plugin.jar
+ <_pluginpath>$(pwd)/tools/bnd-module-plugin/bnd-module-plugin.jar, $(find-jar objectweb-asm/asm-all)
<_plugin>org.objectweb.asm.tools.ModuleInfoBndPlugin;
"
@@ -135,6 +140,9 @@ popd
%license LICENSE.txt
%changelog
+* Fri Jun 29 2018 Mikolaj Izdebski - 6.1.1-3
+- Add objectweb-asm to BND pluginpath
+
* Thu Jun 28 2018 Mikolaj Izdebski - 6.1.1-2
- Allow conditionally building without junit5