Issue
<bean id="fileDiffTaskelt" class="org.springframework.batch.core.step.tasklet.SystemCommandTasklet" scope="step">
<property name="command" value="diff #{jobParameters['INPUT_FILE']} #{jobParameters['PREVIOUS_FILE']} | grep -e '<' -e '>' | grep -x '.\{20\}' > #{jobParameters['FILTERED_FILE']}"/>
<property name="timeout" value="60000"/>
<property name="workingDirectory" value="/tmp/hub"/>
</bean>
I'm getting this error in my IDE : The value of attribute "value" associated with an element type "property" must not contain the '<' character. Im using this character in my grep command and is very essential, stuck here.
Solution
You can use Escape Strings
for the same.
Replace '<'
in value attribute as '<'
.
<property name="command" value="diff #{jobParameters['INPUT_FILE']}
#{jobParameters['PREVIOUS_FILE']} | grep -e '<' -e '>'
| grep -x '.\{20\}' > #{jobParameters['FILTERED_FILE']}"/>
Similarly use for appropriate escape strings
for '>'
Answered By - Rohan
Answer Checked By - Katrina (JavaFixing Volunteer)