Skip to content

Commit

Permalink
Update dependencies. Require Java 17
Browse files Browse the repository at this point in the history
  • Loading branch information
tvand committed Aug 23, 2023
1 parent ebd8b53 commit c8cac6b
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 157 deletions.
2 changes: 1 addition & 1 deletion commons-jcs3-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<artifactId>javax.servlet-api</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
Expand Down
10 changes: 0 additions & 10 deletions commons-jcs3-jcache-openjpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,10 @@
</scm>

<dependencies>
<!-- <dependency>-->
<!-- <groupId>org.apache.geronimo.specs</groupId>-->
<!-- <artifactId>geronimo-jpa_2.0_spec</artifactId>-->
<!-- <version>1.1</version>-->
<!-- <scope>provided</scope>-->
<!-- </dependency>-->
<dependency>
<groupId>javax.cache</groupId>
<artifactId>cache-api</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.apache.geronimo.specs</groupId>-->
<!-- <artifactId>geronimo-jcache_1.0_spec</artifactId>-->
<!-- </dependency>-->
<dependency>
<groupId>org.apache.openjpa</groupId>
<artifactId>openjpa</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
{
Expand Down Expand Up @@ -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();
}

Expand All @@ -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<Object, Object> args = new HashMap<Object, Object>()
{{
put("id", entity.getId());
}};
final Map<Object, Object> 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();
}

Expand Down
35 changes: 1 addition & 34 deletions commons-jcs3-jcache-tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@
<groupId>javax.cache</groupId>
<artifactId>cache-api</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.apache.geronimo.specs</groupId>-->
<!-- <artifactId>geronimo-jcache_1.0_spec</artifactId>-->
<!-- </dependency>-->

<dependency>
<groupId>javax.cache</groupId>
Expand All @@ -116,40 +112,11 @@
<scope>test</scope>
</dependency>

<!-- <dependency>-->
<!-- <groupId>javax.transaction</groupId>-->
<!-- <artifactId>jta</artifactId>-->
<!-- <version>1.1</version>-->
<!-- </dependency>-->

<!-- <dependency>-->
<!-- <groupId>org.apache.geronimo.specs</groupId>-->
<!-- <artifactId>geronimo-jcdi_2.0_spec</artifactId>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>javax.inject</groupId>-->
<!-- <artifactId>javax.inject</artifactId>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.apache.geronimo.specs</groupId>-->
<!-- <artifactId>geronimo-atinject_1.0_spec</artifactId>-->
<!-- </dependency>-->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.apache.geronimo.specs</groupId>-->
<!-- <artifactId>geronimo-interceptor_1.2_spec</artifactId>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>javax.annotation</groupId>-->
<!-- <artifactId>javax.annotation-api</artifactId>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.apache.geronimo.specs</groupId>-->
<!-- <artifactId>geronimo-annotation_1.2_spec</artifactId>-->
<!-- </dependency>-->

<dependency>
<groupId>org.apache.openwebbeans</groupId>
<artifactId>openwebbeans-impl</artifactId>
Expand Down
39 changes: 5 additions & 34 deletions commons-jcs3-jcache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,40 +41,11 @@
<dependency>
<groupId>javax.cache</groupId>
<artifactId>cache-api</artifactId>
<version>1.1.1</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.apache.geronimo.specs</groupId>-->
<!-- <artifactId>geronimo-jcache_1.0_spec</artifactId>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>javax.inject</groupId>-->
<!-- <artifactId>javax.inject</artifactId>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.apache.geronimo.specs</groupId>-->
<!-- <artifactId>geronimo-atinject_1.0_spec</artifactId>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.apache.geronimo.specs</groupId>-->
<!-- <artifactId>geronimo-jcdi_2.0_spec</artifactId>-->
<!-- </dependency>-->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.apache.geronimo.specs</groupId>-->
<!-- <artifactId>geronimo-interceptor_1.2_spec</artifactId>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>javax.annotation</groupId>-->
<!-- <artifactId>javax.annotation-api</artifactId>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.apache.geronimo.specs</groupId>-->
<!-- <artifactId>geronimo-annotation_1.2_spec</artifactId>-->
<!-- </dependency>-->

<dependency>
<groupId>org.apache.commons</groupId>
Expand All @@ -93,11 +64,11 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
68 changes: 11 additions & 57 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -362,18 +362,11 @@

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<optional>true</optional>
</dependency>

<!-- <dependency>-->
<!-- <groupId>org.apache.geronimo.specs</groupId>-->
<!-- <artifactId>geronimo-jcdi_2.0_spec</artifactId>-->
<!-- <version>1.3</version>-->
<!-- <scope>provided</scope>-->
<!-- </dependency>-->

<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
Expand All @@ -385,86 +378,46 @@
</exclusion>
</exclusions>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.apache.geronimo.specs</groupId>-->
<!-- <artifactId>geronimo-interceptor_1.2_spec</artifactId>-->
<!-- <version>1.2</version>-->
<!-- <scope>provided</scope>-->
<!-- </dependency>-->

