AdamaJava / adamajava

Other
14 stars 4 forks source link

qcoverage - change jaxb jars to prepare for newer java versions #338

Closed holmeso closed 11 months ago

holmeso commented 11 months ago

Description

qcoverage uses JAXB for the serialisation of java objects into an xml report. The jar files that the JAXB implementation depends on are housed within java's rt.jar in versions of java up to version 8. Version 9 and 10 contain the relevant jar files, but they have been deprecated, and from version 11 onwards, they have been removed.

More info here.

If you run the current released qcoverage code (/software/adamajava/adamajava-release/123.cdccef6/) using java 11, a ClassNotFoundException is thrown.

Unfortunately, the simple fix of adding the JAXB dependancies didn't work, due to ClassLoader issues, and so the simplest way I could find to fix this was to use the JAXB implementation from eclipse, called MOXy.

The build file was amended to bring in the jakarta JAXB bindings jar, along with the MOXy jar. The model classes (QCoverageSpec, CoverageModel and CoverageReport) were refactored to import from the different dependencies and tests were added.

Type of change

Refactoring to ready the codebase for newer java versions

How Has This Been Tested?

Additional tests have been added and the updated code has been run against a bam and the results favourably compared with the previous versions reults.

Are WDL Updates Required?

n/a

Checklist: