org.apache.sling.maven.slingstart

## Class AbstractSlingStartMojo

- java.lang.Object
- - org.apache.maven.plugin.AbstractMojo
  - - org.apache.sling.maven.slingstart.AbstractSlingStartMojo

All Implemented Interfaces:
  org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

Direct Known Subclasses:
  AttachModelArchive, AttachSlingStartModel, GenerateResourcesMojo, PackageMojo, PreparePackageMojo, RepositoryMojo

    public abstract class AbstractSlingStartMojo
    extends org.apache.maven.plugin.AbstractMojo

Base class for all slingstart mojos.

### Field Summary

Fields
`protected boolean` `allowUnresolvedPomDependencies` If set to true, an exception is throws when "usePomDependencies" is set to true and some dependency version could not be resolved in the Maven POM.
`static String` `DEFAULT_MODEL_PATTERN`
`protected org.apache.maven.execution.MavenSession` `mavenSession`
`protected org.apache.maven.project.MavenProject` `project`
`protected org.apache.maven.project.MavenProjectHelper` `projectHelper`
`protected boolean` `usePomDependencies` If set to `true`, Artifact dependencies from provisioning file without explicit version are tried to be resolved against the versions given in the Maven POM.
`protected boolean` `usePomVariables` If set to `true`, properties from the Maven POM can be used as variables in the provisioning files.

### Fields inherited from interface org.apache.maven.plugin.Mojo

`ROLE`

### Constructor Summary

Constructors
Constructor and Description
`AbstractSlingStartMojo()`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected org.apache.sling.provisioning.model.ModelUtility.ResolverOptions` `getResolverOptions()`
`protected File` `getStandaloneOutputDirectory()`
`protected File` `getTmpDir()`

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

### Methods inherited from interface org.apache.maven.plugin.Mojo

`execute`

### Field Detail

#### DEFAULT_MODEL_PATTERN

    public static final String DEFAULT_MODEL_PATTERN

See Also:
  Constant Field Values

#### project

    @Parameter(property="project",
               readonly=true,
               required=true)
    protected org.apache.maven.project.MavenProject project

#### projectHelper

    @Component
    protected org.apache.maven.project.MavenProjectHelper projectHelper

#### mavenSession

    @Parameter(property="session",
               readonly=true,
               required=true)
    protected org.apache.maven.execution.MavenSession mavenSession

#### usePomVariables

    @Parameter(defaultValue="false")
    protected boolean usePomVariables

If set to `true`, properties from the Maven POM can be used as variables in the provisioning files. The resolved variables are added to the generated provisioning file, so other tools using this model do not have to resolve them themselves.

#### usePomDependencies

    @Parameter(defaultValue="false")
    protected boolean usePomDependencies

If set to `true`, Artifact dependencies from provisioning file without explicit version are tried to be resolved against the versions given in the Maven POM. The following sections in the effective pom are considered during resolving the version:

1. The project's artifact itself
2. The project's dependencies
3. The project's dependencyManagement

#### allowUnresolvedPomDependencies

    @Parameter(defaultValue="false")
    protected boolean allowUnresolvedPomDependencies

If set to true, an exception is throws when "usePomDependencies" is set to true and some dependency version could not be resolved in the Maven POM.

### Constructor Detail

#### AbstractSlingStartMojo

    public AbstractSlingStartMojo()

### Method Detail

#### getTmpDir

    protected File getTmpDir()

#### getResolverOptions

    protected org.apache.sling.provisioning.model.ModelUtility.ResolverOptions getResolverOptions()

Returns:
  Resolving options to be used when building an effective provisioning model.

#### getStandaloneOutputDirectory

    protected File getStandaloneOutputDirectory()