jponge / vertx-gradle-plugin

An opinionated Gradle plugin for Vert.x projects
Apache License 2.0
113 stars 15 forks source link

Classpath error on java project with kotlin dsl #26

Closed ybonnel closed 5 years ago

ybonnel commented 5 years ago

Error was :

An exception occurred applying plugin request [id: 'io.vertx.vertx-plugin', version: '0.2.0']
> Failed to apply plugin [class 'netflix.nebula.dependency.recommender.DependencyRecommendationsPlugin']
   > Could not create an instance of type netflix.nebula.dependency.recommender.provider.RecommendationProviderContainer_Decorated.
      > com/google/common/base/Supplier

Workaround :

buildscript {
    dependencies {
        classpath("com.google.guava:guava:27.0.1-jre")
    }
}
jponge commented 5 years ago

Hi @ybonnel, would you have a full reproducer somewhere?

ybonnel commented 5 years ago

Here it is : https://github.com/ybonnel/test-vertx-plugin

Run ./gradlew vertxRun :


FAILURE: Build failed with an exception.

* Where:
Build file '/home/ybonnel/sources/ima/test-vertx-plugin/build.gradle.kts' line: 9

* What went wrong:
An exception occurred applying plugin request [id: 'io.vertx.vertx-plugin', version: '0.2.0']
> Failed to apply plugin [class 'netflix.nebula.dependency.recommender.DependencyRecommendationsPlugin']
   > Could not create an instance of type netflix.nebula.dependency.recommender.provider.RecommendationProviderContainer_Decorated.
      > com/google/common/base/Supplier

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s

Uncomment https://github.com/ybonnel/test-vertx-plugin/blob/master/build.gradle.kts#L3 and there's no more classhpath error (next error is because of tutu as mainVerticle :))

gmariotti commented 5 years ago

27 contains an updated version of nebula-dependency-recommender that fixes it

jponge commented 5 years ago

Fixed by #27

jponge commented 5 years ago

@ybonnel @gmariotti I'll make a new plugin release today or tomorrow

jponge commented 5 years ago

You can now use version 0.3.1