activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1397620 - in /activemq/activemq-website: pom.xml src/main/java/org/apache/cxf/cwiki/SiteExporter.java template/cms.cfg template/docs.cfg template/nms.cfg template/template.vm
Date Fri, 12 Oct 2012 15:44:45 GMT
Author: chirino
Date: Fri Oct 12 15:44:45 2012
New Revision: 1397620

URL: http://svn.apache.org/viewvc?rev=1397620&view=rev
Log:
Updated template to use ActiveMQ style

Added:
    activemq/activemq-website/template/cms.cfg
    activemq/activemq-website/template/nms.cfg
Removed:
    activemq/activemq-website/template/docs.cfg
Modified:
    activemq/activemq-website/pom.xml
    activemq/activemq-website/src/main/java/org/apache/cxf/cwiki/SiteExporter.java
    activemq/activemq-website/template/template.vm

Modified: activemq/activemq-website/pom.xml
URL: http://svn.apache.org/viewvc/activemq/activemq-website/pom.xml?rev=1397620&r1=1397619&r2=1397620&view=diff
==============================================================================
--- activemq/activemq-website/pom.xml (original)
+++ activemq/activemq-website/pom.xml Fri Oct 12 15:44:45 2012
@@ -93,7 +93,8 @@
                             <argument>${svn.arg2}</argument>
                             <!--argument>-force</argument-->
                             <argument>${basedir}/template/main.cfg</argument>
-                            <!-- <argument>${basedir}/template/docs.cfg</argument>
-->
+                            <argument>${basedir}/template/cms.cfg</argument>
+                            <argument>${basedir}/template/nms.cfg</argument>
                         </arguments>
                     </configuration>
                 </plugin>

Modified: activemq/activemq-website/src/main/java/org/apache/cxf/cwiki/SiteExporter.java
URL: http://svn.apache.org/viewvc/activemq/activemq-website/src/main/java/org/apache/cxf/cwiki/SiteExporter.java?rev=1397620&r1=1397619&r2=1397620&view=diff
==============================================================================
--- activemq/activemq-website/src/main/java/org/apache/cxf/cwiki/SiteExporter.java (original)
+++ activemq/activemq-website/src/main/java/org/apache/cxf/cwiki/SiteExporter.java Fri Oct
12 15:44:45 2012
@@ -365,32 +365,36 @@ public class SiteExporter implements Run
         doc = getDispatch().invoke(doc);
         el = DOMUtils.getFirstElement(DOMUtils.getFirstElement(doc.getDocumentElement()));
         while (el != null) {
-            String filename = DOMUtils.getChildContent(el, "fileName");
-            String durl = DOMUtils.getChildContent(el, "url");
-            String aid = DOMUtils.getChildContent(el, "id");
-            
-            p.addAttachment(aid, filename);
-            
-            String dirName = p.createFileName();
-            dirName = dirName.substring(0, dirName.lastIndexOf(".")) + ".data";
-            File file = new File(outputDir, dirName);
-            if (!file.exists()) {
-                callSvn("mkdir", file.getAbsolutePath());
-                file.mkdirs();
-            }
-            file = new File(file, filename);
-            boolean exists = file.exists();
-            FileOutputStream out = new FileOutputStream(file);
-            URL url = new URL(durl);
-            InputStream ins = url.openStream();
-            IOUtils.copy(ins, out);
-            out.close();
-            ins.close();
-            if (!exists) {
-                callSvn("add", file.getAbsolutePath());
-                svnCommitMessage.append("Added: " + dirName + "/" + file.getName() + "\n");
               
-            } else {
-                svnCommitMessage.append("Modified: " + dirName + "/" + file.getName() + "\n");
+            try {
+                String filename = DOMUtils.getChildContent(el, "fileName");
+                String durl = DOMUtils.getChildContent(el, "url");
+                String aid = DOMUtils.getChildContent(el, "id");
+                
+                p.addAttachment(aid, filename);
+                
+                String dirName = p.createFileName();
+                dirName = dirName.substring(0, dirName.lastIndexOf(".")) + ".data";
+                File file = new File(outputDir, dirName);
+                if (!file.exists()) {
+                    callSvn("mkdir", file.getAbsolutePath());
+                    file.mkdirs();
+                }
+                file = new File(file, filename);
+                boolean exists = file.exists();
+                FileOutputStream out = new FileOutputStream(file);
+                URL url = new URL(durl);
+                InputStream ins = url.openStream();
+                IOUtils.copy(ins, out);
+                out.close();
+                ins.close();
+                if (!exists) {
+                    callSvn("add", file.getAbsolutePath());
+                    svnCommitMessage.append("Added: " + dirName + "/" + file.getName() +
"\n");                
+                } else {
+                    svnCommitMessage.append("Modified: " + dirName + "/" + file.getName()
+ "\n");
+                }
+            } catch (Exception e) {
+                e.printStackTrace();
             }
             el = DOMUtils.getNextElement(el);
         }
@@ -551,7 +555,10 @@ public class SiteExporter implements Run
         return content;
     }
 
