Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
sinkovec opened this issue Nov 3, 2023 · 2 comments · Fixed by #1282
Closed

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

sinkovec opened this issue Nov 3, 2023 · 2 comments · Fixed by #1282

Comments

@sinkovec
Copy link

sinkovec commented Nov 3, 2023

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)

PacoVK added a commit to PacoVK/docToolchain that referenced this issue Nov 3, 2023
@PacoVK
Copy link
Collaborator

PacoVK commented Nov 3, 2023

@sinkovec thanks for reporting, that slipped through and will be released soon. You are absolutely right with the missing imports. i can reproduce and found the issue, there is also another bug that needs to be fixed

@PacoVK
Copy link
Collaborator

PacoVK commented Nov 5, 2023

I already fixed the bugs, i will need to do some testing again and will build a better baseURL handling. Then we can release 3.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants