mirror of
https://github.com/apache/struts.git
synced 2026-08-06 23:27:07 +00:00
WW-4130 Adds usage of SiteExporter instead of wget to export docs from Confluence
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1497786 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
+25
-19
@@ -1,4 +1,5 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
@@ -83,31 +84,29 @@
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>1.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>cwiki-docs</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
<goal>java</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<mkdir dir="${project.build.directory}/cwiki" />
|
||||
<exec executable="wget">
|
||||
<arg value="-erobots=off" />
|
||||
<arg value="-nH" />
|
||||
<arg value="-nv" />
|
||||
<arg value="-E" />
|
||||
<arg value="-L" />
|
||||
<arg value="-l 0" />
|
||||
<arg value="-np" />
|
||||
<arg value="--directory-prefix=${project.build.directory}/cwiki" />
|
||||
<arg value="--no-check-certificate" />
|
||||
<arg value="-r" />
|
||||
<arg value="https://cwiki.apache.org/WW/" />
|
||||
</exec>
|
||||
</tasks>
|
||||
<classpathScope>runtime</classpathScope>
|
||||
<includeProjectDependencies>true</includeProjectDependencies>
|
||||
<mainClass>org.apache.cxf.cwiki.SiteExporter</mainClass>
|
||||
<arguments>
|
||||
<argument>-d</argument>
|
||||
<argument>${project.build.directory}/cwiki/WW</argument>
|
||||
<argument>-password</argument>
|
||||
<argument>${confluence.password}</argument>
|
||||
<argument>-user</argument>
|
||||
<argument>${confluence.user}</argument>
|
||||
<argument>${basedir}/src/main/resources/docs.cfg</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
@@ -142,6 +141,13 @@
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.cxf.site-export</groupId>
|
||||
<artifactId>cxf-site-export</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.struts</groupId>
|
||||
<artifactId>struts2-codebehind-plugin</artifactId>
|
||||
|
||||
@@ -47,8 +47,8 @@
|
||||
|
||||
<!-- Include the Confluence docs in the assembly -->
|
||||
<fileSet>
|
||||
<directory>target/cwiki/WW</directory>
|
||||
<outputDirectory>docs/docs</outputDirectory>
|
||||
<directory>target/cwiki/WW/docs</directory>
|
||||
<outputDirectory>docs</outputDirectory>
|
||||
</fileSet>
|
||||
|
||||
<!-- Plugins -->
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
spaceKey: WW
|
||||
pageCacheFile:/cache/docs.pageCache
|
||||
templateName:assembly/src/main/resources/template.vm
|
||||
outputDir:/docs
|
||||
globalPages:Navigation,Banner,QuickLinks
|
||||
|
||||
@@ -0,0 +1,169 @@
|
||||
#set ($stylebase = "https://struts.apache.org/css")
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!--
|
||||
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.
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<LINK type="text/css" rel="stylesheet" href="$stylebase/default.css">
|
||||
<style type="text/css">
|
||||
.dp-highlighter {
|
||||
width:95% !important;
|
||||
}
|
||||
</style>
|
||||
<style type="text/css">
|
||||
.footer {
|
||||
background-image: url('$confluenceUri/images/border/border_bottom.gif');
|
||||
background-repeat: repeat-x;
|
||||
background-position: left top;
|
||||
padding-top: 4px;
|
||||
color: #666;
|
||||
}
|
||||
</style>
|
||||
#if($page.hasCode)
|
||||
<link href='http://struts.apache.org/highlighter/styles/shCoreStruts.css' rel='stylesheet' type='text/css' />
|
||||
<link href='http://struts.apache.org/highlighter/styles/shThemeStruts.css' rel='stylesheet' type='text/css' />
|
||||
<script src='http://struts.apache.org/highlighter/js/shCore.js' type='text/javascript'></script>
|
||||
#foreach ($hscript in $page.CodeScripts)
|
||||
<script src='http://struts.apache.org/highlighter/js/$hscript' type='text/javascript'></script>
|
||||
#end
|
||||
|
||||
<script type="text/javascript">
|
||||
SyntaxHighlighter.defaults['toolbar'] = false;
|
||||
SyntaxHighlighter.all();
|
||||
</script>
|
||||
#end
|
||||
<script type="text/javascript" language="javascript">
|
||||
var hide = null;
|
||||
var show = null;
|
||||
var children = null;
|
||||
|
||||
function init() {
|
||||
/* Search form initialization */
|
||||
var form = document.forms['search'];
|
||||
if (form != null) {
|
||||
form.elements['domains'].value = location.hostname;
|
||||
form.elements['sitesearch'].value = location.hostname;
|
||||
}
|
||||
|
||||
/* Children initialization */
|
||||
hide = document.getElementById('hide');
|
||||
show = document.getElementById('show');
|
||||
children = document.all != null ?
|
||||
document.all['children'] :
|
||||
document.getElementById('children');
|
||||
if (children != null) {
|
||||
children.style.display = 'none';
|
||||
show.style.display = 'inline';
|
||||
hide.style.display = 'none';
|
||||
}
|
||||
}
|
||||
|
||||
function showChildren() {
|
||||
children.style.display = 'block';
|
||||
show.style.display = 'none';
|
||||
hide.style.display = 'inline';
|
||||
}
|
||||
|
||||
function hideChildren() {
|
||||
children.style.display = 'none';
|
||||
show.style.display = 'inline';
|
||||
hide.style.display = 'none';
|
||||
}
|
||||
</script>
|
||||
<title>$page.title</title>
|
||||
</head>
|
||||
<body onload="init()">
|
||||
<table border="0" cellpadding="2" cellspacing="0" width="100%">
|
||||
<tr class="topBar">
|
||||
<td align="left" valign="middle" class="topBarDiv" align="left" nowrap>
|
||||
$exporter.breadcrumbs($page)
|
||||
</td>
|
||||
<td align="right" valign="middle" nowrap>
|
||||
<form name="search" action="http://www.google.com/search" method="get">
|
||||
<input type="hidden" name="ie" value="UTF-8" />
|
||||
<input type="hidden" name="oe" value="UTF-8" />
|
||||
<input type="hidden" name="domains" value="" />
|
||||
<input type="hidden" name="sitesearch" value="" />
|
||||
<input type="text" name="q" maxlength="255" value="" />
|
||||
<input type="submit" name="btnG" value="Google Search" />
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div id="PageContent">
|
||||
<div class="pageheader" style="padding: 6px 0px 0px 0px;">
|
||||
<!-- We'll enable this once we figure out how to access (and save) the logo resource -->
|
||||
<!--img src="/wiki/images/confluence_logo.gif" style="float: left; margin: 4px 4px 4px 10px;" border="0"-->
|
||||
<div style="margin: 0px 10px 0px 10px" class="smalltext">$page.space.name</div>
|
||||
<div style="margin: 0px 10px 8px 10px" class="pagetitle">$page.title</div>
|
||||
|
||||
<div class="greynavbar" align="right" style="padding: 2px 10px; margin: 0px;">
|
||||
<a href="$confluenceUri/pages/editpage.action?pageId=$page.id">
|
||||
<img src="$confluenceUri/images/icons/notep_16.gif"
|
||||
height="16" width="16" border="0" align="absmiddle" title="Edit Page"></a>
|
||||
<a href="$confluenceUri/pages/editpage.action?pageId=$page.id">Edit Page</a>
|
||||
|
||||
<a href="$confluenceUri/pages/listpages.action?key=$page.spaceKey">
|
||||
<img src="$confluenceUri/images/icons/browse_space.gif"
|
||||
height="16" width="16" border="0" align="absmiddle" title="Browse Space"></a>
|
||||
<a href="$confluenceUri/pages/listpages.action?key=$page.spaceKey">Browse Space</a>
|
||||
|
||||
<a href="$confluenceUri/pages/createpage.action?spaceKey=$page.spaceKey&fromPageId=$page.id">
|
||||
<img src="$confluenceUri/images/icons/add_page_16.gif"
|
||||
height="16" width="16" border="0" align="absmiddle" title="Add Page"></a>
|
||||
<a href="$confluenceUri/pages/createpage.action?spaceKey=$page.spaceKey&fromPageId=$page.id">Add Page</a>
|
||||
|
||||
<a href="$confluenceUri/pages/createblogpost.action?spaceKey=$page.spaceKey&fromPageId=$page.id">
|
||||
<img src="$confluenceUri/images/icons/add_blogentry_16.gif"
|
||||
height="16" width="16" border="0" align="absmiddle" title="Add News"></a>
|
||||
<a href="$confluenceUri/pages/createblogpost.action?spaceKey=$page.spaceKey&fromPageId=$page.id">Add News</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pagecontent">
|
||||
<div class="wiki-content">
|
||||
$body
|
||||
</div>
|
||||
|
||||
#if ($page.hasChildren())
|
||||
<div class="tabletitle">
|
||||
Children
|
||||
<span class="smalltext" id="show" style="display: inline;">
|
||||
<a href="javascript:showChildren()">Show Children</a></span>
|
||||
<span class="smalltext" id="hide" style="display: none;">
|
||||
<a href="javascript:hideChildren()">Hide Children</a></span>
|
||||
</div>
|
||||
<div class="greybox" id="children" style="display: none;">
|
||||
#set ($children = $page.children)
|
||||
#foreach ($child in $children)
|
||||
$page.link($child)
|
||||
<span class="smalltext">($child.space.name)</span>
|
||||
<br>
|
||||
#end
|
||||
</div>
|
||||
#end
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
Generated by CXF SiteExporter
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user