Author: kwright
Date: Thu Nov 21 13:43:39 2013
New Revision: 1544177
URL: http://svn.apache.org/r1544177
Log:
Committing first patch for CONNECTORS-818.
Added:
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/build.xml
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/java/
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/java/org/
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/java/org/apache/
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/java/org/apache/manifoldcf/
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/java/org/apache/manifoldcf/agents/
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/java/org/apache/manifoldcf/agents/output/
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/java/org/apache/manifoldcf/agents/output/rabbitmq/
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/java/org/apache/manifoldcf/agents/output/rabbitmq/OutboundDocument.java
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/java/org/apache/manifoldcf/agents/output/rabbitmq/RabbitmqConfig.java
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/java/org/apache/manifoldcf/agents/output/rabbitmq/RabbitmqOutputConnector.java
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/native2ascii/
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/native2ascii/org/
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/native2ascii/org/apache/
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/native2ascii/org/apache/manifoldcf/
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/native2ascii/org/apache/manifoldcf/agents/
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/rabbitmq/
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/rabbitmq/common_en_US.properties
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/rabbitmq/common_ja_JP.properties
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/resources/
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/resources/org/
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/resources/org/apache/
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/resources/org/apache/manifoldcf/
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/resources/org/apache/manifoldcf/agents/
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/resources/org/apache/manifoldcf/agents/output/
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/resources/org/apache/manifoldcf/agents/output/rabbitmq/
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/resources/org/apache/manifoldcf/agents/output/rabbitmq/viewConfiguration.html
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/pom.xml
Modified:
manifoldcf/branches/CONNECTORS-818/build.xml
manifoldcf/branches/CONNECTORS-818/connectors/ (props changed)
manifoldcf/branches/CONNECTORS-818/connectors/connector-build.xml
manifoldcf/branches/CONNECTORS-818/connectors/pom.xml
manifoldcf/branches/CONNECTORS-818/pom.xml
Modified: manifoldcf/branches/CONNECTORS-818/build.xml
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-818/build.xml?rev=1544177&r1=1544176&r2=1544177&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-818/build.xml (original)
+++ manifoldcf/branches/CONNECTORS-818/build.xml Thu Nov 21 13:43:39 2013
@@ -72,6 +72,7 @@
<ant dir="connectors/jcifs" target="clean"/>
<ant dir="connectors/jdbc" target="clean"/>
<ant dir="connectors/livelink" target="clean"/>
+ <ant dir="connectors/rabbitmq" target="clean"/>
<ant dir="connectors/solr" target="clean"/>
<ant dir="connectors/memex" target="clean"/>
<ant dir="connectors/meridio" target="clean"/>
@@ -2073,6 +2074,33 @@
</antcall>
</target>
+ <target name="setup-rabbitmq-connector" depends="build-framework"
if="downloaded"/>
+
+ <target name="build-rabbitmq-connector"
depends="setup-rabbitmq-connector" if="downloaded">
+ <ant dir="connectors/rabbitmq" target="build"/>
+ </target>
+
+ <target name="calculate-rabbitmq-condition"
depends="build-rabbitmq-connector">
+ <available file="connectors/rabbitmq/dist/lib" type="dir"
property="rabbitmq.exists"/>
+ <condition property="rabbitmq.include">
+ <and>
+ <isset property="rabbitmq.exists"/>
+ <isset property="downloaded"/>
+ </and>
+ </condition>
+ </target>
+
+ <target name="deliver-rabbitmq-connector"
depends="calculate-rabbitmq-condition" if="rabbitmq.include">
+ <antcall target="general-connector-delivery">
+ <param name="connector-name" value="rabbitmq"/>
+ </antcall>
+ <antcall target="general-add-output-connector">
+ <param name="connector-name" value="rabbitmq"/>
+ <param name="connector-label" value="RabbitMQ"/>
+ <param name="connector-class"
value="org.apache.manifoldcf.agents.output.rabbitmq.RabbitmqOutputConnector"/>
+ </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">
@@ -2998,7 +3026,7 @@
<target name="deliver-open-connectors"
depends="deliver-generic-connector,deliver-jira-connector,deliver-googledrive-connector,deliver-dropbox-connector,deliver-nullauthority-connector,deliver-activedirectory-connector,deliver-ldap-connector,deliver-alfresco-connector,deliver-cmis-connector,deliver-filesystem-connector,deliver-hdfs-connector,deliver-rss-connector,deliver-webcrawler-connector,deliver-wiki-connector,deliver-jdbc-connector"/>
<target name="deliver-open-connectors-doc"
depends="deliver-generic-connector-doc,deliver-jira-connector-doc,deliver-googledrive-connector-doc,deliver-dropbox-connector-doc,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-hdfs-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"
depends="deliver-gts-connector,deliver-solr-connector,deliver-nulloutput-connector,deliver-opensearchserver-connector,deliver-elasticsearch-connector,deliver-rabbitmq-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-mapping-connectors" depends="deliver-regexp-mapper"/>
@@ -4033,6 +4061,17 @@ Use Apache Forrest version forrest-0.9-d
</antcall>
</target>
+ <target name="download-rabbitmq-client">
+ <mkdir dir="lib"/>
+ <antcall target="download-via-maven">
+ <param name="target" value="lib"/>
+ <param name="project-path" value="com/rabbitmq"/>
+ <param name="artifact-version" value="3.1.4"/>
+ <param name="artifact-name" value="amqp-client"/>
+ <param name="artifact-type" value="jar"/>
+ </antcall>
+ </target>
+
<target name="download-google-api-client">
<mkdir dir="lib"/>
<antcall target="download-via-maven">
@@ -4148,7 +4187,7 @@ Use Apache Forrest version forrest-0.9-d
</antcall>
</target>
- <target name="make-core-deps"
depends="download-jira-client,download-google-api-client,download-dropbox-client,download-solrj,download-zookeeper,download-httpcomponents,download-json,download-hsqldb,download-xerces,download-commons,download-elasticsearch-plugin,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,download-hadoop"
>
+ <target name="make-core-deps"
depends="download-jira-client,download-google-api-client,download-dropbox-client,download-solrj,download-zookeeper,download-httpcomponents,download-json,download-hsqldb,download-xerces,download-commons,download-elasticsearch-plugin,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,download-hadoop,
download-rabbitmq-client">
<copy todir="lib">
<fileset dir="lib-license" includes="*.txt"/>
</copy>
@@ -4191,6 +4230,7 @@ Use Apache Forrest version forrest-0.9-d
<ant dir="connectors/jcifs" target="download-dependencies"/>
<ant dir="connectors/jdbc" target="download-dependencies"/>
<ant dir="connectors/livelink" target="download-dependencies"/>
+ <ant dir="connectors/rabbitmq" target="download-dependencies"/>
<ant dir="connectors/solr" target="download-dependencies"/>
<ant dir="connectors/memex" target="download-dependencies"/>
<ant dir="connectors/meridio" target="download-dependencies"/>
@@ -4232,6 +4272,7 @@ Use Apache Forrest version forrest-0.9-d
<ant dir="connectors/jcifs" target="download-cleanup"/>
<ant dir="connectors/jdbc" target="download-cleanup"/>
<ant dir="connectors/livelink" target="download-cleanup"/>
+ <ant dir="connectors/rabbitmq" target="download-cleanup"/>
<ant dir="connectors/solr" target="download-cleanup"/>
<ant dir="connectors/memex" target="download-cleanup"/>
<ant dir="connectors/meridio" target="download-cleanup"/>
Propchange: manifoldcf/branches/CONNECTORS-818/connectors/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Thu Nov 21 13:43:39 2013
@@ -1 +1,2 @@
target
+.project
Modified: manifoldcf/branches/CONNECTORS-818/connectors/connector-build.xml
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-818/connectors/connector-build.xml?rev=1544177&r1=1544176&r2=1544177&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-818/connectors/connector-build.xml (original)
+++ manifoldcf/branches/CONNECTORS-818/connectors/connector-build.xml Thu Nov
21 13:43:39 2013
@@ -56,6 +56,7 @@
<include name="xercesImpl*.jar"/>
<include name="xml-apis*.jar"/>
<include name="velocity*.jar"/>
+ <include name="amqp*.jar"/>
</fileset>
<fileset dir="../../lib">
<include name="axis*.jar"/>
Modified: manifoldcf/branches/CONNECTORS-818/connectors/pom.xml
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-818/connectors/pom.xml?rev=1544177&r1=1544176&r2=1544177&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-818/connectors/pom.xml (original)
+++ manifoldcf/branches/CONNECTORS-818/connectors/pom.xml Thu Nov 21 13:43:39
2013
@@ -43,7 +43,6 @@
<module>nullauthority</module>
<module>nulloutput</module>
<module>rss</module>
- <module>sharepoint</module>
<module>solr</module>
<module>webcrawler</module>
<module>cmis</module>
@@ -56,6 +55,7 @@
<module>jira</module>
<module>generic</module>
<module>regexpmapper</module>
+ <module>rabbitmq</module>
</modules>
</project>
Added: manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/build.xml
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/build.xml?rev=1544177&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/build.xml (added)
+++ manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/build.xml Thu Nov 21
13:43:39 2013
@@ -0,0 +1,44 @@
+<!--
+ 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="rabbitmq" default="all">
+
+ <import file="../connector-build.xml"/>
+
+ <target name="download-dependencies">
+ </target>
+
+ <path id="connector-classpath">
+ <path refid="mcf-connector-build.connector-classpath"/>
+ <fileset dir="../../lib">
+ <include name="amqp*.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">
+ <include name="amqp*.jar"/>
+ </fileset>
+ </copy>
+ </target>
+ <target name="download-cleanup">
+
+ </target>
+
+</project>
Added:
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/java/org/apache/manifoldcf/agents/output/rabbitmq/OutboundDocument.java
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/java/org/apache/manifoldcf/agents/output/rabbitmq/OutboundDocument.java?rev=1544177&view=auto
==============================================================================
---
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/java/org/apache/manifoldcf/agents/output/rabbitmq/OutboundDocument.java
(added)
+++
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/java/org/apache/manifoldcf/agents/output/rabbitmq/OutboundDocument.java
Thu Nov 21 13:43:39 2013
@@ -0,0 +1,194 @@
+/**
+ * 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.rabbitmq;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.util.Iterator;
+import java.util.zip.DeflaterOutputStream;
+import java.util.zip.InflaterOutputStream;
+import org.apache.manifoldcf.agents.interfaces.RepositoryDocument;
+import org.apache.manifoldcf.core.common.Base64;
+import org.apache.manifoldcf.core.interfaces.ManifoldCFException;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+public class OutboundDocument {
+ protected static final String allowAttributeName = "allow_token_";
+ protected static final String denyAttributeName = "deny_token_";
+ protected static final String noSecurityToken = "__nosecurity__";
+ protected static final boolean useNullValue = false;
+ private RepositoryDocument document;
+ private InputStream inputStream;
+ private String documentURI;
+ public static enum Operation { ADD, UPDATE, DELETE };
+ Operation operation = Operation.ADD;
+
+ public OutboundDocument(RepositoryDocument document) {
+ this.document = document;
+ this.inputStream = document.getBinaryStream();
+ }
+
+ public OutboundDocument() {
+ }
+
+ public RepositoryDocument getDocument() {
+ return this.document;
+ }
+
+ public String getDocumentURI() {
+ return this.documentURI;
+ }
+
+ public void setOperation(Operation operation) {
+ this.operation = operation;
+ }
+
+ public String writeTo(Writer out) throws JSONException, IOException,
+ ManifoldCFException {
+ JSONObject json = new JSONObject();
+
+ json.put("documentUri", this.documentURI);
+ json.put("acl", this.document.getACL());
+ json.put("acl_deny", this.document.getDenyACL());
+ json.put("acl_share", this.document.getShareACL());
+ json.put("acl_share_deny", this.document.getShareDenyACL());
+
+
+
+ JSONObject fields = new JSONObject();
+ json.put("fields", fields);
+ Iterator i = this.document.getFields();
+ while (i.hasNext()) {
+ String fieldName = (String) i.next();
+ String[] fieldValues =
this.document.getFieldAsStrings(fieldName);
+ fields.put(fieldName, fieldValues);
+ }
+
+ Base64 base64 = new Base64();
+ StringWriter outputWriter = new StringWriter();
+ base64.encodeStream(this.inputStream, outputWriter);
+
+ JSONObject file = new JSONObject();
+ file.put("content", outputWriter.toString());
+ file.put("name", this.document.getFileName());
+
+ outputWriter.close();
+ json.put("file", file);
+ json.write(out);
+
+ return json.toString();
+
+ }
+
+ public void loadString(String content) throws JSONException,
+ ManifoldCFException, IOException {
+ JSONObject json = new JSONObject(content);
+
+ this.document = new RepositoryDocument();
+ if(json.has("file")) {
+ JSONObject file = json.getJSONObject("file");
+ this.document.setFileName(file.getString("name"));
+ Base64 base64 = new Base64();
+ String fileContentB64 = file.getString("content");
+ byte[] bytes = base64.decodeString(fileContentB64);
+ InputStream is = decompress(new
ByteArrayInputStream(bytes));
+ this.inputStream = is;
+ int fileBytes = bytes.length;
+ this.document.setBinary(is, fileBytes);
+ }
+ else {
+ this.document.setBinary(new ByteArrayInputStream(new byte[0]), 0);
+ }
+
+ this.documentURI = json.getString("documentUri");
+
+ if(json.has("fields")) {
+ JSONObject fields = json.getJSONObject("fields");
+ Iterator i = fields.keys();
+ while (i.hasNext()) {
+ String fieldName = (String) i.next();
+ JSONArray fieldValues = fields.getJSONArray(fieldName);
+ String[] values = toArray(fieldValues);
+ this.document.addField(fieldName, values);
+ }
+ }
+
+ if(json.has("acl"))
+ this.document.setACL(toArray(json.getJSONArray("acl")));
+ if(json.has("acl_deny"))
+
this.document.setDenyACL(toArray(json.getJSONArray("acl_deny")));
+ if(json.has("acl_share"))
+
this.document.setShareACL(toArray(json.getJSONArray("acl_share")));
+ if(json.has("acl_share_deny"))
+ this.document.setShareDenyACL(toArray(json
+ .getJSONArray("acl_share_deny")));
+ }
+
+ private String[] toArray(JSONArray array) throws JSONException {
+ if (array == null) {
+ return null;
+ }
+ String[] values = new String[array.length()];
+ for (int j = 0; j < array.length(); j++) {
+ values[j] = array.getString(j);
+ }
+ return values;
+ }
+
+ private static InputStream compress(InputStream inputStream)
+ throws IOException {
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ DeflaterOutputStream compressor = new DeflaterOutputStream(out);
+ long byteCount = 0L;
+ byte[] buf = new byte[1024];
+ int read;
+ while ((read = inputStream.read(buf)) != -1) {
+ compressor.write(buf, 0, read);
+ byteCount += read;
+ }
+ inputStream.close();
+ out.close();
+ compressor.close();
+ byte[] outBytes = out.toByteArray();
+ return new ByteArrayInputStream(outBytes);
+ }
+
+ private static InputStream decompress(InputStream inputStream)
+ throws IOException {
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ InflaterOutputStream compressor = new InflaterOutputStream(out);
+ long byteCount = 0L;
+ byte[] buf = new byte[1024];
+ int read;
+ while ((read = inputStream.read(buf)) != -1) {
+ compressor.write(buf, 0, read);
+ byteCount += read;
+ }
+ inputStream.close();
+ out.close();
+ compressor.close();
+ byte[] outBytes = out.toByteArray();
+ return new ByteArrayInputStream(outBytes);
+ }
+}
Added:
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/java/org/apache/manifoldcf/agents/output/rabbitmq/RabbitmqConfig.java
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/java/org/apache/manifoldcf/agents/output/rabbitmq/RabbitmqConfig.java?rev=1544177&view=auto
==============================================================================
---
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/java/org/apache/manifoldcf/agents/output/rabbitmq/RabbitmqConfig.java
(added)
+++
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/java/org/apache/manifoldcf/agents/output/rabbitmq/RabbitmqConfig.java
Thu Nov 21 13:43:39 2013
@@ -0,0 +1,140 @@
+/*
+ * Copyright 2013 The Apache Software Foundation.
+ *
+ * Licensed 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.rabbitmq;
+
+import org.apache.manifoldcf.core.interfaces.ConfigParams;
+import org.apache.manifoldcf.core.interfaces.IPostParameters;
+import org.apache.manifoldcf.crawler.system.Logging;
+
+/**
+ *
+ * @author Christian
+ */
+public class RabbitmqConfig {
+
+ public static final String hostParameter = "host";
+ public static final String queueParameter = "queue";
+ public static final String durableParameter = "durable";
+ public static final String autoDeleteParameter = "autodelete";
+ public static final String exclusiveParameter = "exclusive";
+ public static final String transactionParameter = "transaction";
+
+ private String queueName = "manifoldcf";
+ private String host = "localhost";
+ private int port;
+ private boolean durable = true;
+ private boolean exclusive = false;
+ private boolean autoDelete = false;
+ private boolean useTransactions = false;
+
+
+ RabbitmqConfig(ConfigParams configParams) {
+ this.host = configParams.getParameter(hostParameter);
+ this.queueName = configParams.getParameter(queueParameter);
+ extractAutoDeleteParameter(configParams);
+ extractExclusiveParameter(configParams);
+ extractDurableParameter(configParams);
+ }
+
+ public final static void contextToConfig(IPostParameters variableContext,
+ ConfigParams parameters)
+ {
+ String host = variableContext.getParameter(hostParameter);
+ if (host != null) {
+ parameters.setParameter(hostParameter, host);
+ }
+ String queue = variableContext.getParameter(queueParameter);
+ if (queue != null) {
+ parameters.setParameter(queueParameter, queue);
+ }
+ String _autodelete = variableContext.getParameter(autoDeleteParameter);
+ if (_autodelete != null) {
+ parameters.setParameter(autoDeleteParameter, _autodelete);
+ }
+ String _durable = variableContext.getParameter(durableParameter);
+ if (_durable != null) {
+ parameters.setParameter(durableParameter, _durable);
+ }
+ String _exclusive = variableContext.getParameter(_durable);
+ if (_exclusive != null) {
+ parameters.setParameter(exclusiveParameter, _exclusive);
+ }
+ }
+
+
+ private void extractAutoDeleteParameter(ConfigParams variableContext) {
+ String _active = variableContext.getParameter(autoDeleteParameter);
+ if(_active != null) {
+ this.autoDelete = Boolean.parseBoolean(_active);
+ Logging.connectors.debug("Channel parameter active set to " +
this.autoDelete);
+ } else {
+ this.autoDelete = false;
+ Logging.connectors.debug("Channel parameter active parameter not
set, defaults to " + this.autoDelete);
+ }
+ }
+
+ private void extractDurableParameter(ConfigParams variableContext) {
+ String _durable = variableContext.getParameter(durableParameter);
+ if(_durable != null) {
+ this.durable = Boolean.parseBoolean(_durable);
+ Logging.connectors.debug("Channel parameter durable set to " +
this.durable);
+ } else {
+ this.autoDelete = true;
+ Logging.connectors.debug("Channel parameter durable parameter not
set, defaults to " + this.durable);
+ }
+ }
+
+ private void extractExclusiveParameter(ConfigParams variableContext) {
+ String _exclusive = variableContext.getParameter(exclusiveParameter);
+ if(_exclusive != null) {
+ this.exclusive = Boolean.parseBoolean(_exclusive);
+ Logging.connectors.debug("Channel parameter exclusive set to " +
this.exclusive);
+ } else {
+ this.exclusive = false;
+ Logging.connectors.debug("Channel parameter exclusive parameter
not set, defaults to " + this.exclusive);
+ }
+ }
+
+
+ public String getQueueName() {
+ return queueName;
+ }
+
+ public String getHost() {
+ return host;
+ }
+
+ public int getPort() {
+ return port;
+ }
+
+ public boolean isDurable() {
+ return durable;
+ }
+
+ public boolean isExclusive() {
+ return exclusive;
+ }
+
+ public boolean isAutoDelete() {
+ return autoDelete;
+ }
+
+ public boolean isUseTransactions() {
+ return useTransactions;
+ }
+}
Added:
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/java/org/apache/manifoldcf/agents/output/rabbitmq/RabbitmqOutputConnector.java
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/java/org/apache/manifoldcf/agents/output/rabbitmq/RabbitmqOutputConnector.java?rev=1544177&view=auto
==============================================================================
---
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/java/org/apache/manifoldcf/agents/output/rabbitmq/RabbitmqOutputConnector.java
(added)
+++
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/java/org/apache/manifoldcf/agents/output/rabbitmq/RabbitmqOutputConnector.java
Thu Nov 21 13:43:39 2013
@@ -0,0 +1,280 @@
+/**
+ * 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.rabbitmq;
+
+import com.rabbitmq.client.Channel;
+import com.rabbitmq.client.Connection;
+import com.rabbitmq.client.ConnectionFactory;
+import com.rabbitmq.client.MessageProperties;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import org.apache.manifoldcf.agents.interfaces.IOutputAddActivity;
+import org.apache.manifoldcf.agents.interfaces.IOutputNotifyActivity;
+import org.apache.manifoldcf.agents.interfaces.IOutputRemoveActivity;
+import org.apache.manifoldcf.agents.interfaces.OutputSpecification;
+import org.apache.manifoldcf.agents.interfaces.RepositoryDocument;
+import org.apache.manifoldcf.agents.interfaces.ServiceInterruption;
+import org.apache.manifoldcf.agents.output.BaseOutputConnector;
+import org.apache.manifoldcf.core.interfaces.ConfigParams;
+import org.apache.manifoldcf.core.interfaces.IHTTPOutput;
+import org.apache.manifoldcf.core.interfaces.IPostParameters;
+import org.apache.manifoldcf.core.interfaces.IThreadContext;
+import org.apache.manifoldcf.core.interfaces.ManifoldCFException;
+import org.apache.manifoldcf.crawler.system.Logging;
+import org.apache.manifoldcf.ui.util.Encoder;
+import org.json.JSONException;
+
+/**
+ *
+ * @author Christian Rieck, Comperio AS
+ */
+public class RabbitmqOutputConnector extends BaseOutputConnector {
+
+ RabbitmqConfig rabbitconfig;
+ public static final String INGEST_ACTIVITY = "document ingest";
+ public static final String REMOVE_ACTIVITY = "document deletion";
+
+
+ private ConnectionFactory factory = new ConnectionFactory();
+ private Connection connection = null;
+ private Channel channel = null;
+
+ @Override
+ public void connect(ConfigParams configParams) {
+ super.connect(configParams);
+ rabbitconfig = new RabbitmqConfig(configParams);
+ }
+
+ public void outputConfigurationHeader(IThreadContext threadContext,
+ IHTTPOutput out, Locale locale, ConfigParams parameters,
+ List<String> tabsArray) throws ManifoldCFException, IOException {
+ tabsArray.add("Settings");
+ }
+
+ public void outputConfigurationBody(IThreadContext threadContext,
+ IHTTPOutput out, Locale locale, ConfigParams parameters,
+ String tabName) throws ManifoldCFException, IOException {
+ // called when displaying editable configuration tables
+ // NPE when edited in use of rabbitconfig. need to parse?
+ System.out.println("outputConfigurationBody called");
+ if (rabbitconfig == null) {
+ rabbitconfig = new RabbitmqConfig(parameters);
+ }
+ if (tabName.equals("Settings")) {
+ out.print("<table class=\"displaytable\">\n"
+ + " <tr><td class=\"separator\"
colspan=\"2\"><hr/></td></tr>\n"
+ + " <tr>\n"
+ + " <td class=\"description\"><nobr>Host</nobr></td><td
class=\"value\">\n"
+ + " <input type=\"text\" name=\"host\"
value=\""+rabbitconfig.getHost()+"\"/>\n"
+ + " </td>\n"
+ + " </tr>\n"
+ + " <tr>\n"
+ + " <td
class=\"description\"><nobr>Queue</nobr></td><td class=\"value\">\n"
+ + " <input type=\"text\" name=\"queue\"
value=\""+rabbitconfig.getQueueName()+"\"/>\n"
+ + " </td>\n"
+ + " </tr>\n"
+ + " <tr><td class=\"separator\"
colspan=\"2\"><hr/></td></tr>\n"
+ + "</table>");
+ }
+ }
+
+ @Override
+ public boolean checkDocumentIndexable(String outputDescription,
+ File localFile) throws ManifoldCFException, ServiceInterruption {
+ System.out.println(outputDescription);
+
+ return true;
+ }
+
+ @Override
+ public void viewConfiguration(IThreadContext threadContext,
+ IHTTPOutput out, Locale locale, ConfigParams parameters)
+ throws ManifoldCFException, IOException {
+ // called when viewing output connector, simple enough
+ System.out.println("viewConfiguration called");
+ if (rabbitconfig == null) {
+ rabbitconfig = new RabbitmqConfig(parameters);
+ }
+ String host = rabbitconfig.getHost();
+ String queueName = rabbitconfig.getQueueName();
+ out.print("<table class=\"displaytable\"> \n"
+ + " <tr> \n"
+ + " <td class=\"value\" colspan=\"3\"> \n"
+ + " <nobr>Directory = " +
Encoder.bodyEscape(host) + "</nobr><br/>\n"
+ + " </td>\n"
+ + " </tr>\n"
+ + " <tr> \n"
+ + " <td class=\"value\" colspan=\"3\"> \n"
+ + " <nobr>Directory = " +
Encoder.bodyEscape(queueName) + "</nobr><br/>\n"
+ + " </td>\n"
+ + " </tr>\n"
+ + "</table>");
+ }
+
+ @Override
+ public void viewSpecification(IHTTPOutput out, Locale locale,
+ OutputSpecification os) throws ManifoldCFException, IOException {
+ super.viewSpecification(out, locale, os);
+ }
+
+ @Override
+ public String processConfigurationPost(IThreadContext threadContext,
+ IPostParameters variableContext, ConfigParams parameters)
+ throws ManifoldCFException {
+ // called each time the tab changes when creating a new output
connector, at least
+ System.out.println("ProcessConfigurationPost called.");
+ System.out.println("ConfigParams.size() = " +
parameters.getChildCount());
+ RabbitmqConfig.contextToConfig(variableContext, parameters);
+ System.out.println("ConfigParams.size() = " +
parameters.getChildCount());
+ return null;
+ }
+
+
+ /**
+ * Remove a document using the connector. Note that the last
+ * outputDescription is included, since it may be necessary for the
+ * connector to use such information to know how to properly remove the
+ * document.
+ *
+ * @param documentURI is the URI of the document. The URI is presumed to be
+ * the unique identifier which the output data store will use to process
and
+ * serve the document. This URI is constructed by the repository connector
+ * which fetches the document, and is thus universal across all output
+ * connectors.
+ * @param outputDescription is the last description string that was
+ * constructed for this document by the getOutputDescription() method
above.
+ * @param activities is the handle to an object that the implementer of an
+ * output connector may use to perform operations, such as logging
+ * processing activity.
+ */
+ @Override
+ public void removeDocument(String documentURI, String outputDescription,
IOutputRemoveActivity activities)
+ throws ManifoldCFException, ServiceInterruption {
+ // Does nothing in the base class
+ }
+
+ @Override
+ public int addOrReplaceDocument(String documentURI,
+ String outputDescription, RepositoryDocument document,
+ String authorityNameString, IOutputAddActivity activities)
+ throws ManifoldCFException, ServiceInterruption {
+ if (Logging.connectors.isDebugEnabled()) {
+ Logging.connectors.debug("New document: " + documentURI);
+ }
+
+ factory.setHost(rabbitconfig.getHost());
+
+ try {
+ if (connection == null || !connection.isOpen()) {
+ connection = factory.newConnection();
+ }
+ if (channel == null || !connection.isOpen()) {
+ channel = connection.createChannel();
+ }
+
+ Map<java.lang.String,java.lang.Object> arguments = null;
+ channel.queueDeclare(rabbitconfig.getQueueName(),
+ rabbitconfig.isDurable(),
+ rabbitconfig.isExclusive(),
+ rabbitconfig.isAutoDelete(),
+ arguments);
+
+ } catch (Exception e1) {
+ Logging.connectors.error("Failed to initialize connections to
rabbitmq, "+ e1.getMessage());
+ throw new ManifoldCFException("Failed to initialize connections to
rabbitmq", e1);
+ }
+
+ try {
+ String bindingName = "";
+ byte[] bytes = writeFile(document);
+ channel.basicPublish(bindingName, rabbitconfig.getQueueName(),
MessageProperties.PERSISTENT_BASIC, bytes);
+
+ activities.recordActivity(null, "document ingest", new Long(
+ document.getBinaryLength()), documentURI, "OK", null);
+ } catch (Exception e) {
+ Logging.connectors.error(
+ "Failed to push to rabbitmq (" + rabbitconfig.getHost() +
"): ", e);
+ return 1;
+ }
+
+ return 0;
+ }
+
+ @Override
+ public void noteJobComplete(IOutputNotifyActivity activities)
+ throws ManifoldCFException, ServiceInterruption {
+
+ try {
+ // channel and connection will be null if no new documents was
found
+ // in the current job. addDocument() is not called and the
+ // initializations are not made.
+ if (channel != null && channel.isOpen()) {
+ channel.close();
+ }
+ if (connection != null && connection.isOpen()) {
+ connection.close();
+ }
+ } catch (IOException e) {
+ Logging.connectors.error("Could not close channel or connection to
rabbitmq: " + e);
+ } catch (NullPointerException npe) {
+ Logging.connectors.error("Channel or connection was null", npe);
+ } catch (Exception e) {
+ Logging.connectors.error(e.getMessage(), e);
+ }
+ }
+
+
+ /** Pre-determine whether a document's length is indexable by this
connector. This method is used by participating repository connectors
+ * to help filter out documents that are too long to be indexable.
+ *@param outputDescription is the document's output version.
+ *@param length is the length of the document.
+ *@return true if the file is indexable.
+ */
+ @Override
+ public boolean checkLengthIndexable(String outputDescription, long length)
+ throws ManifoldCFException, ServiceInterruption
+ {
+ Logging.connectors.error("Document length:, "+ length);
+ return true;
+ }
+
+ private byte[] writeFile(RepositoryDocument document) throws IOException,
JSONException,
+ ManifoldCFException {
+ if (Logging.connectors.isDebugEnabled()) {
+ Logging.connectors.debug("Atempting to serialize " +
document.getFileName());
+ }
+ OutboundDocument rawDocument = new OutboundDocument(document);
+ byte[] bytes;
+
+ StringWriter sw = new StringWriter();
+ BufferedWriter out = new BufferedWriter(sw);
+ String jsons = rawDocument.writeTo(out);
+
+ bytes = jsons.getBytes();
+
+ out.close();
+ sw.close();
+ return bytes;
+ }
+}
Added:
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/rabbitmq/common_en_US.properties
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/rabbitmq/common_en_US.properties?rev=1544177&view=auto
==============================================================================
---
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/rabbitmq/common_en_US.properties
(added)
+++
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/rabbitmq/common_en_US.properties
Thu Nov 21 13:43:39 2013
@@ -0,0 +1,23 @@
+# 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.
+
+RabbitmqConnector.HostTabName=Output Path
+RabbitmqConnector.HostLabel=Root path:
+RabbitmqConnector.QueueLabel=Queue:
+RabbitmqConnector.DurableLabel=Durable:
+RabbitmqConnector.AutodeleteLabel=Auto Delete:
+RabbitmqConnector.ExclusiveLabel=Exclusive:
+RabbitmqConnector.HostCannotBeNull=Host cannot be null
+RabbitmqConnector.QueueNameCannotBeNull=Queue name cannot be null
Added:
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/rabbitmq/common_ja_JP.properties
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/rabbitmq/common_ja_JP.properties?rev=1544177&view=auto
==============================================================================
---
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/rabbitmq/common_ja_JP.properties
(added)
+++
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/native2ascii/org/apache/manifoldcf/agents/output/rabbitmq/common_ja_JP.properties
Thu Nov 21 13:43:39 2013
@@ -0,0 +1,18 @@
+# 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.
+
+FileConnector.PathTabName=åºåãã¹
+FileConnector.RootPath=ã«ã¼ããã¹
+FileConnector.RootPathCannotBeNull=Root path cannot be null
Added:
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/resources/org/apache/manifoldcf/agents/output/rabbitmq/viewConfiguration.html
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/resources/org/apache/manifoldcf/agents/output/rabbitmq/viewConfiguration.html?rev=1544177&view=auto
==============================================================================
---
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/resources/org/apache/manifoldcf/agents/output/rabbitmq/viewConfiguration.html
(added)
+++
manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/connector/src/main/resources/org/apache/manifoldcf/agents/output/rabbitmq/viewConfiguration.html
Thu Nov 21 13:43:39 2013
@@ -0,0 +1,32 @@
+<!--
+ 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.
+-->
+
+<table class="displaytable">
+ <tr>
+ <td
class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('ElasticSearchConnector.ServerLocation'))</nobr>
+
$Encoder.bodyEscape($ResourceBundle.getString('ElasticSearchConnector.URLColon'))</td>
+ <td class="value">$Encoder.bodyEscape($SERVERLOCATION)</td>
+ </tr>
+ <tr>
+ <td
class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('ElasticSearchConnector.IndexNameColon'))</nobr></td>
+ <td class="value">$Encoder.bodyEscape($INDEXNAME)</td>
+ </tr>
+ <tr>
+ <td
class="description"><nobr>$Encoder.bodyEscape($ResourceBundle.getString('ElasticSearchConnector.IndexTypeColon'))</nobr></td>
+ <td class="value">$Encoder.bodyEscape($INDEXTYPE)</td>
+ </tr>
+</table>
\ No newline at end of file
Added: manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/pom.xml
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/pom.xml?rev=1544177&view=auto
==============================================================================
--- manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/pom.xml (added)
+++ manifoldcf/branches/CONNECTORS-818/connectors/rabbitmq/pom.xml Thu Nov 21
13:43:39 2013
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.apache.manifoldcf</groupId>
+ <artifactId>mcf-connectors</artifactId>
+ <version>1.5-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <developers>
+ <developer>
+ <name>Christian Marshall Rieck</name>
+ <organization>Comperio</organization>
+ <organizationUrl>http://www.comperiosearch.com</organizationUrl>
+ <url />
+ </developer>
+ </developers>
+
+ <artifactId>mcf-rabbitmq-connector</artifactId>
+ <name>ManifoldCF - Connectors - RabbitMQ</name>
+
+ <build>
+ <sourceDirectory>${basedir}/connector/src/main/java</sourceDirectory>
+
<testSourceDirectory>${basedir}/connector/src/test/java</testSourceDirectory>
+ <resources>
+ <resource>
+ <directory>${basedir}/connector/src/main/resources</directory>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>native2ascii-maven-plugin</artifactId>
+ <version>1.0-alpha-1</version>
+ <configuration>
+ <dest>target/classes</dest>
+ <src>connector/src/main/native2ascii</src>
+ </configuration>
+ <executions>
+ <execution>
+ <id>native2ascii-utf8</id>
+ <goals>
+ <goal>native2ascii</goal>
+ </goals>
+ <configuration>
+ <encoding>UTF8</encoding>
+ <includes>**/*.properties</includes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.rabbitmq</groupId>
+ <artifactId>amqp-client</artifactId>
+ <version>3.1.4</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>mcf-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>mcf-agents</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>mcf-pull-agent</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>mcf-ui-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ <version>${httpcomponent.httpclient.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>${commons-logging.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>${commons-codec.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>mcf-core</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>mcf-agents</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>mcf-pull-agent</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ <version>${postgresql.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <version>${hsqldb.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.derby</groupId>
+ <artifactId>derby</artifactId>
+ <version>${derby.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
Modified: manifoldcf/branches/CONNECTORS-818/pom.xml
URL:
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-818/pom.xml?rev=1544177&r1=1544176&r2=1544177&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-818/pom.xml (original)
+++ manifoldcf/branches/CONNECTORS-818/pom.xml Thu Nov 21 13:43:39 2013
@@ -72,7 +72,6 @@
<modules>
<module>framework</module>
- <module>connectors</module>
<module>test-materials</module>
<module>tests</module>
<module>framework/jetty-runner</module>