<!-- <dependency>-->
<!-- <groupId>javax.inject</groupId>-->
<!-- <artifactId>javax.inject</artifactId>-->
<!-- <version>1</version>-->
<!-- <scope>provided</scope>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.apache.geronimo.specs</groupId>-->
<!-- <artifactId>geronimo-atinject_1.0_spec</artifactId>-->
<!-- <version>1.2</version>-->
<!-- <scope>provided</scope>-->
<!-- </dependency>-->

<dependency>
<groupId>javax.cache</groupId>
<artifactId>cache-api</artifactId>
<version>1.1.1</version>
<scope>provided</scope>
</dependency>
<!-- Does not work with JPMS/moditect -->
<!-- <dependency>-->
<!-- <groupId>org.apache.geronimo.specs</groupId>-->
<!-- <artifactId>geronimo-jcache_1.0_spec</artifactId>-->
<!-- <version>1.0-alpha-1</version>-->
<!-- <scope>provided</scope>-->
<!-- </dependency>-->

<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
<scope>provided</scope>
</dependency>

<!-- <dependency>-->
<!-- <groupId>org.apache.geronimo.specs</groupId>-->
<!-- <artifactId>geronimo-annotation_1.2_spec</artifactId>-->
<!-- <version>1.0</version>-->
<!-- <scope>provided</scope>-->
<!-- </dependency>-->

<dependency>
<groupId>org.apache.openwebbeans</groupId>
<artifactId>openwebbeans-impl</artifactId>
<version>1.7.6</version>
<version>2.0.27</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>javax.cache</groupId>
<artifactId>test-domain</artifactId>
<version>${jsr107.api.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>javax.cache</groupId>
<artifactId>app-domain</artifactId>
<version>${jsr107.api.version}</version>
</dependency>

<dependency>
<groupId>javax.cache</groupId>
<artifactId>cache-tests</artifactId>
<version>${jsr107.api.version}</version>
<version>1.1.1</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>javax.cache</groupId>
<artifactId>cache-tests</artifactId>
<classifier>tests</classifier>
<version>${jsr107.api.version}</version>
<version>1.1.1</version>
<scope>test</scope>
</dependency>

Expand All @@ -478,7 +431,7 @@
<artifactId>maven-pmd-plugin</artifactId>
<version>${commons.pmd.version}</version>
<configuration>
<targetJdk>1.8</targetJdk>
<targetJdk>${maven.compiler.target}</targetJdk>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -576,15 +529,16 @@

<!-- Default configuration for compiler source and target JVM -->
<maven.compiler.sourceEncoding>UTF-8</maven.compiler.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<commons.compiler.release>17</commons.compiler.release>

<commons.componentid>jcs</commons.componentid>
<commons.osgi.symbolicName>org.apache.commons.${project.artifactId}</commons.osgi.symbolicName>
<commons.module.name>org.apache.commons.jcs3</commons.module.name>
<commons.release.version>3.2</commons.release.version>
<commons.release.name>commons-jcs3-dist-3.2</commons.release.name>
<commons.release.desc>(Java 8+)</commons.release.desc>
<commons.release.desc>(Java 17+)</commons.release.desc>
<commons.releaseManagerName>tv</commons.releaseManagerName>
<commons.releaseManagerKey>88817402</commons.releaseManagerKey>
<!-- The RC version used in the staging repository URL. -->
Expand All @@ -599,7 +553,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<commons.encoding>UTF-8</commons.encoding>
<commons.javadoc.java.link>https://docs.oracle.com/javase/8/docs/api/</commons.javadoc.java.link>
<commons.javadoc.java.link>https://docs.oracle.com/javase/17/docs/api/</commons.javadoc.java.link>

<jsr107.api.version>1.0.1</jsr107.api.version>
<commons.collections.version>4.4</commons.collections.version>
Expand Down
22 changes: 21 additions & 1 deletion src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,27 @@
<author email="[email protected]">Apache Commons Developers</author>
</properties>
<body>
<release version="3.1.1" date="TBD">
<release version="3.2.1" date="TBD">
<action dev="tv" type="update">
Update dependency servlet-api 2.5 to java.servlet-api 3.1.0
</action>
<action dev="tv" type="update">
Update dependency openwebbeans-impl 1.7.6 to 2.0.27
</action>
<action dev="tv" type="update">
Update dependency cache-tests 1.0.1 to 1.1.1
</action>
<action dev="tv" type="update">
Update Tomcat libraries 7.0.22 to 9.0.79
</action>
<action dev="tv" type="update">
From this release on we require Java 17
</action>
</release>
<release version="3.2" date="2023-08-22">
<action dev="tv" type="fix" issue="JCS-234" due-to="Chris Lake">
Fix OSGi manifest
</action>
<action dev="tv" type="fix" issue="JCS-232" due-to="Jeremy Long">
Handle ServiceConfigurationError when using a different logging framework
</action>
Expand Down

0 comments on commit c8cac6b

Please sign in to comment.