Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changed buildfile to ivy/ant

The new ant script is integrated with git, provides better
junit test reports, allows us to check coding style, adds
findbugs functionality to help improved code performance
and eliminate bugs, and generates eclipse project files
for developers using eclipse

Change-Id: I8617ac733a874063c6c5b1699f3d44e286bda750
Reviewed-on: http://review.couchbase.org/8973
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Matt Ingenthron <matt@couchbase.com>
  • Loading branch information...
commit 38d83b289336ec554c945598e5dc793a9bd3fcc3 1 parent d18560a
@mikewied mikewied authored mikewied committed
View
29 .classpath
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry excluding="**/.svn/|**/CVS/" kind="src" path="src/main/java"/>
- <classpathentry excluding="**/.svn/|**/CVS/" kind="src" path="target/generated-src"/>
- <classpathentry excluding="**/.svn/|**/CVS/" kind="src" output="target/resources" path="target/generated-rsrc"/>
- <classpathentry excluding="**/.svn/|**/CVS/" kind="src" output="target/test/classes" path="src/test/java"/>
- <classpathentry kind="src" path="src/test/manual"/>
- <classpathentry javadocpath="M2_REPO/log4j/log4j/1.2.15/log4j-1.2.15-javadoc.jar" kind="var" path="M2_REPO/log4j/log4j/1.2.15/log4j-1.2.15.jar" sourcepath="M2_REPO/log4j/log4j/1.2.15/log4j-1.2.15-sources.jar"/>
- <classpathentry javadocpath="M2_REPO/jmock/jmock/1.2.0/jmock-1.2.0-javadoc.jar" kind="var" path="M2_REPO/jmock/jmock/1.2.0/jmock-1.2.0.jar" sourcepath="M2_REPO/jmock/jmock/1.2.0/jmock-1.2.0-sources.jar"/>
- <classpathentry javadocpath="M2_REPO/junit/junit/4.4/junit-4.4-javadoc.jar" kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar" sourcepath="M2_REPO/junit/junit/4.4/junit-4.4-sources.jar"/>
- <classpathentry javadocpath="M2_REPO/org/springframework/spring-beans/3.0.3.RELEASE/spring-beans-3.0.3.RELEASE-javadoc.jar" kind="var" path="M2_REPO/org/springframework/spring-beans/3.0.3.RELEASE/spring-beans-3.0.3.RELEASE.jar" sourcepath="M2_REPO/org/springframework/spring-beans/3.0.3.RELEASE/spring-beans-3.0.3.RELEASE-sources.jar"/>
- <classpathentry javadocpath="M2_REPO/org/codehaus/jettison/jettison/1.1/jettison-1.1-javadoc.jar" kind="var" path="M2_REPO/org/codehaus/jettison/jettison/1.1/jettison-1.1.jar" sourcepath="M2_REPO/org/codehaus/jettison/jettison/1.1/jettison-1.1-sources.jar"/>
- <classpathentry javadocpath="M2_REPO/junit/junit/4.7/junit-4.7-javadoc.jar" kind="var" path="M2_REPO/junit/junit/4.7/junit-4.7.jar" sourcepath="M2_REPO/junit/junit/4.7/junit-4.7-sources.jar"/>
- <classpathentry javadocpath="M2_REPO/org/jmock/jmock/2.5.1/jmock-2.5.1-javadoc.jar" kind="var" path="M2_REPO/org/jmock/jmock/2.5.1/jmock-2.5.1.jar" sourcepath="M2_REPO/org/jmock/jmock/2.5.1/jmock-2.5.1-sources.jar"/>
- <classpathentry javadocpath="M2_REPO/org/jmock/jmock-junit4/2.5.1/jmock-junit4-2.5.1-javadoc.jar" kind="var" path="M2_REPO/org/jmock/jmock-junit4/2.5.1/jmock-junit4-2.5.1.jar" sourcepath="M2_REPO/org/jmock/jmock-junit4/2.5.1/jmock-junit4-2.5.1-sources.jar"/>
- <classpathentry javadocpath="M2_REPO/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1-javadoc.jar" kind="var" path="M2_REPO/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1.jar" sourcepath="M2_REPO/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1-sources.jar"/>
- <classpathentry javadocpath="M2_REPO/org/hamcrest/hamcrest-library/1.1/hamcrest-library-1.1-javadoc.jar" kind="var" path="M2_REPO/org/hamcrest/hamcrest-library/1.1/hamcrest-library-1.1.jar" sourcepath="M2_REPO/org/hamcrest/hamcrest-library/1.1/hamcrest-library-1.1-sources.jar"/>
- <classpathentry javadocpath="M2_REPO/emma/emma_ant/2.0.5312/emma_ant-2.0.5312-javadoc.jar" kind="var" path="M2_REPO/emma/emma_ant/2.0.5312/emma_ant-2.0.5312.jar" sourcepath="M2_REPO/emma/emma_ant/2.0.5312/emma_ant-2.0.5312-sources.jar"/>
- <classpathentry javadocpath="M2_REPO/emma/emma/2.0.5312/emma-2.0.5312-javadoc.jar" kind="var" path="M2_REPO/emma/emma/2.0.5312/emma-2.0.5312.jar" sourcepath="M2_REPO/emma/emma/2.0.5312/emma-2.0.5312-sources.jar"/>
- <classpathentry javadocpath="/org/jboss/netty/netty/3.1.5.GA/netty-3.1.5.GA.jar" kind="var" path="M2_REPO/org/jboss/netty/netty/3.1.5.GA/netty-3.1.5.GA.jar" sourcepath="M2_REPO/org/jboss/netty/netty/3.1.5.GA/netty-3.1.5.GA.jar"/>
- <classpathentry javadocpath="M2_REPO/org/easymock/easymock/2.4/easymock-2.4.jar" kind="var" path="M2_REPO/org/easymock/easymock/2.4/easymock-2.4.jar" sourcepath="M2_REPO/org/easymock/easymock/2.4/easymock-2.4.jar"/>
- <classpathentry javadocpath="M2_REPO/org/easymock/easymockclassextension/2.4/easymockclassextension-2.4.jar" kind="var" path="M2_REPO/org/easymock/easymockclassextension/2.4/easymockclassextension-2.4.jar" sourcepath="M2_REPO/org/easymock/easymockclassextension/2.4/easymockclassextension-2.4.jar"/>
- <classpathentry javadocpath="M2_PATH/junit-addons/junit-addons/1.4/junit-addons-1.4.jar" kind="var" path="M2_REPO/junit-addons/junit-addons/1.4/junit-addons-1.4.jar" sourcepath="M2_REPO/junit-addons/junit-addons/1.4/junit-addons-1.4.jar"/>
- <classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.5/commons-codec-1.5.jar" sourcepath="M2_REPO/commons-codec/commons-codec/1.4/commons-codec-1.4.jar"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpcore/4.1.1/httpcore-4.1.1.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/apache/httpcomponents/httpcore-nio/4.1.1/httpcore-nio-4.1.1.jar"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
View
4 .gitignore
@@ -1,7 +1,11 @@
.settings
+.classpath
+.project
cobertura.ser
+lib/ivy*
target/
reports/
+build/
junit*
*.iml
*~
View
12 .project
@@ -1,12 +0,0 @@
-<projectDescription>
- <name>spymemcached</name>
- <projects/>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
View
3  LICENSE.txt
@@ -1,4 +1,5 @@
-Copyright (c) 2006-2009 Dustin Sallings <dustin@spy.net>
+Copyright (c) 2006-2009 Dustin Sallings
+Copyright (c) 2009-2011 Couchbase, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
View
583 build.xml
@@ -0,0 +1,583 @@
+<!--
+ Copyright (c) 2009-2011 Couchbase, Inc.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
+ this software and associated documentation files (the "Software"), to deal in
+ the Software without restriction, including without limitation the rights to
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ of the Software, and to permit persons to whom the Software is furnished to do
+ so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
+-->
+
+<project name="spymemcached" default="jar"
+ xmlns:artifact="urn:maven-artifact-ant"
+ xmlns:ivy="antlib:org.apache.ivy.ant">
+
+ <property name="name" value="spymemcached"/>
+ <property name="copyright" value="2006-2011 Dustin Sallings, Matt Ingenthron" />
+ <property name="group" value="spy" />
+
+ <property name="base.src.dir" value="${basedir}/src" />
+ <property name="build.dir" value="${basedir}/build" />
+ <property name="build.src.dir" value="${build.dir}/src" />
+ <property name="etc.dir" value="${basedir}/etc" />
+ <property name="lib.dir" value="${basedir}/lib" />
+ <property name="src.dir" value="${base.src.dir}/main/java" />
+ <property name="test.dir" value="${base.src.dir}/test/java" />
+ <property name="script.src.dir" value="${base.src.dir}/scripts" />
+ <property name="build.javadoc" location="${build.dir}/docs/" />
+ <property name="junit.dir" location="${build.dir}/junit" />
+
+ <property name="dist.dir" value="${basedir}/target" />
+ <property name="build.classes" location="${build.dir}/classes"/>
+
+ <property name="git.hash" value="" />
+
+ <!-- ivy properties used -->
+ <property name="ivy.settings.dir" value="${basedir}/ivy" />
+
+ <path id="test.classpath">
+ <pathelement location="${build.classes}" />
+ <fileset dir="${lib.dir}">
+ <include name="**/*.jar"/>
+ </fileset>
+ </path>
+
+ <!-- tests -->
+ <property name="build.test" location="${build.dir}/test"/>
+ <property name="test.log.dir" location="${build.dir}/test/logs"/>
+ <property name="build.test.classes" location="${build.test}/classes" />
+
+ <!-- maven -->
+ <property name="mvn.build.dir" value="${build.dir}/m2" />
+ <property name="spymemcached.pom" value="${mvn.build.dir}/spymemcached.pom" />
+ <property name="spymemcached.pom" value="${mvn.build.dir}/spymemcached-test.pom" />
+
+ <!-- compilation -->
+ <property name="javac.deprecation" value="off"/>
+ <property name="javac.debug" value="on"/>
+ <property name="build.encoding" value="ISO-8859-1"/>
+
+ <!-- Checking code style -->
+ <property name="checkstyle.xml" value="${etc.dir}/checkstyle.xml" />
+ <property name="checkstyle.format.xsl" value="${etc.dir}/checkstyle-noframes.xsl" />
+ <property name="checkstyle.report.dir" value="${build.dir}/checkstyle" />
+
+ <!-- static analysis -->
+ <property name="findbugs.out.dir" value="${build.dir}/findbugs" />
+ <property name="findbugs.output.xml.file"
+ value="${findbugs.out.dir}/report.xml" />
+ <property name="findbugs.output.html.file"
+ value="${findbugs.out.dir}/report.html" />
+
+ <!-- Ivy-based dependency resolution -->
+ <property name="ivy.dir" location="${basedir}/ivy" />
+ <property name="ivysettings.xml" location="${ivy.dir}/ivysettings.xml"/>
+ <loadproperties srcfile="${ivy.dir}/libraries.properties"/>
+ <property name="ivy.jar" location="${lib.dir}/ivy-${ivy.version}.jar"/>
+ <property name="ivy_repo_url"
+ value="http://repo2.maven.org/maven2/org/apache/ivy/ivy/${ivy.version}/ivy-${ivy.version}.jar" />
+ <property name="mvn_repo_url"
+ value="http://repo2.maven.org/maven2/org/apache/maven/maven-ant-tasks/${mvn.version}/maven-ant-tasks-${mvn.version}.jar"/>
+ <property name="mvn.jar" location="${build.dir}/maven-ant-tasks-${mvn.version}.jar" />
+ <property name="build.ivy.dir" location="${build.dir}/ivy" />
+ <property name="build.ivy.lib.dir" location="${build.ivy.dir}/lib" />
+ <property name="build.ivy.report.dir" location="${build.ivy.dir}/report" />
+ <property name="redist.ivy.lib.dir" location="${build.ivy.lib.dir}/${name}/redist"/>
+
+ <!--test related properties -->
+ <property name="server.address_v4" value="127.0.0.1"/>
+ <property name="server.address_v6" value="::1"/>
+ <property name="server.type" value="memcached"/>
+
+ <!--this is the naming policy for artifacts we want pulled down-->
+ <property name="ivy.artifact.retrieve.pattern"
+ value="${name}/[conf]/[artifact]-[revision](-[classifier]).[ext]"/>
+
+ <!-- paths used for compilation and run -->
+ <path id="lib.path.id">
+ <fileset dir="${lib.dir}" />
+ </path>
+ <path id="run.path.id">
+ <path refid="lib.path.id" />
+ <path location="${build.dir}" />
+ </path>
+
+ <!-- load ant-contrib tasks to get the "if" task. -->
+ <taskdef resource="net/sf/antcontrib/antcontrib.properties">
+ <classpath>
+ <pathelement location="${basedir}/lib/ant-contrib-1.0b3.jar"/>
+ </classpath>
+ </taskdef>
+
+ <!-- The classpath for compiling and running Spymemcached -->
+
+ <path id="compile.classpath">
+ <pathelement location="${build.classes}"/>
+ <path refid="lib.path"/>
+ <path refid="${name}.common.classpath"/>
+ </path>
+
+ <!-- ======================================
+ Section: Initializing
+ ====================================== -->
+ <target name="init">
+ <!-- Path containing third-party libraries deployed directly with spymemcached.
+ This does not include anything that Ivy can retrieve for us.
+ -->
+ <path id="lib.path">
+ <fileset dir="${lib.dir}">
+ <include name="*.jar" />
+ </fileset>
+ </path>
+
+ <!-- Classpath for unit tests (superset of compile.classpath) -->
+ <path id="test.classpath">
+ <pathelement location="${build.test.classes}" />
+ <path refid="compile.classpath" />
+ </path>
+ </target>
+
+ <target name="ivy-probe-antlib" >
+ <condition property="ivy.found">
+ <typefound uri="antlib:org.apache.ivy.ant" name="cleancache"/>
+ </condition>
+ </target>
+
+ <target name="ivy-download" unless="offline">
+ <mkdir dir="${lib.dir}" />
+ <get src="${ivy_repo_url}" dest="${ivy.jar}" usetimestamp="true"/>
+ </target>
+
+ <target name="ivy-init-antlib" depends="ivy-download,ivy-probe-antlib"
+ unless="ivy.found">
+ <typedef uri="antlib:org.apache.ivy.ant" onerror="fail"
+ loaderRef="ivyLoader">
+ <classpath>
+ <pathelement location="${ivy.jar}"/>
+ </classpath>
+ </typedef>
+ <fail >
+ <condition >
+ <not>
+ <typefound uri="antlib:org.apache.ivy.ant" name="cleancache"/>
+ </not>
+ </condition>
+ You need Apache Ivy 2.0 or later from http://ant.apache.org/
+ It could not be loaded from ${ivy_repo_url}
+ </fail>
+ </target>
+
+ <target name="ivy-init" depends="ivy-init-antlib" unless="ivy.configured">
+ <ivy:configure settingsid="${name}.ivy.settings" file="${ivysettings.xml}"/>
+ <property name="ivy.configured" value="true" />
+ </target>
+
+ <!-- ======================================
+ Section: Resolving and Retrieving
+ ====================================== -->
+ <target name="ivy-resolve" depends="ivy-init">
+ <ivy:resolve settingsRef="${name}.ivy.settings" conf="common" />
+ </target>
+
+ <target name="ivy-retrieve" depends="ivy-resolve">
+ <ivy:retrieve settingsRef="${name}.ivy.settings" conf="common"
+ pattern="${build.ivy.lib.dir}/${ivy.artifact.retrieve.pattern}" sync="true" />
+ <ivy:cachepath pathid="${name}.common.classpath" conf="common" />
+ </target>
+
+ <!-- retrieve ivy-managed artifacts for checkstyle -->
+ <target name="ivy-resolve-checkstyle" depends="ivy-init">
+ <ivy:resolve settingsRef="${name}.ivy.settings" conf="checkstyle" />
+ </target>
+
+ <target name="ivy-retrieve-checkstyle" depends="ivy-resolve-checkstyle">
+ <ivy:retrieve settingsRef="${name}.ivy.settings"
+ pattern="${build.ivy.lib.dir}/${ivy.artifact.retrieve.pattern}" sync="true" />
+ <ivy:cachepath pathid="${name}.checkstyle.classpath" conf="checkstyle" />
+ </target>
+
+ <!-- retrieve ivy-managed artifacts for checkstyle -->
+ <target name="ivy-resolve-findbugs" depends="ivy-init">
+ <ivy:resolve settingsRef="${name}.ivy.settings" conf="findbugs" />
+ </target>
+
+ <target name="ivy-retrieve-findbugs" depends="ivy-resolve-findbugs">
+ <ivy:retrieve settingsRef="${name}.ivy.settings"
+ pattern="${build.ivy.lib.dir}/${ivy.artifact.retrieve.pattern}" sync="true" />
+ <ivy:cachepath pathid="${name}.findbugs.classpath" conf="findbugs" />
+ </target>
+
+ <!-- ======================================
+ Section: Testing and Reporting
+ ====================================== -->
+ <target name="report" depends="ivy-retrieve"
+ description="Generates a report of dependencies">
+ <ivy:report todir="${build.dir}"/>
+ </target>
+
+ <target name="test" depends="compile, compile-test"
+ description="Run Spymemcached unit tests">
+ <echo>Testing against ${server.type}</echo>
+ <echo>IPV4 address ${server.address_v4}</echo>
+ <echo>IPV6 address ${server.address_v6}</echo>
+ <delete dir="${junit.dir}"/>
+ <mkdir dir="${junit.dir}/data"/>
+ <if>
+ <equals arg1="${server.type}" arg2="memcached"/>
+ <then>
+ <junit fork="yes" timeout="60000" failureproperty="junit.failure">
+ <batchtest todir="${junit.dir}/data" fork="yes">
+ <fileset dir="${test.dir}">
+ <include name="**/*Test.java"/>
+ <exclude name="**/VBucketMemcachedClientTest.java"/>
+ <exclude name="**/BucketMonitorTest.java"/>
+ <exclude name="**/ConfigurationProviderHTTPTest.java"/>
+ <exclude name="**/CouchbaseClientTest.java"/>
+ <exclude name="**/MembaseClientTest.java"/>
+ </fileset>
+ <formatter type="xml"/>
+ </batchtest>
+ <jvmarg value="-ea" />
+ <sysproperty key="server.address_v4" value="${server.address_v4}"/>
+ <sysproperty key="server.address_v6" value="${server.address_v6}"/>
+ <sysproperty key="server.type" value="${server.type}"/>
+ <formatter type="plain" usefile="false" />
+ <classpath refid="test.classpath" />
+ </junit>
+ </then>
+ </if>
+ <if>
+ <equals arg1="${server.type}" arg2="membase"/>
+ <then>
+ <junit fork="yes" timeout="60000" failureproperty="junit.failure">
+ <batchtest todir="${junit.dir}/data" fork="yes">
+ <fileset dir="${test.dir}">
+ <include name="**/*Test.java"/>
+ <exclude name="**/CouchbaseClientTest.java"/>
+ </fileset>
+ <formatter type="xml"/>
+ </batchtest>
+ <jvmarg value="-ea" />
+ <sysproperty key="server.address_v4" value="${server.address_v4}"/>
+ <sysproperty key="server.address_v6" value="${server.address_v6}"/>
+ <sysproperty key="server.type" value="${server.type}"/>
+ <formatter type="plain" usefile="false" />
+ <classpath refid="test.classpath" />
+ </junit>
+ </then>
+ </if>
+ <if>
+ <equals arg1="${server.type}" arg2="couchbase"/>
+ <then>
+ <junit fork="yes" timeout="60000" failureproperty="junit.failure">
+ <batchtest todir="${junit.dir}/data" fork="yes">
+ <fileset dir="${test.dir}">
+ <include name="**/*Test.java"/>
+ </fileset>
+ <formatter type="xml"/>
+ </batchtest>
+ <jvmarg value="-ea" />
+ <sysproperty key="server.address_v4" value="${server.address_v4}"/>
+ <sysproperty key="server.address_v6" value="${server.address_v6}"/>
+ <sysproperty key="server.type" value="${server.type}"/>
+ <formatter type="plain" usefile="false" />
+ <classpath refid="test.classpath" />
+ </junit>
+ </then>
+ </if>
+ <mkdir dir="${junit.dir}/tmp"/>
+ <junitreport todir="${junit.dir}/tmp">
+ <fileset dir="${junit.dir}/data"/>
+ <report todir="${junit.dir}"/>
+ </junitreport>
+ <delete dir="${junit.dir}/tmp"/>
+ <fail if="junit.failure" message="Unit test(s) failed. See reports!"/>
+ </target>
+
+ <target name="junitreport">
+ <mkdir dir="${junit.out.dir.html}"/>
+ <junitreport todir="${junit.out.dir.html}">
+ <fileset dir="${junit.out.dir.xml}">
+ <include name="*.xml"/>
+ </fileset>
+ <report format="frames" todir="${junit.out.dir.html}"/>
+ </junitreport>
+ </target>
+
+ <target name="compile-test" depends="compile"
+ description="Compile test classes">
+ <mkdir dir="${build.test.classes}" />
+ <javac
+ encoding="${build.encoding}"
+ srcdir="${test.dir}"
+ includes="**/*.java"
+ destdir="${build.test.classes}"
+ debug="${javac.debug}">
+ <classpath>
+ <path refid="test.classpath"/>
+ </classpath>
+ </javac>
+ </target>
+
+ <!-- =======================================
+ Section: Documentation Generation
+ ======================================= -->
+
+ <target name="javadoc-uptodate" depends="init">
+ <uptodate property="javadoc.is.uptodate">
+ <srcfiles dir="${src.dir}">
+ <include name="**/*.java" />
+ <include name="**/*.html" />
+ </srcfiles>
+ <mapper type="merge" to="${build.javadoc}/index.html" />
+ </uptodate>
+ </target>
+
+ <target name="docs" description="Build javadoc"
+ depends="init,javadoc-uptodate,compile" unless="javadoc.is.uptodate">
+ <exec executable="git" outputproperty="version">
+ <arg value="describe" />
+ <arg value="--abbrev=0" />
+ </exec>
+ <mkdir dir="${build.javadoc}" />
+ <exec executable="date" outputproperty="year">
+ <arg value="+%Y" />
+ </exec>
+ <javadoc
+ packagenames="src"
+ sourcepath="${src.dir}"
+ destdir="${build.javadoc}"
+ author="true"
+ version="true"
+ use="true"
+ windowtitle="${name} ${version} API"
+ doctitle="${name} ${version} API"
+ bottom="Copyright &amp;copy; 2006-2009 Dustin Sallings, 2009-2011 Couchbase, Inc.">
+ <packageset dir="${src.dir}">
+ <include name="**" />
+ </packageset>
+ <classpath>
+ <path refid="${name}.common.classpath" />
+ </classpath>
+ </javadoc>
+ </target>
+
+ <!-- =======================================
+ Section: Compiling and Packaging
+ ======================================= -->
+
+ <target name="gen-version" depends="init">
+ <exec executable="git" outputproperty="version">
+ <arg value="describe" />
+ <arg value="--abbrev=0" />
+ </exec>
+ <exec executable="${script.src.dir}/write-version-info.sh"
+ dir="${basedir}" failonerror="true">
+ <arg value="${build.dir}" />
+ <arg value="${version}" />
+ <arg value="${git.hash}" />
+ </exec>
+ </target>
+
+ <target name="compile" depends="ivy-init, gen-version, ivy-retrieve"
+ description="Compile and run the project">
+ <mkdir dir="${build.classes}" />
+ <javac
+ encoding="${build.encoding}"
+ srcdir="${src.dir}"
+ includes="**/*.java"
+ destdir="${build.classes}"
+ debug="${javac.debug}"
+ deprecation="${javac.deprecation}">
+ <classpath refid="${name}.common.classpath" />
+ </javac>
+
+ <javac
+ encoding="${build.encoding}"
+ srcdir="${build.src.dir}"
+ includes="**/*.java"
+ destdir="${build.classes}"
+ debug="${javac.debug}"
+ deprecation="${javac.deprecation}">
+ <classpath refid="${name}.common.classpath"/>
+ </javac>
+ <move file="${build.src.dir}/net/spy/memcached/changelog.txt"
+ tofile="${build.classes}/net/spy/memcached/changelog.txt" />
+ </target>
+
+ <target name="srcjars" depends="init,jar"
+ description="Create source jars">
+ <exec executable="git" outputproperty="version">
+ <arg value="describe" />
+ <arg value="--abbrev=0" />
+ </exec>
+ <mkdir dir="${build.dir}" />
+ <jar jarfile="${build.dir}/${name}-${version}-sources.jar">
+ <fileset dir="${src.dir}" />
+ <fileset dir="${build.src.dir}" />
+ </jar>
+ <jar jarfile="${build.dir}/${name}-${version}-test-sources.jar">
+ <fileset dir="${test.dir}" />
+ </jar>
+ </target>
+
+ <target name="jar" depends="compile" description="Creates a jar file for the plugin">
+ <exec executable="git" outputproperty="version">
+ <arg value="describe" />
+ <arg value="--abbrev=0" />
+ </exec>
+ <jar jarfile="${build.dir}/${name}-${version}.jar" basedir="${build.classes}">
+ <manifest>
+ <attribute name="Implementation-Title" value="java memcached client" />
+ <attribute name="Implementation-Version" value="${version}" />
+ <attribute name="Implementation-Vendor" value="${copyright}" />
+ <attribute name="Copyright" value="${copyright}" />
+ <attribute name="Main-Class" value="net.spy.memcached.BuildInfo" />
+ </manifest>
+ </jar>
+ </target>
+
+ <target name="package" depends="jar" description="Packages files for distribution">
+ <mkdir dir="${dist.dir}" />
+ <zip destfile="${name}-${version}.zip" basedir="${build.javadoc}" />
+ </target>
+
+ <!-- ======================================
+ Section: Checkstyle Integration
+ ====================================== -->
+ <target name="checkstyle" depends="ivy-retrieve-checkstyle, compile"
+ description="Check source code conventions">
+ <taskdef resource="checkstyletask.properties">
+ <classpath refid="${name}.checkstyle.classpath" />
+ </taskdef>
+
+ <mkdir dir="${checkstyle.report.dir}" />
+ <checkstyle config="${checkstyle.xml}" failOnViolation="false">
+ <fileset dir="${base.src.dir}" includes="**/*.java" />
+ <classpath refid="test.classpath"/>
+ <formatter type="xml"
+ toFile="${checkstyle.report.dir}/checkstyle-errors.xml" />
+ </checkstyle>
+
+ <xslt style="${checkstyle.format.xsl}"
+ in="${checkstyle.report.dir}/checkstyle-errors.xml"
+ out="${checkstyle.report.dir}/checkstyle-errors.html" />
+ </target>
+
+ <!-- ======================================
+ Section: Maven Support
+ ====================================== -->
+
+ <target name="mvn-prep" depends="init, ivy-init"
+ description="Creates maven files">
+ <!-- prepare for mvn tasks. -->
+
+ <!-- Download maven -->
+ <mkdir dir="${build.dir}" />
+ <get src="${mvn_repo_url}" dest="${mvn.jar}" usetimestamp="true" />
+
+ <!-- Register mvn tasks -->
+ <path id="mvn-ant-task.classpath" path="${mvn.jar}" />
+ <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
+ uri="urn:maven-artifact-ant"
+ classpathref="mvn-ant-task.classpath"/>
+
+ <!-- generate our poms from our ivy files. -->
+ <mkdir dir="${mvn.build.dir}" />
+ <ivy:makepom ivyfile="ivy/spymemcached.xml" pomfile="${spymemcached.pom}"
+ settingsRef="${name}.ivy.settings">
+ <mapping conf="default" scope="compile" />
+ <mapping conf="runtime" scope="runtime" />
+ </ivy:makepom>
+
+ <!-- Change the version in the pom file to reflect our claimed version. -->
+ <replaceregexp>
+ <regexp pattern="&lt;version&gt;.*&lt;/version&gt;" />
+ <substitution expression="&lt;version&gt;${version}&lt;/version&gt;" />
+ <fileset dir="${mvn.build.dir}">
+ <include name="*.pom" />
+ </fileset>
+ </replaceregexp>
+ </target>
+
+ <!-- ======================================
+ Section: Findbugs Integration
+ ====================================== -->
+ <target name="findbugs" depends="check-for-findbugs, jar"
+ description="Run FindBugs">
+ <taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask"
+ classpath="${findbugs.home}/lib/findbugs-ant.jar" />
+ <mkdir dir="${findbugs.out.dir}"/>
+ <findbugs home="${findbugs.home}" output="xml:withMessages"
+ outputFile="${findbugs.output.xml.file}" effort="max"
+ jvmargs="-Xms512m -Xmx512m">
+ <auxClasspath>
+ <path refid="${name}.common.classpath"/>
+ </auxClasspath>
+ <sourcePath path="${src.dir}" />
+ <sourcePath path="${test.dir}" />
+ <class location="${build.dir}/${dest.jar}" />
+ </findbugs>
+ <xslt style="${findbugs.home}/src/xsl/default.xsl"
+ in="${findbugs.output.xml.file}"
+ out="${findbugs.output.html.file}" />
+ </target>
+
+ <target name="warn-findbugs-unset" unless="findbugs.home">
+ <fail message="You need to set -Dfindbugs.home=/path/to/findbugs" />
+ </target>
+
+ <target name="check-for-findbugs" depends="warn-findbugs-unset">
+ <available property="findbugs.present"
+ file="${findbugs.home}/lib/findbugs.jar" />
+ </target>
+ <!-- ======================================
+ Section: IDE Integration
+ ====================================== -->
+ <target name="eclipse" description="Generate Eclipse project"
+ depends="init, ivy-retrieve">
+ <taskdef name="eclipse" classname="prantl.ant.eclipse.EclipseTask"
+ classpath="${lib.dir}/ant-eclipse-1.0-jvm1.2.jar" />
+ <eclipse failonerror="true" updatealways="true">
+ <project name="${name}" />
+ <classpath>
+ <source path="${src.dir}" />
+ <source path="${test.dir}" />
+ <output path="${build.dir}/eclipse-build" />
+ <library pathref="${name}.common.classpath" />
+ </classpath>
+ </eclipse>
+ </target>
+
+ <!-- =================================
+ Section: Cleaning
+ ================================= -->
+ <target name="clean" description="Clean the project">
+ <delete includeemptydirs="true">
+ <fileset dir="${basedir}">
+ <exclude name="src/**" />
+ <exclude name="ivy/**" />
+ <exclude name="etc/**" />
+ <exclude name="lib/ant*" />
+ <exclude name="xdocs/**" />
+ <exclude name="build.xml" />
+ <exclude name="config.properties" />
+ <exclude name="ivy.xml" />
+ <exclude name="LICENSE.txt" />
+ <exclude name="README.markdown" />
+ </fileset>
+ </delete>
+ </target>
+</project>
View
117 buildfile
@@ -1,117 +0,0 @@
-# -*- mode: ruby -*-
-# Generated by Buildr 1.2.10, change to your liking
-# Version number for this release
-VERSION_NUMBER = `git describe`.strip
-# Version number for the next release
-NEXT_VERSION = VERSION_NUMBER
-# Group identifier for your projects
-GROUP = "spy"
-COPYRIGHT = "2006-2011 Dustin Sallings, Matt Ingenthron"
-
-PROJECT_NAME = "spymemcached"
-
-TEST_SERVER_V4 = ENV['SPYMC_TEST_SERVER_V4'] || "127.0.0.1"
-TEST_SERVER_V6 = ENV['SPYMC_TEST_SERVER_V6'] || ENV['SPYMC_TEST_SERVER_V4'] || "::1"
-
-SERVER_TYPE=ENV['SPYMC_SERVER_TYPE'] || "memcached"
-
-puts "Using server at ipv4 #{TEST_SERVER_V4}"
-puts "Using server at ipv6 #{TEST_SERVER_V6}"
-puts "Server is type #{SERVER_TYPE}"
-
-def compute_released_verions
- h = {}
- `git tag`.reject{|i| i =~ /pre|rc/}.map{|v| v.strip}.each do |v|
- a=v.split('.')
- h[a[0..1].join('.')] = v
- end
- require 'set'
- rv = Set.new h.values
- rv << VERSION_NUMBER
- rv
-end
-
-RELEASED_VERSIONS=compute_released_verions.sort.reverse
-
-# Specify Maven 2.0 remote repositories here, like this:
-repositories.release_to = 'sftp://ingenthr@cb-web01.couchbase.com/var/www/domains/membase.org/files/htdocs/maven2'
-repositories.remote << "http://www.ibiblio.org/maven2/"
-repositories.remote << "http://bleu.west.spy.net/~dustin/m2repo/"
-repositories.remote << "https://repository.jboss.org/nexus/content/repositories/releases/"
-
-require 'buildr/java/emma'
-
-plugins=[
- 'spy:m1compat:rake:1.0',
- 'spy:site:rake:1.2.4',
- 'spy:git_tree_version:rake:1.0',
- 'spy:build_info:rake:1.1.1'
-]
-
-plugins.each do |spec|
- artifact(spec).tap do |plugin|
- plugin.invoke
- load plugin.name
- end
-end
-
-desc "Java memcached client"
-define "spymemcached" do
-
- test.options[:java_args] = "-ea"
- test.include "*Test"
- if SERVER_TYPE == 'memcached' then
- test.exclude '*VBucketMemcachedClientTest', '*BucketMonitorTest',
- '*ConfigurationProviderHTTPTest', '*CouchbaseClientTest',
- '*MembaseClientTest'
- end
- if SERVER_TYPE == 'membase' then
- test.exclude '*CouchbaseClientTest'
- end
- test.using :fork=>:each, :properties=>{ 'server.address_v4'=>TEST_SERVER_V4,
- 'server.address_v6'=>TEST_SERVER_V6,
- 'server.type'=>SERVER_TYPE }
-
- TREE_VER=tree_version
- puts "Tree version is #{TREE_VER}"
-
- project.version = VERSION_NUMBER
- project.group = GROUP
- compile.options.target = '1.5'
- manifest["Implementation-Vendor"] = COPYRIGHT
- manifest['Copyright'] = COPYRIGHT
- compile.with "log4j:log4j:jar:1.2.15", "jmock:jmock:jar:1.2.0",
- "junit:junit:jar:4.7", "org.jboss.netty:netty:jar:3.1.5.GA",
- "org.springframework:spring-beans:jar:3.0.3.RELEASE",
- "org.codehaus.jettison:jettison:jar:1.1",
- "commons-codec:commons-codec:jar:1.5",
- "org.easymock:easymock:jar:2.4",
- "org.easymock:easymockclassextension:jar:2.4",
- "junit-addons:junit-addons:jar:1.4",
- "cglib:cglib:jar:2.2.2", "asm:asm:jar:3.3.1",
- "org.apache.httpcomponents:httpcore:jar:4.1.1",
- "org.apache.httpcomponents:httpcore-nio:jar:4.1.1"
-
- # Gen build
- gen_build_info "net.spy.memcached", "git"
- compile.from "target/generated-src"
- resources.from "target/generated-rsrc"
-
- package(:jar).with :manifest =>
- manifest.merge("Main-Class" => "net.spy.memcached.BuildInfo")
-
- package :sources
- package :javadoc
- javadoc.using(:windowtitle => "javadocs for spymemcached #{TREE_VER}",
- :doctitle => "Javadocs for spymemcached #{TREE_VER}",
- :use => true,
- :charset => 'utf-8',
- :overview => 'src/main/java/net/spy/memcached/overview.html',
- :group => { 'Core' => 'net.spy.memcached' },
- :link => 'http://java.sun.com/j2se/1.5.0/docs/api/')
-
- emma.exclude 'net.spy.memcached.test.*'
- emma.exclude 'net.spy.memcached.BuildInfo'
-
-end
-# vim: syntax=ruby et ts=2
View
21 etc/checkstyle-java-header.txt
@@ -0,0 +1,21 @@
+^/\*\*$
+(^ \* Copyright \(C\) \d{4}+-\d{4}+ [a-zA-Z,. ]+$)+
+^ \*$
+^ \* Permission is hereby granted, free of charge, to any person obtaining a copy$
+^ \* of this software and associated documentation files \(the "Software"\), to deal$
+^ \* in the Software without restriction, including without limitation the rights$
+^ \* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell$
+^ \* copies of the Software, and to permit persons to whom the Software is$
+^ \* furnished to do so, subject to the following conditions:$
+^ \*$
+^ \* The above copyright notice and this permission notice shall be included in$
+^ \* all copies or substantial portions of the Software.$
+^ \*$
+^ \* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR$
+^ \* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,$
+^ \* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE$
+^ \* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER$
+^ \* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING$
+^ \* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALING$
+^ \* IN THE SOFTWARE.$
+^ \*/$
View
172 etc/checkstyle-noframes.xsl
@@ -0,0 +1,172 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+<xsl:output method="html" indent="yes"/>
+<xsl:decimal-format decimal-separator="." grouping-separator="," />
+
+<xsl:key name="files" match="file" use="@name" />
+
+<!-- Checkstyle XML Style Sheet by Stephane Bailliez <sbailliez@apache.org> -->
+<!-- Part of the Checkstyle distribution found at http://checkstyle.sourceforge.net -->
+<!-- Usage (generates checkstyle_report.html): -->
+<!-- <checkstyle failonviolation="false" config="${check.config}"> -->
+<!-- <fileset dir="${src.dir}" includes="**/*.java"/> -->
+<!-- <formatter type="xml" toFile="${doc.dir}/checkstyle_report.xml"/> -->
+<!-- </checkstyle> -->
+<!-- <style basedir="${doc.dir}" destdir="${doc.dir}" -->
+<!-- includes="checkstyle_report.xml" -->
+<!-- style="${doc.dir}/checkstyle-noframes-sorted.xsl"/> -->
+
+<xsl:template match="checkstyle">
+ <html>
+ <head>
+ <style type="text/css">
+ .bannercell {
+ border: 0px;
+ padding: 0px;
+ }
+ body {
+ margin-left: 10;
+ margin-right: 10;
+ font:normal 80% arial,helvetica,sanserif;
+ background-color:#FFFFFF;
+ color:#000000;
+ }
+ .a td {
+ background: #efefef;
+ }
+ .b td {
+ background: #fff;
+ }
+ th, td {
+ text-align: left;
+ vertical-align: top;
+ }
+ th {
+ font-weight:bold;
+ background: #ccc;
+ color: black;
+ }
+ table, th, td {
+ font-size:100%;
+ border: none
+ }
+ table.log tr td, tr th {
+
+ }
+ h2 {
+ font-weight:bold;
+ font-size:140%;
+ margin-bottom: 5;
+ }
+ h3 {
+ font-size:100%;
+ font-weight:bold;
+ background: #525D76;
+ color: white;
+ text-decoration: none;
+ padding: 5px;
+ margin-right: 2px;
+ margin-left: 2px;
+ margin-bottom: 0;
+ }
+ </style>
+ </head>
+ <body>
+ <a name="top"></a>
+ <!-- jakarta logo -->
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <tr>
+ <td class="bannercell" rowspan="2">
+ <!--a href="http://jakarta.apache.org/">
+ <img src="http://jakarta.apache.org/images/jakarta-logo.gif"
+ alt="http://jakarta.apache.org" align="left" border="0"/>
+ </a-->
+ </td>
+ <td class="text-align:right"><h2>CheckStyle Audit</h2></td>
+ </tr>
+ <tr>
+ <td class="text-align:right">Designed for use with <a href='http://checkstyle.sourceforge.net/'>CheckStyle</a> and <a href='http://jakarta.apache.org'>Ant</a>.</td>
+ </tr>
+ </table>
+ <hr size="1"/>
+
+ <!-- Summary part -->
+ <xsl:apply-templates select="." mode="summary"/>
+ <hr size="1" width="100%" align="left"/>
+
+ <!-- Package List part -->
+ <xsl:apply-templates select="." mode="filelist"/>
+ <hr size="1" width="100%" align="left"/>
+
+ <!-- For each package create its part -->
+ <xsl:apply-templates select="file[@name and generate-id(.) = generate-id(key('files', @name))]" />
+ <hr size="1" width="100%" align="left"/>
+
+ </body>
+ </html>
+</xsl:template>
+
+<xsl:template match="checkstyle" mode="filelist">
+ <h3>Files</h3>
+ <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+ <tr>
+ <th>Name</th>
+ <th>Errors</th>
+ </tr>
+ <xsl:for-each select="file[@name and generate-id(.) = generate-id(key('files', @name))]">
+ <xsl:sort data-type="number" order="descending" select="count(key('files', @name)/error)"/>
+ <xsl:variable name="errorCount" select="count(error)"/>
+ <tr>
+ <xsl:call-template name="alternated-row"/>
+ <td><a href="#f-{@name}"><xsl:value-of select="@name"/></a></td>
+ <td><xsl:value-of select="$errorCount"/></td>
+ </tr>
+ </xsl:for-each>
+ </table>
+</xsl:template>
+
+<xsl:template match="file">
+ <a name="f-{@name}"></a>
+ <h3>File <xsl:value-of select="@name"/></h3>
+
+ <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+ <tr>
+ <th>Error Description</th>
+ <th>Line</th>
+ </tr>
+ <xsl:for-each select="key('files', @name)/error">
+ <xsl:sort data-type="number" order="ascending" select="@line"/>
+ <tr>
+ <xsl:call-template name="alternated-row"/>
+ <td><xsl:value-of select="@message"/></td>
+ <td><xsl:value-of select="@line"/></td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ <a href="#top">Back to top</a>
+</xsl:template>
+
+<xsl:template match="checkstyle" mode="summary">
+ <h3>Summary</h3>
+ <xsl:variable name="fileCount" select="count(file[@name and generate-id(.) = generate-id(key('files', @name))])"/>
+ <xsl:variable name="errorCount" select="count(file/error)"/>
+ <table class="log" border="0" cellpadding="5" cellspacing="2" width="100%">
+ <tr>
+ <th>Files</th>
+ <th>Errors</th>
+ </tr>
+ <tr>
+ <xsl:call-template name="alternated-row"/>
+ <td><xsl:value-of select="$fileCount"/></td>
+ <td><xsl:value-of select="$errorCount"/></td>
+ </tr>
+ </table>
+</xsl:template>
+
+ <xsl:template name="alternated-row">
+ <xsl:attribute name="class">
+ <xsl:if test="position() mod 2 = 1">a</xsl:if>
+ <xsl:if test="position() mod 2 = 0">b</xsl:if>
+ </xsl:attribute>
+ </xsl:template>
+</xsl:stylesheet>
View
221 etc/checkstyle.xml
@@ -0,0 +1,221 @@
+<?xml version="1.0"?>
+<!--
+ Copyright (c) 2009-2011 Couchbase, Inc.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
+ this software and associated documentation files (the "Software"), to deal in
+ the Software without restriction, including without limitation the rights to
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ of the Software, and to permit persons to whom the Software is furnished to do
+ so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
+-->
+
+<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
+ "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
+
+<!--
+ Checkstyle configuration for Spymemcached that is based on the sun_checks.xml
+ file that is bundled with Checkstyle and includes checks for:
+
+ - the Java Language Specification at
+ http://java.sun.com/docs/books/jls/second_edition/html/index.html
+
+ - the Sun Code Conventions at http://java.sun.com/docs/codeconv/
+
+ - the Javadoc guidelines at
+ http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
+
+ - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
+
+ - some best practices
+
+ Checkstyle is very configurable. Be sure to read the documentation at
+ http://checkstyle.sf.net (or in your downloaded distribution).
+
+ Most Checks are configurable, be sure to consult the documentation.
+
+ To completely disable a check, just comment it out or delete it from the file.
+
+ Finally, it is worth reading the documentation.
+
+-->
+<module name="Checker">
+
+ <!-- Checks that a package.html file exists for each package. -->
+ <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
+ <!-- module name="PackageHtml"/ -->
+
+ <!-- Checks whether files end with a new line. -->
+ <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
+ <module name="NewlineAtEndOfFile"/>
+
+ <!-- Checks for Headers -->
+ <!-- See http://checkstyle.sf.net/config_header.html -->
+ <module name="RegexpHeader">
+ <property name="headerFile"
+ value="${etc.dir}/checkstyle-java-header.txt" />
+ <property name="multiLines" value="2"/>
+ </module>
+
+ <module name="FileLength">
+ <property name="max" value="2500"/>
+ </module>
+ <module name="FileTabCharacter"/>
+
+ <module name="TreeWalker">
+ <!-- Checks for Javadoc comments. -->
+ <!-- See http://checkstyle.sf.net/config_javadoc.html -->
+ <module name="JavadocType">
+ <property name="scope" value="public"/>
+ <property name="allowMissingParamTags" value="true"/>
+ </module>
+ <module name="JavadocStyle"/>
+
+ <module name="Regexp">
+ <property name="format" value="[ \t]+$"/>
+ <property name="illegalPattern" value="true"/>
+ <property name="message" value="Trailing whitespace"/>
+ </module>
+
+ <module name="SuperClone"/>
+ <module name="SuperFinalize"/>
+
+ <!-- Checks for Naming Conventions. -->
+ <!-- See http://checkstyle.sf.net/config_naming.html -->
+ <module name="ConstantName"/>
+ <module name="ClassTypeParameterName">
+ <property name="format" value="^[A-Z]+$"/>
+ </module>
+ <module name="LocalFinalVariableName"/>
+ <module name="LocalVariableName"/>
+ <module name="MemberName"/>
+ <module name="MethodName"/>
+ <module name="MethodTypeParameterName">
+ <property name="format" value="^[A-Z]+$"/>
+ </module>
+ <module name="PackageName"/>
+ <module name="ParameterName"/>
+ <module name="StaticVariableName"/>
+ <module name="TypeName"/>
+
+ <!-- Checks for imports -->
+ <!-- See http://checkstyle.sf.net/config_import.html -->
+ <module name="AvoidStarImport" />
+ <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
+ <module name="RedundantImport"/>
+ <module name="UnusedImports"/>
+ <module name="ImportOrder">
+ <property name="ordered" value="true"/>
+ <property name="separated" value="true"/>
+ </module>
+
+
+ <!-- Checks for Size Violations. -->
+ <!-- See http://checkstyle.sf.net/config_sizes.html -->
+ <module name="LineLength"/>
+ <module name="MethodLength">
+ <property name="max" value="10000"/>
+ </module>
+ <module name="ParameterNumber">
+ <property name="max" value="10"/>
+ </module>
+ <module name="OuterTypeNumber"/>
+
+ <!-- Checks for whitespace -->
+ <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+ <module name="GenericWhitespace"/>
+ <module name="EmptyForIteratorPad"/>
+ <module name="MethodParamPad"/>
+ <module name="NoWhitespaceAfter">
+ <property name="tokens"
+ value="BNOT, DEC, DOT, INC, LNOT, UNARY_MINUS, UNARY_PLUS" />
+ </module>
+ <module name="NoWhitespaceBefore"/>
+ <module name="OperatorWrap"/>
+ <module name="ParenPad"/>
+ <module name="TypecastParenPad"/>
+ <module name="WhitespaceAfter">
+ <property name="tokens" value="COMMA, SEMI"/>
+ </module>
+
+ <!-- Modifier Checks -->
+ <!-- See http://checkstyle.sf.net/config_modifiers.html -->
+ <module name="ModifierOrder"/>
+ <module name="RedundantModifier"/>
+
+ <!-- Checks for blocks. You know, those {}'s -->
+ <!-- See http://checkstyle.sf.net/config_blocks.html -->
+ <module name="AvoidNestedBlocks"/>
+ <module name="EmptyBlock">
+ <!-- catch blocks need a statement or a comment. -->
+ <property name="option" value="text" />
+ <property name="tokens" value="LITERAL_CATCH" />
+ </module>
+ <module name="EmptyBlock">
+ <!-- all other blocks need a real statement. -->
+ <property name="option" value="stmt" />
+ <property name="tokens" value="LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY,
+ LITERAL_IF, LITERAL_FOR, LITERAL_TRY, LITERAL_WHILE, INSTANCE_INIT,
+ STATIC_INIT" />
+ </module>
+ <module name="LeftCurly"/>
+ <module name="NeedBraces"/>
+ <module name="RightCurly"/>
+
+
+ <!-- Checks for common coding problems -->
+ <!-- See http://checkstyle.sf.net/config_coding.html -->
+ <!-- module name="AvoidInlineConditionals"/-->
+ <module name="DoubleCheckedLocking"/>
+ <module name="EmptyStatement"/>
+ <module name="EqualsHashCode"/>
+ <module name="StringLiteralEquality" />
+ <module name="HiddenField">
+ <property name="ignoreConstructorParameter" value="true"/>
+ </module>
+ <module name="IllegalInstantiation"/>
+ <module name="MissingSwitchDefault"/>
+ <module name="RedundantThrows"/>
+ <module name="SimplifyBooleanExpression"/>
+ <module name="SimplifyBooleanReturn"/>
+ <module name="DefaultComesLast" />
+
+ <!-- Checks for class design -->
+ <!-- See http://checkstyle.sf.net/config_design.html -->
+ <module name="FinalClass"/>
+ <module name="HideUtilityClassConstructor"/>
+ <module name="InterfaceIsType"/>
+ <module name="VisibilityModifier">
+ <property name="protectedAllowed" value="true" />
+ </module>
+ <module name="MissingOverride" />
+
+
+ <!-- Miscellaneous other checks. -->
+ <!-- See http://checkstyle.sf.net/config_misc.html -->
+ <module name="ArrayTypeStyle"/>
+
+ <module name="Indentation">
+ <property name="basicOffset" value="2" />
+ <property name="caseIndent" value="0" />
+ </module>
+ <!-- module name="TodoComment"/ -->
+ <module name="UpperEll"/>
+
+ <module name="FileContentsHolder" />
+ </module>
+
+ <!-- allow warnings to be suppressed -->
+ <module name="SuppressionCommentFilter" />
+</module>
View
73 ivy.xml
@@ -0,0 +1,73 @@
+<!--
+Copyright (c) 2009-2011 Couchbase, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+-->
+
+<ivy-module version="2.0">
+ <info organisation="couchbase" module="spymemcached"/>
+
+ <configurations defaultconfmapping="default">
+ <!--these match the Maven configurations-->
+ <conf name="default" extends="master,runtime"/>
+ <conf name="master" description="contains artifact but no dependencies"/>
+ <conf name="runtime" description="runtime but not the artifact" />
+
+ <conf name="checkstyle" visibility="private" />
+ <conf name="findbugs" visibility="private" />
+
+ <conf name="common" visibility="private" extends="runtime"
+ description="artifacts needed to compile/test the application"/>
+ </configurations>
+
+ <dependencies>
+ <dependency org="log4j" name="log4j" rev="${log4j.version}"
+ conf="common->master" />
+ <dependency org="jmock" name="jmock" rev="${jmock.version}"
+ conf="common->master" />
+ <dependency org="junit" name="junit" rev="${junit.version}"
+ conf="common->master" />
+ <dependency org="org.jboss.netty" name="netty" rev="${netty.version}"
+ conf="common->master" />
+ <dependency org="org.springframework" name="spring-beans"
+ rev="${spring-beans.version}" conf="common->master" />
+ <dependency org="org.codehaus.jettison" name="jettison"
+ rev="${jettison.version}" conf="common->master" />
+ <dependency org="commons-codec" name="commons-codec"
+ rev="${commons-codec.version}" conf="common->master" />
+ <dependency org="org.easymock" name="easymock" rev="${easymock.version}"
+ conf="common->master" />
+ <dependency org="org.easymock" name="easymockclassextension"
+ rev="${easymock-extension.version}" conf="common->master" />
+ <dependency org="junit-addons" name="junit-addons"
+ rev="${junit-addons.version}" conf="common->master" />
+ <dependency org="cglib" name="cglib" rev="${cglib.version}"
+ conf="common->master" />
+ <dependency org="asm" name="asm" rev="${asm.version}"
+ conf="common->master" />
+ <dependency org="org.apache.httpcomponents" name="httpcore"
+ rev="${httpcore.version}" conf="common->master"/>
+ <dependency org="org.apache.httpcomponents" name="httpcore-nio"
+ rev="${httpcore-nio.version}" conf="common->master"/>
+ <dependency org="checkstyle" name="checkstyle" rev="${checkstyle.version}"
+ conf="checkstyle->default" />
+ <dependency org="com.google.code.findbugs" name="findbugs"
+ rev="${findbugs.version}" conf="findbugs->master"/>
+ </dependencies>
+</ivy-module>
View
56 ivy/ivysettings.xml
@@ -0,0 +1,56 @@
+<!--
+ Copyright (c) 2009-2011 Couchbase, Inc.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
+ this software and associated documentation files (the "Software"), to deal in
+ the Software without restriction, including without limitation the rights to
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ of the Software, and to permit persons to whom the Software is furnished to do
+ so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
+ -->
+
+<ivysettings>
+
+ <property name="repo.maven.org" value="http://repo1.maven.org/maven2/"
+ override="false"/>
+ <property name="ibiblio.maven.org" value="http://www.ibiblio.org/maven2/"
+ override="false"/>
+ <property name="repo.couchbase"
+ value="http://files.couchbase.com/maven2"
+ override="false"/>
+
+ <property name="maven2.pattern"
+ value="[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier])"/>
+ <property name="maven2.pattern.ext" value="${maven2.pattern}.[ext]"/>
+
+ <property name="local-maven2-pattern"
+ value="${user.home}/.m2/repository/[organisation]/[module]/[revision]/[module]-[revision](-[classifier]).[ext]"
+ override="false" />
+ <settings defaultResolver="default"/>
+
+ <resolvers>
+ <chain name="default">
+ <ibiblio name="maven2" root="${repo.maven.org}"
+ pattern="${maven2.pattern.ext}" m2compatible="true"/>
+ <ibiblio name="ibiblio" root="${ibiblio.maven.org}"
+ pattern="${maven2.pattern.ext}" m2compatible="true"/>
+ <ibiblio name="couchbase-maven" root="${repo.couchbase}"
+ pattern="${maven2.pattern.ext}" m2compatible="true"/>
+ <filesystem name="local-maven2" m2compatible="true" >
+ <ivy pattern="${local-maven2-pattern}"/>
+ <artifact pattern="${local-maven2-pattern}"/>
+ </filesystem>
+ </chain>
+ </resolvers>
+</ivysettings>
View
41 ivy/libraries.properties
@@ -0,0 +1,41 @@
+# Copyright (c) 2009-2011 Couchbase, Inc.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy of
+# this software and associated documentation files (the "Software"), to deal in
+# the Software without restriction, including without limitation the rights to
+# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+# of the Software, and to permit persons to whom the Software is furnished to do
+# so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in all
+# copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+checkstyle.version=5.0
+
+findbugs.version=1.3.9
+
+ivy.version=2.2.0
+mvn.version=2.0.10
+
+asm.version=3.3.1
+cglib.version=2.2.2
+commons-codec.version=1.5
+easymock.version=2.4
+easymock-extension.version=2.4
+httpcore.version=4.1.1
+httpcore-nio.version=4.1.1
+jettison.version=1.1
+jmock.version=1.2.0
+junit.version=4.7
+junit-addons.version=1.4
+log4j.version=1.2.15
+netty.version=3.1.5.GA
+spring-beans.version=3.0.3.RELEASE
View
64 ivy/spymemcached.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" ?>
+<!--
+ Copyright (c) 2006-2009 Dustin Sallings
+ Copyright (c) 2009-2011 Couchbase, Inc.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
+ this software and associated documentation files (the "Software"), to deal in
+ the Software without restriction, including without limitation the rights to
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ of the Software, and to permit persons to whom the Software is furnished to do
+ so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ SOFTWARE.
+-->
+<ivy-module version="1.0">
+ <info organisation="net.spy.memcached" module="${name}">
+ <license name="Apache 2.0"/>
+ <ivyauthor name="Couchbase" url="http://github.com/dustin/java-memcached-client" />
+ <description>
+ Spymemcached
+ </description>
+ </info>
+ <configurations defaultconfmapping="default">
+ <!--these match the Maven configurations-->
+ <conf name="default" extends="master,runtime"/>
+ <conf name="master" description="contains the artifact but no dependencies"/>
+ <conf name="runtime" description="runtime but not the artifact" />
+ <conf name="checkstyle" visibility="private" />
+ <conf name="findbugs" visibility="private" />
+ <conf name="common" visibility="private" extends="runtime"
+ description="artifacts needed to compile/test the application"/>
+ </configurations>
+ <publications>
+ <!--get the artifact from our module name-->
+ <artifact conf="master"/>
+ </publications>
+ <dependencies>
+ <dependency org="log4j" name="log4j" rev="1.2.15" conf="common->master" />
+ <dependency org="jmock" name="jmock" rev="1.2.0" conf="common->master" />
+ <dependency org="junit" name="junit" rev="4.4" conf="common->master" />
+ <dependency org="org.jboss.netty" name="netty" rev="3.1.5.GA" conf="common->master" />
+ <dependency org="org.springframework" name="spring-beans" rev="3.0.3.RELEASE" conf="common->master" />
+ <dependency org="org.codehaus.jettison" name="jettison" rev="1.1" conf="common->master" />
+ <dependency org="commons-codec" name="commons-codec" rev="1.5" conf="common->master" />
+ <dependency org="org.easymock" name="easymock" rev="2.4" conf="common->master" />
+ <dependency org="org.easymock" name="easymockclassextension" rev="2.4" conf="common->master" />
+ <dependency org="junit-addons" name="junit-addons" rev="1.4" conf="common->master" />
+ <dependency org="cglib" name="cglib" rev="2.2.2" conf="common->master" />
+ <dependency org="asm" name="asm" rev="3.3.1" conf="common->master" />
+ <dependency org="org.apache.httpcomponents" name="httpcore" rev="4.1.1" conf="common->master"/>
+ <dependency org="org.apache.httpcomponents" name="httpcore-nio" rev="4.1.1" conf="common->master"/>
+ <dependency org="checkstyle" name="checkstyle" rev="5.0" conf="checkstyle->default" />
+ <dependency org="com.google.code.findbugs" name="findbugs" rev="1.3.9" conf="findbugs->master"/>
+ </dependencies>
+</ivy-module>
View
BIN  lib/ant-contrib-1.0b3.jar
Binary file not shown
View
BIN  lib/ant-eclipse-1.0-jvm1.2.jar
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.