public class OSGiPackager extends Object
MavenArchiveConfiguration
.Constructor and Description |
---|
OSGiPackager(Properties props) |
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
configureOSGiManifest(org.apache.maven.project.MavenProject pom,
org.apache.maven.archiver.MavenArchiveConfiguration archive,
File classesDirectory)
Reads information from the POM and the artifact archive to configure
the OSGi manifest entries.
|
static List<com.sun.enterprise.module.maven.OSGiPackager.ExportedPackage> |
discoverPackages(File classesDirectory) |
List<com.sun.enterprise.module.maven.OSGiPackager.BundleDependency> |
discoverRequiredBundles(org.apache.maven.project.MavenProject pom) |
static String |
generateExportPackageHeader(Collection<com.sun.enterprise.module.maven.OSGiPackager.ExportedPackage> packages,
String version) |
String |
generateRequireBundleHeader(List<com.sun.enterprise.module.maven.OSGiPackager.BundleDependency> dependencies) |
public OSGiPackager(Properties props)
public Map<String,String> configureOSGiManifest(org.apache.maven.project.MavenProject pom, org.apache.maven.archiver.MavenArchiveConfiguration archive, File classesDirectory) throws IOException
VersionTranslator.MavenToOSGi(String)
Bundle-Description is assumed to be "${pom.description}".
Bundle-Vendor is assumed to be "${pom.organization.name}".
Require-Bundle is populated by values read from pom dependencies
Note:
There is no support for Export-Package yet.
It sets Bundle-ManifestVersion as 2 which indicates OSGi r4 bundle.pom
- The Maven project objectarchive
- The archive that is being builtclassesDirectory
- output for javacIOException
public List<com.sun.enterprise.module.maven.OSGiPackager.BundleDependency> discoverRequiredBundles(org.apache.maven.project.MavenProject pom) throws IOException
IOException
public String generateRequireBundleHeader(List<com.sun.enterprise.module.maven.OSGiPackager.BundleDependency> dependencies)
public static List<com.sun.enterprise.module.maven.OSGiPackager.ExportedPackage> discoverPackages(File classesDirectory)
public static String generateExportPackageHeader(Collection<com.sun.enterprise.module.maven.OSGiPackager.ExportedPackage> packages, String version)
Copyright © 2009–2015 Oracle Corporation. All rights reserved.