You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2012/12/27 13:56:42 UTC

svn commit: r1426185 [1/3] - in /manifoldcf/branches/CONNECTORS-594: ./ connectors/solrcloud/ connectors/solrcloud/connector/ connectors/solrcloud/connector/src/ connectors/solrcloud/connector/src/main/ connectors/solrcloud/connector/src/main/java/ con...

Author: kwright
Date: Thu Dec 27 12:56:41 2012
New Revision: 1426185

URL: http://svn.apache.org/viewvc?rev=1426185&view=rev
Log:
Original patch, modified to remove source control cruft, and fix build.xml merge errors.

Added:
    manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/
    manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/build.xml
    manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/
    manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/
    manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/
    manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/java/
    manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/java/org/
    manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/java/org/apache/
    manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/java/org/apache/manifoldcf/
    manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/java/org/apache/manifoldcf/agents/
    manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/java/org/apache/manifoldcf/agents/output/
    manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/java/org/apache/manifoldcf/agents/output/solrcloud/
    manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/java/org/apache/manifoldcf/agents/output/solrcloud/Messages.java
    manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/java/org/apache/manifoldcf/agents/output/solrcloud/RepositoryDocumentStream.java
    manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/java/org/apache/manifoldcf/agents/output/solrcloud/SolrCloudConfig.java
    manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/java/org/apache/manifoldcf/agents/output/solrcloud/SolrCloudConnector.java
    manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/native2ascii/
    manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/native2ascii/org/
    manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/native2ascii/org/apache/
    manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/native2ascii/org/apache/manifoldcf/
    manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/native2ascii/org/apache/manifoldcf/agents/
    manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/
    manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/solrcloud/
    manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/solrcloud/common_en_US.properties
    manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/solrcloud/common_ja_JP.properties
    manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/pom.xml
Modified:
    manifoldcf/branches/CONNECTORS-594/build.xml

Modified: manifoldcf/branches/CONNECTORS-594/build.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-594/build.xml?rev=1426185&r1=1426184&r2=1426185&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-594/build.xml (original)
+++ manifoldcf/branches/CONNECTORS-594/build.xml Thu Dec 27 12:56:41 2012
@@ -68,6 +68,7 @@
         <ant dir="connectors/jdbc" target="clean"/>
         <ant dir="connectors/livelink" target="clean"/>
         <ant dir="connectors/solr" target="clean"/>
+        <ant dir="connectors/solrcloud" target="clean"/>
         <ant dir="connectors/memex" target="clean"/>
         <ant dir="connectors/meridio" target="clean"/>
         <ant dir="connectors/opensearchserver" target="clean"/>
@@ -87,6 +88,7 @@
         <ant dir="tests/opensearchserver" target="clean"/>
         <ant dir="tests/rss" target="clean"/>
         <ant dir="tests/solr" target="clean"/>
+        <ant dir="tests/solrcloud" target="clean"/>
         <ant dir="tests/jcifs" target="clean"/>
         <ant dir="tests/jdbc" target="clean"/>
         <ant dir="tests/sharepoint" target="clean"/>
@@ -118,6 +120,7 @@
         <ant dir="connectors/jdbc" target="clean"/>
         <ant dir="connectors/livelink" target="clean"/>
         <ant dir="connectors/solr" target="clean"/>
+        <ant dir="connectors/solrcloud" target="clean"/>
         <ant dir="connectors/memex" target="clean"/>
         <ant dir="connectors/meridio" target="clean"/>
         <ant dir="connectors/opensearchserver" target="clean"/>
@@ -137,6 +140,7 @@
         <ant dir="tests/opensearchserver" target="clean"/>
         <ant dir="tests/rss" target="clean"/>
         <ant dir="tests/solr" target="clean"/>
+        <ant dir="tests/solrcloud" target="clean"/>
         <ant dir="tests/jcifs" target="clean"/>
         <ant dir="tests/jdbc" target="clean"/>
         <ant dir="tests/sharepoint" target="clean"/>
@@ -638,6 +642,42 @@
         <ant dir="connectors/solr" target="run-tests-HSQLDB"/>
     </target>
 
