Closed stefan-jung closed 5 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
~@xephon2 I'm closing this in favour of https://github.com/phax/ph-schematron/issues/50 (see my last comment there)~
Sorry, the previous comment was crap. Nevertheless it is fixed in 5.0.11 release.
Hey,
are you sure, this was fixed correctly?
My result for ph-schematron-ant-task-5.0.8-jar-with-dependencies.jar
was:
Buildfile: C:\Users\Nico\Desktop\tests\ant\schematron\ph-schematron-usage\build.xml
db.common.validation.schematron:
[schematron] Successfully parsed Schematron file 'C:\Users\Nico\Desktop\tests\ant\schematron\ph-schematron-usage\test.sch'
[schematron] Validating XML file 'C:\Users\Nico\Desktop\tests\ant\schematron\ph-schematron-usage\test.xml' against Schematron rules from 'test.sch' expecting success
[schematron] [main] INFO com.helger.jaxb.JAXBContextCache - Creating JAXB context for package org.oclc.purl.dsdl.svrl using ClassLoader sun.misc.Launcher$AppClassLoader@5c647e05
BUILD FAILED
C:\Users\Nico\Desktop\tests\ant\schematron\ph-schematron-usage\build.xml:19: 1 Schematron error for XML file 'C:\Users\Nico\Desktop\tests\ant\schematron\ph-schematron-usage\test.xml'
[error] in /foo @ C:\Users\Nico\Desktop\tests\ant\schematron\ph-schematron-usage\test.xml foo should contain bar.
Total time: 2 seconds
With ph-schematron-ant-task-5.1.0-jar-with-dependencies.jar
I'm getting now this:
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre1.8.0_211\lib\tools.jar
Buildfile: C:\Users\Nico\Desktop\tests\ant\schematron\ph-schematron-usage\build.xml
db.common.validation.schematron:
[schematron] Successfully parsed Schematron file 'C:\Users\Nico\Desktop\tests\ant\schematron\ph-schematron-usage\test.sch'
[schematron] Validating XML file 'C:\Users\Nico\Desktop\tests\ant\schematron\ph-schematron-usage\test.xml' against Schematron rules from 'test.sch' expecting success
[schematron] [main] INFO com.helger.jaxb.JAXBContextCache - Creating JAXB context for package org.oclc.purl.dsdl.svrl using ClassLoader sun.misc.Launcher$AppClassLoader@5c647e05
BUILD FAILED
C:\Users\Nico\Desktop\tests\ant\schematron\ph-schematron-usage\build.xml:19: 1 Schematron error for XML file 'C:\Users\Nico\Desktop\tests\ant\schematron\ph-schematron-usage\test.xml'
Total time: 2 seconds
So the log is gone (or only in my case?). Do I have to change something in ant?
Btw, this is my ant script:
<project basedir="." name="ph-schematron test" default="db.common.validation.schematron">
<taskdef name="schematron" classname="com.helger.schematron.ant.Schematron">
<classpath>
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
</classpath>
</taskdef>
<target name="db.common.validation.schematron">
<schematron schematronFile="test.sch" expectSuccess="true" failonerror="true">
<file file="test.xml"/>
</schematron>
</target>
</project>
Background infos:
Apache Ant(TM) version 1.10.6 compiled on May 2 2019
1.8.0_211
You are right - my bad :( 5.1.1 is on it's way.
Great, now it works. Thanks for the really fast reaction!
Hi,
It seems, that
[warning]
messages are not echoed. I'm using the enginepure
with Apache Ant. I'd expect, that all fatals, errors, warnings and infos are reported as[error]
.Could you please implement that?
Greetings, Stefan