You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by re...@apache.org on 2013/02/16 11:06:29 UTC

svn commit: r1446866 - /uima/sandbox/uimafit/trunk/uimafit-maven-plugin/src/it/default/verify.bsh

Author: rec
Date: Sat Feb 16 10:06:29 2013
New Revision: 1446866

URL: http://svn.apache.org/r1446866
Log:
[UIMA-2553] Maven plugin to generate component descriptors from uimaFIT annotations at build time
https://issues.apache.org/jira/browse/UIMA-2553
- Tell XMLUnit to ignore whitespace

Modified:
    uima/sandbox/uimafit/trunk/uimafit-maven-plugin/src/it/default/verify.bsh

Modified: uima/sandbox/uimafit/trunk/uimafit-maven-plugin/src/it/default/verify.bsh
URL: http://svn.apache.org/viewvc/uima/sandbox/uimafit/trunk/uimafit-maven-plugin/src/it/default/verify.bsh?rev=1446866&r1=1446865&r2=1446866&view=diff
==============================================================================
--- uima/sandbox/uimafit/trunk/uimafit-maven-plugin/src/it/default/verify.bsh (original)
+++ uima/sandbox/uimafit/trunk/uimafit-maven-plugin/src/it/default/verify.bsh Sat Feb 16 10:06:29 2013
@@ -3,6 +3,7 @@ import java.util.*;
 import java.util.regex.*;
 import org.apache.commons.io.*;
 import org.custommonkey.xmlunit.Diff;
+import org.custommonkey.xmlunit.XMLUnit;
 
 try
 {
@@ -11,7 +12,10 @@ try
 	String actual = IOUtils.toString(new File(basedir, 
 		"target/generated-sources/uimafit/TestAnnotator.xml").toURI().toURL());
 
-	Diff diff = new Diff(reference, actual);
+    // In a local build, I get indented XML but on the Apache Jenkins I get non-indented XML. This
+    // settings tells XMLUnit to ignore this difference in whitespace - rec 2013-02-16
+	XMLUnit.setIgnoreWhitespace(true);
+	Diff diff = XMLUnit.compareXML(reference, actual);
 
 	if (!diff.identical()) {
         System.out.println("Actual descriptor does not match expected descriptor: " + diff);