-    
+    public String unwrap(String v) throws Exception {
+        return v.trim().replaceFirst("^<div[^>]*>", "").replaceFirst("</div>$",
"");
+    }
+
     private static synchronized void doLogin() throws Exception {
         if (loginToken == null) {
             Document doc = XMLUtils.newDocument();

Added: activemq/activemq-website/template/cms.cfg
URL: http://svn.apache.org/viewvc/activemq/activemq-website/template/cms.cfg?rev=1397620&view=auto
==============================================================================
--- activemq/activemq-website/template/cms.cfg (added)
+++ activemq/activemq-website/template/cms.cfg Fri Oct 12 15:44:45 2012
@@ -0,0 +1,6 @@
+spaceKey: AMQCPP
+pageCacheFile:/cache/docs.pageCache
+templateName:template/template.vm
+outputDir:/cms
+globalPages:Navigation,Banner,QuickLinks
+

Added: activemq/activemq-website/template/nms.cfg
URL: http://svn.apache.org/viewvc/activemq/activemq-website/template/nms.cfg?rev=1397620&view=auto
==============================================================================
--- activemq/activemq-website/template/nms.cfg (added)
+++ activemq/activemq-website/template/nms.cfg Fri Oct 12 15:44:45 2012
@@ -0,0 +1,6 @@
+spaceKey: NMS
+pageCacheFile:/cache/docs.pageCache
+templateName:template/template.vm
+outputDir:/nms
+globalPages:Navigation,Banner,QuickLinks
+

Modified: activemq/activemq-website/template/template.vm
URL: http://svn.apache.org/viewvc/activemq/activemq-website/template/template.vm?rev=1397620&r1=1397619&r2=1397620&view=diff
==============================================================================
--- activemq/activemq-website/template/template.vm (original)
+++ activemq/activemq-website/template/template.vm Fri Oct 12 15:44:45 2012
@@ -1,4 +1,3 @@
-
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <!--
 
@@ -18,132 +17,111 @@
     limitations under the License.
 -->
 <html>
-  <head>
-    <link type="text/css" rel="stylesheet" href="http://cxf.apache.org/resources/site.css">
-    <script src="http://cxf.apache.org/resources/space.js" type="text/javascript"></script>
-    
-<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
-<meta name="keywords" content="business integration, EAI, SOA, Service Oriented Architecture,
web services, SOAP, JBI, JMS, WSDL, XML, EDI, Electronic Data Interchange, standards support,
integration standards, application integration, middleware, software, solutions, services,
CXF, open source">
-<meta name="description" content="Apache CXF, Services Framework - $page.title">
+<head>
+    <link href="http://activemq.apache.org/styles/site.css" rel="stylesheet" type="text/css"/>
+    <link href="http://activemq.apache.org/styles/type-settings.css" rel="stylesheet"
type="text/css"/>
+    <script src="http://activemq.apache.org/styles/prototype.js" type="text/javascript"></script>
+    <script src="http://activemq.apache.org/styles/rico.js" type="text/javascript"></script>
   
+    <script src="http://activemq.apache.org/styles/site.js" type="text/javascript"></script>
+    <style type="text/css">
+      .maincontent { overflow:hidden; }
+    </style>
+    <!--[if IE]>
+    <style type="text/css">
+      .maincontent { width:100%; }
+    </style>
+    <![endif]-->
+
     <title>
-Apache CXF -- $page.title
+    Apache ActiveMQ &#8482; -- $page.title
     </title>
-  </head>
-<body onload="init()">
-
+</head>
+<body>
+<div class="white_box">
+<div class="header">
+  <div class="header_l">
+    <div class="header_r">
+    </div>
+  </div>
+</div>
+<div class="content">
+  <div class="content_l">
+    <div class="content_r">
+      <div>
 
-<table width="100%" cellpadding="0" cellspacing="0">
-  <tr>
-    <td id="cell-0-0" colspan="2">&nbsp;</td>
-    <td id="cell-0-1">&nbsp;</td>
-    <td id="cell-0-2" colspan="2">&nbsp;</td>
-  </tr>
-  <tr>
-    <td id="cell-1-0">&nbsp;</td>
-    <td id="cell-1-1">&nbsp;</td>
-    <td id="cell-1-2">
-      <div style="padding: 5px;">
-        <div id="banner">
-          <!-- Banner -->
-#set($content = $exporter.getPageContent("Banner", "banner-content"))
+<!-- Banner -->
+#set($content = $exporter.unwrap($exporter.getPageContent("Banner", "banner-content")))
 $content
-          <!-- Banner -->
-        </div>
-      </div>
-      <div id="top-menu">
-        <table border="0" cellpadding="1" cellspacing="0" width="100%">
-          <tr>
-            <td>
-              <div align="left">
-                <!-- Breadcrumbs -->
+        <div class="top_red_bar">
+          <div id="site-breadcrumbs">
 #set($content = $exporter.breadcrumbs($page))
 $content
-                <!-- Breadcrumbs -->
-              </div>
-            </td>
-            <td>
-              <div align="right">
-                <!-- Quicklinks -->
-#set($content = $exporter.getPageContent("QuickLinks", "quicklinks"))
+          </div>
+          <div id="site-quicklinks">
+#set($content = $exporter.unwrap($exporter.getPageContent("QuickLinks", "quick-links")))
 $content
-                <!-- Quicklinks -->
-              </div>
-            </td>
-          </tr>
-        </table>
-      </div>
-    </td>
-    <td id="cell-1-3">&nbsp;</td>
-    <td id="cell-1-4">&nbsp;</td>
-  </tr>
-  <tr>
-    <td id="cell-2-0" colspan="2">&nbsp;</td>
-    <td id="cell-2-1">
-      <table>
-        <tr valign="top">
-          <td height="100%">
-            <div id="wrapper-menu-page-right">
-              <div id="wrapper-menu-page-top">
-                <div id="wrapper-menu-page-bottom">
-                  <div id="menu-page">
-                    <!-- NavigationBar -->
-#set($content = $exporter.getPageContent("Navigation", "navigation"))
+          </div>
+        </div>
+
+  <table border="0">
+  <tbody>
+        <tr>
+        <td valign="top" width="100%">
+          <div class="wiki-content maincontent">
+#set($content = $exporter.unwrap($page.getContent()))
+$content
+          </div>
+        </td>
+        <td valign="top">
+          <div class="navigation">
+            <div class="navigation_top">
+              <div class="navigation_bottom">
+#set($content = $exporter.unwrap($exporter.getPageContent("Navigation", "navigation")))
 $content
-                    <!-- NavigationBar -->
-                  </div>
               </div>
             </div>
           </div>
-         </td>
-         <td height="100%">
-           <!-- Content -->
-           <div class="wiki-content">
-#set($content = $page.getContent())
-$content
-           </div>
-           <!-- Content -->
-         </td>
+        </td>
         </tr>
-      </table>
-   </td>
-   <td id="cell-2-2" colspan="2">&nbsp;</td>
-  </tr>
-  <tr>
-   <td id="cell-3-0">&nbsp;</td>
-   <td id="cell-3-1">&nbsp;</td>
-   <td id="cell-3-2">
-     <div id="footer">
-       <!-- Footer -->
-       <div id="site-footer">
-         <a href="http://cxf.apache.org/privacy-policy.html">Privacy Policy</a>
- 
-         (<a href="$confluenceUri/pages/editpage.action?pageId=$page.id">edit page</a>)

-	 (<a href="$confluenceUri/pages/viewpage.action?pageId=$page.id&amp;showComments=true&amp;showCommentArea=true#addcomment">add
comment</a>)<br>
-	Apache CXF, CXF, Apache, the Apache feather logo are trademarks of The Apache Software Foundation.<br>
-        All other marks mentioned may be trademarks or registered trademarks of their respective
owners.
-       </div>
-       <!-- Footer -->
-     </div>
-   </td>
-   <td id="cell-3-3">&nbsp;</td>
-   <td id="cell-3-4">&nbsp;</td>
-  </tr>
-  <tr>
-    <td id="cell-4-0" colspan="2">&nbsp;</td>
-    <td id="cell-4-1">&nbsp;</td>
-    <td id="cell-4-2" colspan="2">&nbsp;</td>
-  </tr>
-</table>
-
-<script type="text/javascript">
-var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-try {
-var pageTracker = _gat._getTracker("UA-4458903-1");
-pageTracker._trackPageview();
-} catch(err) {}</script>
-
+  </tbody>
+        </table>
+        <div class="bottom_red_bar"></div>
+      </div>
+    </div>
+  </div>
+</div>
+<div class="black_box">
+<div class="footer">
+  <div class="footer_l">
+    <div class="footer_r">
+      <div>
+        <a href="http://activemq.apache.org/privacy-policy.html">Privacy Policy</a>
-
+        (<a href="$confluenceUri/pages/editpage.action?pageId=$page.id">edit this page</a>)
+      </div>
+    </div>
+  </div>
+</div>
+</div>
+</div>
+<div class="design_attribution">
+&copy; 2004-2011 The Apache Software Foundation.
+<br/>          
+Apache ActiveMQ, ActiveMQ, Apache, the Apache feather logo, and the Apache ActiveMQ project
logo are trademarks of The Apache Software Foundation.  All other marks mentioned may be trademarks
or registered trademarks of their respective owners.
+<br/>
+<a href="http://hiramchirino.com">Graphic Design By Hiram</a>
+</div>
+
+<!-- delay the loading of large javascript files to the end so that they don't interfere
with the loading of page content -->
+<span style="display: none">
+  <script type="text/javascript">
+    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+  </script>
+  <script type="text/javascript">
+    var pageTracker = _gat._getTracker("UA-1347593-1");
+    pageTracker._initData();
+    pageTracker._trackPageview();
+  </script>
+</span>
 </body>
 </html>
-



Mime
View raw message