xinvoice/test/assets/eInvoicing-EN16931/update-xslt-and-validate.sh

24 lines
778 B
Bash
Raw Normal View History

2025-03-17 17:14:46 +00:00
#!/bin/sh
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-13.jdk/Contents/Home
export PATH=/opt/apache-maven-3.6.2/bin:$PATH
# preprocess first - catches errors quicker
mvn -f pom-preprocess.xml generate-resources || exit 1
# convert to XSLT
mvn -f pom-xslt-preprocessed.xml process-resources || exit 1
# adopt filenames
rm cii/xslt/EN16931-CII-validation.xslt
mv cii/xslt/EN16931-CII-validation-preprocessed.xslt cii/xslt/EN16931-CII-validation.xslt
rm ubl/xslt/EN16931-UBL-validation.xslt
mv ubl/xslt/EN16931-UBL-validation-preprocessed.xslt ubl/xslt/EN16931-UBL-validation.xslt
# Add license headers to all relevant files
mvn -f pom-license.xml license:format || exit 1
# validate afterwards
mvn -f pom-validate.xml validate || exit 1
echo "Successfully done"