PlantUML 2.4.1 against XWiki 16.10 or 18+

Hi, I have an issue running PlantUML on an XWiki 16.x and 18.x. In both cases I get a Java exception Invalid macro: plantuml. Cause: [‘void org.xwiki.contrib.plantuml.internal.PlantUMLMacro.setDefaultCategory(java.lang.String)’]. Click on this message for details.

By using documentation and chatbot, I rebuilt the plugin to change the line setDefaultCategory(DEFAULT_CATEGORY_CONTENT); in PlantUMLMacro.java to setDefaultCategories(Collections.singleton(DEFAULT_CATEGORY_CONTENT));. I also built it against 16.10.17 contrib.
I am now in the midst of another breakage - but I noticed this post PlantUML Macro Diagram Type Issues (Local Execution) where it looks like I should not have this.

I am currently testing on 18.7-snapshot and Tomcat 10 with PostgreSQL.

Thanks for your help.

Are those standard releases or something you built yourself (without -Plegacy, which adds the legacy AbstractMacro#setDefaultCategory(String) API, maybe) ?

Aaaah, that may be it. Yes - all stuff that I run I build locally, and I don’t think I use the flag. I will try now and come back. Maybe if I find time, I may actually issue a PR after all this hassle:)

Confirming it works. Thanks again.