Skip to content

Commit

Permalink
UBO-283 Migrate to MyCoRe 2023.06.x (#335)
Browse files Browse the repository at this point in the history
* UBO-283 Set mycore version to 2022.06.3-SNAPSHOT

* UBO-283 Fixed compile errors

* UBO-283 Removed deprecated api invocation

* UBO-283 Replaced deprecated StringUtils.getLevenshteinDistance() with LevenshteinDistance.getDefaultInstance().apply(normalizeTitle(titleFromAleph), normalizeTitle(titleFromBibEntry)).intValue()

* UBO-283 Moved basket2solradd.xsl and solr2csv.xsl to /xslt. Set TransformerFactoryClass for xslt 1 stylesheets

* UBO-283 Include variable $User-Agent in html-layout.xsl to avoid blank landing page

* UBO-283 Added configuration as mentioned in MyCoRe-Org/mycore#1964 (comment)

* UBO-283 Added mapping files in persistence.xml

* UBO-283 Curly braces must now be encoded in json.facet

* UBO-283 Improved readability of added properties

* UBO-291 Use h2 for testing

* UBO-291 Set mycore version to 2023.06.1-SNAPSHOT

* UBO-291 Sort poms

* UBO-291 Added sort pom plugin

* UBO-291 Removed property "<property name="hibernate.dialect" value=" org.hibernate.dialect.H2Dialect"/>" from persistence.xml

* UBO-291 Fixed persistence.xml

* UBO-291 Set mycore version to 2023.06.2-SNAPSHOT

* UBO-283 Fixed compile error and sort pom.xml

* UBO-283 Migrated to MCRJobQueue to MCRJobQueueManager

* UBO-283 Set mycore version to 2023.06.03-SNAPSHOT

* UBO-283 Updated ImportListJobAction to mycore version 2023.06.x

* UBO-283 delete obsolete language classification, update versions and

installation documentation

---------

Co-authored-by: Kathleen Neumann <[email protected]>
  • Loading branch information
Possommi and kkrebs authored Aug 23, 2024
1 parent efc0a5c commit 4bd7ddf
Show file tree
Hide file tree
Showing 18 changed files with 174 additions and 302 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ ubo-cli/target/bin/ubo.sh create configuration directory
create database ubo;
grant all privileges on ubo.* to ubo@localhost identified by 'ubo';
```
- setup your database and JDBC configuration in persistence.xml and **REMOVE** the following lines
- setup your database and JDBC configuration in persistence.xml, update mappings with:
```
<mapping-file>META-INF/mycore-iview2-mappings.xml</mapping-file>
<mapping-file>META-INF/mycore-viewer-mappings.xml</mapping-file>
<mapping-file>META-INF/mycore-ifs-mappings.xml</mapping-file>
ubo-cli/target/bin/ubo.sh reload mappings in jpa configuration file
```
```
vi ~/.mycore/ubo/resources/META-INF/persistence.xml
Expand All @@ -34,7 +32,7 @@ vi ~/.mycore/ubo/resources/META-INF/persistence.xml
- copy jdbc driver to ~/.mycore/ubo/lib, eg. for h2
```
cd ~/.mycore/ubo/lib
wget https://repo1.maven.org/maven2/com/h2database/h2/1.4.200/h2-1.4.200.jar
wget https://repo1.maven.org/maven2/com/h2database/h2/2.2.224/h2-2.2.224.jar
cd -
```
## Solr
Expand Down
37 changes: 34 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.mycore</groupId>
<artifactId>mycore-parent</artifactId>
<version>49</version>
<version>55</version>
</parent>

<groupId>org.mycore.ubo</groupId>
Expand Down Expand Up @@ -53,13 +53,14 @@
<java.target.version>17</java.target.version>
<jquery.ui.version>1.13.2</jquery.ui.version>
<jquery.version>3.5.1</jquery.version>
<mycore.version>2022.06.3-SNAPSHOT</mycore.version>
<mycore.version>2023.06.3-SNAPSHOT</mycore.version>
<node.version>v16.0.0</node.version>
<pica2mods.version>2.10</pica2mods.version>
<sortpom.sortDeps>scope,groupId,artifactId</sortpom.sortDeps>
<sortpom.sortFile>https://gist.githubusercontent.com/yagee-de/dfd3698c1b49173dbf251f74eb6a9297/raw/406460c088ff3cb6354e4ae6b40535e6f841607d/mycore_sort.xml</sortpom.sortFile>
<sortpom.sortProps>true</sortpom.sortProps>
<timestamp>${maven.build.timestamp}</timestamp>
<tomcat.version>10.1.11</tomcat.version>
<yarn.version>v1.22.10</yarn.version>
</properties>

Expand All @@ -74,6 +75,31 @@
</plugin>
</plugins>
</pluginManagement>

<plugins>
<plugin>
<groupId>com.github.ekryd.sortpom</groupId>
<artifactId>sortpom-maven-plugin</artifactId>
<executions>
<execution>
<id>verify-sort-pom</id>
<goals>
<goal>sort</goal>
</goals>
<phase>verify</phase>
<configuration>
<createBackupFile>false</createBackupFile>
<expandEmptyElements>false</expandEmptyElements>
<spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
<keepBlankLines>true</keepBlankLines>
<sortDependencies>${sortpom.sortDeps}</sortDependencies>
<sortOrderFile>${sortpom.sortFile}</sortOrderFile>
<sortProperties>${sortpom.sortProps}</sortProperties>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<repositories>
Expand Down Expand Up @@ -179,7 +205,7 @@
</property>
</activation>
<properties>
<cargo.container>jetty9x</cargo.container>
<cargo.container>jetty12x</cargo.container>
</properties>
<build>
<pluginManagement>
Expand Down Expand Up @@ -281,6 +307,11 @@
<artifactId>bucket4j-core</artifactId>
<version>8.9.0</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>2.2.224</version>
</dependency>
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
Expand Down
218 changes: 0 additions & 218 deletions ubo-cli/src/main/setup/classifications/rfc4646.xml

This file was deleted.

8 changes: 4 additions & 4 deletions ubo-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -404,13 +404,13 @@
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
18 changes: 16 additions & 2 deletions ubo-common/src/main/java/org/mycore/ubo/DozBibCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,20 @@
import org.mycore.ubo.importer.scopus.ScopusInitialImporter;
import org.xml.sax.SAXException;

import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.zip.Deflater;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;

import static org.mycore.common.MCRConstants.MODS_NAMESPACE;
import static org.mycore.common.MCRConstants.XPATH_FACTORY;

Expand Down Expand Up @@ -132,7 +146,7 @@ public static boolean migrateGenre(String objId) {
MCRContent transformed = transformer.transform(new MCRJDOMContent(mcrObject.createXML()));
MCRMetadataManager.update(new MCRObject(transformed.asXML()));
return true;
} catch (IOException | JDOMException | SAXException | MCRAccessException exception) {
} catch (IOException | JDOMException | MCRAccessException exception) {
LOGGER.error("Could not migrate mods:genre for object {}", objId);
return false;
}
Expand Down Expand Up @@ -266,7 +280,7 @@ public static void importMODSCollection(String fileName) throws Exception {
wrapper.setMODS(mods.clone());
MCRObject obj = wrapper.getMCRObject();

obj.setId(MCRObjectID.getNextFreeId(PROJECT_ID + "_mods"));
obj.setId(MCRMetadataManager.getMCRObjectIDGenerator().getNextFreeId(PROJECT_ID + "_mods"));
MCRMetadataManager.create(obj);
}
}
Expand Down
Loading

0 comments on commit 4bd7ddf

Please sign in to comment.