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

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?

Related

Failed to resolve imported Maven boms: Cannot resolve external dependency

I'm very new to grails and therefore I'm trying to do the following tutorial with IntelliJ: https://guides.grails.org/creating-your-first-grails-app/guide/index.html
After I cloned the repository, the README is asking me to run the following command:
gradle publishGuide
But I get the following error:
sam#sam-USMC:~/IdeaProjects/creating-your-first-grails-app$ gradle publishGuide
Cannot resolve reloading agent JAR: Failed to resolve imported Maven boms: Cannot resolve external dependency org.springframework.boot:spring-boot-dependencies:2.1.9.RELEASE because no repositories are defined.
Required by:
project :complete
Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.
FAILURE: Build failed with an exception.
* Where:
Build file '/home/sam/IdeaProjects/creating-your-first-grails-app/complete/build.gradle' line: 19
* What went wrong:
A problem occurred evaluating project ':complete'.
> org.codehaus.groovy.runtime.DefaultGroovyMethods.each([Ljava/lang/Object;Lgroovy/lang/Closure;)[Ljava/lang/Object;
* 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
Line 19 of the build.gradle file looks like this:
apply plugin:"org.grails.grails-web"
Grateful for any help!

Gradle cannot sync Spring Boot project

I'm trying to import new project with gradle from start.spring.io in intelij and it cannot download any dependency or import plugins. I see that list of sources is empty.
Any idea how to solve it?
$ ./gradlew build
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\Jarek\Downloads\demo\build.gradle' line: 3
* What went wrong:
Plugin [id: 'org.springframework.boot', version: '2.2.2.RELEASE'] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'org.springframework.boot:org.springframework.boot.gradle.plugin:2.2.2.RELEASE')
Searched in the following repositories:
Gradle Central Plugin Repository
* 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
(Screenshot from Intellij IDE) The Toggle Offline mode button is the last to the right on the botton bottom tray
There is a likelihood that you have toggled on the OFFLINE MODE for your gradle. Please turn the offline mode off and run ./gradlew build on your IDE terminal.

Meaning of errors during gradle build

I get an error when trying to build using gradle.
What does this error mean?
E:\intellij-project\MyProject>gradle build
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':compileJava'.
> Cannot specify -processorpath or --processor-path via `CompileOptions.compilerArgs`. Use the `CompileOptions.annotationProcessorPath` property instead.
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
1 actionable task: 1 executed
E:\intellij-project\MyProject>
This is a change made in Gradle 4.5 that became a breaking change in Gradle 5.0:
You should not put annotation processors on the compile classpath or declare them with the -processorpath compiler argument.
They should be added to the annotationProcessor configuration instead. If you don’t want any processing, but your compile classpath contains a processor unintentionally (e.g. as part of a library you depend on), use the -proc:none compiler argument to ignore it.
See upgrade documentation.

build error netflix fenzo library

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.

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.

Resources