Projekt-Seite erstellt: Velocity-Template - Erster Anlauf (unvollständig)
authorKai Moritz <kai@juplo.de>
Tue, 5 Jul 2016 14:33:38 +0000 (16:33 +0200)
committerKai Moritz <kai@juplo.de>
Fri, 12 May 2017 21:43:51 +0000 (23:43 +0200)
pom.xml
src/site/site.xml [new file with mode: 0644]
src/site/template.vm [new file with mode: 0644]
src/site/xhtml/faq.xhtml [new file with mode: 0644]
src/site/xhtml/index.xhtml [new file with mode: 0644]
src/site/xhtml/issue-tracking.xhtml [new file with mode: 0644]
src/site/xhtml/mail-lists.xhtml [new file with mode: 0644]
src/site/xhtml/usage.xhtml [new file with mode: 0644]

diff --git a/pom.xml b/pom.xml
index feb0b1e..e2b9856 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,9 @@
 
   <groupId>de.juplo.jackson</groupId>
   <artifactId>simple-mapper</artifactId>
+  <name>Simple Mapper 4 JSON</name>
   <version>1.0-SNAPSHOT</version>
+  <url>http://juplo.de/simple-mapper</url>
 
   <properties>
 
     </dependencies>
   </dependencyManagement>
 
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>3.3</version>
+        <configuration>
+          <encoding>utf8</encoding>
+          <showWarnings>true</showWarnings>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-dependency-plugin</artifactId>
+        <version>2.10</version>
+        <executions>
+          <execution>
+            <id>install</id>
+            <phase>install</phase>
+            <goals>
+              <goal>sources</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-source-plugin</artifactId>
+        <version>2.1.2</version><!-- Should be same version as in oss-parent-7 -->
+        <executions>
+          <execution>
+            <id>attach-sources</id>
+            <phase>verify</phase>
+            <goals>
+              <goal>jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-resources-plugin</artifactId>
+        <version>2.7</version>
+        <executions>
+          <execution>
+            <id>copy-resources</id>
+            <phase>pre-site</phase>
+            <goals>
+              <goal>copy-resources</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>${project.build.directory}/filtered-site</outputDirectory>
+              <resources>
+                <resource>
+                  <directory>src/site</directory>
+                  <filtering>true</filtering>
+                </resource>
+              </resources>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <artifactId>maven-site-plugin</artifactId>
+          <version>3.5.1</version>
+          <configuration>
+            <siteDirectory>${project.build.directory}/filtered-site</siteDirectory>
+            <templateFile>src/site/template.vm</templateFile>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-changes-plugin</artifactId>
+        <version>2.11</version>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <version>2.7</version><!-- Should be same version as in oss-parent-7 -->
+        <configuration>
+          <additionalparam>-Xdoclint:none</additionalparam>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jxr-plugin</artifactId>
+        <version>2.5</version>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-pmd-plugin</artifactId>
+        <version>3.4</version>
+        <configuration>
+          <linkXref>true</linkXref>
+          <targetJdk>1.5</targetJdk>
+        </configuration>
+      </plugin>
+    </plugins>
+  </reporting>
+
 </project>
