org.apache.felix.bundleplugin
Class BundleAllPlugin

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.felix.bundleplugin.BundlePlugin
          extended by org.apache.felix.bundleplugin.ManifestPlugin
              extended by org.apache.felix.bundleplugin.BundleAllPlugin
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
WrapPlugin

public class BundleAllPlugin
extends ManifestPlugin

Create OSGi bundles from all dependencies in the Maven project


Field Summary
 
Fields inherited from class org.apache.felix.bundleplugin.BundlePlugin
classifier, excludeDependencies, manifestLocation, unpackBundle
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
BundleAllPlugin()
           
 
Method Summary
protected  BundleInfo bundle(org.apache.maven.project.MavenProject project)
          Bundle one project only without building its childre
protected  BundleInfo bundleAll(org.apache.maven.project.MavenProject project, int maxDepth)
          Bundle a project and its transitive dependencies up to some depth level
 void execute()
           
protected  String getBundleName(org.apache.maven.project.MavenProject project)
          TODO this should return getMaven2Osgi().getBundleFileName( project.getArtifact() )
protected  File getFile(org.apache.maven.artifact.Artifact artifact)
          Use previously built bundles when available.
protected  File getOutputFile(org.apache.maven.artifact.Artifact artifact)
           
protected  void logDuplicatedPackages(BundleInfo bundleInfo)
          Log what packages are exported in more than one bundle
protected  boolean snapshotMatch(org.apache.maven.artifact.Artifact artifact, String bundleName)
          Check that the bundleName provided correspond to the artifact provided.
 
Methods inherited from class org.apache.felix.bundleplugin.ManifestPlugin
execute, getAnalyzer, getAnalyzer, getManifest, getManifest, writeManifest
 
Methods inherited from class org.apache.felix.bundleplugin.BundlePlugin
buildOSGiBundle, convertVersionToOsgi, dumpClasspath, dumpInstructions, dumpManifest, execute, getBuildDirectory, getClasspath, getDefaultProperties, getEmbeddableArtifacts, getMaven2OsgiConverter, getOutputDirectory, getProject, includeMavenResources, mergeMavenManifest, removeTagFromInstruction, setBasedir, setBuildDirectory, setMaven2OsgiConverter, setOutputDirectory, transformDirectives
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BundleAllPlugin

public BundleAllPlugin()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException
Specified by:
execute in interface org.apache.maven.plugin.Mojo
Overrides:
execute in class BundlePlugin
Throws:
org.apache.maven.plugin.MojoExecutionException
See Also:
Mojo.execute()

bundleAll

protected BundleInfo bundleAll(org.apache.maven.project.MavenProject project,
                               int maxDepth)
                        throws org.apache.maven.plugin.MojoExecutionException
Bundle a project and its transitive dependencies up to some depth level

Parameters:
project -
maxDepth - how deep to process the dependency tree
Throws:
org.apache.maven.plugin.MojoExecutionException

bundle

protected BundleInfo bundle(org.apache.maven.project.MavenProject project)
                     throws org.apache.maven.plugin.MojoExecutionException
Bundle one project only without building its childre

Parameters:
project -
Throws:
org.apache.maven.plugin.MojoExecutionException

getBundleName

protected String getBundleName(org.apache.maven.project.MavenProject project)
Description copied from class: BundlePlugin
TODO this should return getMaven2Osgi().getBundleFileName( project.getArtifact() )

Overrides:
getBundleName in class BundlePlugin

getFile

protected File getFile(org.apache.maven.artifact.Artifact artifact)
Use previously built bundles when available.

Overrides:
getFile in class BundlePlugin
Parameters:
artifact -

snapshotMatch

protected boolean snapshotMatch(org.apache.maven.artifact.Artifact artifact,
                                String bundleName)
Check that the bundleName provided correspond to the artifact provided. Used to determine when the bundle name is a timestamped snapshot and the artifact is a snapshot not timestamped.

Parameters:
artifact - artifact with snapshot version
bundleName - bundle file name
Returns:
if both represent the same artifact and version, forgetting about the snapshot timestamp

getOutputFile

protected File getOutputFile(org.apache.maven.artifact.Artifact artifact)

logDuplicatedPackages

protected void logDuplicatedPackages(BundleInfo bundleInfo)
Log what packages are exported in more than one bundle



Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.