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 2016/02/28 11:02:06 UTC

svn commit: r1732710 - in /webservices/axiom/trunk: ./ buildutils/javadoc-postprocessor-plugin/ buildutils/javadoc-postprocessor-plugin/src/main/java/org/apache/axiom/buildutils/javadoc/ implementations/fom-impl/ src/site/ testing/xml-truth/src/site/ma...

Author: veithen
Date: Sun Feb 28 10:02:05 2016
New Revision: 1732710

URL: http://svn.apache.org/viewvc?rev=1732710&view=rev
Log:
Upgrade to maven-site-plugin 3.5 and maven-fluido-skin 1.5 to enable snippets in Markdown.

Modified:
    webservices/axiom/trunk/   (props changed)
    webservices/axiom/trunk/buildutils/javadoc-postprocessor-plugin/pom.xml
    webservices/axiom/trunk/buildutils/javadoc-postprocessor-plugin/src/main/java/org/apache/axiom/buildutils/javadoc/PostProcessMojo.java
    webservices/axiom/trunk/implementations/fom-impl/   (props changed)
    webservices/axiom/trunk/pom.xml
    webservices/axiom/trunk/src/site/site.xml
    webservices/axiom/trunk/testing/xml-truth/src/site/markdown/index.md.vm
    webservices/axiom/trunk/testing/xml-truth/src/test/java/org/apache/axiom/truth/xml/XMLSubjectTest.java

Propchange: webservices/axiom/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 28 10:02:05 2016
@@ -8,7 +8,9 @@
 /webservices/axiom/branches/CHECK_PARENT_BUG:1338398-1338886
 /webservices/axiom/branches/CLONE:1337822-1339011
 /webservices/axiom/branches/CLONE_NODE:1346607-1353106
+/webservices/axiom/branches/DOXIA-492:1715574-1716528
 /webservices/axiom/branches/JAXB2_DS:1366463-1367737
 /webservices/axiom/branches/attrs-aspects:1685218-1686663
+/webservices/axiom/branches/maven-site-plugin-3.5:1731125-1732708
 /webservices/axiom/branches/namespaceURIInterning:1293148-1293587
 /webservices/axiom/branches/osgi-redesign:1180368-1180596

Modified: webservices/axiom/trunk/buildutils/javadoc-postprocessor-plugin/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/buildutils/javadoc-postprocessor-plugin/pom.xml?rev=1732710&r1=1732709&r2=1732710&view=diff
==============================================================================
--- webservices/axiom/trunk/buildutils/javadoc-postprocessor-plugin/pom.xml (original)
+++ webservices/axiom/trunk/buildutils/javadoc-postprocessor-plugin/pom.xml Sun Feb 28 10:02:05 2016
@@ -33,7 +33,7 @@
 
     <properties>
         <maven.version>3.0</maven.version>
-        <doxia.version>1.6</doxia.version>
+        <doxia.version>1.7</doxia.version>
     </properties>
 
     <dependencyManagement>

Modified: webservices/axiom/trunk/buildutils/javadoc-postprocessor-plugin/src/main/java/org/apache/axiom/buildutils/javadoc/PostProcessMojo.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/buildutils/javadoc-postprocessor-plugin/src/main/java/org/apache/axiom/buildutils/javadoc/PostProcessMojo.java?rev=1732710&r1=1732709&r2=1732710&view=diff
==============================================================================
--- webservices/axiom/trunk/buildutils/javadoc-postprocessor-plugin/src/main/java/org/apache/axiom/buildutils/javadoc/PostProcessMojo.java (original)
+++ webservices/axiom/trunk/buildutils/javadoc-postprocessor-plugin/src/main/java/org/apache/axiom/buildutils/javadoc/PostProcessMojo.java Sun Feb 28 10:02:05 2016
@@ -26,7 +26,6 @@ import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
-import java.io.StringWriter;
 import java.util.List;
 
 import org.apache.maven.artifact.repository.ArtifactRepository;
@@ -41,10 +40,6 @@ import org.apache.maven.plugins.annotati
 import org.apache.maven.plugins.annotations.Parameter;
 import org.apache.maven.project.MavenProject;
 import org.codehaus.plexus.util.DirectoryScanner;
