I am attempting to upgrade from Grails 3.1.5 to 3.2.2.
When I run grails --debug --stacktrace run-app
I get the following output:
$ grails --debug --stacktrace run-app
|Resolving Dependencies. Please wait...
CONFIGURE SUCCESSFUL
Total time: 5.028 secs
Error |
Could not resolve all dependencies for configuration ':profile'. Type 'gradle dependencies' for more information
I tried running gradle dependencies
but that doesn't seem to tell me anything about what's wrong.
What else can I do to troubleshoot this problem?
EDIT: After looking more closely, I noticed this in the gradle dependencies
output:
profile
\--- org.grails.profiles:web: -> 3.2.2 FAILED
This seems to be due to the line in my build.gradle:
dependencies {
profile "org.grails.profiles:web"
But when I create a brand new grails 3.2.2 app, that line is also there but things work fine.
What else can I check?
EDIT: I compared a new Grails 3.2.2 app with my app, without any version specified for the profiles
dependency.
For both, in the log of gradle dependencies --debug
I see:
[io.spring.gradle.dependencymanagement.VersionConfiguringAction]
Using version '3.2.1' for dependency 'org.grails.profiles:web:'
The next line with the new app is:
[org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder]
Selecting new module version org.grails.profiles:web:3.2.1
But with my app:
[org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder]
Selecting new module version org.grails.profiles:web:3.2.2
So why did it switch to 3.2.2 in the case of my app?
As a workaround, in my build.gradle file I added an explicit version number of 3.2.1 to the end of the web profile dependency line. This is the version that Grails 3.2.2 is supposed to use by default. I am still not sure why it's pulling in version 3.2.2 when not specified.
profile "org.grails.profiles:web:3.2.1"