[DOXIA-566] Upgrade dependences
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 @@
<!-- 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 @@
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.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 @@
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 @@
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 @@
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 @@
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 @@
<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 @@
<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 @@
<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 @@
<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.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 @@
+ "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 @@
<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 @@
<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 @@
<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 @@
<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>