Repository navigation
ManifoldCF SDK
The Apache ManifoldCF™ SDK (apache/manifoldcf-sdk) is the official Maven and Docker development kit for building, packaging, debugging, and running custom Apache ManifoldCF extensions—such as repository, authority, transformation, user-mapping, notification, and output connectors—as well as contributing to and testing Apache ManifoldCF core itself.
-
Zero-Friction Local Stack: Spins up a complete local Apache ManifoldCF + PostgreSQL environment using official
apache/manifoldcfDocker images and Docker Compose. -
Fast Extension Dev Loop: Compiles your custom connector JAR (
mcf-extensions-jar), overlays it into ManifoldCF'sconnector-lib/with yourconnectors.xml,properties.xml, andlogging.xml, and redeploys only the ManifoldCF container (./run-compose.sh reload_mcf) while keeping PostgreSQL running. -
Public Artifacts by Default: Uses official Apache ManifoldCF Maven dependencies and Docker Hub images out of the box (
docker-hubprofile). -
Optional Source-Build Workflow: Supports compiling and testing against an unreleased Release Candidate (RC) or a local custom ManifoldCF source checkout via the
localMaven profile. -
Remote Debugging Ready: Exposes JDWP debug port
5005alongside HTTP port8345for attaching your IDE debugger.
flowchart LR
subgraph SDK["apache/manifoldcf-sdk"]
Ext["mcf-extensions-jar<br/>(Custom Connectors & Extensions)"]
Overlay["mcf-docker-overlay<br/>(Dockerfile, connectors.xml,<br/>properties.xml, docker-compose.yml)"]
Ext -->|"packaged JAR"| Overlay
end
Base["Official Image<br/>apache/manifoldcf:<version>"] --> Overlay
Overlay -->|"builds custom image"| App["mcf-current-project<br/>Ports: 8345 (HTTP), 5005 (Debug)"]
App <-->|"mcf-network"| DB["mcf-postgres<br/>PostgreSQL + mcf-postgres-volume"]
| Path | Description |
|---|---|
pom.xml |
Parent POM defining manifoldcf.version, admin credentials, plugin versions, and docker-hub / local profiles. |
mcf-extensions-jar/ |
Maven JAR module where you implement custom connectors (includes a starter CustomRepositoryConnector). |
mcf-docker-overlay/ |
Docker overlay module containing docker-compose.yml, hub/ (official image overlay), and local/ (source-distribution overlay) along with connectors.xml, properties.xml, and logging.xml. |
run-compose.sh |
Recommended helper script for managing the Docker Compose stack (build_start, reload_mcf, start, stop, tail, purge). |
run.sh / run.bat
|
Helper scripts for initializing a local Maven repository from MCF source code (init) and running docker-maven-plugin workflows. |
src/main/docker/ & src/main/docker-local/
|
Builder Dockerfiles (Maven + Ant) used only when building ManifoldCF from source via run.sh init. |
KEYS & sign-release-artifacts.sh
|
ASF release verification keys and artifact signing script. |
- Git
-
JDK: Java 11+ for SDK
1.0.2(targeting ManifoldCF2.28); Java 25 LTS when targeting ManifoldCF2.31+ -
Apache Maven:
3.6.3+(recommended3.9+) -
Docker and Docker Compose v2 (
docker compose)
The docker-hub Maven profile is active by default and pulls both ManifoldCF Maven dependencies and the official apache/manifoldcf Docker image automatically.
git clone https://github.com/apache/manifoldcf-sdk.git
cd manifoldcf-sdk./run-compose.sh build_startThis command:
- Compiles and packages
mcf-extensions-jar. - Filters and copies
Dockerfile,connectors.xml,properties.xml,logging.xml, anddocker-compose.ymlintotarget/. - Builds the custom
mcf-sdk/current-project:developmentimage on top ofapache/manifoldcf:<manifoldcf.version>. - Creates the
mcf-postgres-volumevolume and starts bothmcf-postgresandmcf-current-projectvia Docker Compose. - Streams container logs (
docker compose logs -f).
Once started, open the Crawler UI at:
-
URL:
http://localhost:8345/mcf-crawler-ui -
Default credentials:
admin/admin(configurable viamanifoldcf.admin.usernameandmanifoldcf.admin.passwordinpom.xml)
After editing your custom connector code in mcf-extensions-jar, rebuild and restart only the ManifoldCF container while keeping PostgreSQL and its data running:
./run-compose.sh reload_mcf| Command | Action |
|---|---|
./run-compose.sh build_start |
Tear down running containers, run mvn clean install -DskipTests -DskipITs, build images, start ManifoldCF + PostgreSQL, and tail logs. |
./run-compose.sh reload_mcf |
Stop/remove only mcf-current-project, rebuild mcf-extensions-jar + mcf-docker-overlay, restart ManifoldCF, and tail logs. |
./run-compose.sh start |
Start the existing Docker Compose stack and tail logs. |
./run-compose.sh stop |
Stop and remove containers (docker compose down). |
./run-compose.sh tail |
Follow live container logs. |
./run-compose.sh unittests |
Run mvn clean test on your extension project. |
./run-compose.sh integrationtests |
Run mvn clean integration-test on your extension project. |
./run-compose.sh purge |
Stop containers and remove the mcf-postgres-volume database volume for a clean slate. |
The mcf-extensions-jar module already includes the core ManifoldCF framework dependencies (mcf-core, mcf-connector-common, mcf-agents, mcf-pull-agent, mcf-ui-core) and a starter class:
mcf-extensions-jar/src/main/java/org/apache/manifoldcf/sdk/extensions/connectors/CustomRepositoryConnector.java
Extend the appropriate base class for your connector type:
| Connector Type | Base Class | Authoring Guide |
|---|---|---|
| Repository Connector | org.apache.manifoldcf.crawler.connectors.BaseRepositoryConnector |
Writing Repository Connectors |
| Output Connector | org.apache.manifoldcf.agents.output.BaseOutputConnector |
Writing Output Connectors |
| Transformation Connector | org.apache.manifoldcf.agents.transformation.BaseTransformationConnector |
Writing Transformation Connectors |
| Authority Connector | org.apache.manifoldcf.authorities.authorities.BaseAuthorityConnector |
Writing Authority Connectors |
| User Mapping Connector | org.apache.manifoldcf.authorities.mappers.BaseMappingConnector |
Writing Mapping Connectors |
Register your connector class in mcf-docker-overlay/src/main/docker/hub/connectors.xml (and local/connectors.xml if using the local profile):
<repositoryconnector
name="Custom Repository Connector"
class="org.apache.manifoldcf.sdk.extensions.connectors.CustomRepositoryConnector" />-
mcf-docker-overlay/src/main/docker/hub/properties.xml: ManifoldCF runtime settings (database connection tomcf-postgres, thread counts, admin credentials,libdirpaths). Maven resource filtering substitutes${manifoldcf.version},${manifoldcf.admin.username}, and${manifoldcf.admin.password}. -
mcf-docker-overlay/src/main/docker/hub/logging.xml: Log4j 2 configuration. Since SDK1.0.0, a Console appender is enabled by default so logs stream directly to Docker Desktop anddocker compose logs.
Run ./run-compose.sh reload_mcf, open http://localhost:8345/mcf-crawler-ui, and verify your connector appears in the corresponding connection-type dropdown.
The SDK exposes port 5005 on the mcf-current-project container (mapped to localhost:5005) for JDWP remote debugging.
To attach your IDE (IntelliJ IDEA, Eclipse, or VS Code):
- Ensure the ManifoldCF JVM inside the container is started with JDWP enabled (for example via
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005in your startup/JVM options). - Create a Remote JVM Debug configuration in your IDE pointing to
localhost:5005. - Set breakpoints in your connector classes under
mcf-extensions-jarand trigger a crawl or configuration action from the UI.
If you are testing an Apache ManifoldCF Release Candidate (RC) or developing against a local checkout of apache/manifoldcf, the SDK provides an optional local workflow via run.sh that compiles ManifoldCF inside a builder container and exports the resulting Maven repository to target/mcf-maven-repo/.
# Build from an official GA release tarball
./run.sh init 2.28 ga
# Build from an ASF Release Candidate
./run.sh init 2.28 rc
# Build from a local ManifoldCF git checkout
./run.sh init custom-version local /path/to/your/manifoldcf-checkout# Build and start using Maven directly with -Plocal
mvn clean install docker:build docker:start -DskipTests -DskipITs -Plocal
# Or via run.sh
./run.sh build_start_local
./run.sh stop_local| Command | Action |
|---|---|
./run.sh test |
Run ant test inside the initialized ManifoldCF source container. |
./run.sh clean |
Run ant clean in the source container and mvn clean locally (preserving target/mcf-maven-repo/). |
./run.sh purge |
Remove the mcf-maven-repo and mcf-app-volume Docker volumes and the mcf-sdk-init image. |
| Profile | Default | Purpose |
|---|---|---|
docker-hub |
Active | Resolves ManifoldCF dependencies from Maven Central / ASF Snapshots and overlays apache/manifoldcf:${manifoldcf.version} from Docker Hub. |
local |
Inactive | Resolves ManifoldCF dependencies from target/mcf-maven-repo/repository and builds the overlay from mcf-docker-overlay/src/main/docker/local/. |
| Property | Default (1.0.2) |
Description |
|---|---|---|
manifoldcf.version |
2.28 |
Target Apache ManifoldCF version (Maven artifacts & Docker image tag). |
manifoldcf.admin.username |
admin |
Crawler UI admin username injected into properties.xml. |
manifoldcf.admin.password |
admin |
Crawler UI admin password injected into properties.xml. |
postgresql.version |
13.1 |
PostgreSQL Docker image tag for mcf-postgres. |
docker.tomcat.port.external |
8345 |
Host HTTP port mapped to ManifoldCF port 8345. |
docker.debug.port.external |
5005 |
Host JDWP debug port mapped to container port 5005. |
-
1.0.2 (Feb 2025): Default support for ManifoldCF
2.28GA, updated Maven plugins, ASF GPG release signing andKEYSfile, Jetty options inherited from official Docker images. -
1.0.0: Added
run-compose.shwith Docker Compose template and fastreload_mcf, Console logging appender for Docker Desktop, default2.27GA support. -
0.0.5: Enabled
docker-hubprofile by default, added official Docker Hub image overlay and debug port5005.
As Apache ManifoldCF advances to 2.31 (Java 25 + Virtual Threads + Jetty 12.1) and 2.32 (Spring Boot 4.2 executable WAR, Modern Admin Console /ui/, REST API v2 / OpenAPI 3.x), upcoming SDK work includes:
- Upgrading the SDK baseline to Java 25, ManifoldCF 2.31 / 2.32, and a modern PostgreSQL image.
- Adding a first-class Spring Boot (
2.32-spring-boot) overlay profile with/actuator/healthhealthchecks and Modern Admin Console / Swagger UI endpoints. - Automatically bundling third-party runtime dependencies of
mcf-extensions-jarintoconnector-lib/. - Providing a richer starter connector example (Velocity UI templates, i18n, and JUnit 5 tests), a Maven Archetype (
mcf-connector-archetype), and GitHub Actions CI.
Apache ManifoldCF™ — Website · GitHub · Jira (CONNECTORS) · Mailing Lists · Security Policy · Apache License 2.0
Apache, Apache ManifoldCF, and the Apache feather logo are trademarks of The Apache Software Foundation.
- End-User Guide
- Included Connectors
- Repository Connectors
- Output Connectors
- Transformation Connectors
- Authority Connectors
- User Mapping Connectors
- Notification Connectors
- ManifoldCF SDK
- Developer Resources
- Writing Repository Connectors
- Writing Output Connectors
- Writing Authority Connectors
- Writing Mapping Connectors
- Writing Transformation Connectors