- cleanup / updates before release: fix pom, prepare site
git-svn-id: https://svn.apache.org/repos/asf/turbine/fulcrum/trunk/cache@1889625 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml
index ef9c6db..80e1c71 100644
--- a/pom.xml
+++ b/pom.xml
@@ -30,6 +30,14 @@
<inceptionYear>2004</inceptionYear>
<description>Fulcrum Cache Service</description>
<url>http://turbine.apache.org/fulcrum/fulcrum-cache</url>
+
+ <!-- Required for staging to work -->
+ <distributionManagement>
+ <site>
+ <id>turbine.apache.org</id>
+ <url>https://turbine.apache.org/fulcrum/fulcrum-cache/</url>
+ </site>
+ </distributionManagement>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/turbine/fulcrum/trunk/cache/</connection>
@@ -67,7 +75,7 @@
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
- <version>2.10.6</version>
+ <version>2.10.9.2</version>
</dependency>
<!-- ehcache has api slf4j incldued -->
<dependency>
@@ -140,6 +148,7 @@
<properties>
<turbine.site.path>fulcrum/fulcrum-cache</turbine.site.path>
+ <turbine.scmPubCheckoutDirectory>${turbine.site.cache}/fulcrum/cache</turbine.scmPubCheckoutDirectory>
</properties>
diff --git a/xdocs/changes.xml b/src/changes/changes.xml
similarity index 71%
rename from xdocs/changes.xml
rename to src/changes/changes.xml
index bd486f4..ae7aada 100644
--- a/xdocs/changes.xml
+++ b/src/changes/changes.xml
@@ -1,93 +1,114 @@
-<?xml version="1.0"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<document>
- <properties>
- <title>Fulcrum Cache</title>
- <author email="epugh@opensourceconnections.com">Eric Pugh</author>
- </properties>
-
- <body>
- <release version="1.1.1" date="in subversion">
- <action type="update" dev="gk">
- Updated JCSCacheService to jcs3, as such Java 8 is required.
- Fix cache object mapping to maxlife in seconds from expiry milliseconds.
- </action>
- <action type="update" dev="gk">
- Fixed bug in CachedObject expires assignment
- </action>
- <action type="update" dev="gk">
- Test updated to Junit 5
- </action>
- </release>
- <release version="1.1.0" date="2010-03-31">
- <action type="update" dev="tv">
- Refactored all implementations to be in the impl-package.
- </action>
- <action type="update" dev="tv">
- Added a EHCache based implementation of the GlobalCacheService interface.
- </action>
- <action type="update" dev="sgoeschl" date="2010-03-22">
- Pulling in commons-logging-1.1.1 to avoid the 1.1 version
- which depends on an outdated Avalon framework
- </action>
- <action type="update" dev="sgoeschl" date="2010-03-18">
- Updating the M2 build.
- </action>
- <action type="update" dev="sgoeschl">
- Improved maven-1.1 build (default goal now in project.xml)
- </action>
- <action type="add" dev="sgoeschl">
- Added M2 build but it is still a bit rough
- </action>
- <action type="update" dev="seade" issue="TRB-17" due-to="Thomas Vandahl">
- Added new JCSCacheService. Thanks to Thomas Vandahl.
- </action>
- <action dev="epugh" type="add">
- Add new EHCacheService based on EHCache from http://ehcache.sourceforge.net/
- </action>
- </release>
- <release version="1.0.5" date="2004-11-24">
- <action dev="epugh" type="remove">
- Remove CacheServiceFacade. It was a code smell.
- </action>
- <action dev="epugh" type="update">
- Make long running tests optional. They often fail for random reasons.
- </action>
- <action dev="epugh" type="update">
- Remove extra dependencies.
- </action>
- <action dev="epugh" type="add">
- Added patch from Peter Courcoux adding new methods,
- getKeys() and getCachedObjects() together with
- associated unit tests.
- </action>
- </release>
- <release version="1.0-alpha-3" date="">
- <action dev="epugh" type="add">
- Added CacheServiceFacade class.
- </action>
- <action dev="epugh" type="add">
- Integrated howto documentation on main page.
- </action>
- </release>
-
- </body>
-</document>
-
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<document>
+ <properties>
+ <title>Fulcrum Cache</title>
+ <author email="epugh@opensourceconnections.com">Eric Pugh</author>
+ </properties>
+
+ <body>
+ <release version="1.1.1" date="in subversion">
+ <action dev="gk" type="update">
+ - Test: Use tags to skip long running tests, minor fixes in log4j2 configuration and test assertion.
+ - Update tests to JUnit 5 and dependencies to Fulcrum Testcontainer 1.0.9 and Turbine Parent 8
+ - Updated EHCache to v2.10.9.2
+ </action>
+ <action dev="gk" type="update">
+ Update JCS to commons-jcs3-core
+ </action>
+ <action dev="gk" type="update">
+ - Updated JCSCacheService to jcs3, as such Java 8 is required.
+ - Add logging configuration for EHcache and JCS
+ </action>
+ <action type="fix" dev="gk">
+ Fix JCS cache object mapping to maxlife in seconds from expiry milliseconds.
+ </action>
+ <action type="fix" dev="gk">
+ Fixed bug in CachedObject expires assignment, use AtomicInteger instead of synchronized stale
+ </action>
+ <action type="update" dev="gk">
+ Tests updated to Junit 5
+ </action>
+ <action dev="painter" type="update">
+ - Update to use release 1.0.8 of yaafi and testcontainer
+ - Updated EHCache
+ </action>
+ <action dev="tv" type="update">
+ - Generify
+ - Update ehcache dependency to 2.9.0
+ - Update to commons-jcs-2.0-beta1
+ - Replace viewcvs with viewvc. Fixes TRB-95
+ </action>
+ </release>
+ <release version="1.1.0" date="2010-03-31">
+ <action type="update" dev="tv">
+ Refactored all implementations to be in the impl-package.
+ </action>
+ <action type="update" dev="tv">
+ Added a EHCache based implementation of the GlobalCacheService interface.
+ </action>
+ <action type="update" dev="sgoeschl" date="2010-03-22">
+ Pulling in commons-logging-1.1.1 to avoid the 1.1 version
+ which depends on an outdated Avalon framework
+ </action>
+ <action type="update" dev="sgoeschl" date="2010-03-18">
+ Updating the M2 build.
+ </action>
+ <action type="update" dev="sgoeschl">
+ Improved maven-1.1 build (default goal now in project.xml)
+ </action>
+ <action type="add" dev="sgoeschl">
+ Added M2 build but it is still a bit rough
+ </action>
+ <action type="update" dev="seade" issue="TRB-17" due-to="Thomas Vandahl">
+ Added new JCSCacheService. Thanks to Thomas Vandahl.
+ </action>
+ <action dev="epugh" type="add">
+ Add new EHCacheService based on EHCache from http://ehcache.sourceforge.net/
+ </action>
+ </release>
+ <release version="1.0.5" date="2004-11-24">
+ <action dev="epugh" type="remove">
+ Remove CacheServiceFacade. It was a code smell.
+ </action>
+ <action dev="epugh" type="update">
+ Make long running tests optional. They often fail for random reasons.
+ </action>
+ <action dev="epugh" type="update">
+ Remove extra dependencies.
+ </action>
+ <action dev="epugh" type="add">
+ Added patch from Peter Courcoux adding new methods,
+ getKeys() and getCachedObjects() together with
+ associated unit tests.
+ </action>
+ </release>
+ <release version="1.0-alpha-3" date="">
+ <action dev="epugh" type="add">
+ Added CacheServiceFacade class.
+ </action>
+ <action dev="epugh" type="add">
+ Integrated howto documentation on main page.
+ </action>
+ </release>
+
+ </body>
+</document>
+
diff --git a/src/java/org/apache/fulcrum/cache/impl/DefaultGlobalCacheService.java b/src/java/org/apache/fulcrum/cache/impl/DefaultGlobalCacheService.java
index 372ee71..edc1ade 100644
--- a/src/java/org/apache/fulcrum/cache/impl/DefaultGlobalCacheService.java
+++ b/src/java/org/apache/fulcrum/cache/impl/DefaultGlobalCacheService.java
@@ -60,7 +60,7 @@
ThreadSafe
{
/**
- * Initial size of hash table Value must be > 0. Default = 20
+ * Initial size of hash table Value must be > 0. Default = 20
*/
public static final int DEFAULT_INITIAL_CACHE_SIZE = 20;
@@ -75,7 +75,7 @@
public static final String CACHE_CHECK_FREQUENCY = "cacheCheckFrequency";
/**
- * Cache check frequency in Millis (1000 Millis = 1 second). Value must be >
+ * Cache check frequency in Millis (1000 Millis = 1 second). Value must be >
* 0. Default = 5 seconds
*/
public static final long DEFAULT_CACHE_CHECK_FREQUENCY = 5000; // 5 seconds
@@ -217,7 +217,7 @@
// this is OK we just do not want this key
continue;
}
- keys.add(new String(key));
+ keys.add(key);
}
return keys;
}
diff --git a/src/java/org/apache/fulcrum/cache/impl/EHCacheService.java b/src/java/org/apache/fulcrum/cache/impl/EHCacheService.java
index 0d850fb..cbe0b7f 100644
--- a/src/java/org/apache/fulcrum/cache/impl/EHCacheService.java
+++ b/src/java/org/apache/fulcrum/cache/impl/EHCacheService.java
@@ -50,7 +50,7 @@
GlobalCacheService, Runnable, Configurable, Disposable, Initializable, ThreadSafe
{
/**
- * Cache check frequency in Millis (1000 Millis = 1 second). Value must be >
+ * Cache check frequency in Millis (1000 Millis = 1 second). Value must be >
* 0. Default = 5 seconds
*/
public static final long DEFAULT_CACHE_CHECK_FREQUENCY = 5000; // 5 seconds
diff --git a/src/java/org/apache/fulcrum/cache/impl/JCSCacheService.java b/src/java/org/apache/fulcrum/cache/impl/JCSCacheService.java
index 43306a0..7afa449 100644
--- a/src/java/org/apache/fulcrum/cache/impl/JCSCacheService.java
+++ b/src/java/org/apache/fulcrum/cache/impl/JCSCacheService.java
@@ -55,7 +55,7 @@
ThreadSafe
{
/**
- * Cache check frequency in Millis (1000 Millis = 1 second). Value must be >
+ * Cache check frequency in Millis (1000 Millis = 1 second). Value must be >
* 0. Default = 5 seconds
*/
public static final long DEFAULT_CACHE_CHECK_FREQUENCY = 5000; // 5 seconds
@@ -228,7 +228,7 @@
{
attrib.setIsEternal(false);
// expires in millis, maxlife in seconds
- double tmp0 = (o.getExpires() + 500) / 1000;
+ double tmp0 = ((double) (o.getExpires() + 500)) / 1000;
getLogger().debug( "setting maxlife seconds (minimum 1sec) from expiry + 0.5s: " + (int)tmp0 );
attrib.setMaxLife( (tmp0 > 0 ? (int) Math.floor( tmp0 ) : 1 ) );
}
diff --git a/src/site/site.xml b/src/site/site.xml
new file mode 100644
index 0000000..be0a12e
--- /dev/null
+++ b/src/site/site.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<project xmlns="http://maven.apache.org/DECORATION/1.4.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/DECORATION/1.4.0 http://maven.apache.org/xsd/decoration-1.4.0.xsd"
+ name="Fulcrum Cache">
+
+
+ <skin>
+ <groupId>org.apache.maven.skins</groupId>
+ <artifactId>maven-fluido-skin</artifactId>
+ <version>1.8</version>
+ </skin>
+ <body>
+
+ <menu name="Overview">
+ <item name="Main" href="/index.html"/>
+ </menu>
+
+ <menu name="Links">
+ <item name="EHCache"
+ href="https://www.ehcache.org/"/>
+ <item name="JCS"
+ href="https://commons.apache.org/proper/commons-jcs/"/>
+ </menu>
+
+ </body>
+ <custom>
+ <fluidoSkin>
+ <topBarEnabled>false</topBarEnabled>
+ <sideBarEnabled>true</sideBarEnabled>
+ </fluidoSkin>
+ </custom>
+</project>
diff --git a/src/test/org/apache/fulcrum/cache/CacheTest.java b/src/test/org/apache/fulcrum/cache/CacheTest.java
index 36b57e9..ebb5e9a 100644
--- a/src/test/org/apache/fulcrum/cache/CacheTest.java
+++ b/src/test/org/apache/fulcrum/cache/CacheTest.java
@@ -521,7 +521,6 @@
/**
* Test that we can get a list of the keys in the cache
*
- * @return
*/
@Test
public void testCacheGetKeyList()
@@ -545,8 +544,6 @@
/**
* Test that we can get a list of the keys in the cache
- *
- * @return
*/
@Test
public void testCacheGetCachedObjects()
@@ -574,7 +571,6 @@
* ConcurrentModificationException's being thrown if the cache is updated
* while we are iterating over the List.
*
- * @return
*/
@Test
public void testCacheModification()
diff --git a/xdocs/index.xml b/xdocs/index.xml
index 6ef1efa..bd608ba 100644
--- a/xdocs/index.xml
+++ b/xdocs/index.xml
@@ -45,7 +45,7 @@
<ul>
<li>GlobalCacheService,</li>
<li>EHCacheService (built on the EHCache project from
- <a href="http://ehcache.sourceforge.net/">ehcache.sourceforge.net</a>) and</li>
+ <a href="https://www.ehcache.org/">ehcache.sourceforge.net</a>, N.B. The implementation is still based on last release 2.10.9.2 of net.sf.ehcache.EHcache) and</li>
<li>JCSCacheService (built on the <a href="http://commons.apache.org/proper/commons-jcs/">Java Caching System</a>,
which was originally a part of Turbine)</li>
</ul>
diff --git a/xdocs/navigation.xml b/xdocs/navigation.xml
deleted file mode 100644
index 02e4412..0000000
--- a/xdocs/navigation.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<!DOCTYPE project [
-<!ENTITY site-nav SYSTEM "../../incl_site_nav.xml">
-]>
-
-<project
- name="Fulcrum Cache"
- href="http://turbine.apache.org/fulcrum/fulcrum-cache/">
-
- <body>
-
- &site-nav;
-
- <menu name="Overview">
- <item name="Main" href="/index.html"/>
- </menu>
-
- <menu name="Links">
- <item name="EHCache"
- href="http://ehcache.sourceforge.net/"/>
- <item name="JCS"
- href="http://jakarta.apache.org/jcs/"/>
- </menu>
-
- </body>
-</project>