build error netflix fenzo library - gradle

The Netflix fenzo (https://github.com/Netflix/Fenzo) build fails complaining on gradle plugin from netflix not available.
Stack trace below
> Configure project :
Inferred project: fenzo, version: 1.1.0-SNAPSHOT
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/UKHANVA/git/Fenzo/build.gradle' line: 32
* What went wrong:
A problem occurred evaluating root project 'fenzo'.
> Failed to apply plugin [class 'nebula.plugin.info.dependencies.DependenciesInfoPlugin']
> Could not create plugin of type 'DependenciesInfoPlugin'.
> No signature of method: org.gradle.api.internal.artifacts.ivyservice.ivyresolve.strategy.DefaultVersionComparator.asStringComparator() is applicable for argument types: () values: []
Possible solutions: asVersionComparator()
* 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 12s

I suspect you are using the version of gradle you have in your path:
gradle build
Try running the build with the gradle wrapper script in the repository:
./gradlew build
The version of gradle used by the wrapper is configured in gradle/wrapper/gradle-wrapper.properties. Fenzo is using 2.13 which is quite old.
By experimenting with the wrapper version, I found that it builds successfully with Gradle 2.x & 3.x but not 4.x.
Gradle 4.0 gave me the exact same error as above. 4.8 also failed but with a different error.

Related

Gradle Project declares a dependency from configuration 'detachedConfiguration1' to configuration 'default'

I have a gradle project https://gist.github.com/iva-nova-e-katerina/f5428f52afa36c5f2719d047ccc53213 and run it with "./gradlew build" with following error:
└─$ ./gradlew build
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
Parallel execution is an incubating feature.
> Configure project :
ArtifactoryUser user: null
Using Java from /home/katya/java (version 11.0.2)
Detected development environment
[buildinfo] Properties file path was not found! (Relevant only for builds running on a CI Server)
FAILURE: Build failed with an exception.
* Where:
Script '/home/katya/tmp_work/groovy/gradle/binarycompatibility.gradle' line: 67
* What went wrong:
Could not determine the dependencies of task ':groovy-console:japicmp'.
> Could not resolve all files for configuration ':groovy-console:detachedConfiguration1'.
> Could not resolve org.codehaus.groovy:groovy-console:2.4.16.
Required by:
project :groovy-console
> Project :groovy-console declares a dependency from configuration 'detachedConfiguration1' to configuration 'default' which is not declared in the descriptor for project :groovy-console.
* 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 3s
Could you explain what is going on? What is 'detachedConfiguratoin1' and how to fix this error?

Plugin with id 'osgi' not found

I am trying to build a project(https://github.com/fge/btf) locally using gradle. There is a plugin "osgi" being used but whenever I build it, I get the error plugin not found. I have tried giving different flavors of OSGi, added the repositories and dependency. Still getting the same error. Please help. Thanks in advance.
FAILURE: Build failed with an exception.
Where:
Build file '/root/btf-1.2/build.gradle' line: 61
What went wrong:
A problem occurred evaluating root project 'btf'.
Plugin with id 'osgi' not found.
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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
BUILD FAILED in 1s
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.1.1/userguide/command_line_interface.html#sec:command_line_warnings
logs generated are as below
Gradle has discontinued their built-in osgi plugin. Please see the Bnd Gradle plugins.
https://github.com/bndtools/bnd/blob/master/biz.aQute.bnd.gradle/README.md#replacing-use-of-gradles-deprecated-osgi-plugin

gradlew wrapper update to new version error that you have old version

Why gradle build failed:
./gradlew wrapper --gradle-version 6.2
FAILURE: Build failed with an exception.
* Where:
Build file '/home/yburtsev/IdeaProjects/spring-io-testcontainers-workshop/build.gradle' line: 3
* What went wrong:
An exception occurred applying plugin request [id: 'org.springframework.boot', version: '2.2.4.RELEASE']
> Failed to apply plugin [id 'org.springframework.boot']
> Spring Boot plugin requires Gradle 4.10 or later. The current version is Gradle 4.4.1
* 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 0s
I manually edit distributionUrl in gradle-wrapper.properties to 6.2 version and than run gradlew wrapper command successfully.
link to project: https://github.com/bsideup/spring-io-testcontainers-workshop
The wrapper task will be run with the previous version of Gradle first. In your case, that is apparently 4.4.1. I don't know why it evaluates the whole project build for the wrapper task, but it does. And since you are using a plugin that is not compatible with that version, it fails.
As you already did, it can be circumvented by editing the file gradle/wrapper/gradle-wrapper.properties manually and set it to the new version. But remember to run the wrapper task again after you did that. This will make it download the new version and use that to update the other wrapper files if needed.
There is a corresponding Github issue for this problem. If you like, you can go put a "thumbs up" on it to give it more attention: https://github.com/gradle/gradle/issues/884.

Error resolving jhipster dependency in kotlin enabled project

My spring boot project which uses jhipster is having issue resolving one of its dependencies:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileKotlin'.
> Could not resolve all files for configuration ':compileClasspath'.
> Could not resolve io.github.jhipster:jhipster-framework:2.0.6.
Required by:
project :
> Could not resolve io.github.jhipster:jhipster-framework:2.0.6.
> Could not get resource 'https://jcenter.bintray.com/io/github/jhipster/jhipster-framework/2.0.6/jhipster-framework-2.0.6.pom'.
> Could not GET 'https://jcenter.bintray.com/io/github/jhipster/jhipster-framework/2.0.6/jhipster-framework-2.0.6.pom'. Received status code 409 from server:
* 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 9s
3 actionable tasks: 3 executed
Could not GET 'https://jcenter.bintray.com/io/github/jhipster/jhipster-framework/2.0.6/jhipster-framework-2.0.6.pom'. Received status code 409 from server:
Enable Gradle 'offline mode' and sync project
3:21:15 PM: Task execution finished 'assemble'.
For some reason it's asking me to compile offline when it's unable to resolve the jhipster library. Any ideas?
I configured my project to compile with kotlin but I don't think this is the issue here.
If you go to jcenter and search jhipster-framework, https://bintray.com/bintray/jcenter/io.github.jhipster%3Ajhipster-framework, there isn't a version 2.0.6. The latest version is 2.0.8.

Gradle Build Error Evaluating Root Project for org/gradle/internal/metaobject/MethodMixIn

I've been playing with a legacy project's build script and I get the following error with Gradle 2.13.
myhost jthoms$ gradle clean build
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/2.13/userguide/gradle_daemon.html.
FAILURE: Build failed with an exception.
* Where:
Build file '/<my-project>/build.gradle' line: 10
* What went wrong:
A problem occurred evaluating root project 'com.mycompany.myorg.myproject'.
> org/gradle/internal/metaobject/MethodMixIn
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 3.494 secs
My build.gradle file looks as follows:
buildscript {
repositories {
maven { url 'http://<my-nexus-repo>/' }
}
dependencies {
classpath 'com.bmuschko:gradle-clover-plugin:2.1.2'
}
}
apply plugin: 'com.bmuschko.clover'
// more build stuff below irrelevant to error line.
My build fails, so how can this error be fixed?
I worked this error out, but I couldn't find anything related to the class mentioned in the error output, so I thought that I would share my finding here.
I found this thread for a similar error. In the thread, #bmuschko recommended upgrading to a newer version of Gradle. For me, upgrading from Gradle version 2.13 to 3.5.1 worked like a charm.

Resources