Package org.apache.felix.bundleplugin
Class ManifestPlugin
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.felix.bundleplugin.BundlePlugin
org.apache.felix.bundleplugin.ManifestPlugin
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
BundleAllPlugin
@Mojo(name="manifest",
requiresDependencyResolution=TEST,
threadSafe=true,
defaultPhase=PROCESS_CLASSES)
public class ManifestPlugin
extends BundlePlugin
Generate an OSGi manifest for this project
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanWhen true, generate the manifest by rebuilding the full bundle in memoryFields inherited from class org.apache.felix.bundleplugin.BundlePlugin
artifactFactory, artifactResolver, classifier, createDependencyReducedPom, dependencyGraphBuilder, dependencyReducedPomLocation, dumpClasspath, dumpInstructions, excludeDependencies, exportScr, localRepository, manifestLocation, mavenProjectBuilder, niceManifest, noWarningProjectTypes, packaging, project, remoteArtifactRepositories, scrLocation, session, supportedProjectTypes, unpackBundleFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcalculateExportsFromContents(aQute.bnd.osgi.Jar bundle) protected voidexecute(Map<String, String> instructions, org.apache.felix.bundleplugin.BundlePlugin.ClassPathItem[] classpath) protected aQute.bnd.osgi.AnalyzergetAnalyzer(org.apache.maven.project.MavenProject project, Map<String, String> instructions, org.apache.felix.bundleplugin.BundlePlugin.ClassPathItem[] classpath) protected aQute.bnd.osgi.AnalyzergetAnalyzer(org.apache.maven.project.MavenProject project, org.apache.felix.bundleplugin.BundlePlugin.ClassPathItem[] classpath) getManifest(org.apache.maven.project.MavenProject project, Map<String, String> instructions, org.apache.felix.bundleplugin.BundlePlugin.ClassPathItem[] classpath, org.sonatype.plexus.build.incremental.BuildContext buildContext) getManifest(org.apache.maven.project.MavenProject project, org.apache.felix.bundleplugin.BundlePlugin.ClassPathItem[] classpath) static voidwriteManifest(aQute.bnd.osgi.Analyzer analyzer, File outputFile, boolean niceManifest, boolean exportScr, File scrLocation, org.sonatype.plexus.build.incremental.BuildContext buildContext, org.apache.maven.plugin.logging.Log log) static voidwriteManifest(Manifest manifest, File outputFile, boolean niceManifest, org.sonatype.plexus.build.incremental.BuildContext buildContext, org.apache.maven.plugin.logging.Log log) Methods inherited from class org.apache.felix.bundleplugin.BundlePlugin
addMavenInstructions, addMavenSourcePath, buildOSGiBundle, convertVersionToOsgi, dumpClasspath, dumpInstructions, dumpManifest, execute, getBase, getBuildDirectory, getBundleName, getClasspath, getDefaultProperties, getEmbeddableArtifacts, getFile, getInstructions, getMaven2OsgiConverter, getMavenResourcePaths, getOptionalPackages, getOSGiBuilder, getOutputDirectory, getProject, includeMavenResources, isTransitivelyOptional, mergeManifest, mergeMavenManifest, removeTagFromInstruction, reportErrors, sanitize, sanitize, setBuildDirectory, setOutputDirectory, transformDirectives, updateExcludesInDepsMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
rebuildBundle
@Parameter(property="rebuildBundle") protected boolean rebuildBundleWhen true, generate the manifest by rebuilding the full bundle in memory
-
-
Constructor Details
-
ManifestPlugin
public ManifestPlugin()
-
-
Method Details
-
execute
protected void execute(Map<String, String> instructions, org.apache.felix.bundleplugin.BundlePlugin.ClassPathItem[] classpath) throws org.apache.maven.plugin.MojoExecutionException- Overrides:
executein classBundlePlugin- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getManifest
public Manifest getManifest(org.apache.maven.project.MavenProject project, org.apache.felix.bundleplugin.BundlePlugin.ClassPathItem[] classpath) throws IOException, org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException, Exception - Throws:
IOExceptionorg.apache.maven.plugin.MojoFailureExceptionorg.apache.maven.plugin.MojoExecutionExceptionException
-
getManifest
public Manifest getManifest(org.apache.maven.project.MavenProject project, Map<String, String> instructions, org.apache.felix.bundleplugin.BundlePlugin.ClassPathItem[] classpath, org.sonatype.plexus.build.incremental.BuildContext buildContext) throws IOException, org.apache.maven.plugin.MojoFailureException, org.apache.maven.plugin.MojoExecutionException, Exception- Throws:
IOExceptionorg.apache.maven.plugin.MojoFailureExceptionorg.apache.maven.plugin.MojoExecutionExceptionException
-
getAnalyzer
protected aQute.bnd.osgi.Analyzer getAnalyzer(org.apache.maven.project.MavenProject project, org.apache.felix.bundleplugin.BundlePlugin.ClassPathItem[] classpath) throws IOException, org.apache.maven.plugin.MojoExecutionException, Exception - Throws:
IOExceptionorg.apache.maven.plugin.MojoExecutionExceptionException
-
getAnalyzer
protected aQute.bnd.osgi.Analyzer getAnalyzer(org.apache.maven.project.MavenProject project, Map<String, String> instructions, org.apache.felix.bundleplugin.BundlePlugin.ClassPathItem[] classpath) throws IOException, org.apache.maven.plugin.MojoExecutionException, Exception- Throws:
IOExceptionorg.apache.maven.plugin.MojoExecutionExceptionException
-
writeManifest
public static void writeManifest(aQute.bnd.osgi.Analyzer analyzer, File outputFile, boolean niceManifest, boolean exportScr, File scrLocation, org.sonatype.plexus.build.incremental.BuildContext buildContext, org.apache.maven.plugin.logging.Log log) throws Exception - Throws:
Exception
-
writeManifest
public static void writeManifest(Manifest manifest, File outputFile, boolean niceManifest, org.sonatype.plexus.build.incremental.BuildContext buildContext, org.apache.maven.plugin.logging.Log log) throws IOException - Throws:
IOException
-
calculateExportsFromContents
-