@Mojo(name="bundle",
requiresDependencyResolution=TEST,
threadSafe=true)
@Execute(phase=PACKAGE)
public class BundlePlugin
extends org.apache.maven.plugin.AbstractMojo
Modifier and Type | Field and Description |
---|---|
protected String |
classifier
Classifier type of the bundle to be installed.
|
protected File |
dumpClasspath
File where the BND class-path will be dumped
|
protected File |
dumpInstructions
File where the BND instructions will be dumped
|
protected String |
excludeDependencies
Comma separated list of artifactIds to exclude from the dependency classpath passed to BND (use "true" to exclude everything)
|
protected File |
manifestLocation
Directory where the manifest will be written
|
protected boolean |
niceManifest
Output a nicely formatted manifest that still respects the 72 character line limit.
|
protected String |
packaging
Packaging type of the bundle to be installed.
|
protected List<String> |
supportedProjectTypes
Project types which this plugin supports.
|
protected boolean |
unpackBundle
When true, unpack the bundle contents to the outputDirectory
|
Constructor and Description |
---|
BundlePlugin() |
Modifier and Type | Method and Description |
---|---|
protected void |
addMavenInstructions(org.apache.maven.project.MavenProject currentProject,
aQute.bnd.osgi.Builder builder) |
protected static void |
addMavenSourcePath(org.apache.maven.project.MavenProject currentProject,
aQute.bnd.osgi.Analyzer analyzer,
org.apache.maven.plugin.logging.Log log) |
protected aQute.bnd.osgi.Builder |
buildOSGiBundle(org.apache.maven.project.MavenProject currentProject,
Map<String,String> originalInstructions,
Properties properties,
aQute.bnd.osgi.Jar[] classpath) |
protected String |
convertVersionToOsgi(String version)
Convert a Maven version into an OSGi compliant version
|
protected static StringBuilder |
dumpClasspath(List<aQute.bnd.osgi.Jar> classpath,
StringBuilder buf) |
protected static StringBuilder |
dumpInstructions(Properties properties,
StringBuilder buf) |
protected static StringBuilder |
dumpManifest(Manifest manifest,
StringBuilder buf) |
void |
execute() |
protected void |
execute(org.apache.maven.project.MavenProject currentProject,
Map<String,String> originalInstructions,
Properties properties) |
protected void |
execute(org.apache.maven.project.MavenProject currentProject,
Map<String,String> originalInstructions,
Properties properties,
aQute.bnd.osgi.Jar[] classpath) |
protected static File |
getBase(org.apache.maven.project.MavenProject currentProject) |
protected String |
getBuildDirectory() |
protected String |
getBundleName(org.apache.maven.project.MavenProject currentProject)
TODO this should return getMaven2Osgi().getBundleFileName( project.getArtifact() )
|
protected aQute.bnd.osgi.Jar[] |
getClasspath(org.apache.maven.project.MavenProject currentProject) |
protected Properties |
getDefaultProperties(org.apache.maven.project.MavenProject currentProject) |
protected Collection<org.apache.maven.artifact.Artifact> |
getEmbeddableArtifacts(org.apache.maven.project.MavenProject currentProject,
aQute.bnd.osgi.Analyzer analyzer) |
protected File |
getFile(org.apache.maven.artifact.Artifact artifact)
Get the file for an Artifact
|
protected Maven2OsgiConverter |
getMaven2OsgiConverter() |
protected static String |
getMavenResourcePaths(org.apache.maven.project.MavenProject currentProject,
boolean test) |
protected Set<String> |
getOptionalPackages(org.apache.maven.project.MavenProject currentProject) |
protected aQute.bnd.osgi.Builder |
getOSGiBuilder(org.apache.maven.project.MavenProject currentProject,
Map<String,String> originalInstructions,
Properties properties,
aQute.bnd.osgi.Jar[] classpath) |
protected File |
getOutputDirectory() |
protected org.apache.maven.project.MavenProject |
getProject() |
protected static void |
includeMavenResources(org.apache.maven.project.MavenProject currentProject,
aQute.bnd.osgi.Analyzer analyzer,
org.apache.maven.plugin.logging.Log log) |
protected boolean |
isTransitivelyOptional(HashSet<String> optionalArtifactIds,
org.apache.maven.artifact.Artifact artifact)
Check to see if any dependency along the dependency trail of
the artifact is optional.
|
protected void |
mergeMavenManifest(org.apache.maven.project.MavenProject currentProject,
aQute.bnd.osgi.Builder builder) |
protected static String |
removeTagFromInstruction(String instruction,
String tag) |
protected boolean |
reportErrors(String prefix,
aQute.bnd.osgi.Analyzer analyzer) |
protected static String |
sanitize(Object value) |
protected static Properties |
sanitize(Properties properties) |
protected void |
setBuildDirectory(String _buildirectory) |
protected void |
setMaven2OsgiConverter(Maven2OsgiConverter maven2OsgiConverter) |
protected void |
setOutputDirectory(File _outputDirectory) |
protected static Map<String,String> |
transformDirectives(Map<String,String> originalInstructions) |
@Parameter(property="manifestLocation", defaultValue="${project.build.outputDirectory}/META-INF") protected File manifestLocation
@Parameter(property="niceManifest", defaultValue="false") protected boolean niceManifest
@Parameter(property="dumpInstructions") protected File dumpInstructions
@Parameter(property="dumpClasspath") protected File dumpClasspath
@Parameter(property="unpackBundle") protected boolean unpackBundle
@Parameter(property="excludeDependencies") protected String excludeDependencies
@Parameter protected String classifier
@Parameter protected String packaging
protected Maven2OsgiConverter getMaven2OsgiConverter()
protected void setMaven2OsgiConverter(Maven2OsgiConverter maven2OsgiConverter)
protected org.apache.maven.project.MavenProject getProject()
public void execute() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
Mojo.execute()
protected void execute(org.apache.maven.project.MavenProject currentProject, Map<String,String> originalInstructions, Properties properties) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected static Map<String,String> transformDirectives(Map<String,String> originalInstructions)
protected boolean reportErrors(String prefix, aQute.bnd.osgi.Analyzer analyzer)
protected void execute(org.apache.maven.project.MavenProject currentProject, Map<String,String> originalInstructions, Properties properties, aQute.bnd.osgi.Jar[] classpath) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected aQute.bnd.osgi.Builder getOSGiBuilder(org.apache.maven.project.MavenProject currentProject, Map<String,String> originalInstructions, Properties properties, aQute.bnd.osgi.Jar[] classpath) throws Exception
Exception
protected static Properties sanitize(Properties properties)
protected void addMavenInstructions(org.apache.maven.project.MavenProject currentProject, aQute.bnd.osgi.Builder builder) throws Exception
Exception
protected aQute.bnd.osgi.Builder buildOSGiBundle(org.apache.maven.project.MavenProject currentProject, Map<String,String> originalInstructions, Properties properties, aQute.bnd.osgi.Jar[] classpath) throws Exception
Exception
protected static StringBuilder dumpInstructions(Properties properties, StringBuilder buf)
protected static StringBuilder dumpClasspath(List<aQute.bnd.osgi.Jar> classpath, StringBuilder buf)
protected static StringBuilder dumpManifest(Manifest manifest, StringBuilder buf)
protected static void includeMavenResources(org.apache.maven.project.MavenProject currentProject, aQute.bnd.osgi.Analyzer analyzer, org.apache.maven.plugin.logging.Log log)
protected void mergeMavenManifest(org.apache.maven.project.MavenProject currentProject, aQute.bnd.osgi.Builder builder) throws Exception
Exception
protected Set<String> getOptionalPackages(org.apache.maven.project.MavenProject currentProject) throws IOException, org.apache.maven.plugin.MojoExecutionException
IOException
org.apache.maven.plugin.MojoExecutionException
protected boolean isTransitivelyOptional(HashSet<String> optionalArtifactIds, org.apache.maven.artifact.Artifact artifact)
artifact
- protected static String removeTagFromInstruction(String instruction, String tag)
protected aQute.bnd.osgi.Jar[] getClasspath(org.apache.maven.project.MavenProject currentProject) throws IOException, org.apache.maven.plugin.MojoExecutionException
IOException
org.apache.maven.plugin.MojoExecutionException
protected File getFile(org.apache.maven.artifact.Artifact artifact)
artifact
- protected String convertVersionToOsgi(String version)
version
- Maven versionprotected String getBundleName(org.apache.maven.project.MavenProject currentProject)
protected String getBuildDirectory()
protected void setBuildDirectory(String _buildirectory)
protected Properties getDefaultProperties(org.apache.maven.project.MavenProject currentProject)
protected static File getBase(org.apache.maven.project.MavenProject currentProject)
protected File getOutputDirectory()
protected void setOutputDirectory(File _outputDirectory)
protected static String getMavenResourcePaths(org.apache.maven.project.MavenProject currentProject, boolean test)
protected Collection<org.apache.maven.artifact.Artifact> getEmbeddableArtifacts(org.apache.maven.project.MavenProject currentProject, aQute.bnd.osgi.Analyzer analyzer) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected static void addMavenSourcePath(org.apache.maven.project.MavenProject currentProject, aQute.bnd.osgi.Analyzer analyzer, org.apache.maven.plugin.logging.Log log)
Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.