This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/sling-htl-maven-plugin.git
commit 6a183af812f55593e00b36c94e69a93c0c31ccc4 Author: Radu Cotescu <[email protected]> AuthorDate: Tue Aug 1 16:42:17 2017 +0000 SLING-6651 - Improve documentation for htl-maven-plugin git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1803667 13f79535-47bb-0310-9956-ffa450edef68 --- pom.xml | 1 + .../org/apache/sling/maven/htl/ValidateMojo.java | 2 +- src/site/markdown/index.md | 30 +++++++++-- src/site/markdown/usage.md.vm | 60 ++++++++++++++++++++++ src/site/site.xml | 31 ++++++----- 5 files changed, 106 insertions(+), 18 deletions(-) diff --git a/pom.xml b/pom.xml index d28a679..243c302 100644 --- a/pom.xml +++ b/pom.xml @@ -30,6 +30,7 @@ <name>Apache Sling HTL Maven Plugin</name> <description>The Apache Sling HTL Maven Plugin provides support for validating HTML Template Language scripts from projects.</description> + <url>https://sling.apache.org/components/htl-maven-plugin/</url> <scm> <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/tooling/maven/htl-maven-plugin</connection> diff --git a/src/main/java/org/apache/sling/maven/htl/ValidateMojo.java b/src/main/java/org/apache/sling/maven/htl/ValidateMojo.java index 6426e29..78765b3 100644 --- a/src/main/java/org/apache/sling/maven/htl/ValidateMojo.java +++ b/src/main/java/org/apache/sling/maven/htl/ValidateMojo.java @@ -44,7 +44,7 @@ import org.codehaus.plexus.util.StringUtils; import org.sonatype.plexus.build.incremental.BuildContext; /** - * This goal validates Sightly scripts syntax. + * Validates HTL scripts. */ @Mojo( name = "validate", diff --git a/src/site/markdown/index.md b/src/site/markdown/index.md index e6f2449..7d449e4 100644 --- a/src/site/markdown/index.md +++ b/src/site/markdown/index.md @@ -1,6 +1,28 @@ -HTL Maven Plugin -================ +## 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. +The Apache Sling HTL Maven Plugin, M2Eclipse compatible, provides support for validating HTML Template Language scripts from projects during +build time, reporting issues like: + +* syntax errors; +* expression warnings (e.g. missing required display contexts, sensible attributes with dynamic values, etc.); +* incorrect usage of block elements. + +### Goals +The HTL Maven Plugin has only one goal: + +* [htl:validate](validate-mojo.html) is bound to the compile phase and is used to validate HTL scripts. + + +### Usage +General instructions on how to use the HTL Maven Plugin can be found on the usage page. + +In case you still have questions regarding the plugin's usage feel free to contact the Apache Sling Development List. The posts to the +mailing list are archived and could already contain the answer to your question as part of an older thread. Hence, it is also worth +browsing/searching the mail archive. + +If you feel like the plugin is missing a feature or has a defect, you can fill a feature request or bug report in our issue tracker. When +creating a new issue, please provide a comprehensive description of your concern. Especially for fixing bugs it is crucial that the +developers can reproduce your problem. For this reason, entire debug logs, POMs or most preferably little demo projects attached to the +issue are very much appreciated. Of course, patches are welcome, too. Contributors can check out the project from our source repository and +will find supplementary information in the guide to helping with Maven. -See [Goals](plugin-info.html) for a list of supported goals. diff --git a/src/site/markdown/usage.md.vm b/src/site/markdown/usage.md.vm new file mode 100644 index 0000000..cb89c11 --- /dev/null +++ b/src/site/markdown/usage.md.vm @@ -0,0 +1,60 @@ +#set($h1 = '#') +#set($h2 = '##') +#set($h3 = '###') +#set($h4 = '####') + + +$h2 Usage + +$h3 Validating your HTL Scripts + +To validate your HTL Scripts you can run the following command: + +``` +mvn org.apache.sling:htl-maven-plugin:validate +``` + +This assumes you've configured the `\${project.build.sourceDirectory}` setting. + +The command can be simplified to + +``` +mvn htl:validate +``` + +if your Maven user settings file provides the following configuration + +``` +<pluginGroups> + <pluginGroup>org.apache.sling</pluginGroup> +</pluginGroups> +``` + +$h3 Configuring Your HTL Maven Plugin + +``` +<project> + ... + <build> + <pluginManagement> + <plugin> + <groupId>org.apache.sling</groupId> + <artifactId>htl-maven-plugin</artifactId> + <version>${project.version}/version> + <configuration> + <!-- put your configurations here --> + </configuration> + <executions> + <execution> + <goals> + <!-- configure which goals you want to execute --> + </goals> + </execution> + </executions> + </plugin> + </pluginManagement> + </build> + ... +</project> +``` + diff --git a/src/site/site.xml b/src/site/site.xml index 9abab11..2592253 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -18,18 +18,23 @@ KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> - <project> - <skin> - <groupId>org.apache.maven.skins</groupId> - <artifactId>maven-fluido-skin</artifactId> - <version>1.6</version> - </skin> - <body> - <menu name="Overview"> - <item name="Introduction" href="index.html"/> - <item name="Goals" href="plugin-info.html"/> - </menu> - <menu ref="reports"/> - </body> + <skin> + <groupId>org.apache.maven.skins</groupId> + <artifactId>maven-fluido-skin</artifactId> + <version>1.6</version> + </skin> + <body> + <menu name="Overview"> + <item name="Introduction" href="index.html"/> + <item name="Goals" href="plugin-info.html"/> + <item name="Usage" href="usage.html"/> + </menu> + <menu ref="reports"/> + </body> + <custom> + <fluidoSkin> + <sourceLineNumbersEnabled>true</sourceLineNumbersEnabled> + </fluidoSkin> + </custom> </project> -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
