4Science / DSpace

This repository contains the 4Science optimized DSpace & DSpace-CRIS distribution.
https://wiki.lyrasis.org/display/DSPACECRIS/
BSD 3-Clause "New" or "Revised" License
44 stars 63 forks source link

no csl on jdk17 builds #352

Open floriangantner opened 1 year ago

floriangantner commented 1 year ago

Describe the bug On jdk17 build no csl can be generated because the used citeproc dependecy is old.

jdk11 builds mention some warning on startup like: NashornEngine is deprecated

To Reproduce Steps to reproduce the behavior:

  1. build dspace server webapp with jdk17
  2. start dspace server webapp
  3. trigger some export of some publication as csl, e.g. in chicago style
  4. no csl is generated and some error is logged

Expected behavior We expect the csl to be generated.

Related work https://github.com/4Science/DSpace/blob/e69f96c19984b87dc80e0803044bae289a8bf11f/dspace-api/pom.xml#L851C16-L851C16 There are some newer versions of citeproc (2.0.0) which are compatible with jdk17 and should work out of the box. Some dependencies have to be removed. I'm not sure about (new) effective maven dependencies which are added through the change.

  <dependency>
            <groupId>de.undercouch</groupId>
            <artifactId>citeproc-java</artifactId>
            <version>2.0.0</version>
            <exclusions>
                <exclusion>
                   <groupId>org.apache.commons</groupId>
                   <artifactId>commons-lang3</artifactId>
                </exclusion>
                <exclusion>
                   <groupId>org.jbibtex</groupId>
                   <artifactId>jbibtex</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.ow2.asm</groupId>
                    <artifactId>asm-tree</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.ow2.asm</groupId>
                    <artifactId>asm-util</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.ow2.asm</groupId>
                    <artifactId>asm-analysis</artifactId>
                </exclusion>
                <exclusion>
                   <groupId>org.antlr</groupId>
                   <artifactId>antlr4-runtime</artifactId>
                </exclusion>
            </exclusions>
      </dependency>
      <dependency>
          <groupId>org.citationstyles</groupId>
          <artifactId>locales</artifactId>
          <version>23.5</version>
      </dependency>
      <dependency>
          <groupId>org.citationstyles</groupId>
          <artifactId>styles</artifactId>
          <version>23.5</version>
      </dependency>
corrad82-4s commented 1 year ago

hello @floriangantner , as anticipated during our DSpace-CRIS 7 working group call, this is the commit who introduced the possibility of using an external service as CSL generator: https://github.com/4Science/DSpace/commit/73fe8c9193e7e930c373e49c6027458941ea7122 . To use an external service, we deployed this project https://github.com/zotero/citeproc-js-server on a web server, then set property csl.web-service.url with the url of the service.