Apache Sling HTL Maven Plugin

The Apache Sling HTL Maven Plugin, M2Eclipse compatible, provides support for validating HTML Template Language scripts from projects during build time.

Goals overview

  • htl:validate - validate the scripts from the build directory (${project.build.sourceDirectory})

Usage

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.sling</groupId>
            <artifactId>htl-maven-plugin</artifactId>
            <version>1.0.0</version>
            <executions>
                <execution>
                    <id>validate-scripts</id>
                    <goals>
                        <goal>validate</goal>
                    </goals>
                    <phase>compile</phase>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

htl:validate

Full name: org.apache.sling:htl-maven-plugin:1.0.0:validate

Description: Validates HTL scripts syntax during the build process.

Optional Parameters

NameTypeSinceDescription
sourceDirectoryString1.0.0Defines the root folder where this goal expects to find Sightly scripts to validate.
includesString[]1.0.0List of files to include, specified as fileset patterns which are relative to sourceDirectory.
excludesString[]1.0.0List of files to exclude, specified as fileset patterns which are relative to sourceDirectory.
failOnWarningsboolean1.0.0If set to true it will fail the build on compiler warnings.

Parameter Details

sourceDirectory:

Defines the root folder where this goal expects to find Sightly scripts to validate.

  • Type: java.lang.String
  • Required: No
  • User Property: sourceDirectory
  • Default: ${project.build.sourceDirectory}

includes:

List of files to include, specified as fileset patterns which are relative to sourceDirectory.

  • Type: java.lang.String[]
  • Required: No
  • User Property: includes
  • Default: **/*.html

excludes:

List of files to exclude, specified as fileset patterns which are relative to sourceDirectory.

  • Type: java.lang.String[]
  • Required: No
  • User Property: excludes

failOnWarnings:

If set to true it will fail the build on compiler warnings.

  • Type: boolean
  • Required: No
  • User Property: failOnWarnings
  • Default: false