Updated Branches: refs/heads/trunk 3345e6ca2 -> c643e7f63
Make sure we test the examples/conf broker xml files. Project: http://git-wip-us.apache.org/repos/asf/activemq/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/c643e7f6 Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/c643e7f6 Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/c643e7f6 Branch: refs/heads/trunk Commit: c643e7f631ff68f3fdaeaa5d99abf6f658c13e38 Parents: 3345e6c Author: Hiram Chirino <[email protected]> Authored: Thu Oct 10 12:19:06 2013 -0400 Committer: Hiram Chirino <[email protected]> Committed: Thu Oct 10 12:19:06 2013 -0400 ---------------------------------------------------------------------- assembly/pom.xml | 2 +- .../apache/activemq/config/ValidateXMLConfigTest.java | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq/blob/c643e7f6/assembly/pom.xml ---------------------------------------------------------------------- diff --git a/assembly/pom.xml b/assembly/pom.xml index a8b9d96..a37aa45 100755 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -551,7 +551,7 @@ <directory>src/release/conf</directory> </resource> <resource> - <directory>src/sample-conf</directory> + <directory>src/release/examples/conf</directory> </resource> </resources> </configuration> http://git-wip-us.apache.org/repos/asf/activemq/blob/c643e7f6/assembly/src/test/java/org/apache/activemq/config/ValidateXMLConfigTest.java ---------------------------------------------------------------------- diff --git a/assembly/src/test/java/org/apache/activemq/config/ValidateXMLConfigTest.java b/assembly/src/test/java/org/apache/activemq/config/ValidateXMLConfigTest.java index 92f5a17..11accb0 100755 --- a/assembly/src/test/java/org/apache/activemq/config/ValidateXMLConfigTest.java +++ b/assembly/src/test/java/org/apache/activemq/config/ValidateXMLConfigTest.java @@ -22,6 +22,7 @@ import java.io.File; import java.io.FileFilter; import java.io.IOException; import java.io.InputStream; +import java.util.HashSet; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; @@ -32,6 +33,7 @@ import org.xml.sax.ErrorHandler; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; +import scala.actors.threadpool.Arrays; public class ValidateXMLConfigTest { @@ -48,12 +50,16 @@ public class ValidateXMLConfigTest { public void validateExampleConfig() throws Exception { // resource:copy-resource brings all config files into target/conf File sampleConfDir = new File("target/conf"); - + + final HashSet<String> skipped = new HashSet<String>(Arrays.asList(new String[]{ + "resin-web.xml", "web.xml" + })); + for (File xmlFile : sampleConfDir.listFiles(new FileFilter() { public boolean accept(File pathname) { - return pathname.isFile() && pathname.getName().endsWith("xml"); + return pathname.isFile() && pathname.getName().endsWith("xml") && !skipped.contains(pathname.getName()); }})) { - + validateXML(xmlFile); } }
