Local relative path include resolves to GitHUB repo instead of local stdlib/C4 library in PlantUML v.1.2021.01

0 votes
asked Feb 25, 2021 in Question / help by 1derer (200 points)

I'm testing a local version of PlantUML 1.2021.01 (latest as of now) for containers and when I add the following after the @startuml line:

   !include <C4/C4_Container.puml>

the renderer tries to add the library from https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml instead of looking for it locally. Since I have blocked internet on the box for security purposes it ends in a timeout.

I'd like to know where I can find or how to properly reference the C4 libraries locally on this version of PlantUML since this exact same code used to work on PlantUML version 1.2020.26, also without internet connectivity (which I won't be able to enable by the way).


1 Answer

0 votes
answered Feb 25, 2021 by The-Lu (57,500 points)
selected Feb 26, 2021 by 1derer
Best answer

Hello 1.,

FYI, the PlantUML team had corrected this issue 18 days ago (commits on Feb 7, 2021):

Awaiting now the next release of PlantUML.


commented Feb 25, 2021 by 1derer (200 points)

Thank you for the quick response!

Do you know if there's a workaround for this so we can work with C4 libraries on this version while we wait for the next release?
Maybe something like explicitly calling all local recursive dependencies and issuing some kind of preprocessor command that will disregard the "!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4.puml" internet calls on all of them?

  ! .....block recursive include calls from now on.....
   !include <C4/C4.puml>
   !include <C4/C4_Context.puml>
   !include <C4/C4_Container.puml>
commented Feb 26, 2021 by The-Lu (57,500 points)

Hello 1.,

1/ With V1.2021.1 (from 2 Feb, 2021)

You could using a local version of the 6 C4 files on your local directory and include them as:

!include /local_path/to/C4.puml
!include /local_path/to/C4_Component.puml

2/ Use beta version

Or perhaps use the beta-version: http://beta.plantuml.net/plantuml.jar

If that can help,