org.apache.sling.maven.projectsupport
Class AbstractLaunchpadStartingMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.sling.maven.projectsupport.AbstractBundleListMojo
          extended by org.apache.sling.maven.projectsupport.AbstractLaunchpadStartingMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, Notifiable
Direct Known Subclasses:
RunMojo, StartMojo

public abstract class AbstractLaunchpadStartingMojo
extends AbstractBundleListMojo
implements Notifiable


Field Summary
 
Fields inherited from class org.apache.sling.maven.projectsupport.AbstractBundleListMojo
BUNDLE_PATH_PREFIX, bundleListFile, CONFIG_PATH_PREFIX, configDirectory, defaultBundleList, JAR, project, projectHelper, WAR
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractLaunchpadStartingMojo()
           
 
Method Summary
protected  void executeWithArtifacts()
          Execute the logic of the plugin after the default artifacts have been initialized.
protected  void initArtifactDefinitions(Properties dependencies)
          Hook methods for subclasses to initialize any additional artifact definitions.
protected  void initBundleList(BundleList bundleList)
          Add the JAR Web Support bundle to the bundle list.
protected abstract  Sling startSling(LaunchpadContentProvider resourceProvider, Map<String,String> props, org.apache.felix.framework.Logger logger)
           
 void stopped()
          Called when the OSGi framework has been stopped because the Bundle.stop method has been called on the system bundle.
protected  void stopSling()
           
 void updated(File updateFile)
          Called when the OSGi framework has been stopped because any of the Bundle.update methods has been called on the system bundle.
 
Methods inherited from class org.apache.sling.maven.projectsupport.AbstractBundleListMojo
execute, getArtifact, getArtifact, getBundleList, isCurrentArtifact, shouldCopy
 
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

AbstractLaunchpadStartingMojo

public AbstractLaunchpadStartingMojo()
Method Detail

stopped

public void stopped()
Description copied from interface: Notifiable
Called when the OSGi framework has been stopped because the Bundle.stop method has been called on the system bundle.

Specified by:
stopped in interface Notifiable

updated

public void updated(File updateFile)
Description copied from interface: Notifiable
Called when the OSGi framework has been stopped because any of the Bundle.update methods has been called on the system bundle.

If a temporary file is provided in the tmpFile parameter, that file must be used to replace the current Launcher JAR file and must be used for restarting the framework. Otherwise the framework is restarted from the existing Launcher JAR file.

Specified by:
updated in interface Notifiable
Parameters:
updateFile - A temporary file containing the contents of the InputStream given to the Bundle.update(InputStream) method. If no input stream has been provided, this parameter is null.

executeWithArtifacts

protected void executeWithArtifacts()
                             throws org.apache.maven.plugin.MojoExecutionException
Execute the logic of the plugin after the default artifacts have been initialized.

Specified by:
executeWithArtifacts in class AbstractBundleListMojo
Throws:
org.apache.maven.plugin.MojoExecutionException

startSling

protected abstract Sling startSling(LaunchpadContentProvider resourceProvider,
                                    Map<String,String> props,
                                    org.apache.felix.framework.Logger logger)
                             throws org.osgi.framework.BundleException
Throws:
org.osgi.framework.BundleException

stopSling

protected void stopSling()

initArtifactDefinitions

protected void initArtifactDefinitions(Properties dependencies)
Description copied from class: AbstractBundleListMojo
Hook methods for subclasses to initialize any additional artifact definitions.

Overrides:
initArtifactDefinitions in class AbstractBundleListMojo
Parameters:
dependencies - the dependency properties loaded from the JAR file

initBundleList

protected void initBundleList(BundleList bundleList)
Add the JAR Web Support bundle to the bundle list.

Overrides:
initBundleList in class AbstractBundleListMojo


Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.