org.apache.felix.bundleplugin

Class BundlePlugin

public class BundlePlugin extends AbstractMojo

Create an OSGi bundle from Maven project

UNKNOWN: bundle package test build an OSGi bundle jar

Field Summary
protected Stringclassifier
Classifier type of the bundle to be installed.
protected StringexcludeDependencies
Comma separated list of artifactIds to exclude from the dependency classpath passed to BND (use "true" to exclude everything)
protected FilemanifestLocation
Directory where the manifest will be written
protected booleanunpackBundle
When true, unpack the bundle contents to the outputDirectory
Method Summary
protected BuilderbuildOSGiBundle(MavenProject currentProject, Map originalInstructions, Properties properties, Jar[] classpath)
protected StringconvertVersionToOsgi(String version)
Convert a Maven version into an OSGi compliant version
protected static voiddumpClasspath(String title, List classpath, Log log)
protected static voiddumpInstructions(String title, Properties properties, Log log)
protected static voiddumpManifest(String title, Manifest manifest, Log log)
voidexecute()
protected voidexecute(MavenProject currentProject, Map originalInstructions, Properties properties)
protected voidexecute(MavenProject currentProject, Map originalInstructions, Properties properties, Jar[] classpath)
protected StringgetBuildDirectory()
protected StringgetBundleName(MavenProject currentProject)
TODO this should return getMaven2Osgi().getBundleFileName( project.getArtifact() )
protected Jar[]getClasspath(MavenProject currentProject)
protected PropertiesgetDefaultProperties(MavenProject currentProject)
protected CollectiongetEmbeddableArtifacts(MavenProject project, Analyzer analyzer)
protected FilegetFile(Artifact artifact)
Get the file for an Artifact
protected Maven2OsgiConvertergetMaven2OsgiConverter()
protected FilegetOutputDirectory()
protected MavenProjectgetProject()
protected static voidincludeMavenResources(MavenProject currentProject, Analyzer analyzer, Log log)
protected voidmergeMavenManifest(MavenProject currentProject, Jar jar, String[] removeHeaders, Log log)
protected static StringremoveTagFromInstruction(String instruction, String tag)
protected voidsetBasedir(File _basedir)
protected voidsetBuildDirectory(String _buildirectory)
protected voidsetMaven2OsgiConverter(Maven2OsgiConverter maven2OsgiConverter)
protected voidsetOutputDirectory(File _outputDirectory)
protected static MaptransformDirectives(Map originalInstructions)

Field Detail

classifier

protected String classifier
Classifier type of the bundle to be installed. For example, "jdk14". Defaults to none which means this is the project's main bundle.

UNKNOWN: expression="${classifier}"

excludeDependencies

protected String excludeDependencies
Comma separated list of artifactIds to exclude from the dependency classpath passed to BND (use "true" to exclude everything)

UNKNOWN: expression="${excludeDependencies}"

manifestLocation

protected File manifestLocation
Directory where the manifest will be written

UNKNOWN: expression="${manifestLocation}" default-value="${project.build.outputDirectory}/META-INF"

unpackBundle

protected boolean unpackBundle
When true, unpack the bundle contents to the outputDirectory

UNKNOWN: expression="${unpackBundle}"

Method Detail

buildOSGiBundle

protected Builder buildOSGiBundle(MavenProject currentProject, Map originalInstructions, Properties properties, Jar[] classpath)

convertVersionToOsgi

protected String convertVersionToOsgi(String version)
Convert a Maven version into an OSGi compliant version

Parameters: version Maven version

Returns: the OSGi version

dumpClasspath

protected static void dumpClasspath(String title, List classpath, Log log)

dumpInstructions

protected static void dumpInstructions(String title, Properties properties, Log log)

dumpManifest

protected static void dumpManifest(String title, Manifest manifest, Log log)

execute

public void execute()

See Also: org.apache.maven.plugin.AbstractMojo#execute()

execute

protected void execute(MavenProject currentProject, Map originalInstructions, Properties properties)

execute

protected void execute(MavenProject currentProject, Map originalInstructions, Properties properties, Jar[] classpath)

getBuildDirectory

protected String getBuildDirectory()

getBundleName

protected String getBundleName(MavenProject currentProject)
TODO this should return getMaven2Osgi().getBundleFileName( project.getArtifact() )

getClasspath

protected Jar[] getClasspath(MavenProject currentProject)

getDefaultProperties

protected Properties getDefaultProperties(MavenProject currentProject)

getEmbeddableArtifacts

protected Collection getEmbeddableArtifacts(MavenProject project, Analyzer analyzer)

getFile

protected File getFile(Artifact artifact)
Get the file for an Artifact

Parameters: artifact

getMaven2OsgiConverter

protected Maven2OsgiConverter getMaven2OsgiConverter()

getOutputDirectory

protected File getOutputDirectory()

getProject

protected MavenProject getProject()

includeMavenResources

protected static void includeMavenResources(MavenProject currentProject, Analyzer analyzer, Log log)

mergeMavenManifest

protected void mergeMavenManifest(MavenProject currentProject, Jar jar, String[] removeHeaders, Log log)

removeTagFromInstruction

protected static String removeTagFromInstruction(String instruction, String tag)

setBasedir

protected void setBasedir(File _basedir)

setBuildDirectory

protected void setBuildDirectory(String _buildirectory)

setMaven2OsgiConverter

protected void setMaven2OsgiConverter(Maven2OsgiConverter maven2OsgiConverter)

setOutputDirectory

protected void setOutputDirectory(File _outputDirectory)

transformDirectives

protected static Map transformDirectives(Map originalInstructions)
Copyright © 2006-2009 Apache Software Foundation. All Rights Reserved.