From: Kai Moritz <kai@juplo.de> Date: Sat, 16 Jul 2016 19:10:16 +0000 (+0200) Subject: Reworked project-documentation: moved to maven-thymeleaf-skin X-Git-Tag: hibernate-maven-plugin-2.1.0~23 X-Git-Url: https://juplo.de/gitweb/?a=commitdiff_plain;h=2ec0af491d992d9c26000f803bbc61fdb1299318;p=hibernate4-maven-plugin Reworked project-documentation: moved to maven-thymeleaf-skin --- diff --git a/pom.xml b/pom.xml index 2356d057..11f9e547 100644 --- a/pom.xml +++ b/pom.xml @@ -12,10 +12,10 @@ <groupId>de.juplo</groupId> <artifactId>hibernate-maven-plugin</artifactId> <name>Hibernate Maven Plugin</name> - <description>Plugin for generating a database-schema from Hibernate-Mapping-Annotations</description> + <description>A simple plugin for generating a database-schema from Hibernate-Mappings</description> <version>2.1-SNAPSHOT</version> <packaging>maven-plugin</packaging> - <url>http://juplo.de/hibernate-maven-plugin</url> + <url>http://juplo.de/hibernate-maven-plugin/index.html</url> <prerequisites> <maven>2.0.6</maven> @@ -326,10 +326,9 @@ <plugins> <plugin> <artifactId>maven-site-plugin</artifactId> - <version>3.4</version> + <version>3.5.1</version> <configuration> <siteDirectory>${project.build.directory}/filtered-site</siteDirectory> - <templateFile>src/site/template.vm</templateFile> </configuration> <dependencies> <dependency><!-- add support for ssh/scp --> diff --git a/src/site/site.xml b/src/site/site.xml index 111fb6b4..e62c0b12 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -1,16 +1,29 @@ <project> - <googleAnalyticsAccountId>UA-571104-3</googleAnalyticsAccountId> <body> <menu> + <item name="Overview" href="index.html"/> <item name="Configuration Examples" href="configuration.html"/> <item name="Goal: CREATE" href="create-mojo.html"/> <item name="Goal: DROP" href="drop-mojo.html"/> - <item name="Enable Debug-Output" href="debugging.html"/> + <item name="Enable Debugging-Output" href="debugging.html"/> <item name="Skipping Execution" href="skip.html"/> <item name="Force Exceution" href="force.html"/> <item name="Known Pitfalls (FAQ)" href="pitfalls.html"/> + <item name="Project Information" href="project-info.html"/> + <item name="Project Reports" href="project-reports.html"/> </menu> <menu ref="reports"/> </body> + <skin> + <groupId>de.juplo.maven</groupId> + <artifactId>maven-thymeleaf-skin</artifactId> + <version>1.0.0</version> + </skin> + <custom> + <thymeproxy> + <path>/hibernate-maven-plugin/</path> + <crumbs><![CDATA[{"uri":"/projects.html","name":"Projects"}]]></crumbs> + </thymeproxy> + </custom> </project> diff --git a/src/site/template.vm b/src/site/template.vm deleted file mode 100644 index 5f586296..00000000 --- a/src/site/template.vm +++ /dev/null @@ -1,334 +0,0 @@ -<!DOCTYPE html> -<!-- Generated by Apache Maven Doxia Site Renderer#if( $doxiaSiteRendererVersion ) $doxiaSiteRendererVersion#end at $dateFormat.format( $currentDate ) --> -## Datenstrukturen für die Navigation (Breadcrumbs und Menü) vorbereiten -#set ( $crumbs = $project.getClass().forName('java.util.LinkedList').newInstance() ) -#set ( $parents = $project.getClass().forName('java.util.LinkedList').newInstance() ) -#set ( $active = 'index.html' ) -#set ( $skiplist = [ 'index.html' ] ) -#macro ( searchBreadcrumbTrail $items ) - #if ( $breadcrumbs ) - ## Der zuerst gefundene Pfad gilt (denn dieser liegt im selbst erzeugten Menü) - #else - #foreach ( $item in $items ) - #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) ) - #set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) ) - #if ( $alignedFileName == $currentItemHref ) - ## Sonderfall abfangen :/ - #if ( $alignedFileName == 'index.html' ) - #set ( $breadcrumbs = [] ) - #set ( $path = [ 'index.html' ] ) - #else - #set ( $breadcrumbs = $crumbs.clone() ) - ## Den Titel der Seite korrigieren! - #set ( $title = "$project.name - $item.name" ) - #set ( $shortTitle = $item.name ) - ## Pfad für die Identifizierung sichtbarer Menüeinträge aufbauen - #set ( $path = [ 'index.html' ] ) - #foreach ( $crumb in $crumbs ) - #set ( $currentItemHref = $PathTool.calculateLink( $crumb.href, $relativePath ) ) - #set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) ) - #set ( $sinkhole = $path.add( $currentItemHref ) ) - #end - #set ( $sinkhole = $path.add( $alignedFileName ) ) - #end - #else - #if ( !$item.items.empty ) - #set ( $sinkhole = $crumbs.push( $item ) ) - #searchBreadcrumbTrail ( $item.items ) - #set ( $sinkhole = $crumbs.pop() ) - #end - #end - #end - #end -#end -#macro ( buildSkiplist $item ) - #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) ) - #set ( $sinkhole = $skiplist.add( $currentItemHref.replaceAll( '\\', '/' ) ) ) - #foreach ( $item in $item.items ) - #buildSkiplist ( $item ) - #end -#end -#macro ( findActive $item $skip) - #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) ) - #set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) ) - #set ( $doskip = false ) - #if ( $skip ) - #foreach ( $toskip in $skiplist ) - #if ( $currentItemHref == $toskip ) - #set ( $doskip = true ) - #end - #end - #end - #if ( !$doskip ) - #if ( $alignedFileName == $currentItemHref ) - #if ( $item.items.size() > 0 ) - #set ( $active = $alignedFileName ) - #else - #set ( $active = $parents.peek() ) - #end - #end - #set ( $sinkhole = $parents.push( $currentItemHref ) ) - #foreach ( $item in $item.items ) - #findActive ( $item $skip ) - #end - #set ( $sinkhole = $parents.pop() ) - #end -#end -#foreach ( $menu in $decoration.body.menus ) - ## Breadcrumb-Pfad suchen - #searchBreadcrumbTrail ( $menu.items ) - ## Bestimmen, welche Pfade in dem selbst definierten Menü liegen - #set ( $sinkhole = $parents.push( 'index.html' ) ) - #if ( !$menu.name ) - #foreach ( $item in $menu.items ) - #buildSkiplist( $item ) - #end - ## Aktives (Unter-)Menü bestimmen (und dabei nichts überspringen) - #foreach ( $item in $menu.items ) - #findActive( $item false) - #end - #else - ## Aktives (Unter-)Menü bestimmen (und dabei Einträge aus dem selbst - ## definierten Menü überspringen) - #foreach ( $item in $menu.items ) - #findActive( $item true) - #end - #end - #set ( $sinkhole = $parents.pop() ) - ## Sonderbehandlung der Einträge im selbst angelegten Menü - ## Das Menü wird daran erkannt, das der Name leer ist! -#end -<!-- Current: $alignedFileName --> -<!-- Active: $active --> -<!-- Path: $path --> -<!-- Skiplist: $skiplist --> -## -#macro ( link $href $name $class ) - #set ( $linkTitle = ' title="' + $name + '"' ) - #if ( $href.toLowerCase().startsWith("http:/") || $href.toLowerCase().startsWith("https:/") || - $href.toLowerCase().startsWith("ftp:/") || $href.toLowerCase().startsWith("mailto:") || - $href.toLowerCase().startsWith("file:/") || ($href.toLowerCase().indexOf("://") != -1) ) - #set ( $linkClass = ' class="external ' + $class + '"' ) - #else - #set ( $linkClass = ' class="' + $class + '"' ) - #end - <a href="$href"$linkClass$linkTitle>$name</a> -#end -## -#macro ( menuItem $item $parent $skip) - #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) ) - #set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) ) - #set ( $doskip = false ) - #if ( $skip ) - #foreach ( $toskip in $skiplist ) - #if ( $currentItemHref == $toskip ) - #set ( $doskip = true ) - #end - #end - #end -## - #if ( !$doskip ) - #set ( $onPath = false ) - #set ( $parentActive = false ) - #set ( $off = '' ) - #set ( $sub = '' ) - #set ( $cssClass = 's' ) - #foreach ( $entry in $path ) - #if ( $entry == $currentItemHref ) - #set ( $onPath = true ) - #set ( $cssClass = 's selected' ) - #end - #if ( $entry == $parent && $parent == $active ) - #set ( $parentActive = true ) - #end - #end - #if ( $item.items.size() > 0 ) - #set ( $sub = ' sub' ) - #end - #if ( !$onPath && !$parentActive ) - #set ( $off = ' off' ) - #end - <li class="s$sub$off"> - #if ( $alignedFileName == $currentItemHref ) - <strong class="s">$item.name</strong> - #else - #link( $currentItemHref $item.name $cssClass ) - #end - #if ( $item.items.size() > 0 && ( $currentItemHref == $active || $onPath ) ) - #set ( $newparent = $currentItemHref ) - <ul class="s#if ( $active == $currentItemHref ) active#end"> - #foreach( $item in $item.items ) - #menuItem( $item $newparent $skip ) - #end - </ul> - #end - </li> - #end -#end -## -#macro ( copyright ) - #if ( $project ) - #set ( $currentYear = ${currentDate.year} + 1900 ) -## - #if ( ${project.inceptionYear} && ( ${project.inceptionYear} != ${currentYear.toString()} ) ) - ${project.inceptionYear}-${currentYear} - #else - ${currentYear} - #end - #end -#end -## -<html> - <head> - <title>juplo - $title</title> - <meta http-equiv="Content-Type" content="text/html; charset=${outputEncoding}" /> - <link rel="canonical" href="$project.url/$alignedFileName"/> - <meta name="viewport" content="width=device-width, initial-scale=1" /> - <link rel="stylesheet" type="text/css" href="/css/base.css" /> - <style type="text/css"> - @import '/css/screen.css' screen; - </style> - <script src="/js/prettify.js"></script> - <!--[if lt IE 9]> - <script src="/js/html5shiv.js"></script> - <![endif]--> - <!--[if IE 8]> - <link rel="stylesheet" type="text/css" href="/css/ie8.css" /> - <![endif]--> -#foreach( $author in $authors ) - <meta name="author" content="$author" /> -#end -#if ( $dateCreation ) - <meta name="author" content="$author" /> -#end - #if ( $decoration.body.head ) - #foreach( $item in $decoration.body.head.getChildren() ) - ## Workaround for DOXIA-150 due to a non-desired behaviour in p-u - ## @see org.codehaus.plexus.util.xml.Xpp3Dom#toString() - ## @see org.codehaus.plexus.util.xml.Xpp3Dom#toUnescapedString() - #set ( $documentHeader = '<?xml version="1.0" encoding="UTF-8"?>' ) - #if ( $item.name == "script" ) - $StringUtils.replace( $item.toUnescapedString(), $documentHeader, "" ) - #else - $StringUtils.replace( $item.toString(), $documentHeader, "" ) - #end - #end - #end - $headContent - </head> - <body class="menu" onload="prettyPrint()"> - <div id="page" class="cf"> - <header id="header"> - <h1 id="logo"><a href="/" title="Home" class="l">juplo</a></h1> - <span id="slogan"><strong>Java</strong> bits from nerds for nerds</span> - <hr class="h" /> - </header> - <div id="breadcrumb"> - <strong class="b title">You are here:</strong> - <ol class="b"> - <li class="b"><a class="b" href="/">Home</a></li> - <li class="b"><a class="b" href="/projects.html">Projects</a></li> - #if ( $alignedFileName == 'index.html' ) - <li class="b"><strong class="b">$project.name</strong></li> - #else - <li class="b"><a class="b" href="$relativePath/index.html">$project.name</a></li> - #foreach( $crumb in $breadcrumbs ) - #set ( $currentItemHref = $PathTool.calculateLink( $crumb.href, $relativePath ) ) - #set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) ) - <li class="b">#link( $currentItemHref $crumb.name 'b')</li> - #end - <li class="b"><strong class="b">$shortTitle</strong></li> - #end - </ol> - <a class="hide" href="#navigation">Jump to navigation</a> - <hr class="b" /> - </div> - <main class="content cf"> - <article id="content" class="main"> - <header><h1>$shortTitle</h1></header> - $bodyContent - </article> - <div class="marginal"> - <nav id="nav"> - <hr class="n" /> - <a id="navigation"></a> - <a class="hide" href="#top" title="Show Content">Jump back to the top of the page</a> - <h2 class="nav menu">Section-Menu</h2> - <ul id="menu"> - <li class="m blog"><a href="/blog/" class="m">Blog</a></li> - <li class="m projects"><a href="/projects.html" class="m selected">Projects</a></li> - <li class="m about"><a href="/about.html" class="m">About</a></li> - </ul> - <h2 class="nav submenu"> - <span class="s">Submenu for section</span> - <a class="s selected" href="/projects.html">Projects</a> - </h2> - <ul id="submenu" class="s"> - ## Die vorhandenen Projekte sind hier hartkodiert! - #set ( $projects = { - 'Hibernate Maven Plugin' : '/hibernate-maven-plugin/' - } ) - #foreach( $entry in $projects.entrySet() ) - #if ( $project.name == $entry.key ) - <li class="s sub"> - #if ( $alignedFileName == 'index.html' ) - <strong class="s">$entry.key</strong> - #else - <a class="s selected" href="$relativePath/index.html">$entry.key</a> - #end - <ul class="s#if ( $active == 'index.html' ) active#end"> - ## Die Einträge aller Menüs werden als Einträge eines gemeinsamen - ## Menüs angezeigt - #foreach ( $menu in $decoration.body.menus ) - ## Einträge aus dem selbst definierten Menü in den - ## automatisch erzeuten Menüs überspringen - #if ( $menu.name ) - #foreach ( $item in $menu.items ) - #menuItem ( $item 'index.html' true ) - #end - #else - #foreach ( $item in $menu.items ) - #menuItem ( $item 'index.html' false ) - #end - #end - #end - </ul> - </li> - #else - <li class="s sub off"><a class="s" href="$entry.value">$entry.key</a></li> - #end - #end - </ul> - <hr class="n" /> - </nav> - <aside class="m"> - <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"> - <img class="poweredBy" alt="Built by Maven" src="$relativePath/images/logos/maven-feather.png" /> - </a> - </aside> - </div> - </main> - <footer id="footer"> - <hr class="f" /> - <ul id="footerlinks"> - <li class="f" id="copyright">© <strong>mo</strong> #copyright()</li> - <li class="f"><a class="f" href="/impressum.html">Impressum</a></li> - <li class="f about"><a class="f" href="/about.html">About</a></li> - </ul> - </footer> - </div> - #if( $decoration.googleAnalyticsAccountId && $decoration.googleAnalyticsAccountId != "" ) - <script type="text/javascript"><!--//--><![CDATA[//><!-- - var _gaq = _gaq || []; - _gaq.push(['_setAccount', '$decoration.googleAnalyticsAccountId']); - _gaq.push(['_trackPageview']); - (function() { - var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; - ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; - var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); - })(); - //--><!]]> - </script> - #end - </body> -</html> diff --git a/src/site/xhtml/configuration.xhtml b/src/site/xhtml/configuration.xhtml index 712bdfb4..e6e738da 100644 --- a/src/site/xhtml/configuration.xhtml +++ b/src/site/xhtml/configuration.xhtml @@ -4,6 +4,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> + <header><h1>Configuration Examples</h1></header> <h2>Configuration Through A Configuration-File</h2> <p> The most simple way to configure the plugin is, to put all the diff --git a/src/site/xhtml/debugging.xhtml b/src/site/xhtml/debugging.xhtml index 6271077d..2fab3254 100644 --- a/src/site/xhtml/debugging.xhtml +++ b/src/site/xhtml/debugging.xhtml @@ -4,6 +4,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> + <header><h1>Enable Debugging-Output</h1></header> <p> If you are new to <code>hibernate-maven-plugin</code>, in many cases, the <a href="./configuration.html#precedence">Configuration-Method-Precedence</a> diff --git a/src/site/xhtml/force.xhtml b/src/site/xhtml/force.xhtml index ecdab5bd..4e4fdcbb 100644 --- a/src/site/xhtml/force.xhtml +++ b/src/site/xhtml/force.xhtml @@ -4,6 +4,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> + <header><h1>Force Execution</h1></header> <p> The hibernate-maven-plugin computes MD5-sums for all found annotated classes and stores them together with the generated schema. diff --git a/src/site/xhtml/index.xhtml b/src/site/xhtml/index.xhtml index 7a2b02c8..ff1ca5ef 100644 --- a/src/site/xhtml/index.xhtml +++ b/src/site/xhtml/index.xhtml @@ -4,8 +4,8 @@ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> - <h1>Hibernate Maven Plugin</h1> - <h2>A simple Plugin for generating a Database-Schema from Hibernate Mapping-Annotations</h2> + <header><h1>${project.name}</h1></header> + <h2>${project.description}</h2> <p> The <strong>hibernate-maven-plugin</strong> is a plugin for generating a database-schema from your Hibernate-Mappings and create or update your database @@ -58,14 +58,14 @@ </ul> <h2>Releases</h2> <ul> - <li><a href="http://juplo.de/hibernate-maven-plugin">current version</a></li> + <li><a href="${project.url}">current version</a></li> <li>${project.version} (this version)</li> - <li><a href="http://juplo.de/hibernate4-maven-plugin-1.0.5">1.0.5</a></li> - <li><a href="http://juplo.de/hibernate4-maven-plugin-1.0.4">1.0.4</a></li> - <li><a href="http://juplo.de/hibernate4-maven-plugin-1.0.3">1.0.3</a></li> - <li><a href="http://juplo.de/hibernate4-maven-plugin-1.0.2">1.0.2</a></li> - <li><a href="http://juplo.de/hibernate4-maven-plugin-1.0.1">1.0.1</a></li> - <li><a href="http://juplo.de/hibernate4-maven-plugin-1.0">1.0</a></li> + <li><a href="http://juplo.de/hibernate4-maven-plugin-1.0.5/index.html">1.0.5</a></li> + <li><a href="http://juplo.de/hibernate4-maven-plugin-1.0.4/index.html">1.0.4</a></li> + <li><a href="http://juplo.de/hibernate4-maven-plugin-1.0.3/index.html">1.0.3</a></li> + <li><a href="http://juplo.de/hibernate4-maven-plugin-1.0.2/index.html">1.0.2</a></li> + <li><a href="http://juplo.de/hibernate4-maven-plugin-1.0.1/index.html">1.0.1</a></li> + <li><a href="http://juplo.de/hibernate4-maven-plugin-1.0/index.html">1.0</a></li> </ul> </body> </html> diff --git a/src/site/xhtml/issue-tracking.xhtml b/src/site/xhtml/issue-tracking.xhtml index f7e68598..40e609d8 100644 --- a/src/site/xhtml/issue-tracking.xhtml +++ b/src/site/xhtml/issue-tracking.xhtml @@ -4,6 +4,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> + <header><h1>Issue Tracking</h1></header> <strong>There is no bug-tracking system set up for this project!</strong> <p> Please send your bug-reports, questions or feature-requests directly diff --git a/src/site/xhtml/mail-lists.xhtml b/src/site/xhtml/mail-lists.xhtml index ff8d7f2b..3dbb7330 100644 --- a/src/site/xhtml/mail-lists.xhtml +++ b/src/site/xhtml/mail-lists.xhtml @@ -4,6 +4,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> + <header><h1>Mailing Lists</h1></header> <strong>There are no mailinglists defined for this project!</strong> <p> Please send your bug-reports, questions or feature-requests directly diff --git a/src/site/xhtml/pitfalls.xhtml b/src/site/xhtml/pitfalls.xhtml index d762b3ae..3d8c6164 100644 --- a/src/site/xhtml/pitfalls.xhtml +++ b/src/site/xhtml/pitfalls.xhtml @@ -4,6 +4,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> + <header><h1>Known Pitfalls (FAQ)</h1></header> <h2>Annotated classes in dependencies are not found.</h2> <p> hibernate-maven-plugin by default scans dependencies in the scope diff --git a/src/site/xhtml/skip.xhtml b/src/site/xhtml/skip.xhtml index e25ed0ed..9b570c9f 100644 --- a/src/site/xhtml/skip.xhtml +++ b/src/site/xhtml/skip.xhtml @@ -4,6 +4,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> </head> <body> + <header><h1>Skipping Execution</h1></header> <p> In most use-cases, the hibernate-maven-plugin is used to create a test-database automatically. In this use-cases, it is very likely, that it