Generate JPM module-info
authorMathieu Baudier <mbaudier@argeo.org>
Fri, 12 Apr 2024 10:50:08 +0000 (12:50 +0200)
committerMathieu Baudier <mbaudier@argeo.org>
Fri, 12 Apr 2024 10:50:08 +0000 (12:50 +0200)
src/org/argeo/build/Make.java

index b0066ac99bdf7ca0295b1bef5aef8e04efe4e882..2b6187bcd6d9912d570232e7c40dd0426f5ffa86 100644 (file)
@@ -45,6 +45,7 @@ import org.eclipse.jdt.core.compiler.CompilationProgress;
 
 import aQute.bnd.osgi.Analyzer;
 import aQute.bnd.osgi.Jar;
+import aQute.bnd.plugin.jpms.JPMSModuleInfoPlugin;
 
 /**
  * Minimalistic OSGi compiler and packager, meant to be used as a single file
@@ -486,6 +487,9 @@ public class Make {
                        Jar jar = new Jar(bundleSymbolicName, binP.toFile());
                        bndAnalyzer.setJar(jar);
                        manifest = bndAnalyzer.calcManifest();
+
+                       JPMSModuleInfoPlugin jpmsModuleInfoPlugin = new JPMSModuleInfoPlugin();
+                       jpmsModuleInfoPlugin.verify(bndAnalyzer);
                } catch (Exception e) {
                        throw new RuntimeException("Bnd analysis of " + compiled + " failed", e);
                }