Class PackageMojo

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

    @Mojo(name="package",
          defaultPhase=PRE_INTEGRATION_TEST,
          requiresDependencyResolution=TEST,
          threadSafe=true)
    public class PackageMojo
    extends AbstractSlingStartMojo
    Create a Sling quickstart package (either JAR or WAR) based on the referenced model.
    • 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.
      • attachArtifact

        @Parameter(defaultValue="true")
        protected boolean attachArtifact
        If set to false does not attach the generated artifact to Maven. This setting takes only effect if the packaging of the current Maven project is not slingstart. Otherwise the generated artifact is always the main artifact (and is therefore always attached).
    • Constructor Detail

      • PackageMojo

        public PackageMojo()
    • 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
      • getNonPrimaryBuildFile

        public static File getNonPrimaryBuildFile​(org.apache.maven.project.MavenProject project,
                                                  String extension)