org.apache.sling.maven.slingstart

## Class PreparePackageMojo

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

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

    @Mojo(name="prepare-package",
          defaultPhase=PROCESS_SOURCES,
          requiresDependencyResolution=TEST,
          threadSafe=true)
    public class PreparePackageMojo
    extends AbstractSlingStartMojo

Prepare the packaging of the Sling quickstart artifact (either JAR or WAR).

### Field Summary

Fields
`protected boolean` `createWebapp` If set to `true` creates a WAR artifact in addition to the standalone JAR from the model.
`protected org.apache.maven.plugin.MojoExecution` `mojoExecution`

### Fields inherited from class org.apache.sling.maven.slingstart.AbstractSlingStartMojo

`allowUnresolvedPomDependencies, DEFAULT_MODEL_PATTERN, mavenSession, project, projectHelper, usePomDependencies, usePomVariables`

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

`ROLE`

### Constructor Summary

Constructors
Constructor and Description
`PreparePackageMojo()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `execute()`

### Methods inherited from class org.apache.sling.maven.slingstart.AbstractSlingStartMojo

`getResolverOptions, getStandaloneOutputDirectory, 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`

### Field Detail

#### createWebapp

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

If set to `true` creates a WAR artifact in addition to the standalone JAR from the model.

#### mojoExecution

    @Parameter(defaultValue="${mojoExecution}",
               readonly=true,
               required=true)
    protected org.apache.maven.plugin.MojoExecution mojoExecution

### Constructor Detail

#### PreparePackageMojo

    public PreparePackageMojo()

### Method Detail

#### execute

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

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