diff --git a/src/site/site.xml b/src/site/site.xml
new file mode 100644 (file)
index 0000000..02fc7c8
--- /dev/null
@@ -0,0 +1,12 @@
+<project>
+  <body>
+    <menu>
+      <item name="About" href="index.html"/>
+      <item name="Usage Examples" href="usage.html"/>
+      <item name="FAQ" href="faq.html"/>
+      <item name="Project Information" href="project-info.html"/>
+      <item name="Project Reports" href="project-reports.html"/>
+    </menu>
+    <menu ref="reports"/>
+  </body>
+</project>
diff --git a/src/site/template.vm b/src/site/template.vm
new file mode 100644 (file)
index 0000000..ac87689
--- /dev/null
@@ -0,0 +1,105 @@
+<!DOCTYPE html>
+<!-- Generated by Apache Maven Doxia Site Renderer#if( $doxiaSiteRendererVersion ) $doxiaSiteRendererVersion#end at $dateFormat.format( $currentDate ) -->
+
+
+## Automatisch generierte Seiten einlesen
+#set ( $pages = $project.getClass().forName('java.util.LinkedHashMap').newInstance() )
+#macro ( buildPages $items )
+  #foreach ( $item in $items )
+    #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) )
+    #set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) )
+    #set ( $sinkhole = $pages.put( $item.name, $currentItemHref ) )
+    #if ( !$item.items.empty )
+      #buildPages ( $item.items )
+    #end
+  #end
+#end
+#foreach ( $menu in $decoration.body.menus )
+  ## Nur benannte Menüs werden berücksichtigt
+  #if ($menu.name)
+    #buildPages ( $menu.items )
+  #end
+#end
+<!-- $pages -->
+
+#set ( $crumbs = $project.getClass().forName('java.util.LinkedHashMap').newInstance() )
+#macro ( searchBreadcrumbTrail $items )
+  #set ( $sep = '' )
+  #foreach ( $item in $items )
+    #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) )
+    #set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) )
+    #if ( $currentItemHref == 'index.html' )
+      #set ( $name = $project.name )
+    #else
+      #set ( $name = $item.name )
+    #end
+    #if ( !$breadcrumbs && $alignedFileName == $currentItemHref )
+      #set ( $breadcrumbs = $project.getClass().forName('java.util.LinkedHashMap').newInstance() )
+      ## Den Titel der Seite korrigieren!
+      #set ( $title = "$project.name - $item.name" )
+      #set ( $shortTitle = $name )
+      #set ( $sinkhole = $breadcrumbs.put( 'index.html', $project.name) )
+      #foreach ( $crumb in $crumbs.entrySet() )
+        #set ( $sinkhole = $breadcrumbs.put( $crumb.key , $crumb.value ) )
+      #end
+      #set ( $sinkhole = $breadcrumbs.put( $alignedFileName , $shortTitle) )
+    #end
+    $sep"$currentItemHref": {
+      "name": "$name"
+      #if ( !$item.items.empty )
+        ,"childs": {
+        #set ( $sinkhole = $crumbs.put( $currentItemHref , $name) )
+        #searchBreadcrumbTrail ( $item.items )
+        #set ( $sinkhole = $crumbs.pop() )
+        }
+      #end
+    }
+    #set ( $sep =',' )
+  #end
+#end
+
+## Datenstrukturen für die Navigation vorbereiten
+#foreach ( $menu in $decoration.body.menus )
+  ## Nur unbenannte Menüs werden berücksichtigt
+  #if (!($menu.name))
+    ## Breadcrumb-Pfad suchen
+    "menu": {
+      #searchBreadcrumbTrail ( $menu.items )
+    }
+  #end
+#end
+
+<!-- title: $title -->
+<!-- short: $shortTitle -->
+<!-- Current: $alignedFileName -->
+<!-- Breadcrumbs: $breadcrumbs -->
+
+<!--
+#set ( $sep = '' )
+"$alignedFileName": [
+  #foreach( $crumb in $breadcrumbs.entrySet() )
+  $sep
+  { "uri": "$crumb.key", "name": "$crumb.value" }
+  #set ( $sep = ',' )
+  #end
+]
+-->
+
+<html
+    xmlns="http://www.w3.org/1999/xhtml"
+    xmlns:layout="http://www.thymeleaf.org"
+    layout:decorator="templates/layout"
+    th:with="uri='$alignedFileName'"
+    >
+  <head>
+    <title>juplo - $title</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=${outputEncoding}" />
+    <link rel="canonical" href="$project.url/$alignedFileName"/>
+  </head>
+  <body>
+    <article class="main" layout:fragment="maincontent">
+      <header><h1>$shortTitle</h1></header>
+      $bodyContent
+    </article>
+  </body>
+</html>
diff --git a/src/site/xhtml/faq.xhtml b/src/site/xhtml/faq.xhtml
new file mode 100644 (file)
index 0000000..802996e
--- /dev/null
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ </head>
+ <body>
+  <h1>Frequently Asked Questions (FAQ)</h1>
+  <p><em>TODO...</em></p>
+ </body>
+</html>
diff --git a/src/site/xhtml/index.xhtml b/src/site/xhtml/index.xhtml
new file mode 100644 (file)
index 0000000..022684b
--- /dev/null
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ </head>
+ <body>
+  <h1>Simple Mapper</h1>
+  <h2>A Simple Convenient Mapper, that translates JSON-Data Into A Hierarchy Of Java-Lists and -Maps</h2>
+  <h2>Releases</h2>
+  <ul>
+    <li><a href="http://juplo.de/simple-mapper">current version</a></li>
+    <li>${project.version} (this version)</li>
+  </ul>
+ </body>
+</html>
diff --git a/src/site/xhtml/issue-tracking.xhtml b/src/site/xhtml/issue-tracking.xhtml
new file mode 100644 (file)
index 0000000..f7e6859
--- /dev/null
@@ -0,0 +1,13 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ </head>
+ <body>
+  <strong>There is no bug-tracking system set up for this project!</strong>
+  <p>
+  Please send your bug-reports, questions or feature-requests directly
+  to the developer.
+  </p>
+ </body>
+</html>
diff --git a/src/site/xhtml/mail-lists.xhtml b/src/site/xhtml/mail-lists.xhtml
new file mode 100644 (file)
index 0000000..ff8d7f2
--- /dev/null
@@ -0,0 +1,13 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ </head>
+ <body>
+  <strong>There are no mailinglists defined for this project!</strong>
+  <p>
+  Please send your bug-reports, questions or feature-requests directly
+  to the developer.
+  </p>
+ </body>
+</html>
diff --git a/src/site/xhtml/usage.xhtml b/src/site/xhtml/usage.xhtml
new file mode 100644 (file)
index 0000000..3c573e4
--- /dev/null
@@ -0,0 +1,10 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ </head>
+ <body>
+  <h1>Usage</h1>
+  <p><em>TODO...</em></p>
+ </body>
+</html>