From: Kai Moritz Date: Tue, 5 Jul 2016 14:33:38 +0000 (+0200) Subject: Projekt-Seite erstellt: Velocity-Template - Erster Anlauf (unvollständig) X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=7d46dae2461bba5a251d9c0911102d12a284bf58;p=simple-mapper Projekt-Seite erstellt: Velocity-Template - Erster Anlauf (unvollständig) --- diff --git a/pom.xml b/pom.xml index 89eb17e..77476fe 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,9 @@ de.juplo.jackson simple-mapper + Simple Mapper 4 JSON 1.0-SNAPSHOT + http://juplo.de/simple-mapper @@ -96,4 +98,113 @@ + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.3 + + utf8 + true + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.10 + + + install + install + + sources + + + + + + org.apache.maven.plugins + maven-source-plugin + 2.1.2 + + + attach-sources + verify + + jar + + + + + + org.apache.maven.plugins + maven-resources-plugin + 2.7 + + + copy-resources + pre-site + + copy-resources + + + ${project.build.directory}/filtered-site + + + src/site + true + + + + + + + + + + + maven-site-plugin + 3.5.1 + + ${project.build.directory}/filtered-site + src/site/template.vm + + + + + + + + + + org.apache.maven.plugins + maven-changes-plugin + 2.11 + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.7 + + -Xdoclint:none + + + + org.apache.maven.plugins + maven-jxr-plugin + 2.5 + + + org.apache.maven.plugins + maven-pmd-plugin + 3.4 + + true + 1.5 + + + + + diff --git a/src/site/site.xml b/src/site/site.xml new file mode 100644 index 0000000..02fc7c8 --- /dev/null +++ b/src/site/site.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/site/template.vm b/src/site/template.vm new file mode 100644 index 0000000..ac87689 --- /dev/null +++ b/src/site/template.vm @@ -0,0 +1,105 @@ + + + + +## 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 + + +#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 + + + + + + + + + + + juplo - $title + + + + +
+

$shortTitle

+ $bodyContent +
+ + diff --git a/src/site/xhtml/faq.xhtml b/src/site/xhtml/faq.xhtml new file mode 100644 index 0000000..802996e --- /dev/null +++ b/src/site/xhtml/faq.xhtml @@ -0,0 +1,10 @@ + + + + + + +

Frequently Asked Questions (FAQ)

+

TODO...

+ + diff --git a/src/site/xhtml/index.xhtml b/src/site/xhtml/index.xhtml new file mode 100644 index 0000000..022684b --- /dev/null +++ b/src/site/xhtml/index.xhtml @@ -0,0 +1,15 @@ + + + + + + +

Simple Mapper

+

A Simple Convenient Mapper, that translates JSON-Data Into A Hierarchy Of Java-Lists and -Maps

+

Releases

+ + + diff --git a/src/site/xhtml/issue-tracking.xhtml b/src/site/xhtml/issue-tracking.xhtml new file mode 100644 index 0000000..f7e6859 --- /dev/null +++ b/src/site/xhtml/issue-tracking.xhtml @@ -0,0 +1,13 @@ + + + + + + + There is no bug-tracking system set up for this project! +

+ Please send your bug-reports, questions or feature-requests directly + to the developer. +

+ + diff --git a/src/site/xhtml/mail-lists.xhtml b/src/site/xhtml/mail-lists.xhtml new file mode 100644 index 0000000..ff8d7f2 --- /dev/null +++ b/src/site/xhtml/mail-lists.xhtml @@ -0,0 +1,13 @@ + + + + + + + There are no mailinglists defined for this project! +

+ Please send your bug-reports, questions or feature-requests directly + to the developer. +

+ + diff --git a/src/site/xhtml/usage.xhtml b/src/site/xhtml/usage.xhtml new file mode 100644 index 0000000..3c573e4 --- /dev/null +++ b/src/site/xhtml/usage.xhtml @@ -0,0 +1,10 @@ + + + + + + +

Usage

+

TODO...

+ +