[maven-doxia] branch master updated: [DOXIA-566] Upgrade dependences

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[maven-doxia] branch master updated: [DOXIA-566] Upgrade dependences

hboutemy
This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-doxia.git


The following commit(s) were added to refs/heads/master by this push:
     new 304c6f4  [DOXIA-566] Upgrade dependences
304c6f4 is described below

commit 304c6f49e8ead22a7e3f77f4e6dbe3547c92b2e4
Author: Sylwester Lachiewicz <[hidden email]>
AuthorDate: Wed Nov 29 00:59:56 2017 +0100

    [DOXIA-566] Upgrade dependences
---
 doxia-core/pom.xml                                 | 11 ++++++---
 .../org/apache/maven/doxia/AbstractModuleTest.java | 12 ++++++++++
 .../maven/doxia/sink/impl/AbstractSinkTest.java    | 25 +++++++++-----------
 doxia-modules/doxia-module-apt/pom.xml             | 10 ++++++++
 doxia-modules/doxia-module-docbook-simple/pom.xml  | 10 ++++++++
 doxia-modules/doxia-module-fo/pom.xml              | 14 +++++++++--
 .../maven/doxia/module/fo/FoAggregateSinkTest.java |  8 +++----
 doxia-modules/doxia-module-latex/pom.xml           | 10 ++++++++
 doxia-modules/doxia-module-xdoc/pom.xml            | 10 ++++++++
 doxia-modules/doxia-module-xhtml/pom.xml           | 10 ++++++++
 pom.xml                                            | 27 +++++++++++++++++++---
 11 files changed, 121 insertions(+), 26 deletions(-)

diff --git a/doxia-core/pom.xml b/doxia-core/pom.xml
index 7b3ce1f..371e56a 100644
--- a/doxia-core/pom.xml
+++ b/doxia-core/pom.xml
@@ -72,9 +72,14 @@ under the License.
 
     <!-- test -->
     <dependency>
-      <groupId>xmlunit</groupId>
-      <artifactId>xmlunit</artifactId>
-      <version>1.5</version>
+      <groupId>org.xmlunit</groupId>
+      <artifactId>xmlunit-core</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.xmlunit</groupId>
+      <artifactId>xmlunit-matchers</artifactId>
+      <scope>test</scope>
     </dependency>
 
   </dependencies>
diff --git a/doxia-core/src/test/java/org/apache/maven/doxia/AbstractModuleTest.java b/doxia-core/src/test/java/org/apache/maven/doxia/AbstractModuleTest.java
index 997d3b4..396fa6e 100644
--- a/doxia-core/src/test/java/org/apache/maven/doxia/AbstractModuleTest.java
+++ b/doxia-core/src/test/java/org/apache/maven/doxia/AbstractModuleTest.java
@@ -102,6 +102,18 @@ public abstract class AbstractModuleTest
         return getXmlTestWriter( baseName, outputExtension() );
     }
 