-import org.codehaus.plexus.util.xml.PrettyPrintXMLWriter;
-import org.codehaus.plexus.util.xml.XMLWriter;
-import org.codehaus.plexus.util.xml.Xpp3Dom;
-import org.codehaus.plexus.util.xml.Xpp3DomWriter;
 
 @Mojo(name="post-process")
 public class PostProcessMojo extends AbstractMojo {
@@ -76,20 +71,13 @@ public class PostProcessMojo extends Abs
     public void execute() throws MojoExecutionException, MojoFailureException {
         DecorationModel decorationModel;
         try {
-            decorationModel = siteTool.getDecorationModel(project, reactorProjects, localRepository, repositories,
-                    siteTool.getRelativePath(siteDirectory.getAbsolutePath(), project.getBasedir().getAbsolutePath()),
-                    siteTool.getAvailableLocales(locales).get(0));
+            decorationModel = siteTool.getDecorationModel(siteDirectory,
+                    siteTool.getSiteLocales(locales).get(0),
+                    project, reactorProjects, localRepository, repositories);
         } catch (SiteToolException ex) {
             throw new MojoExecutionException("SiteToolException: " + ex.getMessage(), ex);
         }
-        StringWriter sw = new StringWriter();
-        XMLWriter xmlWriter = new PrettyPrintXMLWriter(sw, null, null);
-        for (Xpp3Dom element : ((Xpp3Dom)decorationModel.getBody().getHead()).getChildren()) {
-            // Turn off escaping in scripts. Note that this mimics the behavior in the default-site.vm
-            // template in doxia-site-renderer.
-            Xpp3DomWriter.write(xmlWriter, element, !element.getName().equals("script"));
-        }
-        String headElements = sw.toString();
+        String head = decorationModel.getBody().getHead();
         DirectoryScanner ds = new DirectoryScanner();
         ds.setIncludes(new String[] { "**/*.html" });
         ds.setBasedir(javadocDirectory);
@@ -106,7 +94,7 @@ public class PostProcessMojo extends Abs
                         String line;
                         while ((line = in.readLine()) != null) {
                             if (line.equals("</head>")) {
-                                out.println(headElements);
+                                out.println(head);
                             }
                             out.println(line);
                         }

Propchange: webservices/axiom/trunk/implementations/fom-impl/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Feb 28 10:02:05 2016
@@ -1 +1,2 @@
 /abdera/java/branches/axiom-upgrade/parser:1371877-1374810
+/webservices/axiom/branches/maven-site-plugin-3.5/implementations/fom-impl:1731125-1732708

Modified: webservices/axiom/trunk/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/pom.xml?rev=1732710&r1=1732709&r2=1732710&view=diff
==============================================================================
--- webservices/axiom/trunk/pom.xml (original)
+++ webservices/axiom/trunk/pom.xml Sun Feb 28 10:02:05 2016
@@ -660,7 +660,7 @@
                 </plugin>
                 <plugin>
                     <artifactId>maven-site-plugin</artifactId>
-                    <version>3.4</version>
+                    <version>3.5</version>
                 </plugin>
                 <plugin>
                     <artifactId>maven-assembly-plugin</artifactId>
@@ -1109,6 +1109,7 @@
             </plugin>
             <plugin>
                 <artifactId>maven-site-plugin</artifactId>
+                <version>3.5</version>
                 <executions>
                     <execution>
                         <id>default-site</id>
@@ -1131,6 +1132,20 @@
                         </configuration>
                     </execution>
                 </executions>
+                <dependencies>
+                    <dependency>
+                        <!-- Needed because the Apache parent POM declares a dependency on version 1.6 -->
+                        <groupId>org.apache.maven.doxia</groupId>
+                        <artifactId>doxia-core</artifactId>
+                        <version>1.7</version>
+                        <exclusions>
+                            <exclusion>
+                                <artifactId>xercesImpl</artifactId>
+                                <groupId>xerces</groupId>
+                            </exclusion>
+                        </exclusions>
+                    </dependency>
+                </dependencies>
             </plugin>
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>

Modified: webservices/axiom/trunk/src/site/site.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/src/site/site.xml?rev=1732710&r1=1732709&r2=1732710&view=diff
==============================================================================
--- webservices/axiom/trunk/src/site/site.xml (original)
+++ webservices/axiom/trunk/src/site/site.xml Sun Feb 28 10:02:05 2016
@@ -18,6 +18,11 @@
   ~ under the License.
   -->
 <project name="Axiom">
+    <skin>
+        <groupId>org.apache.maven.skins</groupId>
+        <artifactId>maven-fluido-skin</artifactId>
+        <version>1.5</version>
+    </skin>
     <bannerLeft>
         <name>Apache Axiom</name>
         <src>images/logo.png</src>
@@ -25,12 +30,14 @@
     </bannerLeft>
     <body>
         <head>
+            <![CDATA[
             <script async='' src='//www.google-analytics.com/analytics.js'> </script>
             <script>
               window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
               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"/>

Modified: webservices/axiom/trunk/testing/xml-truth/src/site/markdown/index.md.vm
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/xml-truth/src/site/markdown/index.md.vm?rev=1732710&r1=1732709&r2=1732710&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/xml-truth/src/site/markdown/index.md.vm (original)
+++ webservices/axiom/trunk/testing/xml-truth/src/site/markdown/index.md.vm Sun Feb 28 10:02:05 2016
@@ -49,8 +49,4 @@ By default, comparison is strict. E.g. t
 To control how the comparison is performed, use the relevant methods on the
 [`XMLSubject`](apidocs/org/apache/axiom/truth/xml/XMLSubject.html) object returned by `that()`:
 
-    assertAbout(xml())
-            .that("<p:a xmlns:p='urn:ns'/>")
-            .ignoringNamespacePrefixes()
-            .ignoringNamespaceDeclarations()
-            .hasSameContentAs("<a xmlns='urn:ns'/>");
+<!-- MACRO{snippet|id=sample|file=${project.basedir}/src/test/java/org/apache/axiom/truth/xml/XMLSubjectTest.java} -->

Modified: webservices/axiom/trunk/testing/xml-truth/src/test/java/org/apache/axiom/truth/xml/XMLSubjectTest.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/xml-truth/src/test/java/org/apache/axiom/truth/xml/XMLSubjectTest.java?rev=1732710&r1=1732709&r2=1732710&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/xml-truth/src/test/java/org/apache/axiom/truth/xml/XMLSubjectTest.java (original)
+++ webservices/axiom/trunk/testing/xml-truth/src/test/java/org/apache/axiom/truth/xml/XMLSubjectTest.java Sun Feb 28 10:02:05 2016
@@ -42,11 +42,13 @@ public class XMLSubjectTest {
     
     @Test
     public void testIgnoringNamespaceDeclarationsAndPrefixes() {
+        // START SNIPPET: sample
         assertAbout(xml())
                 .that("<p:a xmlns:p='urn:ns'/>")
                 .ignoringNamespacePrefixes()
                 .ignoringNamespaceDeclarations()
                 .hasSameContentAs("<a xmlns='urn:ns'/>");
+        // END SNIPPET: sample
     }
     
     @Test