org.apache.sling.maven.projectsupport
Class AbstractUsingBundleListMojo

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.AbstractUsingBundleListMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
Direct Known Subclasses:
AbstractLaunchpadFrameworkMojo, AbstractLaunchpadStartingMojo, AttachBundleListMojo, CheckBundleListForSnapshotsMojo, CreateKarafFeatureDescriptorMojo, OutputBundleListMojo

public abstract class AbstractUsingBundleListMojo
extends AbstractBundleListMojo


Field Summary
protected static java.lang.String BUNDLE_PATH_PREFIX
           
protected static java.lang.String CONFIG_PATH_PREFIX
           
protected  ArtifactDefinition defaultBundleList
          The definition of the defaultBundleList artifact.
protected static java.lang.String JAR
          JAR Packaging type.
protected  org.apache.maven.shared.filtering.MavenFileFilter mavenFileFilter
           
protected static java.lang.String WAR
          WAR Packaging type.
 
Fields inherited from class org.apache.sling.maven.projectsupport.AbstractBundleListMojo
bundleListFile, commonSlingBootstrap, commonSlingProps, ignoreBundleListConfig, mavenSession, PARTIAL, project, projectHelper, standaloneSlingBootstrap, standaloneSlingProps, webappSlingBootstrap, webappSlingProps
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
AbstractUsingBundleListMojo()
           
 
Method Summary
 void execute()
           
protected abstract  void executeWithArtifacts()
          Execute the logic of the plugin after the default artifacts have been initialized.
protected  java.io.File getConfigDirectory()
           
protected  BundleList getInitializedBundleList()
           
protected  java.lang.String getSlingBootstrap(boolean standalone)
          Try to read the bootstrap command file and return its content The filter is copied to a tmp location to apply filtering.
protected  java.util.Properties getSlingProperties(boolean standalone)
           
protected  void initArtifactDefinitions(java.util.Properties dependencies)
          Hook methods for subclasses to initialize any additional artifact definitions.
protected  void initBundleList(BundleList bundleList)
          Hook methods for subclasses to initialize the bundle list.
protected static boolean shouldCopy(java.io.File source, java.io.File dest)
           
 
Methods inherited from class org.apache.sling.maven.projectsupport.AbstractBundleListMojo
getArtifact, getArtifact
 
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
 

Field Detail

JAR

protected static final java.lang.String JAR
JAR Packaging type.

See Also:
Constant Field Values

WAR

protected static final java.lang.String WAR
WAR Packaging type.

See Also:
Constant Field Values

CONFIG_PATH_PREFIX

protected static final java.lang.String CONFIG_PATH_PREFIX
See Also:
Constant Field Values

BUNDLE_PATH_PREFIX

protected static final java.lang.String BUNDLE_PATH_PREFIX
See Also:
Constant Field Values

defaultBundleList

protected ArtifactDefinition defaultBundleList
The definition of the defaultBundleList artifact.


mavenFileFilter

protected org.apache.maven.shared.filtering.MavenFileFilter mavenFileFilter
Constructor Detail

AbstractUsingBundleListMojo

public AbstractUsingBundleListMojo()
Method Detail

shouldCopy

protected static boolean shouldCopy(java.io.File source,
                                    java.io.File dest)

execute

public final void execute()
                   throws org.apache.maven.plugin.MojoFailureException,
                          org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException

getConfigDirectory

protected java.io.File getConfigDirectory()
Overrides:
getConfigDirectory in class AbstractBundleListMojo

executeWithArtifacts

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

Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

getInitializedBundleList

protected BundleList getInitializedBundleList()

initArtifactDefinitions

protected void initArtifactDefinitions(java.util.Properties dependencies)
Hook methods for subclasses to initialize any additional artifact definitions.

Parameters:
dependencies - the dependency properties loaded from the JAR file

initBundleList

protected void initBundleList(BundleList bundleList)
Hook methods for subclasses to initialize the bundle list.


getSlingProperties

protected java.util.Properties getSlingProperties(boolean standalone)
                                           throws org.apache.maven.plugin.MojoExecutionException
Throws:
org.apache.maven.plugin.MojoExecutionException

getSlingBootstrap

protected java.lang.String getSlingBootstrap(boolean standalone)
                                      throws org.apache.maven.plugin.MojoExecutionException
Try to read the bootstrap command file and return its content The filter is copied to a tmp location to apply filtering.

Returns:
The contents are null
Throws:
org.apache.maven.plugin.MojoExecutionException


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