Class BndHelper
java.lang.Object
org.standardout.gradle.plugin.platform.internal.util.bnd.BndHelper
Utilities for working with bnd.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbuildAndClose(aQute.bnd.osgi.Builder b, File target) Build the bnd configuration present in the given builder and write the bundle to the target file.static aQute.bnd.osgi.BuilderCreate a default builder.getSymbolicNameAndPackageImports(File bundle) Creates aPairwith the "Bundle-SymbolicName" as first value and a list of imported packages as second value of the given bundle, but without meta data like version and others .static booleanwrap(File source, Collection<File> classpath, File target, Map<String, String> properties, boolean removeSignature) Wrap a Jar as it is, only changing the manifest.
-
Constructor Details
-
BndHelper
public BndHelper()
-
-
Method Details
-
createBuilder
public static aQute.bnd.osgi.Builder createBuilder()Create a default builder. -
buildAndClose
Build the bnd configuration present in the given builder and write the bundle to the target file.- Parameters:
b- the buildertarget- the target file- Throws:
Exception- if creating the bundle fails
-
wrap
public static boolean wrap(File source, Collection<File> classpath, File target, Map<String, String> properties, boolean removeSignature) throws ExceptionWrap a Jar as it is, only changing the manifest.- Parameters:
source- the source jarclasspath- the class pathtarget- the target fileproperties- the bnd properties- Returns:
- if the target file was created, it will not be created if the source Jar is empty or invalid
- Throws:
Exception- if wrapping the Jar fails
-
getSymbolicNameAndPackageImports
public static aQute.libg.tuple.Pair<String,List<String>> getSymbolicNameAndPackageImports(File bundle) throws Exception Creates aPairwith the "Bundle-SymbolicName" as first value and a list of imported packages as second value of the given bundle, but without meta data like version and others .
-