phax / ph-ubl

Java library for reading and writing UBL 2.0, 2.1, 2.2, 2.3 and 2.4 (CS01) documents

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

meierlink88 opened this issue · comments

Then you have to stick with release v6.7.0

get it, thanks.

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;
}

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 phax/ph-jaxb-plugin#5 for the issue