diff --git a/spring-batch-core/src/main/resources/META-INF/spring.schemas b/spring-batch-core/src/main/resources/META-INF/spring.schemas index a75ad5775..df18c6979 100644 --- a/spring-batch-core/src/main/resources/META-INF/spring.schemas +++ b/spring-batch-core/src/main/resources/META-INF/spring.schemas @@ -1,4 +1,3 @@ -http\://www.springframework.org/schema/batch/spring-batch.xsd=/org/springframework/batch/core/configuration/xml/spring-batch-2.2.xsd -http\://www.springframework.org/schema/batch/spring-batch-2.2.xsd=/org/springframework/batch/core/configuration/xml/spring-batch-2.2.xsd +http\://www.springframework.org/schema/batch/spring-batch.xsd=/org/springframework/batch/core/configuration/xml/spring-batch-2.1.xsd http\://www.springframework.org/schema/batch/spring-batch-2.1.xsd=/org/springframework/batch/core/configuration/xml/spring-batch-2.1.xsd http\://www.springframework.org/schema/batch/spring-batch-2.0.xsd=/org/springframework/batch/core/configuration/xml/spring-batch-2.0.xsd \ No newline at end of file diff --git a/spring-batch-core/src/main/resources/org/springframework/batch/core/configuration/xml/spring-batch-2.1.xsd b/spring-batch-core/src/main/resources/org/springframework/batch/core/configuration/xml/spring-batch-2.1.xsd index 5bff17301..bb58e2cbb 100644 --- a/spring-batch-core/src/main/resources/org/springframework/batch/core/configuration/xml/spring-batch-2.1.xsd +++ b/spring-batch-core/src/main/resources/org/springframework/batch/core/configuration/xml/spring-batch-2.1.xsd @@ -286,6 +286,7 @@ ref" is not required, and only needs to be specified explicitly + @@ -623,13 +624,6 @@ ref" is not required, and only needs to be specified explicitly ]]> - - - - - + @@ -985,6 +980,16 @@ ref" is not required, and only needs to be specified explicitly + + + + + + + + diff --git a/spring-batch-core/src/main/resources/org/springframework/batch/core/configuration/xml/spring-batch-2.2.xsd b/spring-batch-core/src/main/resources/org/springframework/batch/core/configuration/xml/spring-batch-2.2.xsd deleted file mode 100644 index d50f6fdc8..000000000 --- a/spring-batch-core/src/main/resources/org/springframework/batch/core/configuration/xml/spring-batch-2.2.xsd +++ /dev/null @@ -1,1328 +0,0 @@ - - - - - - - - - - - - - - Defines a job composed of a set of steps and - transitions between steps. The job will be exposed in - the enclosing - bean factory as a component of type Job - that can be launched using a - JobLauncher. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Defines a stage in job processing backed by a - Step. The id attribute must be specified since this - step definition - will be referred to from other elements - to form a Job flow. - - - - - - - - - - - - - - - - - Defines a flow composed of a set of steps and - transitions between steps. - - - - - - - - - - - - - - - - - - A reference to a JobExecutionListener (or a POJO - if using before-job-method / after-job-method or - source level - annotations). - - - - - - - - - - - - - - - A bean definition for a step listener (or POJO if - using *-method attributes or source level - annotations) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Defines a stage in job processing backed by a - Step. The id attribute must be specified. The - step - requires either - a chunk definition, - a tasklet reference, or a reference to a - (possibly abstract) parent step. - - - - - - - - - - - - - - - - Declares job should split here into two or more - subflows. - - - - - - - - A subflow within a job, having the same - format as a job, but without a separate identity. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Declares job should include an externalized flow - here. - - - - - - - - - - - - - - - - - - - - - - Declares job should query a decider to determine - where execution should go next. - - - - - - - - - The decider is a reference to a - JobExecutionDecider that can produce a status to base - the next - transition on. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The tasklet is a reference to another bean - definition that implements - the Tasklet interface. - - - - - - - - - - If the tasklet is specified as a bean definition, then a method can be specified and a POJO - will - be adapted to the Tasklet interface. The method suggested should have the same arguments - as Tasklet.execute (or a subset), and have a compatible return type (boolean, void or RepeatStatus). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - An exception class name. - - - - - - - - - - - - - - - - - Classify an exception as "included" in the set. Exceptions of this type or a subclass are - included. - - - - - - - - - - - - - - - - Classify an exception as "excluded" from the - set. Exceptions of this type or a subclass are - excluded - - - - - - - - - - - - - - - A reference to a listener, a POJO with a - listener-annotated method, or a POJO with - a method - referenced by a - *-method attribute. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Defines a transition from this step to the - next - one depending on the value of the exit - status. - - - - - - A pattern to match against the exit status - code. Use * and ? as wildcard characters. When a - step finishes - the most - specific match will be chosen to select the next step. - Hint: - always include a default - transition with on="*". - - - - - - - The name of the step to go to next. Must - resolve to one of the other steps in this job. - - - - - - - - - Declares job should be stop at this point and - provides pointer where execution should continue - when - the job is - restarted. - - - - - - A pattern to match against the exit status - code. Use * and ? as wildcard characters. - When a step - finishes - the most specific match will be chosen to - select the next step. - - - - - - The name of the step to start on when the - stopped job is restarted. - Must resolve to one of the - other steps - in this job. - - - - - - - - - Declares job should end at this point, without - the possibility of restart. - BatchStatus will be - COMPLETED. - ExitStatus is configurable. - - - - - - A pattern to match against the exit status - code. Use * and ? as wildcard characters. - When a step - finishes - the most specific match will be chosen to - select the next step. - - - - - - The exit code value to end on, defaults to - COMPLETED. - - - - - - - - Declares job should fail at this point. - BatchStatus will be FAILED. ExitStatus is configurable. - - - - - - A pattern to match against the exit status - code. Use * and ? as wildcard characters. - When a step - finishes - the most specific match will be chosen to - select the next step. - - - - - - The exit code value to end on, defaults to - FAILED. - - - - - - - - - - - - - - - - - - - - - - - - - The name of the parent bean from which the - configuration should inherit. - - - - - - - - - - - - - Is this bean "abstract", that is, not meant to be - instantiated itself - but rather just serving as - parent for concrete - child bean definitions? - The default is "false". Specify "true" to - tell the bean factory to not - try - to instantiate that particular bean - in any case. - - Note: This attribute will not be inherited by child - bean definitions. - Hence, it needs to be specified per abstract bean - definition. - - - - - - - - - - Should this list be merged with the corresponding - list provided - by the parent? If not, it will - overwrite the parent - list. - - - - - - - - - - This attribute indicates the method from the - class that should - be used to dynamically create a - proxy. - - - - - - - - - - - - - diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/AbstractStepParserTest.java b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/AbstractStepParserTest.java new file mode 100644 index 000000000..f5381cc3b --- /dev/null +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/AbstractStepParserTest.java @@ -0,0 +1,28 @@ +package org.springframework.batch.core.configuration.xml; + +import static org.junit.Assert.assertTrue; + +import javax.annotation.Resource; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.batch.core.step.AbstractStep; +import org.springframework.context.ApplicationContext; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration +public class AbstractStepParserTest { + + @Resource + private ApplicationContext context; + + @Test + public void test() throws Exception { + //retrieve the step from the context and see that it's allow is set + AbstractStep abstractStep = context.getBean(AbstractStep.class); + assertTrue(abstractStep.isAllowStartIfComplete()); + } + +} diff --git a/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/AbstractStepParserTest-context.xml b/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/AbstractStepParserTest-context.xml new file mode 100644 index 000000000..e4290033b --- /dev/null +++ b/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/AbstractStepParserTest-context.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +