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

Cannot use plantuml in subproject. #27

Open
sebastianzillessen opened this issue Dec 6, 2022 · 1 comment
Open

Cannot use plantuml in subproject. #27

sebastianzillessen opened this issue Dec 6, 2022 · 1 comment

Comments

@sebastianzillessen
Copy link

Hi

I am using asciidoctor-gradle-plugin (version 1.5.8.1) in a Gradle Project with subprojects.

My main build.gradle looks like this:

import org.asciidoctor.gradle.AsciidoctorTask


buildscript {
    repositories {
        maven { url "<leftout>/mvn-all-local" }
    }

    dependencies {
        classpath "org.asciidoctor:asciidoctor-gradle-plugin:1.5.8.1"
        classpath "org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.15"
        classpath 'org.asciidoctor:asciidoctorj-diagram:1.5.4.1'
        classpath 'org.asciidoctor:asciidoctorj-diagram-plantuml:1.2022.5'
    }
}

allprojects {
    group = 'leftout'
    version = '0.0.1'
}

subprojects {
    apply plugin: 'org.asciidoctor.convert'

    repositories {
        maven { url "<leftout>/mvn-all-local" }
    }


    asciidoctor {
        logDocuments true
        separateOutputDirs false
        outputDir "${buildDir}/asciidoc"
        // outputDir = file("build/docs")
        sourceDir = project.file('src/asciidoc')
        options doctype: 'book' //, ruby: 'erubis'
        attributes = [
                toc             : 'left',
                //		stylesheet: 'css/asciidoctor.css', linkcss : true, icons: 'font', // for unknown reason admonition-icons e.g. for WARNING boxes do not appear
                encoding        : 'utf-8',
                setanchors      : true,
                numbered        : true,
                linkattrs       : true,
                'allow-uri-read': ''
        ]

        sources {
            include 'index.asciidoc'
        }
        resources {
            from file('src/asciidoc')
        }
        requires 'asciidoctor-diagram'
    }

    defaultTasks 'asciidoctor'
}

When I have snippet in my asciidoc like this

[plantuml, target=test1, format=png]
....
@startuml
testdot
@enduml
....

I get the following error:

asciidoctor: WARNING: system-overview.asciidoc: line 4: invalid style for literal block: plantuml

My assumption is, that the plugin gets not applied in the subproject.

Can anyone assist how to apply the plugin in the subprojects as well?

Thanks!

@robertpanzer
Copy link
Member

You might want to check in the repo asciidoctor/asciidoctor-gradle-plugin.
If it also fails when converting a document from a local java program, or the distribution please reopen the ticket.

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

No branches or pull requests

2 participants