org.ops4j.pax.construct.archetype
Class OSGiBundleArchetypeMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.ops4j.pax.construct.archetype.AbstractPaxArchetypeMojo
          extended by org.ops4j.pax.construct.archetype.OSGiBundleArchetypeMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class OSGiBundleArchetypeMojo
extends AbstractPaxArchetypeMojo

Create a new bundle project inside an existing Pax-Construct OSGi project

   mvn pax:create-bundle -Dpackage=... [-DbundleName=...] [-Dversion=...]
 
or create a standalone version which doesn't require an existing project
   cd some-empty-folder
   mvn org.ops4j:maven-pax-plugin:create-bundle ...etc...
 


Field Summary
 
Fields inherited from class org.ops4j.pax.construct.archetype.AbstractPaxArchetypeMojo
PAX_CONSTRUCT_GROUP_ID
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
OSGiBundleArchetypeMojo()
           
 
Method Summary
 java.lang.String getBundleSymbolicName()
          Provide Velocity template with customized Bundle-SymbolicName
protected  java.lang.String getParentId()
          
protected static void makeStandalone(PomUtils.Pom pom, java.lang.String bundleType, java.lang.String pluginVersion)
          Add additional POM elements to make it work standalone
protected  void postProcess(PomUtils.Pom pom, BndUtils.Bnd bnd)
          Sub-class specific post-processing, which runs *after* custom archetypes are added
protected  void updateExtensionFields()
          Set the remaining fields in the archetype mojo
 
Methods inherited from class org.ops4j.pax.construct.archetype.AbstractPaxArchetypeMojo
addTempFiles, cacheOriginalFiles, createMoreArtifacts, execute, getArchetypeProperty, getCompoundId, getFactory, getFinalFilenames, getInternalGroupId, getLocalRepo, getPluginVersion, getRemoteRepos, getResolver, getSource, hasCustomContent, saveBndInstructions, saveProjectModel, scheduleArchetype, setArchetypeProperty, setMainArchetype
 
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

OSGiBundleArchetypeMojo

public OSGiBundleArchetypeMojo()
Method Detail

getParentId

protected java.lang.String getParentId()

Specified by:
getParentId in class AbstractPaxArchetypeMojo
Returns:
The logical parent of the new project (use artifactId or groupId:artifactId)

updateExtensionFields

protected void updateExtensionFields()
Set the remaining fields in the archetype mojo

Specified by:
updateExtensionFields in class AbstractPaxArchetypeMojo

getBundleSymbolicName

public java.lang.String getBundleSymbolicName()
Provide Velocity template with customized Bundle-SymbolicName

Returns:
bundle symbolic name

postProcess

protected void postProcess(PomUtils.Pom pom,
                           BndUtils.Bnd bnd)
                    throws org.apache.maven.plugin.MojoExecutionException
Sub-class specific post-processing, which runs *after* custom archetypes are added

Overrides:
postProcess in class AbstractPaxArchetypeMojo
Parameters:
pom - working copy of Maven POM
bnd - working copy of Bnd instructions
Throws:
org.apache.maven.plugin.MojoExecutionException

makeStandalone

protected static void makeStandalone(PomUtils.Pom pom,
                                     java.lang.String bundleType,
                                     java.lang.String pluginVersion)
                              throws org.apache.maven.plugin.MojoExecutionException
Add additional POM elements to make it work standalone

Parameters:
pom - Maven project model
bundleType - name of folder with settings specific to this bundle type
pluginVersion - selected version of the Pax-Construct plugin
Throws:
org.apache.maven.plugin.MojoExecutionException


Copyright © 2007-2008 OPS4J. All Rights Reserved.