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-jspc-maven-plugin.git

commit bcf27d0d2ab90b3614d7f7a3be26bd2d581fa5bb
Author: Stefan Seifert <[email protected]>
AuthorDate: Mon Jun 12 20:08:44 2017 +0000

    prepare maven site publishing on sling site
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1798519 
13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                            | 33 +++++++++++++++
 .../java/org/apache/sling/maven/jspc/JspcMojo.java | 10 ++++-
 src/site/markdown/index.md                         | 48 ++++++++++++++++++++++
 src/site/site.xml                                  | 35 ++++++++++++++++
 4 files changed, 124 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index 24b1421..ddd7568 100644
--- a/pom.xml
+++ b/pom.xml
@@ -43,6 +43,18 @@
         
<url>http://svn.apache.org/viewvc/sling/trunk/tooling/maven/maven-jspc-plugin</url>
     </scm>
 
+    <!-- Support for publishing the mvn site. -->
+    <distributionManagement>
+        <site>
+            <id>apache.website</id>
+            
<url>scm:svn:https://svn.apache.org/repos/asf/sling/site/trunk/content/components/${maven.site.path}</url>
+        </site>
+    </distributionManagement>
+
+    <properties>
+        
<maven.site.path>${project.artifactId}-archives/${project.artifactId}-LATEST</maven.site.path>
+    </properties>
+
     <build>
         <plugins>
             <plugin>
@@ -61,6 +73,23 @@
                     </execution>
                 </executions>
             </plugin>        
+            <plugin>
+                <groupId>org.apache.rat</groupId>
+                <artifactId>apache-rat-plugin</artifactId>
+                <configuration>
+                    <excludes>
+                        <exclude>src/site/markdown/**</exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-scm-publish-plugin</artifactId>
+                <configuration>
+                    
<checkoutDirectory>${user.home}/maven-sites/${maven.site.path}</checkoutDirectory>
+                    <tryUpdate>true</tryUpdate>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 
@@ -76,6 +105,10 @@
                     </excludePackageNames>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-plugin-plugin</artifactId>
+            </plugin>
         </plugins>
     </reporting>
 
diff --git a/src/main/java/org/apache/sling/maven/jspc/JspcMojo.java 
b/src/main/java/org/apache/sling/maven/jspc/JspcMojo.java
index dab978a..f03e95e 100644
--- a/src/main/java/org/apache/sling/maven/jspc/JspcMojo.java
+++ b/src/main/java/org/apache/sling/maven/jspc/JspcMojo.java
@@ -73,13 +73,13 @@ public class JspcMojo extends AbstractMojo implements 
Options {
     private MavenProject project;
 
     /**
-     * Location of JSP source files.
+     * Location of the JSP source file. 
      */
     @Parameter( property = "jspc.sourceDirectory", defaultValue = 
"${project.build.scriptSourceDirectory}")
     private File sourceDirectory;
 
     /**
-     * Target folder for the compiled classes.
+     * Target directory for the compiled JSP classes.
      */
     @Parameter ( property = "jspc.outputDirectory", defaultValue = 
"${project.build.outputDirectory}")
     private String outputDirectory;
@@ -111,9 +111,15 @@ public class JspcMojo extends AbstractMojo implements 
Options {
     @Parameter ( property = "jspc.showSuccess", defaultValue = "false")
     private boolean showSuccess;
 
+    /**
+     * The Target Virtual Machine Version to generate class files for.
+     */
     @Parameter ( property = "jspc.compilerTargetVM", defaultValue = "1.5")
     private String compilerTargetVM;
 
+    /**
+     * The Compiler Source Version of the Java source generated from the JSP 
files before compiling into classes.
+     */
     @Parameter ( property = "jspc.compilerSourceVM", defaultValue = "1.5")
     private String compilerSourceVM;
 
diff --git a/src/site/markdown/index.md b/src/site/markdown/index.md
new file mode 100644
index 0000000..67f49ba
--- /dev/null
+++ b/src/site/markdown/index.md
@@ -0,0 +1,48 @@
+JspC Maven Plugin
+=================
+
+Compiles JSP scripts into class files and generates Declarative Service 
Descriptors to register the compiled JSPs as services.
+
+See [Goals](plugin-info.html) for a list of supported goals.
+
+
+## Overview
+
+The Maven JspC Plugin provides a single goal `jspc` which is by default 
executed in the `compile` phase of the Maven build process. This goal takes all 
JSP source files from a configured location (`src/main/scripts` by default) and 
compiles them into classes in a configurable location 
(`target/jspc-plugin-generated` by default). In addition, for each compiled JSP 
a Declarative Services descriptor is generated and written to a descriptor file 
(`OSGI-INF/jspServiceComponents.xml` in the ou [...]
+
+
+## Usage
+
+To use the Maven JspC Plugin define the following elements in the `<plugins>` 
section of the POM:
+
+
+    <?xml version="1.0" encoding="ISO-8859-1"?>
+    <project>
+        ....
+        <build>
+            ....
+            <plugins>
+                ....
+                <plugin>
+                    <groupId>org.apache.sling</groupId>
+                    <artifactId>jspc-maven-plugin</artifactId>
+                    <executions>
+                        <execution>
+                            <id>compile-jsp</id>
+                            <goals>
+                                <goal>jspc</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                </plugin>
+                ....
+            <plugins>
+            ....
+        <build>
+        ....
+    <project>
+
+
+## Notes
+
+The generated JSP classes as well as the Declarative Services descriptor are 
automatically copied to the generated bundle jar file if the Maven Bundle 
Plugin (from the Apache Felix) project is used to build the project package.
diff --git a/src/site/site.xml b/src/site/site.xml
new file mode 100644
index 0000000..9abab11
--- /dev/null
+++ b/src/site/site.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+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>
+</project>

-- 
To stop receiving notification emails like this one, please contact
"[email protected]" <[email protected]>.

Reply via email to