phax / ph-ubl

Java library for reading and writing UBL 2.0, 2.1, 2.2, 2.3 and 2.4 documents
Apache License 2.0
110 stars 40 forks source link

Master branch can compile using JDK 11 or higher version.But i can only JDK 1.8 version for some reason. #58

Closed meierlink88 closed 1 year ago

phax commented 1 year ago

Then you have to stick with release v6.7.0

meierlink88 commented 1 year ago

get it, thanks.

meierlink88 commented 1 year ago

Compile fail with following error message in v6.7.0: Incompatible type: oasis.names.specification.ubl.schema.xsd.commonaggregatecomponents_23.CommunicationType can not transfer to oasis.names.specification.ubl.schema.xsd.commonbasiccomponents_23.ValueType Error in code as following: DocumentDistributionType.java @Nonnull public ValueType setCommunication( @Nullable final String valueParam) { ValueType aObj = getCommunication(); if (aObj == null) { aObj = new ValueType(valueParam); setCommunication(aObj); } else { aObj.setValue(valueParam); } return aObj; }

phax commented 1 year ago

Yes, this is an unfortunate error that occurs when compiling under Mac OS and has been fixed in a later version. Please find the binary versions in Maven Central under https://repo1.maven.org/maven2/com/helger/ubl/

Edit: see https://github.com/phax/ph-jaxb-plugin/issues/5 for the issue