Replaced javax.annotation with jakarta.annotation.
Change-Id: Ieab946df4b09280beb1048de556ad12d446b0207
diff --git a/full/pom.xml b/full/pom.xml
index 5ddf970..c58e24b 100644
--- a/full/pom.xml
+++ b/full/pom.xml
@@ -15,7 +15,7 @@
<flyway.version>9.21.1</flyway.version>
<log4j.version>2.20.0</log4j.version>
<krill.version>[0.61.4,)</krill.version>
- <koral.version>[0.40.1,)</koral.version>
+ <koral.version>[0.41,)</koral.version>
</properties>
<profiles>
<profile>
@@ -455,11 +455,11 @@
<version>0.4</version>
</dependency>
- <dependency>
+ <!--<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
- </dependency>
+ </dependency>-->
<dependency>
<groupId>de.ids_mannheim.korap</groupId>
@@ -784,11 +784,11 @@
<version>2.1.2</version>
</dependency>
- <!--<dependency>
+ <dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
- </dependency>-->
+ </dependency>
<!-- OAuth -->
<dependency>
diff --git a/full/src/main/java/de/ids_mannheim/korap/authentication/APIAuthentication.java b/full/src/main/java/de/ids_mannheim/korap/authentication/APIAuthentication.java
index 341c4d0..ef9db77 100644
--- a/full/src/main/java/de/ids_mannheim/korap/authentication/APIAuthentication.java
+++ b/full/src/main/java/de/ids_mannheim/korap/authentication/APIAuthentication.java
@@ -20,8 +20,6 @@
import de.ids_mannheim.korap.exceptions.StatusCodes;
import de.ids_mannheim.korap.security.context.TokenContext;
import de.ids_mannheim.korap.user.User;
-import net.sf.ehcache.Cache;
-import net.sf.ehcache.CacheManager;
/**
* Authentication provider using JWT tokens
diff --git a/full/src/main/java/de/ids_mannheim/korap/config/NamedVCLoader.java b/full/src/main/java/de/ids_mannheim/korap/config/NamedVCLoader.java
index 410a58a..f16acbf 100644
--- a/full/src/main/java/de/ids_mannheim/korap/config/NamedVCLoader.java
+++ b/full/src/main/java/de/ids_mannheim/korap/config/NamedVCLoader.java
@@ -7,8 +7,6 @@
import java.util.Arrays;
import java.util.zip.GZIPInputStream;
-import javax.management.RuntimeErrorException;
-
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.io.output.ByteArrayOutputStream;
@@ -61,7 +59,7 @@
}
catch (IOException | QueryException e) {
// e.printStackTrace();
- throw new RuntimeErrorException(new Error(e.getMessage(), e.getCause()));
+ throw new RuntimeException(e.getMessage(), e.getCause());
}
}
diff --git a/full/src/main/java/de/ids_mannheim/korap/security/context/TokenContext.java b/full/src/main/java/de/ids_mannheim/korap/security/context/TokenContext.java
index b31c643..23d2fa4 100644
--- a/full/src/main/java/de/ids_mannheim/korap/security/context/TokenContext.java
+++ b/full/src/main/java/de/ids_mannheim/korap/security/context/TokenContext.java
@@ -2,7 +2,6 @@
import java.io.Serializable;
import java.time.ZonedDateTime;
-import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@@ -16,7 +15,6 @@
import de.ids_mannheim.korap.utils.TimeUtils;
import lombok.AccessLevel;
import lombok.Data;
-import lombok.Getter;
import lombok.Setter;
/**
diff --git a/full/src/main/resources/basic-config.xml b/full/src/main/resources/basic-config.xml
index 2ba0d1a..87cb8f7 100644
--- a/full/src/main/resources/basic-config.xml
+++ b/full/src/main/resources/basic-config.xml
@@ -333,7 +333,7 @@
<constructor-arg index="0" value="${mail.username}" />
<constructor-arg index="1" value="${mail.password}" />
</bean>
- <bean id="smtpSession" class="javax.mail.Session" factory-method="getInstance">
+ <bean id="smtpSession" class="jakarta.mail.Session" factory-method="getInstance">
<constructor-arg index="0">
<props>
<prop key="mail.smtp.submitter">${mail.username}</prop>
diff --git a/full/src/test/java/de/ids_mannheim/korap/authentication/RandomCodeGeneratorTest.java b/full/src/test/java/de/ids_mannheim/korap/authentication/RandomCodeGeneratorTest.java
index 952f804..0f0c012 100644
--- a/full/src/test/java/de/ids_mannheim/korap/authentication/RandomCodeGeneratorTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/authentication/RandomCodeGeneratorTest.java
@@ -4,8 +4,6 @@
import java.security.NoSuchAlgorithmException;
-import org.apache.oltu.oauth2.as.issuer.MD5Generator;
-import org.apache.oltu.oauth2.common.exception.OAuthSystemException;
import org.junit.Ignore;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
@@ -28,7 +26,7 @@
}
@Ignore
- public void testRandomGeneratorPerformance () throws OAuthSystemException,
+ public void testRandomGeneratorPerformance () throws
NoSuchAlgorithmException, KustvaktException {
long min = Integer.MAX_VALUE, max = Integer.MIN_VALUE;
@@ -49,14 +47,4 @@
}
}
-
- @Ignore
- public void testMD5Generator () throws OAuthSystemException,
- NoSuchAlgorithmException, KustvaktException {
- MD5Generator m = new MD5Generator();
- String value = m.generateValue();
- value = m.generateValue(value);
- System.out.println(value);
- }
-
}
diff --git a/full/src/test/java/de/ids_mannheim/korap/misc/LocalQueryTest.java b/full/src/test/java/de/ids_mannheim/korap/misc/LocalQueryTest.java
index ab5039e..ecf00c2 100644
--- a/full/src/test/java/de/ids_mannheim/korap/misc/LocalQueryTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/misc/LocalQueryTest.java
@@ -3,7 +3,7 @@
import java.io.IOException;
-import javax.annotation.PostConstruct;
+import jakarta.annotation.PostConstruct;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/full/src/test/java/de/ids_mannheim/korap/web/SearchKrillTest.java b/full/src/test/java/de/ids_mannheim/korap/web/SearchKrillTest.java
index ec5561b..c9acc30 100644
--- a/full/src/test/java/de/ids_mannheim/korap/web/SearchKrillTest.java
+++ b/full/src/test/java/de/ids_mannheim/korap/web/SearchKrillTest.java
@@ -4,7 +4,7 @@
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
-import javax.annotation.PostConstruct;
+import jakarta.annotation.PostConstruct;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
diff --git a/full/src/test/resources/test-config-icc.xml b/full/src/test/resources/test-config-icc.xml
index fed99a6..383f378 100644
--- a/full/src/test/resources/test-config-icc.xml
+++ b/full/src/test/resources/test-config-icc.xml
@@ -44,14 +44,15 @@
</array>
</property>
</bean>
-
+
+ <!--
<bean id='cacheManager' class='org.springframework.cache.ehcache.EhCacheCacheManager'
p:cacheManager-ref='ehcache' />
<bean id='ehcache'
class='org.springframework.cache.ehcache.EhCacheManagerFactoryBean'
p:configLocation='classpath:ehcache.xml' p:shared='true' />
-
+ -->
<bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource"
lazy-init="true">
<!-- <property name="driverClassName" value="${jdbc.driverClassName}" /> -->
@@ -296,7 +297,7 @@
<constructor-arg index="0" value="${mail.username}" />
<constructor-arg index="1" value="${mail.password}" />
</bean>
- <bean id="smtpSession" class="javax.mail.Session" factory-method="getInstance">
+ <bean id="smtpSession" class="jakarta.mail.Session" factory-method="getInstance">
<constructor-arg index="0">
<props>
<prop key="mail.smtp.submitter">${mail.username}</prop>