You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ra...@apache.org on 2017/08/01 16:42:18 UTC

svn commit: r1803667 - in /sling/trunk/tooling/maven/htl-maven-plugin: pom.xml src/main/java/org/apache/sling/maven/htl/ValidateMojo.java src/site/markdown/index.md src/site/markdown/usage.md.vm src/site/site.xml

Author: radu
Date: Tue Aug  1 16:42:17 2017
New Revision: 1803667

URL: http://svn.apache.org/viewvc?rev=1803667&view=rev
Log:
SLING-6651 - Improve documentation for htl-maven-plugin

Added:
    sling/trunk/tooling/maven/htl-maven-plugin/src/site/markdown/usage.md.vm
Modified:
    sling/trunk/tooling/maven/htl-maven-plugin/pom.xml
    sling/trunk/tooling/maven/htl-maven-plugin/src/main/java/org/apache/sling/maven/htl/ValidateMojo.java
    sling/trunk/tooling/maven/htl-maven-plugin/src/site/markdown/index.md
    sling/trunk/tooling/maven/htl-maven-plugin/src/site/site.xml

Modified: sling/trunk/tooling/maven/htl-maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/maven/htl-maven-plugin/pom.xml?rev=1803667&r1=1803666&r2=1803667&view=diff
==============================================================================
--- sling/trunk/tooling/maven/htl-maven-plugin/pom.xml (original)
+++ sling/trunk/tooling/maven/htl-maven-plugin/pom.xml Tue Aug  1 16:42:17 2017
@@ -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>

Modified: sling/trunk/tooling/maven/htl-maven-plugin/src/main/java/org/apache/sling/maven/htl/ValidateMojo.java
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/maven/htl-maven-plugin/src/main/java/org/apache/sling/maven/htl/ValidateMojo.java?rev=1803667&r1=1803666&r2=1803667&view=diff
==============================================================================
--- sling/trunk/tooling/maven/htl-maven-plugin/src/main/java/org/apache/sling/maven/htl/ValidateMojo.java (original)
+++ sling/trunk/tooling/maven/htl-maven-plugin/src/main/java/org/apache/sling/maven/htl/ValidateMojo.java Tue Aug  1 16:42:17 2017
@@ -44,7 +44,7 @@ import org.codehaus.plexus.util.StringUt
 import org.sonatype.plexus.build.incremental.BuildContext;
 
 /**
- * This goal validates Sightly scripts syntax.
+ * Validates HTL scripts.
  */
 @Mojo(
         name = "validate",

Modified: sling/trunk/tooling/maven/htl-maven-plugin/src/site/markdown/index.md
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/maven/htl-maven-plugin/src/site/markdown/index.md?rev=1803667&r1=1803666&r2=1803667&view=diff
==============================================================================
--- sling/trunk/tooling/maven/htl-maven-plugin/src/site/markdown/index.md (original)
+++ sling/trunk/tooling/maven/htl-maven-plugin/src/site/markdown/index.md Tue Aug  1 16:42:17 2017
@@ -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.

Added: sling/trunk/tooling/maven/htl-maven-plugin/src/site/markdown/usage.md.vm
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/maven/htl-maven-plugin/src/site/markdown/usage.md.vm?rev=1803667&view=auto
==============================================================================
--- sling/trunk/tooling/maven/htl-maven-plugin/src/site/markdown/usage.md.vm (added)
+++ sling/trunk/tooling/maven/htl-maven-plugin/src/site/markdown/usage.md.vm Tue Aug  1 16:42:17 2017
@@ -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>
+```
+

Modified: sling/trunk/tooling/maven/htl-maven-plugin/src/site/site.xml
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/maven/htl-maven-plugin/src/site/site.xml?rev=1803667&r1=1803666&r2=1803667&view=diff
==============================================================================
--- sling/trunk/tooling/maven/htl-maven-plugin/src/site/site.xml (original)
+++ sling/trunk/tooling/maven/htl-maven-plugin/src/site/site.xml Tue Aug  1 16:42:17 2017
@@ -18,18 +18,23 @@ KIND, either express or implied.  See th
 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>