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

DocGenerator fails to create JSDocGenerator #35

Open
chefhoobajoob opened this issue May 3, 2019 · 3 comments
Open

DocGenerator fails to create JSDocGenerator #35

chefhoobajoob opened this issue May 3, 2019 · 3 comments

Comments

@chefhoobajoob
Copy link

With the following dependency configuration in my gradle 5.3.1 build script:

def vertxVersion = "3.6.3"
dependencies {
    // snip
    compileOnly "io.vertx:vertx-lang-js-gen:$vertxVersion"
    compileOnly "io.vertx:vertx-codetrans:$vertxVersion"
    compileOnly "io.vertx:vertx-docgen:0.9.2"
    annotationProcessor "io.vertx:vertx-docgen:0.9.2"
    annotationProcessor "io.vertx:vertx-lang-js-gen:$vertxVersion"
    annotationProcessor "io.vertx:vertx-rx-java2-gen:$vertxVersion"
    annotationProcessor "io.vertx:vertx-codegen:$vertxVersion"
    // snip
}

...and the following docgen task:

task generateJsAsciiDocs(type: JavaCompile) {
    group = 'documentation'
    source = sourceSets.main.java
    options.annotationProcessorPath = configurations.annotationProcessor
    classpath = configurations.compile + configurations.compileOnly
    destinationDir = project.file("$buildDir/docs/asciidoc/vertx/js-manual")
    options.compilerArgs = [
            "-proc:only",
            "-processor", "io.vertx.docgen.DocGenProcessor",
            "-Adocgen.output=$buildDir/docs/asciidoc/vertx/js-manual"
    ]
}

I get the following build failure when running the js doc generation task:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':generateJsAsciiDocs'.
> java.util.ServiceConfigurationError: io.vertx.docgen.DocGenerator: Provider io.vertx.lang.js.JSDocGenerator could not be instantiated

I've tried various combinations of using compile, compileOnly, and annotationProcessor configurations for the different vertx dependencies, but I can't find any that work.

I have a pretty nearly identical dependency/task configuration for using the codegen libraries in this same project, and those all work without error, but I can't find a way around this docgen problem.

@chefhoobajoob
Copy link
Author

Any ideas? Is this a bug or a build script problem?

@chefhoobajoob
Copy link
Author

@vietj @cescoffier : any ideas what I should even look for? Still seeing this after updating to use the gradle java-library plugin.

@vietj
Copy link
Contributor

vietj commented Oct 18, 2019

@chefhoobajoob no idea so far

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

No branches or pull requests

2 participants