org.apache.sling.maven.projectsupport

## Class AbstractUsingBundleListMojo

- java.lang.Object
- - org.apache.maven.plugin.AbstractMojo
  - - org.apache.sling.maven.projectsupport.AbstractBundleListMojo
    - - 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, CreatePaxRunnerBundleProvisionFileMojo, OutputBundleListMojo

    public abstract class AbstractUsingBundleListMojo
    extends AbstractBundleListMojo

### Field Summary

Fields
`protected static String` `BUNDLE_PATH_PREFIX`
`protected static String` `CONFIG_PATH_PREFIX`
`protected ArtifactDefinition` `defaultBundleList` The definition of the defaultBundleList artifact.
`protected static String` `JAR` JAR Packaging type.
`protected org.apache.maven.shared.filtering.MavenFileFilter` `mavenFileFilter`
`protected static 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

Constructors
Constructor and Description
`AbstractUsingBundleListMojo()`

### Method Summary

All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
`void` `execute()`
`protected abstract void` `executeWithArtifacts()` Execute the logic of the plugin after the default artifacts have been initialized.
`protected File` `getConfigDirectory()`
`protected BundleList` `getInitializedBundleList()`
`protected 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 Properties` `getSlingProperties(boolean standalone)`
`protected void` `initArtifactDefinitions(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(File source, File dest)`

### Methods inherited from class org.apache.sling.maven.projectsupport.AbstractBundleListMojo

`copyDirectory, 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 String JAR

JAR Packaging type.

See Also:
  Constant Field Values

#### WAR

    protected static final String WAR

WAR Packaging type.

See Also:
  Constant Field Values

#### CONFIG_PATH_PREFIX

    protected static final String CONFIG_PATH_PREFIX

See Also:
  Constant Field Values

#### BUNDLE_PATH_PREFIX

    protected static final String BUNDLE_PATH_PREFIX

See Also:
  Constant Field Values

#### defaultBundleList

    @Parameter
    protected ArtifactDefinition defaultBundleList

The definition of the defaultBundleList artifact.

#### mavenFileFilter

    @Component
    protected org.apache.maven.shared.filtering.MavenFileFilter mavenFileFilter

### Constructor Detail

#### AbstractUsingBundleListMojo

    public AbstractUsingBundleListMojo()

### Method Detail

#### shouldCopy

    protected static boolean shouldCopy(File source,
                                        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 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(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 Properties getSlingProperties(boolean standalone)
                                     throws org.apache.maven.plugin.MojoExecutionException

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

#### getSlingBootstrap

    protected 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`