ADR-009 — CalDAV Integration Strategy for Nextcloud

ADR

ADR-009

Title

CalDAV Integration Strategy for Nextcloud

State

Accepted

Author

klenkes74

Decision Body

klenkes74

Valid from

2025-10-05

Expires

./.

1. Context

The application must synchronize calendar events with Nextcloud using CalDAV. A robust, well-supported Java library is required for integration in a Spring Boot environment.

3. Decision

We choose ical4j for CalDAV integration.

ical4j is a mature Java library for handling iCalendar data and CalDAV protocol. The decision drivers are addressed as follows:

4. Consequences

  • Fast onboarding and reliable support

  • Easy updates and bugfixes due to active development

  • Good compatibility with Spring Boot and modern Java

  • Community support for troubleshooting

  • License model (Apache 2.0) fits project needs

5. Options

5.1. Option 1: ical4j

License: Apache 2.0

Pros:

  • Mature Java library for iCalendar and CalDAV

  • Good documentation and active development

  • Large user base and community

  • Maven Central support

  • Integrates well with Spring Boot

  • Open source, permissive license (Apache 2.0)

  • Supports modern Java versions

  • Fulfills maintainability and reliability requirements

Cons:

  • API can be complex for advanced CalDAV features

  • Some CalDAV operations require manual handling

5.2. Option 2: sabre/dav (via REST API)

License: MIT

Pros:

  • Used by Nextcloud as backend (full protocol support)

  • Large community (Nextcloud ecosystem)

  • REST API can be consumed with any HTTP client (flexible)

  • Open source, permissive license (MIT)

Cons:

  • PHP-based, no native Java library

  • Integration requires custom REST client code

  • No direct Spring Boot integration

  • Documentation mainly PHP-focused

5.3. Option 3: Sardine

License: Apache 2.0

Pros:

  • Lightweight Java WebDAV client

  • Simple API for basic CalDAV operations

  • Maven Central support

  • Open source, permissive license (Apache 2.0)

Cons:

  • Less active development, smaller community

  • Limited CalDAV-specific features

  • May not fulfill all functional suitability requirements