+    protected static String normalizeLineEnds( String s )
+    {
+        if ( s != null )
+        {
+            return s.replaceAll( "\r\n", "\n" ).replaceAll( "\r", "\n" );
+        }
+        else
+        {
+            return null;
+        }
+    }
+
     /**
      * Returns an XML FileWriter to write to a file with the given name
      * in the test target output directory.
diff --git a/doxia-core/src/test/java/org/apache/maven/doxia/sink/impl/AbstractSinkTest.java b/doxia-core/src/test/java/org/apache/maven/doxia/sink/impl/AbstractSinkTest.java
index 4a5baca..4fb1d7f 100644
--- a/doxia-core/src/test/java/org/apache/maven/doxia/sink/impl/AbstractSinkTest.java
+++ b/doxia-core/src/test/java/org/apache/maven/doxia/sink/impl/AbstractSinkTest.java
@@ -27,11 +27,11 @@ import org.apache.maven.doxia.AbstractModuleTest;
 import org.apache.maven.doxia.logging.PlexusLoggerWrapper;
 import org.apache.maven.doxia.sink.Sink;
 import org.apache.maven.doxia.sink.SinkEventAttributes;
-import org.apache.maven.doxia.sink.impl.SinkEventAttributeSet;
 import org.codehaus.plexus.DefaultPlexusContainer;
 import org.codehaus.plexus.util.IOUtil;
-import org.custommonkey.xmlunit.Diff;
-import org.custommonkey.xmlunit.XMLUnit;
+import org.xmlunit.matchers.CompareMatcher;
+
+import static org.junit.Assert.assertThat;
 
 /**
  * Abstract base class to test sinks.
@@ -207,8 +207,8 @@ public abstract class AbstractSinkTest
         sink.flush();
         sink.close();
 
-        String actual = testWriter.toString();
-        String expected = getHeadBlock();
+        String actual = normalizeLineEnds( testWriter.toString() );
+        String expected = normalizeLineEnds( getHeadBlock() );
 
         assertEquals( "Wrong head!", expected, actual );
     }
@@ -470,12 +470,11 @@ public abstract class AbstractSinkTest
 
         if ( isXmlSink() )
         {
-            Diff diff = XMLUnit.compareXML( wrapXml( expected ), wrapXml( actual ) );
-            assertTrue( "Wrong figure!", diff.identical() );
+            assertThat ( wrapXml( actual ), CompareMatcher.isIdenticalTo( wrapXml( expected ) ));
         }
         else
         {
-            assertEquals( "Wrong figure!", expected, actual );
+            assertEquals( actual, expected );
         }
     }
 
@@ -494,12 +493,11 @@ public abstract class AbstractSinkTest
 
         if ( isXmlSink() )
         {
-            Diff diff = XMLUnit.compareXML( wrapXml( expected ), wrapXml( actual ) );
-            assertTrue( "Wrong figure!", diff.identical() );
+            assertThat ( wrapXml( actual ), CompareMatcher.isIdenticalTo( wrapXml( expected ) ));
         }
         else
         {
-            assertEquals( "Wrong figure!", expected, actual );
+            assertEquals( actual, expected );
         }
     }
 
@@ -536,12 +534,11 @@ public abstract class AbstractSinkTest
 
         if ( isXmlSink() )
         {
-            Diff diff = XMLUnit.compareXML( wrapXml( expected ), wrapXml( actual ) );
-            assertTrue( "Wrong table!", diff.identical() );
+            assertThat ( wrapXml( actual ), CompareMatcher.isIdenticalTo( wrapXml( expected ) ));
         }
         else
         {
-            assertEquals( "Wrong table!", expected, actual );
+            assertEquals( actual, expected );
         }
     }
 
diff --git a/doxia-modules/doxia-module-apt/pom.xml b/doxia-modules/doxia-module-apt/pom.xml
index c3e5a04..4e9308d 100644
--- a/doxia-modules/doxia-module-apt/pom.xml
+++ b/doxia-modules/doxia-module-apt/pom.xml
@@ -46,5 +46,15 @@ under the License.
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.xmlunit</groupId>
+      <artifactId>xmlunit-core</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.xmlunit</groupId>
+      <artifactId>xmlunit-matchers</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 </project>
\ No newline at end of file
diff --git a/doxia-modules/doxia-module-docbook-simple/pom.xml b/doxia-modules/doxia-module-docbook-simple/pom.xml
index 281ba5e..cdc930b 100644
--- a/doxia-modules/doxia-module-docbook-simple/pom.xml
+++ b/doxia-modules/doxia-module-docbook-simple/pom.xml
@@ -42,5 +42,15 @@ under the License.
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.xmlunit</groupId>
+      <artifactId>xmlunit-core</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.xmlunit</groupId>
+      <artifactId>xmlunit-matchers</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 </project>
diff --git a/doxia-modules/doxia-module-fo/pom.xml b/doxia-modules/doxia-module-fo/pom.xml
index dfebdfe..056eee3 100644
--- a/doxia-modules/doxia-module-fo/pom.xml
+++ b/doxia-modules/doxia-module-fo/pom.xml
@@ -78,7 +78,7 @@ under the License.
     <dependency>
       <groupId>commons-collections</groupId>
       <artifactId>commons-collections</artifactId>
-      <version>3.2.1</version>
+      <version>3.2.2</version>
       <!-- runtime dependency for commons-configuration -->
       <scope>runtime</scope>
     </dependency>
@@ -90,10 +90,20 @@ under the License.
     <dependency>
       <groupId>log4j</groupId>
       <artifactId>log4j</artifactId>
-      <version>1.2.12</version>
+      <version>1.2.17</version>
       <!-- runtime dep for fop -->
       <scope>runtime</scope>
     </dependency>
+    <dependency>
+      <groupId>org.xmlunit</groupId>
+      <artifactId>xmlunit-core</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.xmlunit</groupId>
+      <artifactId>xmlunit-matchers</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
   <build>
diff --git a/doxia-modules/doxia-module-fo/src/test/java/org/apache/maven/doxia/module/fo/FoAggregateSinkTest.java b/doxia-modules/doxia-module-fo/src/test/java/org/apache/maven/doxia/module/fo/FoAggregateSinkTest.java
index bd07c7d..9e6792e 100644
--- a/doxia-modules/doxia-module-fo/src/test/java/org/apache/maven/doxia/module/fo/FoAggregateSinkTest.java
+++ b/doxia-modules/doxia-module-fo/src/test/java/org/apache/maven/doxia/module/fo/FoAggregateSinkTest.java
@@ -30,11 +30,12 @@ import org.apache.maven.doxia.document.DocumentCover;
 import org.apache.maven.doxia.document.DocumentModel;
 import org.apache.maven.doxia.markup.Markup;
 import org.codehaus.plexus.util.WriterFactory;
-import org.custommonkey.xmlunit.Diff;
-import org.custommonkey.xmlunit.XMLUnit;
 import org.xml.sax.SAXParseException;
 
 import junit.framework.TestCase;
+import org.xmlunit.matchers.CompareMatcher;
+
+import static org.junit.Assert.assertThat;
 
 /**
  * Test FoAggregateSink.
@@ -184,8 +185,7 @@ public class FoAggregateSinkTest
                         + "width=\"100%\"/>" + Markup.EOL;
         String actual = writer.toString();
 
-        Diff diff = XMLUnit.compareXML( wrapXml( expected ), wrapXml( actual ) );
-        assertTrue( "Wrong figure!", diff.identical() );
+        assertThat ( wrapXml( actual ), CompareMatcher.isIdenticalTo( wrapXml( expected ) ));
     }
 
     /**
diff --git a/doxia-modules/doxia-module-latex/pom.xml b/doxia-modules/doxia-module-latex/pom.xml
index 5f42dff..c1c9d3e 100644
--- a/doxia-modules/doxia-module-latex/pom.xml
+++ b/doxia-modules/doxia-module-latex/pom.xml
@@ -42,5 +42,15 @@ under the License.
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.xmlunit</groupId>
+      <artifactId>xmlunit-core</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.xmlunit</groupId>
+      <artifactId>xmlunit-matchers</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 </project>
\ No newline at end of file
diff --git a/doxia-modules/doxia-module-xdoc/pom.xml b/doxia-modules/doxia-module-xdoc/pom.xml
index 7c3b9b4..05d82d4 100644
--- a/doxia-modules/doxia-module-xdoc/pom.xml
+++ b/doxia-modules/doxia-module-xdoc/pom.xml
@@ -49,6 +49,16 @@ under the License.
       <artifactId>doxia-test-docs</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.xmlunit</groupId>
+      <artifactId>xmlunit-core</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.xmlunit</groupId>
+      <artifactId>xmlunit-matchers</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
   <build>
diff --git a/doxia-modules/doxia-module-xhtml/pom.xml b/doxia-modules/doxia-module-xhtml/pom.xml
index 355e191..85d710a 100644
--- a/doxia-modules/doxia-module-xhtml/pom.xml
+++ b/doxia-modules/doxia-module-xhtml/pom.xml
@@ -42,5 +42,15 @@ under the License.
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.xmlunit</groupId>
+      <artifactId>xmlunit-core</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.xmlunit</groupId>
+      <artifactId>xmlunit-matchers</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 </project>
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 780ae8a..d97bb21 100644
--- a/pom.xml
+++ b/pom.xml
@@ -176,24 +176,45 @@ under the License.
         <version>${project.version}</version>
       </dependency>
 
+      <!-- test -->
+      <dependency>
+          <groupId>org.xmlunit</groupId>
+          <artifactId>xmlunit-core</artifactId>
+          <version>2.5.1</version>
+          <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.xmlunit</groupId>
+        <artifactId>xmlunit-matchers</artifactId>
+        <version>2.5.1</version>
+        <scope>test</scope>
+      </dependency>
+
       <!-- Plexus -->
       <dependency>
         <groupId>org.codehaus.plexus</groupId>
         <artifactId>plexus-container-default</artifactId>
-        <version>1.5.5</version>
+        <version>1.7.1</version>
       </dependency>
       <dependency>
         <groupId>org.codehaus.plexus</groupId>
+        <artifactId>plexus-component-annotations</artifactId>
+        <version>1.7.1</version>
+      </dependency>
+
+      <dependency>
+        <groupId>org.codehaus.plexus</groupId>
         <artifactId>plexus-utils</artifactId>
-        <version>3.0.24</version>
+        <version>3.1.0</version>
       </dependency>
     </dependencies>
   </dependencyManagement>
+
   <dependencies>
     <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
-      <version>4.11</version>
+      <version>4.12</version>
       <scope>test</scope>
     </dependency>
   </dependencies>

--
To stop receiving notification emails like this one, please contact
['"[hidden email]" <[hidden email]>'].