+    <target name="setup-solrcloud-connector" depends="build-framework" if="downloaded"/>
+
+    <target name="setup-solrcloud-connector-tests" depends="build-tests-framework" if="downloaded"/>
+
+    <target name="build-solrcloud-connector" depends="setup-solrcloud-connector" if="downloaded">
+        <ant dir="connectors/solrcloud" target="build"/>
+    </target>
+
+    <target name="doc-solrcloud-connector" depends="setup-solrcloud-connector" if="downloaded">
+        <ant dir="connectors/solrcloud" target="doc"/>
+    </target>
+
+    <target name="build-tests-solrcloud-connector" depends="setup-solrcloud-connector,setup-solrcloud-connector-tests" if="downloaded">
+        <ant dir="connectors/solrcloud" target="build-tests"/>
+    </target>
+
+    <target name="run-tests-solrcloud-connector" depends="setup-solrcloud-connector,setup-solrcloud-connector-tests" if="downloaded">
+        <ant dir="connectors/solrcloud" target="run-tests"/>
+    </target>
+
+    <target name="run-tests-derby-solrcloud-connector" depends="setup-solrcloud-connector,setup-solrcloud-connector-tests" if="downloaded">
+        <ant dir="connectors/solrcloud" target="run-tests-derby"/>
+    </target>
+
+    <target name="run-tests-postgresql-solrcloud-connector" depends="setup-solrcloud-connector,setup-solrcloud-connector-tests" if="downloaded">
+        <ant dir="connectors/solrcloud" target="run-tests-postgresql"/>
+    </target>
+
+    <target name="run-tests-mysql-solrcloud-connector" depends="setup-solrcloud-connector,setup-solrcloud-connector-tests" if="downloaded">
+        <ant dir="connectors/solrcloud" target="run-tests-mysql"/>
+    </target>
+
+    <target name="run-tests-HSQLDB-solrcloud-connector" depends="setup-solrcloud-connector,setup-solrcloud-connector-tests" if="downloaded">
+        <ant dir="connectors/solrcloud" target="run-tests-HSQLDB"/>
+    </target>
+
     <target name="setup-memex-connector" depends="build-framework" if="downloaded"/>
     
     <target name="setup-memex-connector-tests" depends="build-tests-framework" if="downloaded"/>
@@ -1705,6 +1745,43 @@
         </antcall>
     </target>
 
+    <target name="calculate-solrcloud-condition" depends="build-solrcloud-connector">
+        <available file="connectors/solrcloud/dist/lib" type="dir" property="solrcloud.exists"/>
+        <condition property="solrcloud.include">
+            <and>
+                <isset property="solrcloud.exists"/>
+                <isset property="downloaded"/>
+            </and>
+        </condition>
+    </target>
+
+    <target name="calculate-solrcloud-doc-condition" depends="doc-solrcloud-connector">
+        <available file="connectors/solrcloud/dist/doc" type="dir" property="solrcloud-doc.exists"/>
+        <condition property="solrcloud-doc.include">
+            <and>
+                <isset property="solrcloud-doc.exists"/>
+                <isset property="downloaded"/>
+            </and>
+        </condition>
+    </target>
+
+    <target name="deliver-solrcloud-connector" depends="calculate-solrcloud-condition" if="solrcloud.include">
+        <antcall target="general-connector-delivery">
+            <param name="connector-name" value="solrcloud"/>
+        </antcall>
+        <antcall target="general-add-output-connector">
+            <param name="connector-name" value="solrcloud"/>
+            <param name="connector-label" value="SolrCloud"/>
+            <param name="connector-class" value="org.apache.manifoldcf.agents.output.solrcloud.SolrCloudConnector"/>
+        </antcall>
+    </target>
+    
+    <target name="deliver-solrcloud-connector-doc" depends="calculate-solrcloud-doc-condition" if="solrcloud-doc.include">
+        <antcall target="general-connector-doc-delivery">
+            <param name="connector-name" value="solrcloud"/>
+        </antcall>
+    </target>
+
     <target name="calculate-memex-condition" depends="build-memex-connector">
         <available file="connectors/memex/dist/lib" type="dir" property="memex.exists"/>
         <condition property="memex.include">
@@ -2155,6 +2232,15 @@
       </condition>
     </target>
 
+    <target name="calculate-solrcloud-tests-condition" depends="calculate-filesystem-condition,calculate-solrcloud-condition">
+      <condition property="solrcloud-tests.include">
+        <and>
+            <isset property="filesystem.include"/>
+            <isset property="solrcloud.include"/>
+        </and>
+      </condition>
+    </target>
+
     <target name="calculate-gts-tests-condition" depends="calculate-filesystem-condition,calculate-gts-condition">
       <condition property="gts-tests.include">
         <and>
@@ -2259,6 +2345,10 @@
         <ant dir="tests/solr" target="run-UI-derby"/>
     </target>
 
+    <target name="run-solrcloud-UI-tests-derby" depends="build-tests-framework,build-tests-solrcloud-connector,build-tests-filesystem-connector,calculate-solrcloud-tests-condition" if="solrcloud-tests.include">
+        <ant dir="tests/solrcloud" target="run-UI-derby"/>
+    </target>
+
     <target name="run-gts-UI-tests-derby" depends="build-tests-framework,build-tests-filesystem-connector,build-tests-gts-connector,calculate-gts-tests-condition" if="gts-tests.include">
         <ant dir="tests/gts" target="run-UI-derby"/>
     </target>
@@ -2487,29 +2577,29 @@
         <ant dir="tests/sharepoint" target="run-load-HSQLDB"/>
     </target>
 
