Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

Commit

Permalink
Upgraded dependencies: Hibernate -> 3.6.6.Final, Spymemcached -> 2.8.…
Browse files Browse the repository at this point in the history
…1, Groovy (for tests) -> 1.8.5.
  • Loading branch information
lhazlewood committed Jun 12, 2012
1 parent ce50ca3 commit 853bd58
Show file tree
Hide file tree
Showing 10 changed files with 112 additions and 67 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Expand Up @@ -5,3 +5,7 @@ target
release.properties
pom.xml.releaseBackup
nb-configuration.xml
*.iml
*.ipr
*.iws
.idea
127 changes: 93 additions & 34 deletions pom.xml
@@ -1,4 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.googlecode</groupId>
<artifactId>hibernate-memcached</artifactId>
Expand Down Expand Up @@ -35,9 +36,9 @@
<url>http://download.java.net/maven/2/</url>
</repository>
<repository>
<id>couchbase</id>
<name>Spymemcached repository</name>
<url>http://files.couchbase.com/maven2/</url>
<id>couchbase</id>
<name>Spymemcached repository</name>
<url>http://files.couchbase.com/maven2/</url>
</repository>
</repositories>

Expand All @@ -47,22 +48,29 @@
<url>http://github.com/raykrueger/hibernate-memcached/</url>
</scm>

<properties>

<!-- You can redefine these properties in your $HOME/.m2/settings.xml to point to your own Maven repository (e.g. Nexus) -->
<hibernate-memcached.repository.releases.url>svn:https://raykrueger.googlecode.com/svn/repository</hibernate-memcached.repository.releases.url>
<hibernate-memcached.repository.snapshots.url>svn:https://raykrueger.googlecode.com/svn/repository</hibernate-memcached.repository.snapshots.url>

<gmaven.version>1.4</gmaven.version>
<groovy.version>1.8.5</groovy.version>
<junit.version>4.8.2</junit.version>

</properties>

<distributionManagement>
<!-- use the following if you're not using a snapshot version. -->
<repository>
<uniqueVersion>false</uniqueVersion>
<id>googlecode</id>
<url>svn:https://raykrueger.googlecode.com/svn/repository</url>
<!--<url>file://distribution</url>-->
<id>hibernate-memcached.repository.releases</id>
<url>${hibernate-memcached.repository.releases.url}</url>
</repository>
<!-- use the following if you ARE using a snapshot version. -->
<snapshotRepository>
<uniqueVersion>false</uniqueVersion>
<id>googlecode</id>
<url>svn:https://raykrueger.googlecode.com/svn/repository</url>
<!--<url>file://distribution</url>-->
<id>hibernate-memcached.repository.snapshots</id>
<url>${hibernate-memcached.repository.snapshots.url}</url>
</snapshotRepository>
</distributionManagement>

<build>
<extensions>
<extension>
Expand All @@ -74,31 +82,31 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.1.2</version>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8.1</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>verify</phase>
<id>attach-api-docs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<inherited>true</inherited>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.7</version>
<artifactId>maven-source-plugin</artifactId>
<version>2.1.2</version>
<executions>
<execution>
<id>attach-javadoc</id>
<phase>verify</phase>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<inherited>true</inherited>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -118,7 +126,43 @@
</descriptorRefs>
</configuration>
</plugin>
<!-- Allow writing tests in Groovy: -->
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>${gmaven.version}</version>
<executions>
<execution>
<goals>
<goal>generateTestStubs</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
<configuration>
<providerSelection>1.7</providerSelection>
<source>src/main/groovy</source>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.gmaven.runtime</groupId>
<artifactId>gmaven-runtime-1.7</artifactId>
<version>${gmaven.version}</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>${groovy.version}</version>
</dependency>
</dependencies>
</plugin>
<!-- <plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>groovy-maven-plugin</artifactId>
<version>1.0-rc-5</version>
Expand All @@ -130,7 +174,7 @@
</goals>
</execution>
</executions>
</plugin>
</plugin> -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
Expand Down Expand Up @@ -167,42 +211,57 @@
<dependency>
<groupId>spy</groupId>
<artifactId>spymemcached</artifactId>
<version>2.7.1</version>
<version>2.8.1</version>
</dependency>
<dependency>
<groupId>com.danga</groupId>
<artifactId>java_memcached</artifactId>
<version>2.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.5.6</version>
<version>1.6.4</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.6.ga</version>
<scope>compile</scope>
<artifactId>hibernate-core</artifactId>
<version>3.6.6.Final</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.10.0.GA</version>
<!-- needed by Hibernate at runtime (or end-user can choose CGLib): -->
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.3.1.GA</version>
<version>3.5.6-Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.5.6</version>
<version>1.6.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -214,7 +273,7 @@
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>1.6.3</version>
<version>${groovy.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
@@ -1,6 +1,5 @@
package com.googlecode.hibernate.memcached;

import com.googlecode.hibernate.memcached.utils.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
@@ -1,12 +1,6 @@
package com.googlecode.hibernate.memcached.spymemcached;

import net.spy.memcached.AddrUtil;
import net.spy.memcached.BinaryConnectionFactory;
import net.spy.memcached.ConnectionFactory;
import net.spy.memcached.DefaultConnectionFactory;
import net.spy.memcached.HashAlgorithm;
import net.spy.memcached.KetamaConnectionFactory;
import net.spy.memcached.MemcachedClient;
import net.spy.memcached.*;
import net.spy.memcached.auth.AuthDescriptor;
import net.spy.memcached.auth.PlainCallbackHandler;

Expand Down Expand Up @@ -159,8 +153,8 @@ public boolean isDaemonMode() {

public HashAlgorithm getHashAlgorithm() {
return properties.getEnum(PROP_HASH_ALGORITHM,
HashAlgorithm.class,
HashAlgorithm.NATIVE_HASH);
DefaultHashAlgorithm.class,
DefaultHashAlgorithm.NATIVE_HASH);
}

public String getConnectionFactoryName() {
Expand Down
@@ -1,5 +1,7 @@
package com.googlecode.hibernate.memcached

import org.junit.Test

/**
* DOCUMENT ME!
*
Expand All @@ -18,9 +20,11 @@ abstract class AbstractKeyStrategyTestCase extends BaseTestCase {
assertEquals(expected, key)
}

void assert_null_key_does_not_validate() {
shouldFailWithCause(IllegalArgumentException.class) {
void test_assert_null_key_does_not_validate() {
try {
strategy.toKey(null, 0, null)
fail(IllegalArgumentException.class.name + " expected.");
} catch (IllegalArgumentException expected) {
}
}

Expand Down
@@ -1,5 +1,7 @@
package com.googlecode.hibernate.memcached

import org.junit.Test

/**
* DOCUMENT ME!
*
Expand All @@ -19,10 +21,6 @@ class HashCodeKeyStrategyTest extends AbstractKeyStrategyTestCase {
assert_cache_key_equals "null:0:93916277", null, 0, "boing"
}

void test_null_key_does_not_validate() {
assert_null_key_does_not_validate()
}

void test_spaces() {
assert_cache_key_equals "Ihavespaces:0:-2100783816", "I have spaces", 0, "so do I"
}
Expand Down
Expand Up @@ -19,10 +19,6 @@ class Md5KeyStrategyTest extends AbstractKeyStrategyTestCase {
assert_cache_key_equals "cf23c7bb0c99979d4be1129adc959e6f", null, 0, "boing"
}

void test_null_key_does_not_validate() {
assert_null_key_does_not_validate()
}

void test_spaces() {
assert_cache_key_equals "0564810c2fd4e86dc6f355ad99e7d01b", "I have spaces", 0, "so do I"
}
Expand Down
Expand Up @@ -19,10 +19,6 @@ class Sha1KeyStrategyTest extends AbstractKeyStrategyTestCase {
assert_cache_key_equals "6afcec5614479d46a1ec6d73dabbc2cea154da3c", null, 0, "boing"
}

void test_null_key_does_not_validate() {
assert_null_key_does_not_validate()
}

void test_spaces() {
assert_cache_key_equals "949b2a6fce917d85bd56e6197c93b3affa694e50", "I have spaces", 0, "so do I"
}
Expand Down
Expand Up @@ -19,10 +19,6 @@ class StringKeyStrategyTest extends AbstractKeyStrategyTestCase {
assert_cache_key_equals "null:0:boing", null, 0, "boing"
}

void test_null_key_does_not_validate() {
assert_null_key_does_not_validate()
}

void test_spaces() {
assert_cache_key_equals "Ihavespaces:0:sodoI", "I have spaces", 0, "so do I"
}
Expand Down
@@ -1,12 +1,11 @@
package com.googlecode.hibernate.memcached.spymemcached

import net.spy.memcached.HashAlgorithm
import net.spy.memcached.MemcachedClient
import net.spy.memcached.auth.PlainCallbackHandler

import com.googlecode.hibernate.memcached.BaseTestCase
import com.googlecode.hibernate.memcached.Memcache
import com.googlecode.hibernate.memcached.PropertiesHelper
import net.spy.memcached.DefaultHashAlgorithm
import net.spy.memcached.MemcachedClient
import net.spy.memcached.auth.PlainCallbackHandler

class SpyMemcacheClientFactoryTest extends BaseTestCase {

Expand All @@ -22,7 +21,7 @@ class SpyMemcacheClientFactoryTest extends BaseTestCase {
void test_all_properties_set() {

properties.setProperty "hibernate.memcached.servers", "localhost:11211 localhost:11212"
properties.setProperty "hibernate.memcached.hashAlgorithm", HashAlgorithm.CRC32_HASH.name()
properties.setProperty "hibernate.memcached.hashAlgorithm", DefaultHashAlgorithm.CRC_HASH.name()
properties.setProperty "hibernate.memcached.operationQueueLength", "8192"
properties.setProperty "hibernate.memcached.readBufferLength", "8192"
properties.setProperty "hibernate.memcached.operationTimeout", "5000"
Expand Down

0 comments on commit 853bd58

Please sign in to comment.