Index: NOTICE.txt
===================================================================
--- NOTICE.txt	(revision 900440)
+++ NOTICE.txt	(working copy)
@@ -5,10 +5,10 @@
 The Apache Software Foundation (http://www.apache.org/).
 
 The snowball stemmers in
-  contrib/snowball/src/java/net/sf/snowball
+  contrib/analyzers/common/src/java/net/sf/snowball
 were developed by Martin Porter and Richard Boulton.
 The snowball stopword lists in
-  contrib/snowball/src/resources/org/apache/lucene/analysis/snowball
+  contrib/analyzers/common/src/resources/org/apache/lucene/analysis/snowball
 were developed by Martin Porter and Richard Boulton.
 The full snowball package is available from
   http://snowball.tartarus.org/
Index: README.txt
===================================================================
--- README.txt	(revision 900440)
+++ README.txt	(working copy)
@@ -25,7 +25,7 @@
 
 contrib/*
   Contributed code which extends and enhances Lucene, but is not
-  part of the core library.  Of special note are the JAR files in the analyzers and snowball directory which
+  part of the core library.  Of special note are the JAR files in the analyzers directory which
   contain various analyzers that people may find useful in place of the StandardAnalyzer.
 
 
Index: contrib/CHANGES.txt
===================================================================
--- contrib/CHANGES.txt	(revision 900440)
+++ contrib/CHANGES.txt	(working copy)
@@ -94,14 +94,13 @@
 
 Build
 
- * LUCENE-2117: SnowballAnalyzer now holds a runtime-dependency on
-   contrib-analyzers to correctly handle the unique Turkish casing behavior.
-   (Robert Muir via Simon Willnauer)  
-
  * LUCENE-2124: Moved the JDK-based collation support from contrib/collation 
    into core, and moved the ICU-based collation support into contrib/icu.  
    (Steven Rowe, Robert Muir)
 
+ * LUCENE-2226: Moved contrib/snowball functionality into contrib/analyzers
+   (Robert Muir)
+   
 Optimizations
 
  * LUCENE-2157: DelimitedPayloadTokenFilter no longer copies the buffer
Index: contrib/analyzers/common/README.txt
===================================================================
--- contrib/analyzers/common/README.txt	(revision 900440)
+++ contrib/analyzers/common/README.txt	(working copy)
@@ -1,4 +1,4 @@
-Lucene Snowball README file
+Lucene Contrib Analyzers README file
 
 This project provides pre-compiled version of the Snowball stemmers
 based on revision 500 of the Tartarus Snowball repository,
Index: contrib/analyzers/common/build.xml
===================================================================
--- contrib/analyzers/common/build.xml	(revision 900440)
+++ contrib/analyzers/common/build.xml	(working copy)
@@ -35,4 +35,20 @@
     <path refid="junit-path"/>
     <pathelement location="${build.dir}/classes/java"/>
   </path>	
+
+  <target name="compile-test" depends="download-snowball-vocab-tests, common.compile-test" />
+  <property name="snowball.vocab.rev" value="500"/>
+  <property name="snowball.vocab.url" 
+            value="svn://svn.tartarus.org/snowball/trunk/data"/>
+  <property name="snowball.vocab.dir" value="src/test/org/apache/lucene/analysis/snowball"/>
+		
+  <target name="download-snowball-vocab-tests" depends="compile-core"
+	      description="Downloads Snowball vocabulary tests">
+	<sequential>
+	  <mkdir dir="${snowball.vocab.dir}"/>
+	    <exec dir="${snowball.vocab.dir}" executable="${svn.exe}" failifexecutionfails="false" failonerror="true">
+	      <arg line="checkout --trust-server-cert --non-interactive -r ${snowball.vocab.rev} ${snowball.vocab.url}"/>
+	    </exec>
+	</sequential>
+  </target>
 </project>
Index: contrib/analyzers/common/src/java/org/apache/lucene/analysis/snowball/package.html
===================================================================
--- contrib/analyzers/common/src/java/org/apache/lucene/analysis/snowball/package.html	(revision 0)
+++ contrib/analyzers/common/src/java/org/apache/lucene/analysis/snowball/package.html	(working copy)
@@ -20,5 +20,34 @@
 {@link org.apache.lucene.analysis.TokenFilter} and {@link
 org.apache.lucene.analysis.Analyzer} implementations that use Snowball
 stemmers.
+<p>
+This project provides pre-compiled version of the Snowball stemmers
+based on revision 500 of the Tartarus Snowball repository,
+together with classes integrating them with the Lucene search engine.
+</p>
+<p>
+A few changes has been made to the static Snowball code and compiled stemmers:
+</p>
+<ul>
+  <li>Class SnowballProgram is made abstract and contains new abstract method stem() to avoid reflection in Lucene filter class SnowballFilter.</li>
+  <li>All use of StringBuffers has been refactored to StringBuilder for speed.</li>
+  <li>Snowball BSD license header has been added to the Java classes to avoid having RAT adding ASL headers.</li>
+</ul>
+<p>
+See the Snowball <a href ="http://snowball.tartarus.org/">home page</a> for more information about the algorithms.
+</p>
+
+<p>
+<b>IMPORTANT NOTICE ON BACKWARDS COMPATIBILITY!</b>
+</p>
+<p>
+An index created using the Snowball module in Lucene 2.3.2 and below
+might not be compatible with the Snowball module in Lucene 2.4 or greater.
+</p>
+<p>
+For more information about this issue see:
+https://issues.apache.org/jira/browse/LUCENE-1142
+</p>
+
 </body>
 </html>
Index: src/site/src/documentation/content/xdocs/site.xml
===================================================================
--- src/site/src/documentation/content/xdocs/site.xml	(revision 900440)
+++ src/site/src/documentation/content/xdocs/site.xml	(working copy)
@@ -72,7 +72,6 @@
 		    <javadoc-contrib-similarity label="Similarity" href="ext:javadocs-contrib-similarity"/>
 -->			
 		    <javadoc-contrib-remote label="Remote" href="ext:javadocs-contrib-remote"/>
-            <javadoc-contrib-snowball label="Snowball" href="ext:javadocs-contrib-snowball"/>
 		    <javadoc-contrib-spatial label="Spatial" href="ext:javadocs-contrib-spatial"/>
 		    <javadoc-contrib-spellchecker label="Spellchecker" href="ext:javadocs-contrib-spellchecker"/>
 		    <javadoc-contrib-surround label="Surround" href="ext:javadocs-contrib-surround"/>			
@@ -125,7 +124,6 @@
 	<javadocs-contrib-regex href="api/contrib-regex/index.html"/>
 	<javadocs-contrib-remote href="api/contrib-remote/index.html"/>
 	<javadocs-contrib-similarity href="api/contrib-similarity/index.html"/>
-	<javadocs-contrib-snowball href="api/contrib-snowball/index.html"/>
 	<javadocs-contrib-spatial href="api/contrib-spatial/index.html"/>
 	<javadocs-contrib-spellchecker href="api/contrib-spellchecker/index.html"/>
 	<javadocs-contrib-surround href="api/contrib-surround/index.html"/>
Index: src/site/src/documentation/content/xdocs/lucene-contrib/index.xml
===================================================================
--- src/site/src/documentation/content/xdocs/lucene-contrib/index.xml	(revision 900440)
+++ src/site/src/documentation/content/xdocs/lucene-contrib/index.xml	(working copy)
@@ -120,12 +120,7 @@
             <section id="remote"><title>remote</title>
                 <p>Classes to help use Lucene with RMI.</p>
                 <p>See <a href="../api/contrib-remote/index.html">remote javadoc</a></p>
-            </section>    
-            
-            <section id="snowball"><title>snowball</title>
-                <p>Pre-compiled versions of the Snowball stemmers for Lucene.</p>
-                <p>See <a href="../api/contrib-snowball/index.html">snowball javadoc</a></p>
-            </section>               
+            </section>                 
                         
             <section id="spatial"><title>spatial</title>
                 <p>Classes to help with efficient distance based sorting.</p>
