maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1060799 - /maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/xsd/AbstractXmlValidatorTest.java
Date Wed, 19 Jan 2011 12:59:25 GMT
Author: brett
Date: Wed Jan 19 12:59:25 2011
New Revision: 1060799

URL: http://svn.apache.org/viewvc?rev=1060799&view=rev
Log:
trying an alternate way of getting the path to get it working in Hudson. Note this is a Java
5 API - but it's only for testing.

Modified:
    maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/xsd/AbstractXmlValidatorTest.java

Modified: maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/xsd/AbstractXmlValidatorTest.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/xsd/AbstractXmlValidatorTest.java?rev=1060799&r1=1060798&r2=1060799&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/xsd/AbstractXmlValidatorTest.java
(original)
+++ maven/doxia/doxia/trunk/doxia-core/src/test/java/org/apache/maven/doxia/xsd/AbstractXmlValidatorTest.java
Wed Jan 19 12:59:25 2011
@@ -26,6 +26,7 @@ import java.io.Reader;
 import java.io.StringReader;
 import java.net.JarURLConnection;
 import java.net.URL;
+import java.net.URISyntaxException;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Enumeration;
@@ -246,8 +247,16 @@ public abstract class AbstractXmlValidat
         }
         else
         {
-            // IDE projects
-            File testDocsDir = FileUtils.toFile( testJar ).getParentFile();
+            // IDE projects - get parent directory of "doxia-site"
+            File testDocsDir;
+            try
+            {
+                testDocsDir = new File( testJar.toURI() ).getParentFile();
+            }
+            catch ( URISyntaxException e )
+            {
+                testDocsDir = new File( testJar.getPath() ).getParentFile();
+            }
 
             List files = FileUtils.getFiles( testDocsDir, "**/*.*", FileUtils.getDefaultExcludesAsString(),
true );
             for ( Iterator it = files.iterator(); it.hasNext();)



Mime
View raw message