java-osgi.eclass
Description
This eclass provides functionality which is used by packages that need to be OSGi compliant. This means that the generated jars will have special headers in their manifests. Currently this is used only by Eclipse-3.3 - later we could extend this so that Gentoo Java system would be fully OSGi compliant.
Functions
- @java-osgi_dojar <jar name> <symbolic name> <bundle name> <header name>
-
Rewrites a jar, and produce an OSGi compliant jar from arguments given on the command line. The arguments given correspond to the minimal set of headers that must be present on a Manifest file of an OSGi package. If you need more headers, you should use the
Warning:*-fromfile functions below, that create the Manifest from a file. It will call java-pkg_dojar at the end.Warning:Inline emphasis start-string without end-string.
java-osgi_dojar "dist/${PN}.jar" "com.jcraft.jsch" "JSch" "com.jcraft.jsch, com.jcraft.jsch.jce;x-internal:=true"
@param $1 - name of jar to repackage with OSGi @param $2 - bundle symbolic name @param $3 - bundle name @param $4 - export-package-header
- java-osgi_newjar <jar name> <symbolic name> <bundle name> <header name>
-
Rewrites a jar, and produce an OSGi compliant jar. The arguments given correspond to the minimal set of headers that must be present on a Manifest file of an OSGi package. If you need more headers, you should use the
Warning:*-fromfile functions below, that create the Manifest from a file. It will call java-pkg_newjar at the end.Warning:Inline emphasis start-string without end-string.
java-osgi_newjar "dist/${PN}.jar" "com.jcraft.jsch" "JSch" "com.jcraft.jsch, com.jcraft.jsch.jce;x-internal:=true"
@param $1 - name of jar to repackage with OSGi @param $2 (optional) - name of the target jar. It will default to package name if not specified. @param $3 - bundle symbolic name @param $4 - bundle name @param $5 - export-package header
- java-osgi_newjar-fromfile <jar to repackage with OSGi> <Manifest file> <bundle name> <version rewriting>
-
This function produces an OSGi compliant jar from a given manifest file. The Manifest Bundle-Version header will be replaced by the current version of the package, unless the --no-auto-version option is given. It will call java-pkg_newjar at the end.
java-osgi_newjar-fromfile "dist/${PN}.jar" "${FILESDIR}/MANIFEST.MF" "Standard Widget Toolkit for GTK 2.0"
@param $opt --no-auto-version - This option disables automatic rewriting of the
Warning:Unexpected indentation.
version in the Manifest file
@param $1 - name of jar to repackage with OSGi @param $2 (optional) - name of the target jar. It will default to package name if not specified. @param $3 - path to the Manifest file @param $4 - bundle name
- java-osgi_dojar-fromfile <jar to repackage with OSGi> <Manifest file> <bundle name>
-
This function produces an OSGi compliant jar from a given manifestfile. The Manifest Bundle-Version header will be replaced by the current version of the package, unless the --no-auto-version option is given. It will call java-pkg_dojar at the end.
java-osgi_dojar-fromfile "dist/${PN}.jar" "${FILESDIR}/MANIFEST.MF" "Standard Widget Toolkit for GTK 2.0"
@param $opt --no-auto-version - This option disables automatic rewriting of the
Warning:Unexpected indentation.
version in the Manifest file
@param $1 - name of jar to repackage with OSGi @param $2 - path to the Manifest file @param $3 - bundle name
Authors
Java maintainers <java@gentoo.org>
Reporting Bugs
Please report bugs via https://bugs.gentoo.org/