diff --git a/.classpath b/.classpath index f9e3df9..f7e4a1d 100644 --- a/.classpath +++ b/.classpath @@ -1,9 +1,29 @@ + + + + + + + + + + + + + + + + + + + + @@ -14,20 +34,6 @@ - - - - - - - - - - - - - - diff --git a/.project b/.project index 3de64be..b395248 100644 --- a/.project +++ b/.project @@ -6,12 +6,12 @@ - org.eclipse.wst.common.project.facet.core.builder + org.eclipse.jdt.core.javabuilder - org.eclipse.jdt.core.javabuilder + org.eclipse.wst.common.project.facet.core.builder @@ -27,8 +27,6 @@ - org.eclipse.jem.workbench.JavaEMFNature - org.eclipse.wst.common.modulecore.ModuleCoreNature org.eclipse.jdt.core.javanature org.eclipse.m2e.core.maven2Nature org.eclipse.wst.common.project.facet.core.nature diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index ca4c66e..2f5cc74 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -1,11 +1,8 @@ eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.8 diff --git a/pom.xml b/pom.xml index 4005ea3..5e5fed2 100644 --- a/pom.xml +++ b/pom.xml @@ -1,4 +1,5 @@ - 4.0.0 @@ -14,12 +15,12 @@ Scope-related APIs distro - 1.8 - 1.8 - scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git - scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git + + scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git + + scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git https://code-repo.d4science.org/gCubeSystem/${project.artifactId} @@ -48,8 +49,12 @@ common-security - javax.xml.bind - jaxb-api + jakarta.xml.bind + jakarta.xml.bind-api + + + org.glassfish.jaxb + jaxb-runtime junit diff --git a/src/main/java/org/gcube/common/scope/impl/DefaultServiceMap.java b/src/main/java/org/gcube/common/scope/impl/DefaultServiceMap.java index f89541d..1ba294b 100644 --- a/src/main/java/org/gcube/common/scope/impl/DefaultServiceMap.java +++ b/src/main/java/org/gcube/common/scope/impl/DefaultServiceMap.java @@ -3,14 +3,14 @@ package org.gcube.common.scope.impl; import java.util.LinkedHashMap; import java.util.Map; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - import org.gcube.common.scope.api.ServiceMap; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlAttribute; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; + /** * A {@link ServiceMap} with a standard XML binding. * diff --git a/src/main/java/org/gcube/common/scope/impl/ServiceMapAdapter.java b/src/main/java/org/gcube/common/scope/impl/ServiceMapAdapter.java index 46dc2f0..1e4efdf 100644 --- a/src/main/java/org/gcube/common/scope/impl/ServiceMapAdapter.java +++ b/src/main/java/org/gcube/common/scope/impl/ServiceMapAdapter.java @@ -5,10 +5,10 @@ import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.adapters.XmlAdapter; +import jakarta.xml.bind.annotation.XmlAttribute; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.adapters.XmlAdapter; /** diff --git a/src/main/java/org/gcube/common/scope/impl/ServiceMapScanner.java b/src/main/java/org/gcube/common/scope/impl/ServiceMapScanner.java index 1ed2405..7a21d2a 100644 --- a/src/main/java/org/gcube/common/scope/impl/ServiceMapScanner.java +++ b/src/main/java/org/gcube/common/scope/impl/ServiceMapScanner.java @@ -1,15 +1,11 @@ package org.gcube.common.scope.impl; import java.net.URL; -import java.util.Collection; import java.util.HashMap; import java.util.Map; import java.util.Set; import java.util.regex.Pattern; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.Unmarshaller; - import org.gcube.common.scope.api.ServiceMap; import org.reflections.Reflections; import org.reflections.scanners.ResourcesScanner; @@ -18,6 +14,9 @@ import org.reflections.util.ConfigurationBuilder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import jakarta.xml.bind.JAXBContext; +import jakarta.xml.bind.Unmarshaller; + /** * Scans the classpath for {@link ServiceMap}s. * @@ -44,8 +43,6 @@ class ServiceMapScanner { Map maps = new HashMap(); try { - - Collection urls = ClasspathHelper.forJavaClassPath(); ConfigurationBuilder reflectionConf = new ConfigurationBuilder().addUrls(ClasspathHelper.forJavaClassPath()).addUrls(ClasspathHelper.forClassLoader()).setScanners(new ResourcesScanner()); diff --git a/src/test/java/org/gcube/common/scope/ServiceMapTest.java b/src/test/java/org/gcube/common/scope/ServiceMapTest.java index 7f58b4a..c17b363 100644 --- a/src/test/java/org/gcube/common/scope/ServiceMapTest.java +++ b/src/test/java/org/gcube/common/scope/ServiceMapTest.java @@ -6,14 +6,14 @@ import static org.junit.Assert.assertNotNull; import java.io.StringReader; import java.io.StringWriter; -import javax.xml.bind.JAXBContext; - import org.gcube.common.scope.api.ServiceMap; import org.gcube.common.scope.impl.DefaultServiceMap; import org.gcube.common.security.providers.SecretManagerProvider; import org.junit.After; import org.junit.Test; +import jakarta.xml.bind.JAXBContext; + public class ServiceMapTest { diff --git a/src/test/java/org/gcube/common/scope/TestSecret.java b/src/test/java/org/gcube/common/scope/TestSecret.java index 2b9915f..bbd2836 100644 --- a/src/test/java/org/gcube/common/scope/TestSecret.java +++ b/src/test/java/org/gcube/common/scope/TestSecret.java @@ -16,7 +16,7 @@ public class TestSecret extends Secret { @Override public Owner getOwner() { - return new Owner("test", Collections.emptyList(), false); + return new Owner("test", Collections.emptyList(), false, false); } @Override @@ -30,7 +30,7 @@ public class TestSecret extends Secret { } @Override - public boolean isExpired() { - return false; + public boolean isValid() { + return true; } }