You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2015/05/29 23:46:33 UTC
svn commit: r1682557 - in /webservices/axiom/trunk: apidocs/pom.xml
src/site/apt/privacy-policy.apt src/site/site.xml
Author: veithen
Date: Fri May 29 21:46:32 2015
New Revision: 1682557
URL: http://svn.apache.org/r1682557
Log:
Add Google Analytics to site.
Added:
webservices/axiom/trunk/src/site/apt/privacy-policy.apt (with props)
Modified:
webservices/axiom/trunk/apidocs/pom.xml
webservices/axiom/trunk/src/site/site.xml
Modified: webservices/axiom/trunk/apidocs/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/apidocs/pom.xml?rev=1682557&r1=1682556&r2=1682557&view=diff
==============================================================================
--- webservices/axiom/trunk/apidocs/pom.xml (original)
+++ webservices/axiom/trunk/apidocs/pom.xml Fri May 29 21:46:32 2015
@@ -119,6 +119,59 @@
</configuration>
</plugin>
<plugin>
+ <groupId>org.codehaus.gmaven</groupId>
+ <artifactId>groovy-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-tracking-code</id>
+ <phase>site</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <source><![CDATA[
+ import javax.xml.parsers.*
+ import javax.xml.transform.*
+ import javax.xml.transform.dom.*
+ import javax.xml.transform.stream.*
+ import javax.xml.xpath.*
+
+ import groovy.io.FileType
+
+ def siteXml = new File(basedir, '../src/site/site.xml')
+ def javadocDir = new File(project.reporting.outputDirectory)
+
+ // Extract tracking code from site.xml
+ def builder = DocumentBuilderFactory.newInstance().newDocumentBuilder()
+ def xpath = XPathFactory.newInstance().newXPath()
+ def nodes = xpath.evaluate('/project/body/head/*', builder.parse(siteXml), XPathConstants.NODESET)
+ def transformer = TransformerFactory.newInstance().newTransformer()
+ transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, 'yes')
+ def sw = new StringWriter()
+ def result = new StreamResult(sw)
+ nodes.each({ node -> transformer.transform(new DOMSource(node), result) })
+ def trackingCode = sw.toString()
+
+ // Inject tracking code into Javadoc HTML files
+ javadocDir.eachFileRecurse(FileType.FILES, { file ->
+ if (file.name.endsWith('.html')) {
+ def lines = file.readLines('UTF-8')
+ def out = file.newPrintWriter('UTF-8')
+ lines.each({ line ->
+ if (line == '</head>') {
+ out.println(trackingCode)
+ }
+ out.println(line)
+ })
+ out.close()
+ }
+ })
+ ]]></source>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
Added: webservices/axiom/trunk/src/site/apt/privacy-policy.apt
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/src/site/apt/privacy-policy.apt?rev=1682557&view=auto
==============================================================================
--- webservices/axiom/trunk/src/site/apt/privacy-policy.apt (added)
+++ webservices/axiom/trunk/src/site/apt/privacy-policy.apt Fri May 29 21:46:32 2015
@@ -0,0 +1,47 @@
+~~ 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.
+
+ --------------
+ Privacy Policy
+ --------------
+
+Apache Axiom Privacy Policy
+
+ Information about your use of this website is collected using server access logs and a tracking
+ cookie. The collected information consists of the following:
+
+ [[1]] The IP address from which you access the website;
+
+ [[2]] The type of browser and operating system you use to access our site;
+
+ [[3]] The date and time you access our site;
+
+ [[4]] The pages you visit; and
+
+ [[5]] The addresses of pages from where you followed a link to our site.
+
+ Part of this information is gathered using a tracking cookie set by the Google Analytics service
+ and handled by Google as described in their {{{http://www.google.com/policies/privacy/partners/}privacy policy}}.
+ See your browser documentation for instructions on how to disable the cookie if you prefer not to
+ share this data with Google.
+
+ We use the gathered information to help us make our site more useful to visitors and to better
+ understand how and when our site is used. We do not track or collect personally identifiable
+ information or associate gathered data with any personally identifying information from other sources.
+
+ By using this website, you consent to the collection of this data in the manner and for the purpose
+ described above.
Propchange: webservices/axiom/trunk/src/site/apt/privacy-policy.apt
------------------------------------------------------------------------------
svn:eol-style = native
Modified: webservices/axiom/trunk/src/site/site.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/src/site/site.xml?rev=1682557&r1=1682556&r2=1682557&view=diff
==============================================================================
--- webservices/axiom/trunk/src/site/site.xml (original)
+++ webservices/axiom/trunk/src/site/site.xml Fri May 29 21:46:32 2015
@@ -23,6 +23,17 @@
<href>http://ws.apache.org/axiom/index.html</href>
</bannerLeft>
<body>
+ <head>
+ <script>
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+ ga('create', 'UA-56790914-3', {'cookieDomain': 'ws.apache.org', 'cookiePath': '/axiom' });
+ ga('send', 'pageview');
+ </script>
+ </head>
<menu name="About">
<item name="Introduction" href="index.html"/>
<item name="Mailing Lists" href="/mail-lists.html"/>
@@ -43,6 +54,7 @@
<item name="FAQ" href="faq.html"/>
<item name="View Source" href="http://svn.apache.org/viewvc/webservices/axiom/trunk/?root=Apache-SVN"/>
<item name="Code Coverage" href="code-coverage/index.html"/>
+ <item name="Privacy Policy" href="privacy-policy.html"/>
</menu>
</body>
</project>