ZUGFeRD / mustangproject

Open Source Java e-Invoicing library, validator and tool (Factur-X/ZUGFeRD, UNCEFACT/CII XRechnung)
http://www.mustangproject.org
Apache License 2.0
168 stars 99 forks source link

Module dependency update #299

Closed svanteschubert closed 1 year ago

svanteschubert commented 1 year ago

Hello Jochen,

as discussed, the easiest workaround for the following problem is to run "mvn package" or "mvn install" twice without a "mvn clean".

First, I have added a dependency in the pom.xml of the validation module to the library module. So library will always be called before validation. Second, as the library module requires executing the JUnit tests in alphabetical order, I have updated the JUnit dependency from 4 to 5 as this is possible in JUnit4 adding by adding a property JUnit file under test resources. See https://stackoverflow.com/questions/57624495/junit-test-class-order

NOTE: You might want to consider migrating from 4 to 5 API - https://blog.jetbrains.com/idea/2020/08/migrating-from-junit-4-to-junit-5/ -> The clean JUnit 5 way would be exchanging the new two API and vintage Junit dependency with one to the engine - https://oss.sonatype.org/content/groups/public/org/junit/jupiter/junit-jupiter-engine/

Unfortunately, this ordering seems to work only for windows atm on my machines, you might want to test it yourself.

But there is still a problem with or without the new test class ordering working (I added the ordering to the validator module as well) there are now build/test problems in the validator module calling the Schematron/JAXB of Philip Helger. You might want to look into this as you are more familiar with your library than I am.

But at least we are now passing the library module, and getting closer.. :-)

Good luck, Jochen! Svante