Skip to content

publishToConfluence throws exception when uploading attachments in v3.1.0 #1281

@sinkovec

Description

@sinkovec

Describe the bug
When uploading attachments, e.g., images, using the new ConfluenceClient in 3.1.0 via the publicToConfluence task, the following error occurs. This affects the usage of v1 and the new v2 Api versions of the ConfluenceClient.

> Task :publishToConfluence FAILED

FAILURE: Build failed with an exception.

* Where:
Script '/home/dtcuser/docToolchain/scripts/publishToConfluence.gradle' line: 43

* What went wrong:
Execution failed for task ':publishToConfluence'.
> No such property: MultipartEntityBuilder for class: groovyx.net.http.HTTPBuilder$RequestConfigDelegate

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 26s
4 actionable tasks: 2 executed, 2 up-to-date

To Reproduce
Steps to reproduce the behavior:

  1. Install 3.1.0 docToolChain Docker image
  2. Download arc42 template using ./dtcw downloadTemplate
  3. Run ./dtcw publishToConfluence ...
  4. See error

Expected behavior
The publishToConfluence task shouldn't throw an error when uploading attachments.

Configuration

  • docToolchain version: 3.1.0
  • OS: MacOS Sonoma
  • Relevant SDK Versions JDK 11
  • Atlassian Confluence: Confluence Cloud

Just an uneducated guess (after skimming the code): in the recent merge #1226, the ConfluenceClient seems to miss some import statements, e.g., for MultiPartEntityBuilder and HttpMultipartMode:

def multiPartContent = MultipartEntityBuilder.create()
.setMode(HttpMultipartMode.BROWSER_COMPATIBLE)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions