This is an automated email from the ASF dual-hosted git repository.
OpenPj pushed a commit to branch CONNECTORS-1784
in repository https://gitbox.apache.org/repos/asf/manifoldcf.git
The following commit(s) were added to refs/heads/CONNECTORS-1784 by this push:
new 06df05b21 first commit of the Docker Integration Test (CONNECTORS-1784)
06df05b21 is described below
commit 06df05b21f4522b24360cebae7613969e57143fe
Author: Piergiorgio Lucidi <[email protected]>
AuthorDate: Wed May 27 13:36:11 2026 +0200
first commit of the Docker Integration Test (CONNECTORS-1784)
---
Dockerfile | 39 +++++-----
.../authorities/amazons3/AmazonS3Authority.java | 7 +-
.../output/cmisoutput/CmisOutputConnector.java | 70 +++++++++++++++---
.../connectors/cmis/CmisRepositoryConnector.java | 70 +++++++++++++++---
.../dropbox/DropboxRepositoryConnector.java | 4 +-
.../connectors/filesystem/FileConnector.java | 35 +++++----
.../GoogleDriveRepositoryConnector.java | 14 +++-
.../mongodboutput/MongodbOutputConnector.java | 30 ++++++--
docker-integration-test/connectors.xml | 7 ++
docker-integration-test/docker-compose.yml | 44 ++++++++++++
docker-integration-test/mcf-properties.xml | 30 ++++++++
docker-integration-test/setup-mcf.sh | 83 ++++++++++++++++++++++
.../test-data/Apache ManifoldCF/test2.txt | 2 +
docker-integration-test/test-data/test1.txt | 2 +
Dockerfile => src/main/docker/JDK-25/Dockerfile | 39 +++++-----
src/main/docker/JDK-25/README.md | 15 ++++
16 files changed, 409 insertions(+), 82 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index aa84730f8..1ae878ec6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -13,10 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-FROM eclipse-temurin:21-jre-noble
+FROM eclipse-temurin:25-jre-resolute
LABEL maintainer="The Apache ManifoldCF Project"
-ARG MCF_VERSION="2.30-SNAPSHOT"
+ARG MCF_VERSION="2.31-SNAPSHOT"
ARG MCF_USER=manifoldcf
ARG MCF_USER_ID=100001
@@ -27,27 +27,28 @@ ARG MCF_GROUP_ID=100002
ARG MCF_HOME=/usr/share/manifoldcf
ARG MCF_PORT=8345
+ARG
MCF_DIST=distribution/target/apache-manifoldcf-${MCF_VERSION}/apache-manifoldcf-${MCF_VERSION}
+
RUN apt-get update && apt-get install -y iputils-ping && \
- apt-get install -y dnsutils
+ apt-get install -y dnsutils
#Below the specific COPY instructions to configure a distribution without
propprietary artifacts and plugins
-COPY dist/connector-common-lib/ ${MCF_HOME}/connector-common-lib/
-COPY dist/connector-lib/ ${MCF_HOME}/connector-lib/
-COPY dist/connector-lib-proprietary/ ${MCF_HOME}/connector-lib-proprietary/
-COPY dist/example/ ${MCF_HOME}/example/
-COPY dist/file-resources/ ${MCF_HOME}/file-resources/
-COPY dist/lib/ ${MCF_HOME}/lib/
-COPY dist/multiprocess-file-example/ ${MCF_HOME}/multiprocess-file-example/
-COPY dist/multiprocess-zk-example/ ${MCF_HOME}/multiprocess-zk-example/
-COPY dist/obfuscation-utility/ ${MCF_HOME}/obfuscation-utility/
-COPY dist/web/war/ ${MCF_HOME}/web/war/
-COPY dist/connector-build.xml ${MCF_HOME}/
-COPY dist/connectors.xml ${MCF_HOME}/
-COPY dist/DEPENDENCIES.txt ${MCF_HOME}/
-COPY dist/LICENSE.txt ${MCF_HOME}/
-COPY dist/NOTICE.txt ${MCF_HOME}/
-COPY dist/README.txt ${MCF_HOME}/
+COPY ${MCF_DIST}/connector-common-lib/ ${MCF_HOME}/connector-common-lib/
+COPY ${MCF_DIST}/connector-lib/ ${MCF_HOME}/connector-lib/
+COPY ${MCF_DIST}/connector-lib-proprietary/
${MCF_HOME}/connector-lib-proprietary/
+COPY ${MCF_DIST}/example/ ${MCF_HOME}/example/
+COPY ${MCF_DIST}/file-resources/ ${MCF_HOME}/file-resources/
+COPY ${MCF_DIST}/lib/ ${MCF_HOME}/lib/
+COPY ${MCF_DIST}/multiprocess-file-example/
${MCF_HOME}/multiprocess-file-example/
+COPY ${MCF_DIST}/multiprocess-zk-example/ ${MCF_HOME}/multiprocess-zk-example/
+COPY ${MCF_DIST}/obfuscation-utility/ ${MCF_HOME}/obfuscation-utility/
+COPY ${MCF_DIST}/web/war/ ${MCF_HOME}/web/war/
+COPY ${MCF_DIST}/connectors.xml ${MCF_HOME}/
+COPY ${MCF_DIST}/DEPENDENCIES.txt ${MCF_HOME}/
+COPY ${MCF_DIST}/LICENSE.txt ${MCF_HOME}/
+COPY ${MCF_DIST}/NOTICE.txt ${MCF_HOME}/
+COPY ${MCF_DIST}/README.txt ${MCF_HOME}/
LABEL maintainer="Apache ManifoldCF Developers <[email protected]>"
LABEL org.opencontainers.image.title="Apache ManifoldCF"
diff --git
a/connectors/amazons3/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/amazons3/AmazonS3Authority.java
b/connectors/amazons3/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/amazons3/AmazonS3Authority.java
index b2a39a369..9dc7eaf52 100644
---
a/connectors/amazons3/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/amazons3/AmazonS3Authority.java
+++
b/connectors/amazons3/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/amazons3/AmazonS3Authority.java
@@ -511,7 +511,7 @@ public class AmazonS3Authority extends
org.apache.manifoldcf.authorities.authori
}
public void finishUp() throws InterruptedException, IOException,
- ResponseException {
+ ResponseException, ManifoldCFException {
join();
Throwable thr = exception;
if (thr != null) {
@@ -524,9 +524,12 @@ public class AmazonS3Authority extends
org.apache.manifoldcf.authorities.authori
else if (thr instanceof RuntimeException) {
throw (RuntimeException) thr;
}
- else {
+ else if (thr instanceof Error) {
throw (Error) thr;
}
+ else {
+ throw new ManifoldCFException("Unexpected throwable: " +
thr.getMessage(), thr);
+ }
}
}
diff --git
a/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/agents/output/cmisoutput/CmisOutputConnector.java
b/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/agents/output/cmisoutput/CmisOutputConnector.java
index de3c09aeb..b7e5dd18c 100644
---
a/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/agents/output/cmisoutput/CmisOutputConnector.java
+++
b/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/agents/output/cmisoutput/CmisOutputConnector.java
@@ -316,16 +316,26 @@ public class CmisOutputConnector extends
BaseOutputConnector {
if (thr != null) {
if (thr instanceof RemoteException)
throw (RemoteException) thr;
- else
+ else if (thr instanceof RuntimeException)
+ throw (RuntimeException) thr;
+ else if (thr instanceof Error)
throw (Error) thr;
+ else
+ throw new ManifoldCFException("CMIS: Unexpected error during
getting a new session: " + thr.getMessage(),
+ thr);
}
} else {
Throwable thr = t.getException();
if (thr != null) {
if (thr instanceof RemoteException)
throw (RemoteException) thr;
- else
+ else if (thr instanceof RuntimeException)
+ throw (RuntimeException) thr;
+ else if (thr instanceof Error)
throw (Error) thr;
+ else
+ throw new ManifoldCFException("CMIS: Unexpected error during
getting a new session: " + thr.getMessage(),
+ thr);
}
}
session = null;
@@ -466,8 +476,13 @@ public class CmisOutputConnector extends
BaseOutputConnector {
else if (thr instanceof CmisPermissionDeniedException)
throw new ManifoldCFException("CMIS: Wrong credentials during
getting a new session: " + thr.getMessage(),
thr);
- else
+ else if (thr instanceof RuntimeException)
+ throw (RuntimeException) thr;
+ else if (thr instanceof Error)
throw (Error) thr;
+ else
+ throw new ManifoldCFException("CMIS: Unexpected error during
getting a new session: " + thr.getMessage(),
+ thr);
}
} else {
Throwable thr = t.getException();
@@ -483,8 +498,13 @@ public class CmisOutputConnector extends
BaseOutputConnector {
else if (thr instanceof CmisPermissionDeniedException)
throw new ManifoldCFException("CMIS: Wrong credentials during
getting a new session: " + thr.getMessage(),
thr);
- else
+ else if (thr instanceof RuntimeException)
+ throw (RuntimeException) thr;
+ else if (thr instanceof Error)
throw (Error) thr;
+ else
+ throw new ManifoldCFException("CMIS: Unexpected error during
getting a new session: " + thr.getMessage(),
+ thr);
}
}
} catch (InterruptedException e) {
@@ -532,16 +552,26 @@ public class CmisOutputConnector extends
BaseOutputConnector {
if (thr != null) {
if (thr instanceof RemoteException)
throw (RemoteException) thr;
- else
+ else if (thr instanceof RuntimeException)
+ throw (RuntimeException) thr;
+ else if (thr instanceof Error)
throw (Error) thr;
+ else
+ throw new ManifoldCFException("CMIS: Unexpected error during
getting a new session: " + thr.getMessage(),
+ thr);
}
} else {
Throwable thr = t.getException();
if (thr != null) {
if (thr instanceof RemoteException)
throw (RemoteException) thr;
- else
+ else if (thr instanceof RuntimeException)
+ throw (RuntimeException) thr;
+ else if (thr instanceof Error)
throw (Error) thr;
+ else
+ throw new ManifoldCFException("CMIS: Unexpected error during
getting a new session: " + thr.getMessage(),
+ thr);
}
}
session = null;
@@ -580,8 +610,13 @@ public class CmisOutputConnector extends
BaseOutputConnector {
throw (RemoteException) thr;
else if (thr instanceof CmisConnectionException)
throw new ManifoldCFException("CMIS: Error during checking
connection: " + thr.getMessage(), thr);
- else
+ else if (thr instanceof RuntimeException)
+ throw (RuntimeException) thr;
+ else if (thr instanceof Error)
throw (Error) thr;
+ else
+ throw new ManifoldCFException("CMIS: Unexpected error during
getting a new session: " + thr.getMessage(),
+ thr);
}
} else {
Throwable thr = t.getException();
@@ -590,8 +625,13 @@ public class CmisOutputConnector extends
BaseOutputConnector {
throw (RemoteException) thr;
else if (thr instanceof CmisConnectionException)
throw new ManifoldCFException("CMIS: Error during checking
connection: " + thr.getMessage(), thr);
- else
+ else if (thr instanceof RuntimeException)
+ throw (RuntimeException) thr;
+ else if (thr instanceof Error)
throw (Error) thr;
+ else
+ throw new ManifoldCFException("CMIS: Unexpected error during
getting a new session: " + thr.getMessage(),
+ thr);
}
}
return;
@@ -636,16 +676,26 @@ public class CmisOutputConnector extends
BaseOutputConnector {
if (thr != null) {
if (thr instanceof RemoteException)
throw (RemoteException) thr;
- else
+ else if (thr instanceof RuntimeException)
+ throw (RuntimeException) thr;
+ else if (thr instanceof Error)
throw (Error) thr;
+ else
+ throw new ManifoldCFException("CMIS: Unexpected error during
getting a new session: " + thr.getMessage(),
+ thr);
}
} else {
Throwable thr = t.getException();
if (thr != null) {
if (thr instanceof RemoteException)
throw (RemoteException) thr;
- else
+ else if (thr instanceof RuntimeException)
+ throw (RuntimeException) thr;
+ else if (thr instanceof Error)
throw (Error) thr;
+ else
+ throw new ManifoldCFException("CMIS: Unexpected error during
getting a new session: " + thr.getMessage(),
+ thr);
}
}
session = null;
diff --git
a/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java
b/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java
index 3e2c21736..72baba308 100644
---
a/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java
+++
b/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java
@@ -305,16 +305,26 @@ public class CmisRepositoryConnector extends
BaseRepositoryConnector {
if (thr != null) {
if (thr instanceof RemoteException)
throw (RemoteException) thr;
- else
+ else if (thr instanceof RuntimeException)
+ throw (RuntimeException) thr;
+ else if (thr instanceof Error)
throw (Error) thr;
+ else
+ throw new ManifoldCFException("CMIS: Unexpected error during
getting a new session: " + thr.getMessage(),
+ thr);
}
} else {
Throwable thr = t.getException();
if (thr != null) {
if (thr instanceof RemoteException)
throw (RemoteException) thr;
- else
+ else if (thr instanceof RuntimeException)
+ throw (RuntimeException) thr;
+ else if (thr instanceof Error)
throw (Error) thr;
+ else
+ throw new ManifoldCFException("CMIS: Unexpected error during
getting a new session: " + thr.getMessage(),
+ thr);
}
}
session = null;
@@ -447,8 +457,13 @@ public class CmisRepositoryConnector extends
BaseRepositoryConnector {
throw new ManifoldCFException("CMIS: Error during getting a new
session: " + thr.getMessage(), thr);
else if (thr instanceof CmisPermissionDeniedException)
throw new ManifoldCFException("CMIS: Wrong credentials during
getting a new session: " + thr.getMessage(), thr);
- else
+ else if (thr instanceof RuntimeException)
+ throw (RuntimeException) thr;
+ else if (thr instanceof Error)
throw (Error) thr;
+ else
+ throw new ManifoldCFException("CMIS: Unexpected error during
getting a new session: " + thr.getMessage(),
+ thr);
}
} else {
Throwable thr = t.getException();
@@ -463,8 +478,13 @@ public class CmisRepositoryConnector extends
BaseRepositoryConnector {
throw new ManifoldCFException("CMIS: Error during getting a new
session: " + thr.getMessage(), thr);
else if (thr instanceof CmisPermissionDeniedException)
throw new ManifoldCFException("CMIS: Wrong credentials during
getting a new session: " + thr.getMessage(), thr);
- else
+ else if (thr instanceof RuntimeException)
+ throw (RuntimeException) thr;
+ else if (thr instanceof Error)
throw (Error) thr;
+ else
+ throw new ManifoldCFException("CMIS: Unexpected error during
getting a new session: " + thr.getMessage(),
+ thr);
}
}
} catch (InterruptedException e) {
@@ -518,16 +538,26 @@ public class CmisRepositoryConnector extends
BaseRepositoryConnector {
if (thr != null) {
if (thr instanceof RemoteException)
throw (RemoteException) thr;
- else
+ else if (thr instanceof RuntimeException)
+ throw (RuntimeException) thr;
+ else if (thr instanceof Error)
throw (Error) thr;
+ else
+ throw new ManifoldCFException("CMIS: Unexpected error during
getting a new session: " + thr.getMessage(),
+ thr);
}
} else {
Throwable thr = t.getException();
if (thr != null) {
if (thr instanceof RemoteException)
throw (RemoteException) thr;
- else
+ else if (thr instanceof RuntimeException)
+ throw (RuntimeException) thr;
+ else if (thr instanceof Error)
throw (Error) thr;
+ else
+ throw new ManifoldCFException("CMIS: Unexpected error during
getting a new session: " + thr.getMessage(),
+ thr);
}
}
session = null;
@@ -572,8 +602,13 @@ public class CmisRepositoryConnector extends
BaseRepositoryConnector {
throw (RemoteException) thr;
else if (thr instanceof CmisConnectionException)
throw new ManifoldCFException("CMIS: Error during checking
connection: " + thr.getMessage(), thr);
- else
+ else if (thr instanceof RuntimeException)
+ throw (RuntimeException) thr;
+ else if (thr instanceof Error)
throw (Error) thr;
+ else
+ throw new ManifoldCFException("CMIS: Unexpected error during
getting a new session: " + thr.getMessage(),
+ thr);
}
} else {
Throwable thr = t.getException();
@@ -582,8 +617,13 @@ public class CmisRepositoryConnector extends
BaseRepositoryConnector {
throw (RemoteException) thr;
else if (thr instanceof CmisConnectionException)
throw new ManifoldCFException("CMIS: Error during checking
connection: " + thr.getMessage(), thr);
- else
+ else if (thr instanceof RuntimeException)
+ throw (RuntimeException) thr;
+ else if (thr instanceof Error)
throw (Error) thr;
+ else
+ throw new ManifoldCFException("CMIS: Unexpected error during
getting a new session: " + thr.getMessage(),
+ thr);
}
}
return;
@@ -632,16 +672,26 @@ public class CmisRepositoryConnector extends
BaseRepositoryConnector {
if (thr != null) {
if (thr instanceof RemoteException)
throw (RemoteException) thr;
- else
+ else if (thr instanceof RuntimeException)
+ throw (RuntimeException) thr;
+ else if (thr instanceof Error)
throw (Error) thr;
+ else
+ throw new ManifoldCFException("CMIS: Unexpected error during
getting a new session: " + thr.getMessage(),
+ thr);
}
} else {
Throwable thr = t.getException();
if (thr != null) {
if (thr instanceof RemoteException)
throw (RemoteException) thr;
- else
+ else if (thr instanceof RuntimeException)
+ throw (RuntimeException) thr;
+ else if (thr instanceof Error)
throw (Error) thr;
+ else
+ throw new ManifoldCFException("CMIS: Unexpected error during
getting a new session: " + thr.getMessage(),
+ thr);
}
}
session = null;
diff --git
a/connectors/dropbox/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/dropbox/DropboxRepositoryConnector.java
b/connectors/dropbox/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/dropbox/DropboxRepositoryConnector.java
index f081449cd..1c01ba0b4 100644
---
a/connectors/dropbox/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/dropbox/DropboxRepositoryConnector.java
+++
b/connectors/dropbox/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/dropbox/DropboxRepositoryConnector.java
@@ -229,8 +229,10 @@ public class DropboxRepositoryConnector extends
BaseRepositoryConnector {
throw (DropboxException) thr;
} else if (thr instanceof RuntimeException) {
throw (RuntimeException) thr;
- } else {
+ } else if (thr instanceof Error) {
throw (Error) thr;
+ } else {
+ throw new RuntimeException("Unexpected throwable: " +
thr.getMessage(), thr);
}
}
return;
diff --git
a/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java
b/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java
index b6c7cb16b..8c4c99b24 100644
---
a/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java
+++
b/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java
@@ -212,12 +212,16 @@ public class FileConnector extends
org.apache.manifoldcf.crawler.connectors.Base
if (n.getType().equals("startpoint"))
{
// The id returned MUST be in canonical form!!!
- String seed = new
File(n.getAttributeValue("path")).getCanonicalPath();
- if (Logging.connectors.isDebugEnabled())
+ String path = n.getAttributeValue("path");
+ if (path != null && path.length() > 0)
{
- Logging.connectors.debug("Seed = '"+seed+"'");
+ String seed = new File(path).getCanonicalPath();
+ if (Logging.connectors.isDebugEnabled())
+ {
+ Logging.connectors.debug("Seed = '"+seed+"'");
+ }
+ activities.addSeedDocument(seed);
}
- activities.addSeedDocument(seed);
}
}
}
@@ -257,9 +261,10 @@ public class FileConnector extends
org.apache.manifoldcf.crawler.connectors.Base
SpecificationNode sn = spec.getChild(i);
if (sn.getType().equals("startpoint"))
{
- String path = sn.getAttributeValue("path").replaceAll("\\\\","/");
- if (path.length() > 0)
+ String path = sn.getAttributeValue("path");
+ if (path != null && path.length() > 0)
{
+ path = path.replaceAll("\\\\","/");
if (!path.endsWith("/")) path += "/";
rootPaths.add(path);
}
@@ -498,14 +503,18 @@ public class FileConnector extends
org.apache.manifoldcf.crawler.connectors.Base
SpecificationNode sn = spec.getChild(j);
if (sn.getType().equals("startpoint"))
{
- String path = sn.getAttributeValue("path").replaceAll("\\\\","/");
- String convertToURI = sn.getAttributeValue("converttouri");
- if (path.length() > 0 && convertToURI != null &&
convertToURI.equals("true"))
+ String path = sn.getAttributeValue("path");
+ if (path != null)
{
- if (!path.endsWith("/"))
- path += "/";
- if (fullpath.startsWith(path))
- return fullpath.substring(path.length());
+ path = path.replaceAll("\\\\","/");
+ String convertToURI = sn.getAttributeValue("converttouri");
+ if (path.length() > 0 && convertToURI != null &&
convertToURI.equals("true"))
+ {
+ if (!path.endsWith("/"))
+ path += "/";
+ if (fullpath.startsWith(path))
+ return fullpath.substring(path.length());
+ }
}
}
}
diff --git
a/connectors/googledrive/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/googledrive/GoogleDriveRepositoryConnector.java
b/connectors/googledrive/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/googledrive/GoogleDriveRepositoryConnector.java
index cc999782d..81e60d21a 100644
---
a/connectors/googledrive/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/googledrive/GoogleDriveRepositoryConnector.java
+++
b/connectors/googledrive/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/googledrive/GoogleDriveRepositoryConnector.java
@@ -257,8 +257,10 @@ public class GoogleDriveRepositoryConnector extends
BaseRepositoryConnector {
throw (IOException) thr;
} else if (thr instanceof RuntimeException) {
throw (RuntimeException) thr;
- } else {
+ } else if (thr instanceof Error) {
throw (Error) thr;
+ } else {
+ throw new RuntimeException("Unexpected throwable: " +
thr.getMessage(), thr);
}
}
return;
@@ -326,8 +328,12 @@ public class GoogleDriveRepositoryConnector extends
BaseRepositoryConnector {
throw (IOException) thr;
} else if (thr instanceof GeneralSecurityException) {
throw (GeneralSecurityException) thr;
- } else {
+ } else if (thr instanceof RuntimeException) {
+ throw (RuntimeException) thr;
+ } else if (thr instanceof Error) {
throw (Error) thr;
+ } else {
+ throw new RuntimeException("Unexpected throwable: " +
thr.getMessage(), thr);
}
}
@@ -905,8 +911,10 @@ public class GoogleDriveRepositoryConnector extends
BaseRepositoryConnector {
throw (IOException) thr;
} else if (thr instanceof RuntimeException) {
throw (RuntimeException) thr;
- } else {
+ } else if (thr instanceof Error) {
throw (Error) thr;
+ } else {
+ throw new RuntimeException("Unexpected throwable: " +
thr.getMessage(), thr);
}
}
} catch (InterruptedException e) {
diff --git
a/connectors/mongodb/connector/src/main/java/org/apache/manifoldcf/agents/output/mongodboutput/MongodbOutputConnector.java
b/connectors/mongodb/connector/src/main/java/org/apache/manifoldcf/agents/output/mongodboutput/MongodbOutputConnector.java
index 6158b1d7e..3022700e9 100644
---
a/connectors/mongodb/connector/src/main/java/org/apache/manifoldcf/agents/output/mongodboutput/MongodbOutputConnector.java
+++
b/connectors/mongodb/connector/src/main/java/org/apache/manifoldcf/agents/output/mongodboutput/MongodbOutputConnector.java
@@ -193,8 +193,12 @@ public class MongodbOutputConnector extends
BaseOutputConnector {
if (thr != null) {
if (thr instanceof RemoteException)
throw (RemoteException) thr;
- else
+ else if (thr instanceof RuntimeException)
+ throw (RuntimeException) thr;
+ else if (thr instanceof Error)
throw (Error) thr;
+ else
+ throw new RuntimeException("Unexpected throwable: " +
thr.getMessage(), thr);
}
client = null;
lastSessionFetch = -1L;
@@ -417,8 +421,12 @@ public class MongodbOutputConnector extends
BaseOutputConnector {
if (thr != null) {
if (thr instanceof RemoteException)
throw (RemoteException) thr;
- else
+ else if (thr instanceof RuntimeException)
+ throw (RuntimeException) thr;
+ else if (thr instanceof Error)
throw (Error) thr;
+ else
+ throw new RuntimeException("Unexpected throwable: " +
thr.getMessage(), thr);
}
client = null;
mongoDatabase = null;
@@ -511,8 +519,12 @@ public class MongodbOutputConnector extends
BaseOutputConnector {
throw new ManifoldCFException("MongoDB: Error during
getting a new session: " + thr.getMessage(), thr);
else if (thr instanceof java.net.ConnectException)
throw new ManifoldCFException("MongoDB: Error Connecting
to MongoDB is mongod running? : " + thr.getMessage(), thr);
- else
+ else if (thr instanceof RuntimeException)
+ throw (RuntimeException) thr;
+ else if (thr instanceof Error)
throw (Error) thr;
+ else
+ throw new RuntimeException("Unexpected throwable: " +
thr.getMessage(), thr);
}
} catch (InterruptedException e) {
t.interrupt();
@@ -547,8 +559,12 @@ public class MongodbOutputConnector extends
BaseOutputConnector {
if (thr != null) {
if (thr instanceof RemoteException)
throw (RemoteException) thr;
- else
+ else if (thr instanceof RuntimeException)
+ throw (RuntimeException) thr;
+ else if (thr instanceof Error)
throw (Error) thr;
+ else
+ throw new RuntimeException("Unexpected throwable: " +
thr.getMessage(), thr);
}
client = null;
lastSessionFetch = -1L;
@@ -587,8 +603,12 @@ public class MongodbOutputConnector extends
BaseOutputConnector {
throw new ManifoldCFException("MongoDB: Error during
checking connection: " + thr.getMessage(), thr);
else if (thr instanceof ManifoldCFException)
throw new ManifoldCFException(thr.getMessage(), thr);
- else
+ else if (thr instanceof RuntimeException)
+ throw (RuntimeException) thr;
+ else if (thr instanceof Error)
throw (Error) thr;
+ else
+ throw new RuntimeException("Unexpected throwable: " +
thr.getMessage(), thr);
}
return;
} catch (InterruptedException e) {
diff --git a/docker-integration-test/connectors.xml
b/docker-integration-test/connectors.xml
new file mode 100644
index 000000000..4e5746d73
--- /dev/null
+++ b/docker-integration-test/connectors.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<connectors>
+ <outputconnector name="Null Output"
class="org.apache.manifoldcf.agents.output.nullconnector.NullConnector"/>
+ <outputconnector name="CMIS"
class="org.apache.manifoldcf.agents.output.cmisoutput.CmisOutputConnector"/>
+ <repositoryconnector name="File System"
class="org.apache.manifoldcf.crawler.connectors.filesystem.FileConnector"/>
+ <repositoryconnector name="CMIS"
class="org.apache.manifoldcf.crawler.connectors.cmis.CmisRepositoryConnector"/>
+</connectors>
diff --git a/docker-integration-test/docker-compose.yml
b/docker-integration-test/docker-compose.yml
new file mode 100644
index 000000000..6310b4ae6
--- /dev/null
+++ b/docker-integration-test/docker-compose.yml
@@ -0,0 +1,44 @@
+services:
+ db:
+ image: postgres:17
+ environment:
+ POSTGRES_USER: manifoldcf
+ POSTGRES_PASSWORD: password
+ POSTGRES_DB: manifoldcf
+ POSTGRES_HOST_AUTH_METHOD: md5
+ healthcheck:
+ test: ["CMD-SHELL", "pg_isready -U manifoldcf -d manifoldcf"]
+ interval: 5s
+ timeout: 5s
+ retries: 5
+
+ cmis:
+ image: exoplatform/lightweightcmisserver:1.0
+ ports:
+ - "8080:8080"
+ volumes:
+ - ./cmis-data:/data/cmis/default
+
+ mcf:
+ build:
+ context: ..
+ dockerfile: Dockerfile
+ ports:
+ - "8345:8345"
+ depends_on:
+ db:
+ condition: service_healthy
+ cmis:
+ condition: service_started
+ volumes:
+ - ./mcf-properties.xml:/usr/share/manifoldcf/example/properties.xml
+ - ./connectors.xml:/usr/share/manifoldcf/connectors.xml
+ - ./test-data:/usr/share/manifoldcf/test-data
+
+ mcf-setup:
+ image: alpine:latest
+ depends_on:
+ - mcf
+ volumes:
+ - ./setup-mcf.sh:/setup-mcf.sh
+ entrypoint: ["/bin/sh", "-c", "apk add --no-cache curl && /bin/sh
/setup-mcf.sh"]
diff --git a/docker-integration-test/mcf-properties.xml
b/docker-integration-test/mcf-properties.xml
new file mode 100644
index 000000000..ccd74b5f5
--- /dev/null
+++ b/docker-integration-test/mcf-properties.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<configuration>
+ <property name="org.apache.manifoldcf.versionstring" value="2.31-SNAPSHOT"/>
+ <property name="org.apache.manifoldcf.crawleruiwarpath"
value="../web/war/mcf-crawler-ui.war"/>
+ <property name="org.apache.manifoldcf.authorityservicewarpath"
value="../web/war/mcf-authority-service.war"/>
+ <property name="org.apache.manifoldcf.apiservicewarpath"
value="../web/war/mcf-api-service.war"/>
+ <property name="org.apache.manifoldcf.usejettyparentclassloader"
value="true"/>
+ <property name="org.apache.manifoldcf.jettyconfigfile" value="./jetty.xml"/>
+ <property name="org.apache.manifoldcf.combinedwarpath"
value="../web/war/mcf-combined-service.war"/>
+
+ <property name="org.apache.manifoldcf.databaseimplementationclass"
value="org.apache.manifoldcf.core.database.DBInterfacePostgreSQL"/>
+ <property name="org.apache.manifoldcf.postgresql.hostname" value="db"/>
+ <property name="org.apache.manifoldcf.postgresql.port" value="5432"/>
+ <property name="org.apache.manifoldcf.postgresql.database"
value="manifoldcf"/>
+ <property name="org.apache.manifoldcf.postgresql.username"
value="manifoldcf"/>
+ <property name="org.apache.manifoldcf.postgresql.password" value="password"/>
+ <property name="org.apache.manifoldcf.database.name" value="manifoldcf"/>
+ <property name="org.apache.manifoldcf.database.username" value="manifoldcf"/>
+ <property name="org.apache.manifoldcf.database.password" value="password"/>
+ <property name="org.apache.manifoldcf.dbsuperusername" value="manifoldcf"/>
+ <property name="org.apache.manifoldcf.dbsuperuserpassword" value="password"/>
+
+ <property name="org.apache.manifoldcf.database.maxhandles" value="100"/>
+ <property name="org.apache.manifoldcf.crawler.threads" value="50"/>
+ <property name="org.apache.manifoldcf.logconfigfile" value="./logging.xml"/>
+ <property name="org.apache.manifoldcf.connectorsconfigurationfile"
value="../connectors.xml"/>
+ <property name="org.apache.manifoldcf.fileresources"
value="../file-resources"/>
+ <libdir path="../connector-lib"/>
+ <libdir path="../connector-common-lib"/>
+</configuration>
diff --git a/docker-integration-test/setup-mcf.sh
b/docker-integration-test/setup-mcf.sh
new file mode 100644
index 000000000..0c17b94c1
--- /dev/null
+++ b/docker-integration-test/setup-mcf.sh
@@ -0,0 +1,83 @@
+#!/bin/sh
+
+# Wait for MCF to start
+until curl -s http://mcf:8345/mcf-api-service/json/repositoryconnections >
/dev/null; do
+ echo "Waiting for ManifoldCF..."
+ sleep 5
+done
+
+echo "ManifoldCF is up. Configuring connections..."
+
+# 1. Create CMIS Output Connection
+curl -X PUT
http://mcf:8345/mcf-api-service/json/outputconnections/CMIS%20Output \
+ -H "Content-Type: application/json" \
+ -d '{
+ "outputconnection": {
+ "name": "CMIS Output",
+ "class_name":
"org.apache.manifoldcf.agents.output.cmisoutput.CmisOutputConnector",
+ "description": "CMIS Output Connection",
+ "max_connections": "10",
+ "configuration": {
+ "_PARAMETER_": [
+ { "_attribute_name": "binding", "_value_": "atom" },
+ { "_attribute_name": "username", "_value_": "admin" },
+ { "_attribute_name": "password", "_value_": "admin" },
+ { "_attribute_name": "protocol", "_value_": "http" },
+ { "_attribute_name": "server", "_value_": "cmis" },
+ { "_attribute_name": "port", "_value_": "8080" },
+ { "_attribute_name": "path", "_value_": "/atom11" },
+ { "_attribute_name": "repositoryId", "_value_": "A1" },
+ { "_attribute_name": "cmisQuery", "_value_": "SELECT * FROM
cmis:folder WHERE cmis:name='\''Apache ManifoldCF'\''" }
+ ]
+ }
+ }
+ }'
+
+# 2. Create File System Repository Connection
+curl -X PUT
http://mcf:8345/mcf-api-service/json/repositoryconnections/File%20System \
+ -H "Content-Type: application/json" \
+ -d '{
+ "repositoryconnection": {
+ "name": "File System",
+ "class_name":
"org.apache.manifoldcf.crawler.connectors.filesystem.FileConnector",
+ "description": "File System Connection",
+ "max_connections": "10"
+ }
+ }'
+
+# 3. Create Job
+curl -X POST http://mcf:8345/mcf-api-service/json/jobs \
+ -H "Content-Type: application/json" \
+ -d '{
+ "job": {
+ "description": "File to CMIS Job",
+ "repository_connection": "File System",
+ "pipelinestage": [
+ {
+ "stage_id": "0",
+ "stage_isoutput": "true",
+ "stage_connectionname": "CMIS Output",
+ "stage_description": "Output to CMIS"
+ }
+ ],
+ "run_mode": "scan once",
+ "start_mode": "manual",
+ "priority": "5",
+ "hopcount_mode": "never delete",
+ "document_specification": {
+ "startpoint": [
+ {
+ "_attribute_path": "/usr/share/manifoldcf/test-data",
+ "include": [
+ {
+ "_attribute_type": "file",
+ "_attribute_match": "*"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ }'
+
+echo "MCF Setup complete!"
diff --git a/docker-integration-test/test-data/Apache ManifoldCF/test2.txt
b/docker-integration-test/test-data/Apache ManifoldCF/test2.txt
new file mode 100644
index 000000000..345d16a2d
--- /dev/null
+++ b/docker-integration-test/test-data/Apache ManifoldCF/test2.txt
@@ -0,0 +1,2 @@
+This is a test file for ManifoldCF File System to CMIS integration.
+Created on: 2026-05-27
diff --git a/docker-integration-test/test-data/test1.txt
b/docker-integration-test/test-data/test1.txt
new file mode 100644
index 000000000..345d16a2d
--- /dev/null
+++ b/docker-integration-test/test-data/test1.txt
@@ -0,0 +1,2 @@
+This is a test file for ManifoldCF File System to CMIS integration.
+Created on: 2026-05-27
diff --git a/Dockerfile b/src/main/docker/JDK-25/Dockerfile
similarity index 69%
copy from Dockerfile
copy to src/main/docker/JDK-25/Dockerfile
index aa84730f8..1ae878ec6 100644
--- a/Dockerfile
+++ b/src/main/docker/JDK-25/Dockerfile
@@ -13,10 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-FROM eclipse-temurin:21-jre-noble
+FROM eclipse-temurin:25-jre-resolute
LABEL maintainer="The Apache ManifoldCF Project"
-ARG MCF_VERSION="2.30-SNAPSHOT"
+ARG MCF_VERSION="2.31-SNAPSHOT"
ARG MCF_USER=manifoldcf
ARG MCF_USER_ID=100001
@@ -27,27 +27,28 @@ ARG MCF_GROUP_ID=100002
ARG MCF_HOME=/usr/share/manifoldcf
ARG MCF_PORT=8345
+ARG
MCF_DIST=distribution/target/apache-manifoldcf-${MCF_VERSION}/apache-manifoldcf-${MCF_VERSION}
+
RUN apt-get update && apt-get install -y iputils-ping && \
- apt-get install -y dnsutils
+ apt-get install -y dnsutils
#Below the specific COPY instructions to configure a distribution without
propprietary artifacts and plugins
-COPY dist/connector-common-lib/ ${MCF_HOME}/connector-common-lib/
-COPY dist/connector-lib/ ${MCF_HOME}/connector-lib/
-COPY dist/connector-lib-proprietary/ ${MCF_HOME}/connector-lib-proprietary/
-COPY dist/example/ ${MCF_HOME}/example/
-COPY dist/file-resources/ ${MCF_HOME}/file-resources/
-COPY dist/lib/ ${MCF_HOME}/lib/
-COPY dist/multiprocess-file-example/ ${MCF_HOME}/multiprocess-file-example/
-COPY dist/multiprocess-zk-example/ ${MCF_HOME}/multiprocess-zk-example/
-COPY dist/obfuscation-utility/ ${MCF_HOME}/obfuscation-utility/
-COPY dist/web/war/ ${MCF_HOME}/web/war/
-COPY dist/connector-build.xml ${MCF_HOME}/
-COPY dist/connectors.xml ${MCF_HOME}/
-COPY dist/DEPENDENCIES.txt ${MCF_HOME}/
-COPY dist/LICENSE.txt ${MCF_HOME}/
-COPY dist/NOTICE.txt ${MCF_HOME}/
-COPY dist/README.txt ${MCF_HOME}/
+COPY ${MCF_DIST}/connector-common-lib/ ${MCF_HOME}/connector-common-lib/
+COPY ${MCF_DIST}/connector-lib/ ${MCF_HOME}/connector-lib/
+COPY ${MCF_DIST}/connector-lib-proprietary/
${MCF_HOME}/connector-lib-proprietary/
+COPY ${MCF_DIST}/example/ ${MCF_HOME}/example/
+COPY ${MCF_DIST}/file-resources/ ${MCF_HOME}/file-resources/
+COPY ${MCF_DIST}/lib/ ${MCF_HOME}/lib/
+COPY ${MCF_DIST}/multiprocess-file-example/
${MCF_HOME}/multiprocess-file-example/
+COPY ${MCF_DIST}/multiprocess-zk-example/ ${MCF_HOME}/multiprocess-zk-example/
+COPY ${MCF_DIST}/obfuscation-utility/ ${MCF_HOME}/obfuscation-utility/
+COPY ${MCF_DIST}/web/war/ ${MCF_HOME}/web/war/
+COPY ${MCF_DIST}/connectors.xml ${MCF_HOME}/
+COPY ${MCF_DIST}/DEPENDENCIES.txt ${MCF_HOME}/
+COPY ${MCF_DIST}/LICENSE.txt ${MCF_HOME}/
+COPY ${MCF_DIST}/NOTICE.txt ${MCF_HOME}/
+COPY ${MCF_DIST}/README.txt ${MCF_HOME}/
LABEL maintainer="Apache ManifoldCF Developers <[email protected]>"
LABEL org.opencontainers.image.title="Apache ManifoldCF"
diff --git a/src/main/docker/JDK-25/README.md b/src/main/docker/JDK-25/README.md
new file mode 100644
index 000000000..887a99677
--- /dev/null
+++ b/src/main/docker/JDK-25/README.md
@@ -0,0 +1,15 @@
+# Building Apache ManifoldCF 2.31 Docker Image with Open JDK 25
+
+In order to build ManifoldCF from version 2.31 you have to:
+
+1. Download or build ManifoldCF 2.31 and be sure to have the dist folder in
the same folder of this Dockerfile
+2. Build the Docker image with the following command:
+
+ For version 2.31:
+
+ `docker build --build-arg="MCF_VERSION=2.31" --progress=plain . -t
apache/manifoldcf:2.31`
+
+4. Run ManifoldCF 2.31 with:
+
+`docker run -p 8345:8345 apache/manifoldcf:2.31`
+