diff --git a/commons-jcs3-core/pom.xml b/commons-jcs3-core/pom.xml index 9575c92fd..1f347a22b 100644 --- a/commons-jcs3-core/pom.xml +++ b/commons-jcs3-core/pom.xml @@ -112,7 +112,7 @@ javax.servlet - servlet-api + javax.servlet-api true diff --git a/commons-jcs3-jcache-openjpa/pom.xml b/commons-jcs3-jcache-openjpa/pom.xml index 91689fad8..79ce3a366 100644 --- a/commons-jcs3-jcache-openjpa/pom.xml +++ b/commons-jcs3-jcache-openjpa/pom.xml @@ -36,20 +36,10 @@ - - - - - - javax.cache cache-api - - - - org.apache.openjpa openjpa diff --git a/commons-jcs3-jcache-openjpa/src/test/java/org/apache/commons/jcs3/jcache/openjpa/OpenJPAJCacheDataCacheTest.java b/commons-jcs3-jcache-openjpa/src/test/java/org/apache/commons/jcs3/jcache/openjpa/OpenJPAJCacheDataCacheTest.java index a0a3d54f3..c1104eda7 100644 --- a/commons-jcs3-jcache-openjpa/src/test/java/org/apache/commons/jcs3/jcache/openjpa/OpenJPAJCacheDataCacheTest.java +++ b/commons-jcs3-jcache-openjpa/src/test/java/org/apache/commons/jcs3/jcache/openjpa/OpenJPAJCacheDataCacheTest.java @@ -18,12 +18,14 @@ */ package org.apache.commons.jcs3.jcache.openjpa; -import org.apache.derby.jdbc.EmbeddedDriver; -import org.apache.openjpa.conf.OpenJPAConfiguration; -import org.apache.openjpa.datacache.QueryKey; -import org.apache.openjpa.persistence.JPAFacadeHelper; -import org.apache.openjpa.persistence.OpenJPAEntityManagerFactorySPI; -import org.junit.Test; +import static org.hamcrest.CoreMatchers.instanceOf; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.util.Map; +import java.util.Properties; import javax.persistence.Entity; import javax.persistence.EntityManager; @@ -32,15 +34,13 @@ import javax.persistence.Id; import javax.persistence.Persistence; import javax.persistence.Query; -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; -import static org.hamcrest.CoreMatchers.instanceOf; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; +import org.apache.derby.jdbc.EmbeddedDriver; +import org.apache.openjpa.conf.OpenJPAConfiguration; +import org.apache.openjpa.datacache.QueryKey; +import org.apache.openjpa.persistence.JPAFacadeHelper; +import org.apache.openjpa.persistence.OpenJPAEntityManagerFactorySPI; +import org.junit.Test; public class OpenJPAJCacheDataCacheTest { @@ -78,7 +78,6 @@ public void entity() assertTrue(conf.getDataCacheManagerInstance().getDataCache("default").contains(JPAFacadeHelper.toOpenJPAObjectId(conf.getMetaDataRepositoryInstance().getCachedMetaData(MyEntity.class), entity.getId()))); em.close(); - emf.close(); } @@ -103,15 +102,11 @@ public void query() assertThat(conf.getDataCacheManagerInstance().getDataCache("default"), instanceOf(OpenJPAJCacheDataCache.class)); assertTrue(conf.getDataCacheManagerInstance().getDataCache("default").contains(JPAFacadeHelper.toOpenJPAObjectId(conf.getMetaDataRepositoryInstance().getCachedMetaData(MyEntity.class), entity.getId()))); - final Map args = new HashMap() - {{ - put("id", entity.getId()); - }}; + final Map args = Map.of("id", entity.getId()); final QueryKey qk = QueryKey.newInstance(query.unwrap(org.apache.openjpa.kernel.Query.class), args); assertNotNull(conf.getDataCacheManagerInstance().getSystemQueryCache().get(qk)); em.close(); - emf.close(); } diff --git a/commons-jcs3-jcache-tck/pom.xml b/commons-jcs3-jcache-tck/pom.xml index 20c2dbb27..f5c655ea4 100644 --- a/commons-jcs3-jcache-tck/pom.xml +++ b/commons-jcs3-jcache-tck/pom.xml @@ -99,10 +99,6 @@ javax.cache cache-api - - - - javax.cache @@ -116,40 +112,11 @@ test - - - - - - - - - - - - - - - - - - javax javaee-api - - - - - - - - - - - - + org.apache.openwebbeans openwebbeans-impl diff --git a/commons-jcs3-jcache/pom.xml b/commons-jcs3-jcache/pom.xml index c74095970..cf204a116 100644 --- a/commons-jcs3-jcache/pom.xml +++ b/commons-jcs3-jcache/pom.xml @@ -41,40 +41,11 @@ javax.cache cache-api - 1.1.1 - - - - - - - - - - - - - - - - javax javaee-api - - - - - - - - - - - - org.apache.commons @@ -93,11 +64,11 @@ junit test - - org.hamcrest - hamcrest - test - + + org.hamcrest + hamcrest + test + diff --git a/pom.xml b/pom.xml index 318e858e8..3205434e4 100644 --- a/pom.xml +++ b/pom.xml @@ -362,18 +362,11 @@ javax.servlet - servlet-api - 2.5 + javax.servlet-api + 3.1.0 true - - - - - - - javax javaee-api @@ -385,86 +378,46 @@ - - - - - - - - - - - - - - - - - - - - javax.cache cache-api 1.1.1 provided - - - - - - - - javax.annotation javax.annotation-api 1.3.2 provided - - - - - - - - org.apache.openwebbeans openwebbeans-impl - 1.7.6 + 2.0.27 test - javax.cache test-domain ${jsr107.api.version} test - javax.cache app-domain ${jsr107.api.version} - javax.cache cache-tests - ${jsr107.api.version} + 1.1.1 test - javax.cache cache-tests tests - ${jsr107.api.version} + 1.1.1 test @@ -478,7 +431,7 @@ maven-pmd-plugin ${commons.pmd.version} - 1.8 + ${maven.compiler.target} @@ -576,15 +529,16 @@ UTF-8 - 1.8 - 1.8 + 17 + 17 + 17 jcs org.apache.commons.${project.artifactId} org.apache.commons.jcs3 3.2 commons-jcs3-dist-3.2 - (Java 8+) + (Java 17+) tv 88817402 @@ -599,7 +553,7 @@ UTF-8 UTF-8 UTF-8 - https://docs.oracle.com/javase/8/docs/api/ + https://docs.oracle.com/javase/17/docs/api/ 1.0.1 4.4 diff --git a/src/changes/changes.xml b/src/changes/changes.xml index a31fab003..273f3b7f0 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -21,7 +21,27 @@ Apache Commons Developers - + + + Update dependency servlet-api 2.5 to java.servlet-api 3.1.0 + + + Update dependency openwebbeans-impl 1.7.6 to 2.0.27 + + + Update dependency cache-tests 1.0.1 to 1.1.1 + + + Update Tomcat libraries 7.0.22 to 9.0.79 + + + From this release on we require Java 17 + + + + + Fix OSGi manifest + Handle ServiceConfigurationError when using a different logging framework