Author: uli Date: Thu Dec 13 11:00:35 2012 New Revision: 1421224 URL: http://svn.apache.org/viewvc?rev=1421224&view=rev Log: initial import of tapestry site with svnpubsub backed by confluence
Added: tapestry/tapestry-site/README tapestry/tapestry-site/bin/ tapestry/tapestry-site/bin/update-site (with props) tapestry/tapestry-site/build_cms.sh (with props) tapestry/tapestry-site/pom.xml tapestry/tapestry-site/template/ tapestry/tapestry-site/template/main.cfg tapestry/tapestry-site/template/template.vm Added: tapestry/tapestry-site/README URL: http://svn.apache.org/viewvc/tapestry/tapestry-site/README?rev=1421224&view=auto ============================================================================== --- tapestry/tapestry-site/README (added) +++ tapestry/tapestry-site/README Thu Dec 13 11:00:35 2012 @@ -0,0 +1,40 @@ + +This is the start of an export utility to export the Tapestry +confluence spaces to the sites. To run this manually, you need to +have a copy of the Tapestry website checked out to a local directory: + +svn checkout https://svn.apache.org/repos/infra/websites/production/tapestry/content + +Build: +mvn install + +You will need to pass credentials for a valid confluence user. This can be +done in one of two ways: + +1) Command line: + -Dconfluence.user=username -Dconfluence.password=password + +2) Profile in .m2/settings.xml + <profile> + <id>confluence</id> + <properties> + <confluence.user>user</confluence.user> + <confluence.password>passwd</confluence.password> + </properties> + </profile> + +To export the space: +mvn -Pconfluence exec:java -Dcxf.site.output=/path/to/content +should appear in /path/to/content/ + +In the confluence profile above, you could add a property like: + <cxf.site.output>/path/to/content</cxf.site.output> +to simplify passing that into the command. + +When you commit any changes in the content directory, the changes +should be "live" fairly quickly due to the svnpubsub process. + + + + + Added: tapestry/tapestry-site/bin/update-site URL: http://svn.apache.org/viewvc/tapestry/tapestry-site/bin/update-site?rev=1421224&view=auto ============================================================================== --- tapestry/tapestry-site/bin/update-site (added) +++ tapestry/tapestry-site/bin/update-site Thu Dec 13 11:00:35 2012 @@ -0,0 +1,4 @@ +#!/bin/sh +mvn -Pconfluence,nochecks -e package exec:java $@ +[ $? -eq 0 ] || exit -1 + Propchange: tapestry/tapestry-site/bin/update-site ------------------------------------------------------------------------------ svn:executable = Added: tapestry/tapestry-site/build_cms.sh URL: http://svn.apache.org/viewvc/tapestry/tapestry-site/build_cms.sh?rev=1421224&view=auto ============================================================================== --- tapestry/tapestry-site/build_cms.sh (added) +++ tapestry/tapestry-site/build_cms.sh Thu Dec 13 11:00:35 2012 @@ -0,0 +1,3 @@ +#!/bin/sh +bin/update-site -Dsite.output=$2 + Propchange: tapestry/tapestry-site/build_cms.sh ------------------------------------------------------------------------------ svn:executable = Added: tapestry/tapestry-site/pom.xml URL: http://svn.apache.org/viewvc/tapestry/tapestry-site/pom.xml?rev=1421224&view=auto ============================================================================== --- tapestry/tapestry-site/pom.xml (added) +++ tapestry/tapestry-site/pom.xml Thu Dec 13 11:00:35 2012 @@ -0,0 +1,112 @@ +<!-- + 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 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> + <groupId>org.apache.tapestry</groupId> + <artifactId>tapestry-site-export</artifactId> + <packaging>jar</packaging> + <version>1.0-SNAPSHOT</version> + <name>Apache Tapestry Confluence Site Exporter</name> + <url>http://tapestry.apache.org</url> + + <parent> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-parent</artifactId> + <version>2.5.2</version> + </parent> + + <properties> + <cxf.version>2.5.2</cxf.version> + <extra.arg></extra.arg> + <svn.arg1></svn.arg1> + <svn.arg2></svn.arg2> + <site.output>${basedir}/content</site.output> + <cxf.site.output>${site.output}</cxf.site.output> + <maven.test.skip>true</maven.test.skip> + </properties> + + <dependencies> + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-rt-frontend-jaxws</artifactId> + <version>${cxf.version}</version> + </dependency> + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-rt-transports-http</artifactId> + <version>${cxf.version}</version> + </dependency> + <dependency> + <groupId>org.apache.velocity</groupId> + <artifactId>velocity</artifactId> + </dependency> + <dependency> + <groupId>org.ccil.cowan.tagsoup</groupId> + <artifactId>tagsoup</artifactId> + <version>1.2.1</version> + </dependency> + </dependencies> + + <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.6</source> + <target>1.6</target> + </configuration> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <version>1.2</version> + <configuration> + <mainClass>org.apache.cxf.cwiki.SiteExporter</mainClass> + <arguments> + <argument>-d</argument> + <argument>${cxf.site.output}</argument> + <argument>-password</argument> + <argument>${confluence.password}</argument> + <argument>-user</argument> + <argument>${confluence.user}</argument> + <argument>${extra.arg}</argument> + <argument>${svn.arg1}</argument> + <argument>${svn.arg2}</argument> + <!--argument>-force</argument--> + <argument>${basedir}/template/main.cfg</argument> + </arguments> + </configuration> + </plugin> + </plugins> + </pluginManagement> + </build> + + + <profiles> + <profile> + <id>svn</id> + <properties> + <svn.arg1>-svn</svn.arg1> + <svn.arg2>-commit</svn.arg2> + </properties> + </profile> + </profiles> +</project> Added: tapestry/tapestry-site/template/main.cfg URL: http://svn.apache.org/viewvc/tapestry/tapestry-site/template/main.cfg?rev=1421224&view=auto ============================================================================== --- tapestry/tapestry-site/template/main.cfg (added) +++ tapestry/tapestry-site/template/main.cfg Thu Dec 13 11:00:35 2012 @@ -0,0 +1,6 @@ +spaceKey: TAPESTRY +pageCacheFile:cache/main.pageCache +templateName:template/template.vm +outputDir:/ +globalPages:Navigation,Banner,QuickLinks + Added: tapestry/tapestry-site/template/template.vm URL: http://svn.apache.org/viewvc/tapestry/tapestry-site/template/template.vm?rev=1421224&view=auto ============================================================================== --- tapestry/tapestry-site/template/template.vm (added) +++ tapestry/tapestry-site/template/template.vm Thu Dec 13 11:00:35 2012 @@ -0,0 +1,69 @@ +<!DOCTYPE html> + + <!-- + + 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> + <meta http-equiv="x-ua-compatible" content="IE=9"> + <title> +#if (! $page.title.equals("Index") && ! $page.title.equals("IndexV2")) + $page.title -- Apache Tapestry +#else + Apache Tapestry Home Page +#end + </title> + <link type="text/css" rel="stylesheet" href="$stylesheet"> + <link href="http://svn.apache.org/repos/asf/tapestry/tapestry-site/branches/post-5.2-site/publish/styles/style.css" rel="stylesheet" type="text/css"/> +</head> +<body> + <div class="wrapper bs"> + +#set($content = $exporter.getPageContent("Navigation","navigation")) +$content.replaceAll('rel="nofollow"', "") + +#if (! $page.title.equals("Index") && ! $page.title.equals("IndexV2")) +<div id="top"> +#set($content = $exporter.getPageContent("Small Banner","smallbanner")) +$content.replaceAll("Page Title", $page.title).replaceAll('rel="nofollow"', "") +<div class="clearer"></div> +</div> + +<div class="clearer"></div> + + <div id="breadcrumbs"> + #set($content = $exporter.breadcrumbs($page)) + $content.replaceAll('<a href="https://cwiki.apache.org/confluence/display/TAPESTRY/Index" title="Index">Index</a> > ',"").replaceAll("Home", "Index") + </div> + +<div id="content"> +#set($body = $page.getContent()) +$body.replaceAll('rel="nofollow"', "") +</div> + +<div class="clearer"></div> +#else +#set($body = $page.getContent()) +$body.replaceAll('rel="nofollow"', "") +#end +<div id="footer"> +#set($content = $exporter.getPageContent("Footer","footer")) +$content.replaceAll('rel="nofollow"', "") +</div> + </div> +</body> +</html>