-
Notifications
You must be signed in to change notification settings - Fork 66
#1602 - Upgrade dependencies #1614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- corenlp 4.5.7 -> 4.5.10 - gate 8.6.1 -> 9.0.1 - annie 8.6 -> 9.1 - gate-tools 8.6 -> 9.0.1 - jsoup 1.21.2 -> 1.22.1 - solr-solrj 9.6.1 -> 9.10.0 - jaxen 1.2.0 -> 2.0.0 - jaxb-core 2.3.0.1 -> 4.0.6 - jaxb-impl 2.3.9 -> 4.0.6 - jakarta.xml.bind-api 4.0.2 -> 4.0.4 - dkpro-parent-pom 32 -> 34
- Refactor XCES module to use jackson instead of jaxb
- Refactor BioC module to use jackson instead of jaxb
- Formatting - Fix dependencies - jaxb-impl 4.0.6 -> 2.3.9 - jaxb-core 4.0.6 -> 2.3.0.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR upgrades multiple dependencies and refactors the BioC and XCES modules to use Jackson instead of JAXB for XML processing.
Key Changes:
- Upgraded parent POM (dkpro-parent-pom 32 → 34) and multiple library versions (CoreNLP, GATE, jsoup, Solr, jaxen, jakarta.xml.bind-api)
- Migrated BioC and XCES modules from JAXB to Jackson for XML serialization/deserialization
- Updated license headers to new format across XCES module files
Reviewed changes
Copilot reviewed 35 out of 36 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| pom.xml | Upgraded dkpro-parent-pom from version 32 to 34 |
| dkpro-core-parent-common/pom.xml | Updated jaxen (1.2.0 → 2.0.0) and jakarta.xml.bind-api (4.0.2 → 4.0.4) versions |
| dkpro-core-io-xces-asl/pom.xml | Replaced JAXB dependencies with Jackson databind and dataformat-xml |
| dkpro-core-io-xces-asl/src/main/java/org/dkpro/core/io/xces/models/*.java | Replaced JAXB annotations with Jackson XML annotations in model classes |
| dkpro-core-io-xces-asl/src/main/java/org/dkpro/core/io/xces/XcesXmlReader.java | Migrated from JAXB Unmarshaller to Jackson XmlMapper with XMLStreamReader |
| dkpro-core-io-xces-asl/src/main/java/org/dkpro/core/io/xces/XcesBasicXmlReader.java | Migrated from JAXB Unmarshaller to Jackson XmlMapper with XMLStreamReader |
| dkpro-core-io-xces-asl/src/main/java/org/dkpro/core/io/xces/XcesXmlWriter.java | Migrated from JAXB Marshaller to Jackson XmlMapper with string-based intermediate serialization |
| dkpro-core-io-xces-asl/src/main/java/org/dkpro/core/io/xces/XcesBasicXmlWriter.java | Migrated from JAXB Marshaller to Jackson XmlMapper with string-based intermediate serialization |
| dkpro-core-io-xces-asl/src/test/java/org/dkpro/core/io/xces/*.java | Updated license headers and modernized test code with var declarations and static imports |
| dkpro-core-io-bioc-asl/pom.xml | Replaced JAXB dependencies with Jackson databind, annotations, and dataformat-xml |
| dkpro-core-io-bioc-asl/src/main/java/org/dkpro/core/io/bioc/internal/model/*.java | Replaced JAXB annotations with Jackson XML annotations in model classes |
| dkpro-core-io-bioc-asl/src/main/java/org/dkpro/core/io/bioc/BioCReader.java | Migrated from JAXB to Jackson with StringWriter-based intermediate parsing |
| dkpro-core-io-bioc-asl/src/main/java/org/dkpro/core/io/bioc/BioCWriter.java | Migrated from JAXB to Jackson with custom indentation handling via regex |
| dkpro-core-io-bioc-asl/src/main/java/org/dkpro/core/io/bioc/internal/BioCToCas.java | Updated to use Jackson XmlMapper with StringWriter-based parsing approach |
| dkpro-core-io-solr-asl/pom.xml | Updated solr-solrj from 9.6.1 to 9.10.0 |
| dkpro-core-io-html-asl/pom.xml | Updated jsoup from 1.21.2 to 1.22.1 |
| dkpro-core-gate-asl/pom.xml | Updated GATE (8.6.1 → 9.0.1), ANNIE (8.6 → 9.1), and tools (8.6 → 9.0.1) versions |
| dkpro-core-gate-asl/src/scripts/build.xml | Removed trailing whitespace from XML pattern includes |
| dkpro-core-corenlp-gpl/pom.xml | Updated CoreNLP from 4.5.7 to 4.5.10 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dkpro-core-io-bioc-asl/src/main/java/org/dkpro/core/io/bioc/internal/BioCToCas.java
Outdated
Show resolved
Hide resolved
dkpro-core-io-xces-asl/src/main/java/org/dkpro/core/io/xces/XcesXmlWriter.java
Outdated
Show resolved
Hide resolved
dkpro-core-io-xces-asl/src/test/java/org/dkpro/core/io/xces/XcesXmlReaderTest.java
Outdated
Show resolved
Hide resolved
dkpro-core-io-bioc-asl/src/main/java/org/dkpro/core/io/bioc/internal/model/BioCAnnotation.java
Outdated
Show resolved
Hide resolved
dkpro-core-io-bioc-asl/src/main/java/org/dkpro/core/io/bioc/BioCReader.java
Outdated
Show resolved
Hide resolved
dkpro-core-io-bioc-asl/src/main/java/org/dkpro/core/io/bioc/BioCWriter.java
Outdated
Show resolved
Hide resolved
dkpro-core-io-xces-asl/src/main/java/org/dkpro/core/io/xces/XcesBasicXmlWriter.java
Outdated
Show resolved
Hide resolved
dkpro-core-io-bioc-asl/src/main/java/org/dkpro/core/io/bioc/internal/model/BioCLocation.java
Outdated
Show resolved
Hide resolved
dkpro-core-io-xces-asl/src/test/java/org/dkpro/core/io/xces/XcesXmlReaderWriterTest.java
Show resolved
Hide resolved
dkpro-core-io-xces-asl/src/main/java/org/dkpro/core/io/xces/package-info.java
Show resolved
Hide resolved
7dc735d to
9d0016e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 37 out of 39 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dkpro-core-io-xces-asl/src/main/java/org/dkpro/core/io/xces/models/XcesParaBasic.java
Show resolved
Hide resolved
dkpro-core-io-xces-asl/src/main/java/org/dkpro/core/io/xces/models/XcesPara.java
Show resolved
Hide resolved
dkpro-core-io-bioc-asl/src/main/java/org/dkpro/core/io/bioc/internal/model/BioCAnnotation.java
Outdated
Show resolved
Hide resolved
dkpro-core-io-bioc-asl/src/main/java/org/dkpro/core/io/bioc/BioCWriter.java
Show resolved
Hide resolved
dkpro-core-io-xces-asl/src/main/java/org/dkpro/core/io/xces/models/XcesToken.java
Show resolved
Hide resolved
dkpro-core-io-xces-asl/src/main/java/org/dkpro/core/io/xces/models/XcesSentence.java
Show resolved
Hide resolved
9d43944 to
05216e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 37 out of 39 changed files in this pull request and generated 5 comments.
Comments suppressed due to low confidence (1)
dkpro-core-io-bioc-asl/src/main/java/org/dkpro/core/io/bioc/BioCWriter.java:114
- The Marshaller is now created once during initialization and reused across all process() calls. However, Marshaller instances are not thread-safe. If this component can be called concurrently from multiple threads, reusing the same Marshaller instance could lead to race conditions and corrupted output. Consider creating a new Marshaller instance for each process() call, or ensure this component is only used in single-threaded contexts.
private Marshaller marshaller;
@Override
public void initialize(UimaContext aContext) throws ResourceInitializationException
{
super.initialize(aContext);
try {
context = JAXBContext.newInstance(BioCCollection.class);
marshaller = context.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, indent);
marshaller.setProperty(Marshaller.JAXB_ENCODING, targetEncoding);
}
catch (JAXBException e) {
throw new ResourceInitializationException(e);
}
}
@Override
public void process(JCas aJCas) throws AnalysisEngineProcessException
{
try (var docOS = getOutputStream(aJCas, filenameSuffix)) {
var bioCCollection = new BioCCollection();
// Base-information - may be overwritten by the metadata fields below
var dmd = DocumentMetaData.get(aJCas);
bioCCollection.setSource(dmd.getCollectionId());
// Use BioC metadata fields if available
getCollectionMetadataField(aJCas.getCas(), E_SOURCE)
.ifPresent($ -> bioCCollection.setSource($.getValue()));
getCollectionMetadataField(aJCas.getCas(), E_KEY)
.ifPresent($ -> bioCCollection.setKey($.getValue()));
getCollectionMetadataField(aJCas.getCas(), E_DATE)
.ifPresent($ -> bioCCollection.setDate($.getValue()));
new CasToBioC().convert(aJCas, bioCCollection);
marshaller.marshal(bioCCollection, docOS);
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dkpro-core-io-bioc-asl/src/main/java/org/dkpro/core/io/bioc/internal/model/BioCAnnotation.java
Show resolved
Hide resolved
dkpro-core-io-bioc-asl/src/main/java/org/dkpro/core/io/bioc/internal/model/BioCCollection.java
Show resolved
Hide resolved
dkpro-core-io-bioc-asl/src/main/java/org/dkpro/core/io/bioc/internal/model/BioCPassage.java
Show resolved
Hide resolved
dkpro-core-io-bioc-asl/src/main/java/org/dkpro/core/io/bioc/internal/model/BioCSentence.java
Show resolved
Hide resolved
- Revert migration to Jackson and instead upgrade to modern JAXB
05216e8 to
635825e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 37 out of 39 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
What's in the PR
How to test manually
Automatic testing
Documentation