cosminpolifronie / gradle-plantuml-plugin

A simple Gradle plugin to render PlantUML files
MIT License
10 stars 5 forks source link

Cannot generate diagrams for C4 Plantuml #9

Open abhinav3295 opened 3 years ago

abhinav3295 commented 3 years ago

Expected Behavior

Proper Diagrams are generated expected

Actual Behavior

PNG file with error is created actual

Steps to Reproduce the Problem

  1. Create a Plantuml file with following content
@startuml C4_Elements
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml

Person(personAlias, "Label", "Optional Description")
Container(containerAlias, "Label", "Technology", "Optional Description")
System(systemAlias, "Label", "Optional Description")

Rel(personAlias, containerAlias, "Label", "Optional Technology")
@enduml
  1. Generate the PNG

Specifications

arittner commented 3 years ago

Hello!

You need a current PlantUML version. Accordingly to the readme, try this configuration in your gradle build script (as a workaround):


buildscript {
    dependencies {
        // Load plugin and exclude embedded plant-uml
        classpath('com.cosminpolifronie.gradle:gradle-plantuml-plugin:1.6.0') {
            exclude group: 'net.sourceforge.plantuml', module: 'plantuml'
        }
        // Use our own plantUML, because we need this version to manage the c4-model skin
        classpath files('libs/plantuml.1.2021.11.jar')
    }
}

plugins {
    id 'java'
}
// Use our composed plugin
apply plugin: 'com.cosminpolifronie.gradle.plantuml'

Please add the latest plantuml JAR to your libs path.

Best regards, Aljoscha