Author: kwright
Date: Thu Oct 4 18:23:09 2018
New Revision: 1842838
URL: http://svn.apache.org/viewvc?rev=1842838&view=rev
Log:
Fix for CONNECTORS-1536.
Modified:
manifoldcf/trunk/CHANGES.txt
manifoldcf/trunk/build.xml
manifoldcf/trunk/connectors/googledrive/build.xml
manifoldcf/trunk/connectors/googledrive/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/googledrive/GoogleDriveSession.java
manifoldcf/trunk/connectors/googledrive/pom.xml
Modified: manifoldcf/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1842838&r1=1842837&r2=1842838&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Thu Oct 4 18:23:09 2018
@@ -3,6 +3,9 @@ $Id$
======================= 2.12-dev =====================
+CONNECTORS-1536: Update GoogleDrive connector to support Teams.
+(Douglas C. R. Paes, Karl Wright)
+
CONNECTORS-1532: Documentum connector would not remove docs that
were no longer eligible because of path changes or mime type changes.
(James Thomas, Karl Wright)
Modified: manifoldcf/trunk/build.xml
URL:
http://svn.apache.org/viewvc/manifoldcf/trunk/build.xml?rev=1842838&r1=1842837&r2=1842838&view=diff
==============================================================================
--- manifoldcf/trunk/build.xml (original)
+++ manifoldcf/trunk/build.xml Thu Oct 4 18:23:09 2018
@@ -98,8 +98,10 @@
<property name="dropbox-client.version" value="1.5.3"/>
<property name="json-simple.version" value="1.1.1"/>
<property name="json.version" value="1.8"/>
- <property name="google-api-client.version" value="v2-rev136-1.19.0"/>
- <property name="google-http-client.version" value="1.19.0"/>
+ <property name="google-api-client.version" value="v2-rev326-1.25.0"/>
+ <property name="google-http-client.version" value="1.25.0"/>
+ <property name="findbugs.version" value="3.0.2"/>
+ <property name="j2objc.version" value="1.1"/>
<property name="jackson-core.version" value="2.9.6"/>
<property name="jetty-jsp-jdt.version" value="2.3.3"/>
<property name="jetty-schemas.version" value="3.1.M0"/>
@@ -2017,6 +2019,20 @@ Use Apache Forrest version forrest-0.9-d
<param name="artifact-type" value="jar"/>
</antcall>
<antcall target="download-via-maven">
+ <param name="target" value="lib"/>
+ <param name="project-path" value="com/google/code/findbugs"/>
+ <param name="artifact-version" value="${findbugs.version}"/>
+ <param name="artifact-name" value="jsr305"/>
+ <param name="artifact-type" value="jar"/>
+ </antcall>
+ <antcall target="download-via-maven">
+ <param name="target" value="lib"/>
+ <param name="project-path" value="com/google/j2objc"/>
+ <param name="artifact-version" value="${j2objc.version}"/>
+ <param name="artifact-name" value="j2objc-annotations"/>
+ <param name="artifact-type" value="jar"/>
+ </antcall>
+ <antcall target="download-via-maven">
<param name="target" value="lib"/>
<param name="project-path" value="com/google/http-client"/>
<param name="artifact-version"
value="${google-http-client.version}"/>
Modified: manifoldcf/trunk/connectors/googledrive/build.xml
URL:
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/googledrive/build.xml?rev=1842838&r1=1842837&r2=1842838&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/googledrive/build.xml (original)
+++ manifoldcf/trunk/connectors/googledrive/build.xml Thu Oct 4 18:23:09 2018
@@ -34,7 +34,9 @@
<path refid="mcf-connector-build.connector-classpath"/>
<fileset dir="../../lib">
<include name="google-*.jar"/>
- <include name="jackson-core.jar"/>
+ <include name="jackson-core*.jar"/>
+ <include name="jsr305*.jar"/>
+ <include name="j2objc-annotations*.jar"/>
</fileset>
</path>
@@ -43,7 +45,9 @@
<copy todir="dist/lib">
<fileset dir="../../lib">
<include name="google-*.jar"/>
- <include name="jackson-core.jar"/>
+ <include name="jackson-core*.jar"/>
+ <include name="jsr305*.jar"/>
+ <include name="j2objc-annotations*.jar"/>
</fileset>
</copy>
</target>
Modified:
manifoldcf/trunk/connectors/googledrive/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/googledrive/GoogleDriveSession.java
URL:
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/googledrive/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/googledrive/GoogleDriveSession.java?rev=1842838&r1=1842837&r2=1842838&view=diff
==============================================================================
---
manifoldcf/trunk/connectors/googledrive/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/googledrive/GoogleDriveSession.java
(original)
+++
manifoldcf/trunk/connectors/googledrive/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/googledrive/GoogleDriveSession.java
Thu Oct 4 18:23:09 2018
@@ -30,6 +30,8 @@ import com.google.api.client.http.HttpTr
import com.google.api.client.json.JsonFactory;
import com.google.api.client.json.jackson2.JacksonFactory;
import com.google.api.services.drive.Drive;
+import com.google.api.services.drive.Drive.Files.Get;
+
import java.util.Map;
@@ -86,7 +88,11 @@ public class GoogleDriveSession {
info.put("Application Name", drive.getApplicationName());
info.put("Base URL", drive.getBaseUrl());
// We need something that will actually cause a back-and-forth to the
server!
- drive.files().get("").execute();
+ Get get = drive.files().get("");
+ get.setSupportsTeamDrives(true);
+
+ get.execute();
+
return info;
}
@@ -97,6 +103,8 @@ public class GoogleDriveSession {
Drive.Files.List request;
request = drive.files().list().setQ(googleDriveQuery);
+ request.setIncludeTeamDriveItems(true);
+ request.setSupportsTeamDrives(true);
do {
FileList files = request.execute();
@@ -111,7 +119,10 @@ public class GoogleDriveSession {
/** Get an individual document.
*/
public File getObject(String id) throws IOException {
- File file = drive.files().get(id).execute();
+ Get get = drive.files().get(id);
+ get.setSupportsTeamDrives(true);
+
+ File file = get.execute();
return file;
}
@@ -120,6 +131,8 @@ public class GoogleDriveSession {
public void getChildren(XThreadStringBuffer idBuffer, String nodeId)
throws IOException, InterruptedException {
Drive.Files.List request = drive.files().list().setQ("'" + nodeId + "' in
parents");
+ request.setIncludeTeamDriveItems(true);
+ request.setSupportsTeamDrives(true);
do {
FileList files = request.execute();
Modified: manifoldcf/trunk/connectors/googledrive/pom.xml
URL:
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/googledrive/pom.xml?rev=1842838&r1=1842837&r2=1842838&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/googledrive/pom.xml (original)
+++ manifoldcf/trunk/connectors/googledrive/pom.xml Thu Oct 4 18:23:09 2018
@@ -40,8 +40,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
- <project.http.version>1.19.0</project.http.version>
- <project.oauth.version>1.19.0</project.oauth.version>
+ <project.http.version>1.25.0</project.http.version>
+ <project.oauth.version>1.25.0</project.oauth.version>
</properties>
<artifactId>mcf-googledrive-connector</artifactId>
@@ -380,7 +380,7 @@
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-drive</artifactId>
- <version>v2-rev136-1.19.0</version>
+ <version>v2-rev326-1.25.0</version>
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>