koppor / jabref

Collection of simple for JabRef issues. Please submit PRs to https://github.com/jabRef/jabref/.
https://github.com/jabRef/jabref/
MIT License
8 stars 13 forks source link

WIP Restapi #628

Closed Siedlerchr closed 1 year ago

Siedlerchr commented 2 years ago

This ports the code of https://github.com/UST-QuAntiL/PlanQK-Library to JabRef's core.

Siedlerchr commented 1 year ago

Further idea: https://foojay.io/today/whats-new-in-jakarta-rest-3-1-in-jakarta-ee-10/ No cotainer necessary as it seems

koppor commented 1 year ago

Quoting from the article:

In the past, to run a Jakarta EE REST application required a full deployment to a compatible runtime like the Payara Platform or Payara Cloud. Jakarta REST 3.1 in Jakarta EE 10 introduced a new API to bootstrap REST resources outside of a container.

The simplest way to get a REST API deployed is to call the start() method on the jakarta.ws.rs. SeBootstrap class. This method returns a CompletionStage that you can then chain for different purposes.

koppor commented 1 year ago

Maybe, we just need to remove dependencies and call the start method? 1 hour pair programming?

Siedlerchr commented 1 year ago

https://github.com/jakartaee/rest/blob/master/examples/src/main/java/jaxrs/examples/bootstrap/BasicJavaSeBootstrapExample.java

Siedlerchr commented 1 year ago

Fuu. I hat this complicated shit. Still needs a server implementation like jersey or whatever.

koppor commented 1 year ago

Trying to do two things

Found these helpful links:

Following is not supported by Jackson:

JAXBContext.newInstance("org.jabref.logic.importer.fileformat.mods");

There is ObjectMapper and XmlMapper.

However, polymorphism in XMLElements is not supported by JAXB. See https://github.com/FasterXML/jackson-modules-base/issues/127.

Thus, I tried to rewrite the Importers to a StAX-based parsing. This is a huge job, but would make the code more "clean" and hopefully remove this xjc stuff. Was possibly a bad idea 5 years ago to go for the JAXB way and not directly parse the XML.

koppor commented 1 year ago

And now we have

reads package org.jboss.resteasy.concurrent from both resteasy.core.spi and resteasy.core
Siedlerchr commented 1 year ago

Yes. I encountered the split modules as well. I don't think this jaxb rewrite will help. Jetty etc had also problems. In the end it's jlink again

koppor commented 1 year ago

Submitted RestEasy Issue https://issues.redhat.com/browse/RESTEASY-3272

koppor commented 1 year ago

Fun with modules:

error: duplicate module on application module path
  module in jakarta.activation
Siedlerchr commented 1 year ago

I could fix the duplicate module stuff, but we stilll have method too large...