RESOLVED - BATCH-981: Use Woodstox instead of ref impl of StaX

switched to woodstox-core-asl 4.0.6
This commit is contained in:
robokaso
2009-11-21 21:23:26 +00:00
parent c8f0680da4
commit b65a634d59
7 changed files with 25 additions and 52 deletions

View File

@@ -13,18 +13,6 @@
<relativePath>../spring-batch-parent</relativePath>
</parent>
<profiles>
<profile>
<id>tiger</id>
<activation>
<jdk>1.5</jdk>
</activation>
<dependencies>
<dependency>
<groupId>stax</groupId>
<artifactId>stax</artifactId>
</dependency>
</dependencies>
</profile>
<profile>
<id>default</id>
<activation>
@@ -133,6 +121,11 @@
<artifactId>xstream</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>woodstox-core-asl</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-oxm</artifactId>

View File

@@ -16,20 +16,6 @@
<version>2.1.0.CI-SNAPSHOT</version>
<relativePath>../spring-batch-parent</relativePath>
</parent>
<profiles>
<profile>
<id>tiger</id>
<activation>
<jdk>1.5</jdk>
</activation>
<dependencies>
<dependency>
<groupId>stax</groupId>
<artifactId>stax</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
<build>
<plugins>
<plugin>
@@ -180,6 +166,10 @@
<artifactId>spring-tx</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>woodstox-core-asl</artifactId>
</dependency>
</dependencies>
<reporting>
<plugins>

View File

@@ -88,8 +88,8 @@ public class MultiResourceItemWriterXmlTests extends AbstractMultiResourceItemWr
tested.update(executionContext);
tested.close();
assertEquals(xmlDocStart + "<prefix:4></prefix:4>" + xmlDocEnd, readFile(part2));
assertEquals(xmlDocStart + "<prefix:1></prefix:1><prefix:2></prefix:2><prefix:3></prefix:3>" + xmlDocEnd,
assertEquals(xmlDocStart + "<prefix:4/>" + xmlDocEnd, readFile(part2));
assertEquals(xmlDocStart + "<prefix:1/><prefix:2/><prefix:3/>" + xmlDocEnd,
readFile(part1));
tested.open(executionContext);
@@ -102,9 +102,9 @@ public class MultiResourceItemWriterXmlTests extends AbstractMultiResourceItemWr
tested.close();
assertEquals(xmlDocStart + "<prefix:4></prefix:4><prefix:5></prefix:5>" + xmlDocEnd, readFile(part2));
assertEquals(xmlDocStart + "<prefix:4/><prefix:5/>" + xmlDocEnd, readFile(part2));
assertEquals(xmlDocStart
+ "<prefix:6></prefix:6><prefix:7></prefix:7><prefix:8></prefix:8><prefix:9></prefix:9>" + xmlDocEnd,
+ "<prefix:6/><prefix:7/><prefix:8/><prefix:9/>" + xmlDocEnd,
readFile(part3));
}

View File

@@ -176,7 +176,7 @@ public class StaxEventItemWriterTests {
writer.open(executionContext);
writer.write(items);
String content = outputFileContent();
assertTrue("Wrong content: " + content, content.contains(("<header></header>")));
assertTrue("Wrong content: " + content, content.contains(("<header/>")));
assertTrue("Wrong content: " + content, content.contains(TEST_STRING));
}
@@ -240,8 +240,8 @@ public class StaxEventItemWriterTests {
String content = outputFileContent();
assertTrue(content.contains("<testroot attribute=\"value\">"));
assertTrue(content.contains("<header></header>"));
assertTrue(content.contains("<footer></footer>"));
assertTrue(content.contains("<header/>"));
assertTrue(content.contains("<footer/>"));
assertTrue(content.endsWith("</testroot>"));
}

View File

@@ -141,7 +141,7 @@ public class TransactionalStaxEventItemWriterTests {
});
writer.close();
String content = outputFileContent();
assertEquals("Wrong content: " + content, 1, StringUtils.countOccurrencesOf(content, ("<header></header>")));
assertEquals("Wrong content: " + content, 1, StringUtils.countOccurrencesOf(content, ("<header/>")));
assertEquals("Wrong content: " + content, 1, StringUtils.countOccurrencesOf(content, TEST_STRING));
}
@@ -199,7 +199,7 @@ public class TransactionalStaxEventItemWriterTests {
}
writer.close();
String content = outputFileContent();
assertEquals("Wrong content: " + content, 1, StringUtils.countOccurrencesOf(content, ("<header></header>")));
assertEquals("Wrong content: " + content, 1, StringUtils.countOccurrencesOf(content, ("<header/>")));
assertEquals("Wrong content: " + content, 1, StringUtils.countOccurrencesOf(content, TEST_STRING));
}

View File

@@ -288,9 +288,9 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>stax</groupId>
<artifactId>stax</artifactId>
<version>1.2.0</version>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>woodstox-core-asl</artifactId>
<version>4.0.6</version>
<optional>true</optional>
</dependency>
<dependency>

View File

@@ -16,20 +16,6 @@
<!-- Override this with -Denvironment=XXXX to change database type -->
<environment>hsql</environment>
</properties>
<profiles>
<profile>
<id>tiger</id>
<activation>
<jdk>1.5</jdk>
</activation>
<dependencies>
<dependency>
<groupId>stax</groupId>
<artifactId>stax</artifactId>
</dependency>
</dependencies>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>org.springframework.batch</groupId>
@@ -128,6 +114,10 @@
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>woodstox-core-asl</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>