-    <target name="run-tests-open-connectors" depends="run-tests-activedirectory-connector,run-tests-ldap-connector,run-tests-alfresco-connector,run-tests-cmis-connector,run-tests-filesystem-connector,run-tests-nullauthority-connector,run-tests-nulloutput-connector,run-tests-rss-connector,run-tests-solr-connector,run-tests-webcrawler-connector,run-tests-wiki-connector,run-tests-jdbc-connector"/>
+    <target name="run-tests-open-connectors" depends="run-tests-activedirectory-connector,run-tests-ldap-connector,run-tests-alfresco-connector,run-tests-cmis-connector,run-tests-filesystem-connector,run-tests-nullauthority-connector,run-tests-nulloutput-connector,run-tests-rss-connector,run-tests-solr-connector,run-tests-solrcloud-connector,run-tests-webcrawler-connector,run-tests-wiki-connector,run-tests-jdbc-connector"/>
     <target name="run-tests-lgpl-connectors" depends="run-tests-jcifs-connector"/>
     <target name="run-tests-proprietary-connectors" depends="run-tests-documentum-connector,run-tests-filenet-connector,run-tests-livelink-connector,run-tests-memex-connector,run-tests-meridio-connector,run-tests-sharepoint-connector"/>
 
-    <target name="run-tests-derby-open-connectors" depends="run-tests-derby-activedirectory-connector,run-tests-derby-ldap-connector,run-tests-derby-alfresco-connector,run-tests-derby-cmis-connector,run-tests-derby-filesystem-connector,run-tests-derby-nullauthority-connector,run-tests-derby-nulloutput-connector,run-tests-derby-rss-connector,run-tests-derby-solr-connector,run-tests-derby-webcrawler-connector,run-tests-derby-wiki-connector,run-tests-derby-jdbc-connector"/>
+    <target name="run-tests-derby-open-connectors" depends="run-tests-derby-activedirectory-connector,run-tests-derby-ldap-connector,run-tests-derby-alfresco-connector,run-tests-derby-cmis-connector,run-tests-derby-filesystem-connector,run-tests-derby-nullauthority-connector,run-tests-derby-nulloutput-connector,run-tests-derby-rss-connector,run-tests-derby-solr-connector,run-tests-derby-solrcloud-connector,run-tests-derby-webcrawler-connector,run-tests-derby-wiki-connector,run-tests-derby-jdbc-connector"/>
     <target name="run-tests-derby-lgpl-connectors" depends="run-tests-derby-jcifs-connector"/>
     <target name="run-tests-derby-proprietary-connectors" depends="run-tests-derby-documentum-connector,run-tests-derby-filenet-connector,run-tests-derby-livelink-connector,run-tests-derby-memex-connector,run-tests-derby-meridio-connector,run-tests-derby-sharepoint-connector"/>
     
     <target name="end-to-end-tests-derby" depends="run-filesystem-tests-derby,run-webcrawler-tests-derby,run-rss-tests-derby,run-wiki-tests-derby,run-alfresco-tests-derby,run-cmis-tests-derby,run-sharepoint-tests-derby"/>
 
-    <target name="run-tests-postgresql-open-connectors" depends="run-tests-postgresql-activedirectory-connector,run-tests-postgresql-ldap-connector,run-tests-postgresql-alfresco-connector,run-tests-postgresql-cmis-connector,run-tests-postgresql-filesystem-connector,run-tests-postgresql-nullauthority-connector,run-tests-postgresql-nulloutput-connector,run-tests-postgresql-rss-connector,run-tests-postgresql-solr-connector,run-tests-postgresql-webcrawler-connector,run-tests-postgresql-wiki-connector,run-tests-postgresql-jdbc-connector,run-tests-postgresql-opensearchserver-connector,run-tests-postgresql-elasticsearch-connector"/>
+    <target name="run-tests-postgresql-open-connectors" depends="run-tests-postgresql-activedirectory-connector,run-tests-postgresql-ldap-connector,run-tests-postgresql-alfresco-connector,run-tests-postgresql-cmis-connector,run-tests-postgresql-filesystem-connector,run-tests-postgresql-nullauthority-connector,run-tests-postgresql-nulloutput-connector,run-tests-postgresql-rss-connector,run-tests-postgresql-solr-connector,run-tests-postgresql-solrcloud-connector,run-tests-postgresql-webcrawler-connector,run-tests-postgresql-wiki-connector,run-tests-postgresql-jdbc-connector,run-tests-postgresql-opensearchserver-connector,run-tests-postgresql-elasticsearch-connector"/>
     <target name="run-tests-postgresql-lgpl-connectors" depends="run-tests-postgresql-jcifs-connector"/>
     <target name="run-tests-postgresql-proprietary-connectors" depends="run-tests-postgresql-documentum-connector,run-tests-postgresql-filenet-connector,run-tests-postgresql-livelink-connector,run-tests-postgresql-memex-connector,run-tests-postgresql-meridio-connector,run-tests-postgresql-sharepoint-connector"/>
     
     <target name="end-to-end-tests-postgresql" depends="run-filesystem-tests-postgresql,run-wiki-tests-postgresql,run-alfresco-tests-postgresql,run-cmis-tests-postgresql,run-sharepoint-tests-postgresql"/>
 
-    <target name="run-tests-mysql-open-connectors" depends="run-tests-mysql-activedirectory-connector,run-tests-mysql-ldap-connector,run-tests-mysql-alfresco-connector,run-tests-mysql-cmis-connector,run-tests-mysql-filesystem-connector,run-tests-mysql-nullauthority-connector,run-tests-mysql-nulloutput-connector,run-tests-mysql-rss-connector,run-tests-mysql-solr-connector,run-tests-mysql-webcrawler-connector,run-tests-mysql-wiki-connector,run-tests-mysql-jdbc-connector,run-tests-mysql-opensearchserver-connector,run-tests-mysql-elasticsearch-connector"/>
+    <target name="run-tests-mysql-open-connectors" depends="run-tests-mysql-activedirectory-connector,run-tests-mysql-ldap-connector,run-tests-mysql-alfresco-connector,run-tests-mysql-cmis-connector,run-tests-mysql-filesystem-connector,run-tests-mysql-nullauthority-connector,run-tests-mysql-nulloutput-connector,run-tests-mysql-rss-connector,run-tests-mysql-solr-connector,run-tests-mysql-solrcloud-connector,run-tests-mysql-webcrawler-connector,run-tests-mysql-wiki-connector,run-tests-mysql-jdbc-connector,run-tests-mysql-opensearchserver-connector,run-tests-mysql-elasticsearch-connector"/>
     <target name="run-tests-mysql-lgpl-connectors" depends="run-tests-mysql-jcifs-connector"/>
     <target name="run-tests-mysql-proprietary-connectors" depends="run-tests-mysql-documentum-connector,run-tests-mysql-filenet-connector,run-tests-mysql-livelink-connector,run-tests-mysql-memex-connector,run-tests-mysql-meridio-connector,run-tests-mysql-sharepoint-connector"/>
     
     <target name="end-to-end-tests-mysql" depends="run-filesystem-tests-mysql,run-wiki-tests-mysql,run-alfresco-tests-mysql,run-cmis-tests-mysql,run-sharepoint-tests-mysql"/>
 
-    <target name="run-tests-HSQLDB-open-connectors" depends="run-tests-HSQLDB-activedirectory-connector,run-tests-HSQLDB-ldap-connector,run-tests-HSQLDB-alfresco-connector,run-tests-HSQLDB-cmis-connector,run-tests-HSQLDB-filesystem-connector,run-tests-HSQLDB-nullauthority-connector,run-tests-HSQLDB-nulloutput-connector,run-tests-HSQLDB-rss-connector,run-tests-HSQLDB-solr-connector,run-tests-HSQLDB-webcrawler-connector,run-tests-HSQLDB-wiki-connector,run-tests-HSQLDB-jdbc-connector,run-tests-HSQLDB-opensearchserver-connector,run-tests-HSQLDB-elasticsearch-connector"/>
+    <target name="run-tests-HSQLDB-open-connectors" depends="run-tests-HSQLDB-activedirectory-connector,run-tests-HSQLDB-ldap-connector,run-tests-HSQLDB-alfresco-connector,run-tests-HSQLDB-cmis-connector,run-tests-HSQLDB-filesystem-connector,run-tests-HSQLDB-nullauthority-connector,run-tests-HSQLDB-nulloutput-connector,run-tests-HSQLDB-rss-connector,run-tests-HSQLDB-solr-connector,run-tests-HSQLDB-solrcloud-connector,run-tests-HSQLDB-webcrawler-connector,run-tests-HSQLDB-wiki-connector,run-tests-HSQLDB-jdbc-connector,run-tests-HSQLDB-opensearchserver-connector,run-tests-HSQLDB-elasticsearch-connector"/>
     <target name="run-tests-HSQLDB-lgpl-connectors" depends="run-tests-HSQLDB-jcifs-connector"/>
     <target name="run-tests-HSQLDB-proprietary-connectors" depends="run-tests-HSQLDB-documentum-connector,run-tests-HSQLDB-filenet-connector,run-tests-HSQLDB-livelink-connector,run-tests-HSQLDB-memex-connector,run-tests-HSQLDB-meridio-connector,run-tests-HSQLDB-sharepoint-connector"/>
     
@@ -2527,8 +2617,8 @@
     <target name="deliver-open-connectors" depends="deliver-nullauthority-connector,deliver-activedirectory-connector,deliver-ldap-connector,deliver-alfresco-connector,deliver-cmis-connector,deliver-filesystem-connector,deliver-rss-connector,deliver-webcrawler-connector,deliver-wiki-connector,deliver-jdbc-connector"/>
     <target name="deliver-open-connectors-doc" depends="deliver-nullauthority-connector-doc,deliver-activedirectory-connector-doc,deliver-ldap-connector-doc,deliver-alfresco-connector-doc,deliver-cmis-connector-doc,deliver-filesystem-connector-doc,deliver-rss-connector-doc,deliver-webcrawler-connector-doc,deliver-wiki-connector-doc,deliver-jdbc-connector-doc"/>
     
-    <target name="deliver-output-connectors" depends="deliver-gts-connector,deliver-solr-connector,deliver-nulloutput-connector,deliver-opensearchserver-connector,deliver-elasticsearch-connector"/>
-    <target name="deliver-output-connectors-doc" depends="deliver-gts-connector-doc,deliver-solr-connector-doc,deliver-nulloutput-connector-doc,deliver-opensearchserver-connector-doc,deliver-elasticsearch-connector-doc"/>
+    <target name="deliver-output-connectors" depends="deliver-gts-connector,deliver-solr-connector,deliver-solrcloud-connector,deliver-nulloutput-connector,deliver-opensearchserver-connector,deliver-elasticsearch-connector"/>
+    <target name="deliver-output-connectors-doc" depends="deliver-gts-connector-doc,deliver-solr-connector-doc,deliver-solrcloud-connector-doc,deliver-nulloutput-connector-doc,deliver-opensearchserver-connector-doc,deliver-elasticsearch-connector-doc"/>
     
     <target name="deliver-lgpl-connectors" depends="deliver-jcifs-connector"/>
     <target name="deliver-lgpl-connectors-doc" depends="deliver-jcifs-connector-doc"/>
@@ -2676,7 +2766,7 @@
 
     <target name="ldtest" depends="load-dr,load-hs"/>
 
-    <target name="uitest" depends="run-filesystem-UI-tests-derby,run-filesystem-UI-tests-HSQLDB,run-jcifs-UI-tests-derby,run-jdbc-UI-tests-derby,run-activedirectory-UI-tests-derby,run-ldap-UI-tests-derby,run-rss-UI-tests-derby,run-webcrawler-UI-tests-derby,run-wiki-UI-tests-derby,run-solr-UI-tests-derby,run-cmis-UI-tests-derby,run-gts-UI-tests-derby,run-opensearchserver-UI-tests-derby"/>
+    <target name="uitest" depends="run-filesystem-UI-tests-derby,run-filesystem-UI-tests-HSQLDB,run-jcifs-UI-tests-derby,run-jdbc-UI-tests-derby,run-activedirectory-UI-tests-derby,run-ldap-UI-tests-derby,run-rss-UI-tests-derby,run-webcrawler-UI-tests-derby,run-wiki-UI-tests-derby,run-solr-UI-tests-derby,run-solrcloud-UI-tests-derby,run-cmis-UI-tests-derby,run-gts-UI-tests-derby,run-opensearchserver-UI-tests-derby"/>
     
     <target name="all" depends="build,javadoc,doc,image,test-dr,test-hs"/>
 
@@ -3547,7 +3637,21 @@ Use Apache Forrest version forrest-0.9-d
         </copy>
     </target>
 
-    <target name="make-core-deps" depends="download-httpcomponents,download-json,download-hsqldb,download-xerces,download-commons,download-solr-plugins,download-sharepoint-plugins,download-jstl,download-xmlgraphics-commons,download-wstx-asl,download-xmlsec,download-xml-apis,download-wss4j,download-velocity,download-streambuffer,download-stax,download-servlet-api,download-xml-resolver,download-osgi,download-opensaml,download-mimepull,download-mail,download-log4j,download-junit,download-jaxws,download-glassfish,download-jaxb,download-tomcat,download-h2,download-h2-support,download-geronimo-specs,download-fop,download-derby,download-postgresql,download-axis,download-saaj,download-wsdl4j,download-castor,download-jetty,download-slf4j,download-xalan,download-activation,download-avalon-framework,download-poi,download-chemistry,download-ecj">
+    <target name="download-solrj">
+        <mkdir dir="lib/solr-4.x"/>
+        <mkdir dir="lib/solr-4.x/solrj-lib"/>
+        <mkdir dir="build/download"/>
+        <get src="http://www.us.apache.org/dist/lucene/solr/4.0.0/apache-solr-4.0.0.tgz" dest="build/download/apache-solr-4.0.0.tgz"/>
+        <untar src="build/download/apache-solr-4.0.0.tgz" dest="build/download" compression="gzip"/>
+    	<copy todir="lib/solr-4.x">
+            <fileset file="build/download/apache-solr-4.0.0/dist/apache-solr-solrj-4.0.0.jar"/>
+        </copy>
+    	<copy todir="lib/solr-4.x/solrj-lib">
+            <fileset  dir="build/download/apache-solr-4.0.0/dist/solrj-lib"/>
+        </copy>
+    </target>
+
+    <target name="make-core-deps" depends="download-solrj,download-httpcomponents,download-json,download-hsqldb,download-xerces,download-commons,download-solr-plugins,download-sharepoint-plugins,download-jstl,download-xmlgraphics-commons,download-wstx-asl,download-xmlsec,download-xml-apis,download-wss4j,download-velocity,download-streambuffer,download-stax,download-servlet-api,download-xml-resolver,download-osgi,download-opensaml,download-mimepull,download-mail,download-log4j,download-junit,download-jaxws,download-glassfish,download-jaxb,download-tomcat,download-h2,download-h2-support,download-geronimo-specs,download-fop,download-derby,download-postgresql,download-axis,download-saaj,download-wsdl4j,download-castor,download-jetty,download-slf4j,download-xalan,download-activation,download-avalon-framework,download-poi,download-chemistry,download-ecj">
         <copy todir="lib">
             <fileset dir="lib-license" includes="*.txt"/>
         </copy>
@@ -3586,6 +3690,7 @@ Use Apache Forrest version forrest-0.9-d
         <ant dir="connectors/jdbc" target="download-dependencies"/>
         <ant dir="connectors/livelink" target="download-dependencies"/>
         <ant dir="connectors/solr" target="download-dependencies"/>
+        <ant dir="connectors/solrcloud" target="download-dependencies"/>
         <ant dir="connectors/memex" target="download-dependencies"/>
         <ant dir="connectors/meridio" target="download-dependencies"/>
         <ant dir="connectors/opensearchserver" target="download-dependencies"/>
@@ -3622,6 +3727,7 @@ Use Apache Forrest version forrest-0.9-d
         <ant dir="connectors/jdbc" target="download-cleanup"/>
         <ant dir="connectors/livelink" target="download-cleanup"/>
         <ant dir="connectors/solr" target="download-cleanup"/>
+        <ant dir="connectors/solrcloud" target="download-cleanup"/>
         <ant dir="connectors/memex" target="download-cleanup"/>
         <ant dir="connectors/meridio" target="download-cleanup"/>
         <ant dir="connectors/opensearchserver" target="download-cleanup"/>

Added: manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/build.xml
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/build.xml?rev=1426185&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/build.xml (added)
+++ manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/build.xml Thu Dec 27 12:56:41 2012
@@ -0,0 +1,50 @@
+<!--
+ 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 name="solrcloud" default="all">
+
+    <import file="../connector-build.xml"/>
+
+    <path id="connector-classpath">
+        <path refid="mcf-connector-build.connector-classpath"/>
+        <fileset dir="../../lib/solr-4.x">
+            <include name="apache-solr-solrj-*.jar"/>
+        </fileset>
+        <fileset dir="../../lib/solr-4.x/solrj-lib">
+            <include name="*.jar"/>
+        </fileset>
+    </path>
+	
+
+    <target name="lib" depends="mcf-connector-build.lib,precompile-check" if="canBuild">
+        <mkdir dir="dist/lib"/>
+        <copy todir="dist/lib">
+            <fileset dir="../../lib/solr-4.x">
+                <include name="apache-solr-solrj-*.jar"/>
+            </fileset>
+        </copy>
+        <copy todir="dist/lib">
+            <fileset dir="../../lib/solr-4.x/solrj-lib">
+                <include name="httpclient-*.jar"/>
+                <include name="httpcore-*.jar"/>
+                <include name="httpmime-*.jar"/>
+                <include name="zookeeper-*.jar"/>
+            </fileset>
+        </copy>
+    </target>
+
+</project>

Added: manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/java/org/apache/manifoldcf/agents/output/solrcloud/Messages.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/java/org/apache/manifoldcf/agents/output/solrcloud/Messages.java?rev=1426185&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/java/org/apache/manifoldcf/agents/output/solrcloud/Messages.java (added)
+++ manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/java/org/apache/manifoldcf/agents/output/solrcloud/Messages.java Thu Dec 27 12:56:41 2012
@@ -0,0 +1,139 @@
+/**
+ * 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.
+ */
+package org.apache.manifoldcf.agents.output.solrcloud;
+
+import java.util.Locale;
+import java.util.Map;
+import org.apache.manifoldcf.core.interfaces.ManifoldCFException;
+import org.apache.manifoldcf.core.interfaces.IHTTPOutput;
+
+public class Messages extends org.apache.manifoldcf.ui.i18n.Messages
+{
+  public static final String DEFAULT_BUNDLE_NAME="org.apache.manifoldcf.agents.output.solrcloud.common";
+  public static final String DEFAULT_PATH_NAME="org.apache.manifoldcf.agents.output.solrcloud";
+
+  /** Constructor - do no instantiate
+   */
+  protected Messages()
+  {
+  }
+
+  public static String getString(Locale locale, String messageKey)
+  {
+    return getString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
+  }
+
+  public static String getAttributeString(Locale locale, String messageKey)
+  {
+    return getAttributeString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
+  }
+
+  public static String getBodyString(Locale locale, String messageKey)
+  {
+    return getBodyString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
+  }
+
+  public static String getAttributeJavascriptString(Locale locale, String messageKey)
+  {
+    return getAttributeJavascriptString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
+  }
+
+  public static String getBodyJavascriptString(Locale locale, String messageKey)
+  {
+    return getBodyJavascriptString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
+  }
+
+  public static String getString(Locale locale, String messageKey, Object[] args)
+  {
+    return getString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
+  }
+
+  public static String getAttributeString(Locale locale, String messageKey, Object[] args)
+  {
+    return getAttributeString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
+  }
+
+  public static String getBodyString(Locale locale, String messageKey, Object[] args)
+  {
+    return getBodyString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
+  }
+
+  public static String getAttributeJavascriptString(Locale locale, String messageKey, Object[] args)
+  {
+    return getAttributeJavascriptString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
+  }
+
+  public static String getBodyJavascriptString(Locale locale, String messageKey, Object[] args)
+  {
+    return getBodyJavascriptString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
+  }
+
+  // More general methods which allow bundlenames and class loaders to be specified.
+
+  public static String getString(String bundleName, Locale locale, String messageKey, Object[] args)
+  {
+    return getString(Messages.class, bundleName, locale, messageKey, args);
+  }
+
+  public static String getAttributeString(String bundleName, Locale locale, String messageKey, Object[] args)
+  {
+    return getAttributeString(Messages.class, bundleName, locale, messageKey, args);
+  }
+
+  public static String getBodyString(String bundleName, Locale locale, String messageKey, Object[] args)
+  {
+    return getBodyString(Messages.class, bundleName, locale, messageKey, args);
+  }
+
+  public static String getAttributeJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
+  {
+    return getAttributeJavascriptString(Messages.class, bundleName, locale, messageKey, args);
+  }
+
+  public static String getBodyJavascriptString(String bundleName, Locale locale, String messageKey, Object[] args)
+  {
+    return getBodyJavascriptString(Messages.class, bundleName, locale, messageKey, args);
+  }
+
+  // Resource output
+
+  public static void outputResource(IHTTPOutput output, Locale locale, String resourceKey,
+      Map<String,String> substitutionParameters, boolean mapToUpperCase)
+          throws ManifoldCFException
+          {
+    outputResource(output,Messages.class,DEFAULT_PATH_NAME,locale,resourceKey,
+        substitutionParameters,mapToUpperCase);
+          }
+
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+      Map<String,String> substitutionParameters, boolean mapToUpperCase)
+          throws ManifoldCFException
+          {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+        substitutionParameters,mapToUpperCase);
+          }
+
+  public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String resourceKey,
+      Map<String,Object> contextObjects)
+          throws ManifoldCFException
+          {
+    outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+        contextObjects);
+          }
+
+}
+

Added: manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/java/org/apache/manifoldcf/agents/output/solrcloud/RepositoryDocumentStream.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/java/org/apache/manifoldcf/agents/output/solrcloud/RepositoryDocumentStream.java?rev=1426185&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/java/org/apache/manifoldcf/agents/output/solrcloud/RepositoryDocumentStream.java (added)
+++ manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/java/org/apache/manifoldcf/agents/output/solrcloud/RepositoryDocumentStream.java Thu Dec 27 12:56:41 2012
@@ -0,0 +1,122 @@
+/**
+ * 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.
+ */
+package org.apache.manifoldcf.agents.output.solrcloud;
+
+import java.io.BufferedOutputStream;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.Reader;
+
+import org.apache.manifoldcf.agents.interfaces.RepositoryDocument;
+import org.apache.solr.common.util.ContentStreamBase;
+
+/**
+ * @author minoru
+ *
+ */
+public class RepositoryDocumentStream extends ContentStreamBase {
+  private final RepositoryDocument document;
+  private byte[] binary;
+
+  /**
+   * @param document
+   */
+  public RepositoryDocumentStream( RepositoryDocument document ) {
+    this.document = document;
+    this.contentType = null;
+    this.name = this.document.getFileName();
+    this.size = this.document.getBinaryLength();
+    this.binary = this.getBytes(this.document.getBinaryStream());
+    this.sourceInfo = "repository document";
+  }
+
+  /* (non-Javadoc)
+   * @see org.apache.solr.common.util.ContentStream#getStream()
+   */
+  @Override
+  public InputStream getStream() throws IOException {
+    return new ByteArrayInputStream(this.binary);
+  }
+
+  /* (non-Javadoc)
+   * @see org.apache.solr.common.util.ContentStreamBase#getReader()
+   */
+  @Override
+  public Reader getReader() throws IOException {
+    String charset = getCharsetFromContentType( this.getContentType() );
+    return charset == null ? new InputStreamReader( this.getStream() ) : new InputStreamReader( this.getStream(), charset );
+  }
+
+  /* (non-Javadoc)
+   * @see org.apache.solr.common.util.ContentStreamBase#getContentType()
+   */
+  @Override
+  public String getContentType() {
+    if(contentType==null) {
+      InputStream stream = null;
+      try {
+        stream = this.getStream();
+        char first = (char)stream.read();
+        if(first == '<') {
+          contentType = "application/xml";
+        } else if(first == '{') {
+          contentType = "application/json";
+        } else {
+          contentType = "application/octet-stream";
+        }
+      } catch(Exception ex) {
+      } finally {
+        if (stream != null) try {
+          stream.close();
+        } catch (IOException ioe) {}
+      }
+    }
+    return contentType;
+  }
+
+  /**
+   * @param is
+   * @return
+   */
+  private byte[] getBytes(InputStream is) {
+    ByteArrayOutputStream b = new ByteArrayOutputStream();
+    OutputStream os = new BufferedOutputStream(b);
+    int c;
+    try {
+      while ((c = is.read()) != -1) {
+        os.write(c);
+      }
+    } catch (IOException e) {
+      e.printStackTrace();
+    } finally {
+      if (os != null) {
+        try {
+          os.flush();
+          os.close();
+        } catch (IOException e) {
+          e.printStackTrace();
+        }
+      }
+    }
+
+    return b.toByteArray();
+  }
+}

