You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shiro.apache.org by fp...@apache.org on 2023/01/29 18:21:31 UTC

[shiro] 03/03: [SHIRO-849] Add Karaf feature and osgi metadata for JCache

This is an automated email from the ASF dual-hosted git repository.

fpapon pushed a commit to branch jcache-1.11
in repository https://gitbox.apache.org/repos/asf/shiro.git

commit 96003cade1a3810d8aff76d0ce843c0f999934fd
Author: francois papon <fp...@apache.org>
AuthorDate: Sun Jan 29 19:20:04 2023 +0100

    [SHIRO-849] Add Karaf feature and osgi metadata for JCache
---
 pom.xml                                          | 2 ++
 support/features/src/main/resources/features.xml | 6 ++++++
 support/jcache/pom.xml                           | 8 ++++----
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index c432b828..89730a53 100644
--- a/pom.xml
+++ b/pom.xml
@@ -75,6 +75,7 @@
 
         <!-- non-dependency-based properties: -->
         <shiro.osgi.importRange>[1.2, 2)</shiro.osgi.importRange>
+        <jcache.osgi.importRange>[1.1,2)</jcache.osgi.importRange>
 
         <!-- Compile 3rd party dependencies: -->
         <!-- Don't change this version without also changing the shiro-aspect and shiro-features
@@ -95,6 +96,7 @@
         <hazelcast.version>3.12.13</hazelcast.version>
         <hsqldb.version>2.7.1</hsqldb.version>
         <javax.annotation.api.version>1.3.2</javax.annotation.api.version>
+        <jcache.api.version>1.1.1</jcache.api.version>
         <jdk.version>1.8</jdk.version>
         <jetty.version>9.4.47.v20220610</jetty.version>
         <owasp.java.encoder.version>1.2.3</owasp.java.encoder.version>
diff --git a/support/features/src/main/resources/features.xml b/support/features/src/main/resources/features.xml
index e2151ae4..ddf9ffa1 100644
--- a/support/features/src/main/resources/features.xml
+++ b/support/features/src/main/resources/features.xml
@@ -47,6 +47,12 @@
         <bundle>mvn:org.apache.shiro/shiro-cas/${project.version}</bundle>
     </feature>
 
+    <feature name="shiro-cache" version="${project.version}">
+        <feature version="${project.version}">shiro-core</feature>
+        <bundle dependency='true'>mvn:javax.cache/cache-api/${jcache.api.version}</bundle>
+        <bundle>mvn:org.apache.shiro/shiro-cache/${project.version}</bundle>
+    </feature>
+
     <feature name="shiro-ehcache" version="${project.version}">
         <feature version="${project.version}">shiro-core</feature>
         <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.ehcache/${ehcache.bundle.version}</bundle>
diff --git a/support/jcache/pom.xml b/support/jcache/pom.xml
index 6e45484c..b2cb7a7c 100644
--- a/support/jcache/pom.xml
+++ b/support/jcache/pom.xml
@@ -22,7 +22,7 @@
     <parent>
         <groupId>org.apache.shiro</groupId>
         <artifactId>shiro-support</artifactId>
-        <version>1.8.1-SNAPSHOT</version>
+        <version>1.11.1-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
@@ -32,7 +32,7 @@
     <packaging>bundle</packaging>
 
     <properties>
-        <jcache.osgi.importRange>[1.1,2)</jcache.osgi.importRange>
+
     </properties>
 
     <dependencies>
@@ -43,7 +43,7 @@
         <dependency>
             <groupId>javax.cache</groupId>
             <artifactId>cache-api</artifactId>
-            <version>1.1.1</version>
+            <version>${jcache.api.version}</version>
         </dependency>
         <!-- Test dependencies -->
         <dependency>
@@ -76,7 +76,7 @@
                         <Export-Package>org.apache.shiro.jcache*;version=${project.version}</Export-Package>
                         <Import-Package>
                             org.apache.shiro*;version="${shiro.osgi.importRange}",
-                            com.hazelcast*;version="${jcache.osgi.importRange}",
+                            javax.cache*;version="${jcache.osgi.importRange}",
                             *
                         </Import-Package>
                     </instructions>