Added: manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/java/org/apache/manifoldcf/agents/output/solrcloud/SolrCloudConfig.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/java/org/apache/manifoldcf/agents/output/solrcloud/SolrCloudConfig.java?rev=1426185&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/java/org/apache/manifoldcf/agents/output/solrcloud/SolrCloudConfig.java (added)
+++ manifoldcf/branches/CONNECTORS-594/connectors/solrcloud/connector/src/main/java/org/apache/manifoldcf/agents/output/solrcloud/SolrCloudConfig.java Thu Dec 27 12:56:41 2012
@@ -0,0 +1,132 @@
+/**
+ * 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.
+ */
+package org.apache.manifoldcf.agents.output.solrcloud;
+
+
+/** Parameters and output data for SOLR output connector.
+ */
+public class SolrCloudConfig
+{
+  /** Solr type */
+  public static final String PARAM_SOLR_TYPE = "Solr type";
+
+
+
+  /*
+   * SolrCloud Configurations
+   */
+  /** ZooKeeper Servers */
+  public static final String PARAM_ZOOKEEPER_HOST = "ZooKeeper host";
+
+  /** ZooKeeper client timeout */
+  public static final String PARAM_ZOOKEEPER_CLIENT_TIMEOUT = "ZooKeeper client timeout";
+
+  /** ZooKeeper connect timeout */
+  public static final String PARAM_ZOOKEEPER_CONNECT_TIMEOUT = "ZooKeeper connect timeout";
+
+
+
+  /*
+   * Solr Configurations
+   */
+  /** Protocol */
+  public static final String PARAM_PROTOCOL = "Protocol";
+
+  /** Server name */
+  public static final String PARAM_HOST = "Host";
+
+  /** Port */
+  public static final String PARAM_PORT = "Port";
+
+  /** Context */
+  public static final String PARAM_CONTEXT = "Context";
+
+
+
+  /** Collection */
+  public static final String PARAM_COLLECTION = "Collection";
+
+  /** Update path */
+  public static final String PARAM_UPDATEPATH = "Server update handler";
+
+  /** Remove path */
+  public static final String PARAM_REMOVEPATH = "Server remove handler";
+
+  /** Status path */
+  public static final String PARAM_STATUSPATH = "Server status handler";
+
+
+
+  /** HTTP client connection timeout */
+  public static final String PARAM_HTTP_CLIENT_CONNECTION_TIMEOUT = "HTTP client connection timeout";
+
+  /** HTTP client socket timeout */
+  public static final String PARAM_HTTP_CLIENT_SOCKET_TIMEOUT = "HTTP client socket timeout";
+
+
+
+  /** Optional basic auth realm */
+  public static final String PARAM_REALM = "Realm";
+
+  /** Optional user ID */
+  public static final String PARAM_USERID = "User ID";
+
+  /** Optional user password */
+  public static final String PARAM_PASSWORD = "Password";
+
+  /** Keystore */
+  public static final String PARAM_KEYSTORE = "Keystore";
+
+  /** Id field */
+  public static final String PARAM_UNIQUE_KEY_FIELD = "Unique key field";
+
+  /** Maximum document length */
+  public static final String PARAM_MAXLENGTH = "Maximum document length";
+
+  /** Included mime types */
+  public static final String PARAM_INCLUDEDMIMETYPES = "Included mime types";
+
+  /** Excluded mime types */
+  public static final String PARAM_EXCLUDEDMIMETYPES="Excluded mime types";
+
+  /** Node describing an argument */
+  public static final String NODE_ARGUMENT = "argument";
+
+  /** Attribute with the argument name */
+  public static final String ATTRIBUTE_NAME = "name";
+
+  /** Attribute with the argument value */
+  public static final String ATTRIBUTE_VALUE = "value";
+
+  /** Enable commits */
+  public static final String PARAM_COMMITS = "Commits";
+
+  /** Commit within time */
+  public static final String PARAM_COMMITWITHIN = "Commit within";
+
+  // Output specification
+
+  /** Node describing a fieldmap */
+  public static final String NODE_FIELDMAP = "fieldmap";
+
+  /** Attribute describing a source field name */
+  public static final String ATTRIBUTE_SOURCE = "source";
+
+  /** Attribute describing a target field name */
+  public static final String ATTRIBUTE_TARGET = "target";
+
+}