Hi folks, I've forged a 7.0.0-M4 app but it does n...
# questions
g
Hi folks, I've forged a 7.0.0-M4 app but it does not build. Here is the exception, am I missing something?
Copy code
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':configureGroovyCompilerGrailsCore'.
> Could not resolve all files for configuration ':runtimeClasspath'.
   > Could not resolve com.bertramlabs.plugins:asset-pipeline-grails:5.0.9.
     Required by:
         root project :
      > Could not resolve com.bertramlabs.plugins:asset-pipeline-grails:5.0.9.
         > Could not parse POM <https://repo.maven.apache.org/maven2/com/bertramlabs/plugins/asset-pipeline-grails/5.0.9/asset-pipeline-grails-5.0.9.pom>
            > Could not find org.apache.grails:grails-bom:7.0.0-SNAPSHOT.
              Searched in the following locations:
                - <https://repo.maven.apache.org/maven2/org/apache/grails/grails-bom/7.0.0-SNAPSHOT/maven-metadata.xml>
                - <https://repo.maven.apache.org/maven2/org/apache/grails/grails-bom/7.0.0-SNAPSHOT/grails-bom-7.0.0-SNAPSHOT.pom>
                - <https://repo.grails.org/grails/restricted/org/apache/grails/grails-bom/7.0.0-SNAPSHOT/maven-metadata.xml>
                - <https://repo.grails.org/grails/restricted/org/apache/grails/grails-bom/7.0.0-SNAPSHOT/grails-bom-7.0.0-SNAPSHOT.pom>
> There are 3 more failures with identical causes.

* 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
j
What gradle command and options are you running? I am not seeing this when loading the generated project, or on the following: assemble, bootRun or build. I am seeing it on:
build --refresh-dependencies
But subsequent assemble, bootRun or build runs work fine. We saw a similar issue on grails-forge and I have updated that issue with the refresh part: https://github.com/apache/grails-forge/issues/592 Adding
Copy code
maven { url = '<https://repository.apache.org/content/groups/snapshots>' }
is a workaround
g
I've just downloaded the forged zip file, uncompressed it and open the project with IntelliJ. When Gradle stared configuring the project I got the error.
j
the asset pipeline is published to maven central
👍 1
j
@giangio Are you using IntelliJ 2025.1 or another version? And what OS? Trying to narrow this down.
g
@James Fredley I'm on macOs with Java 17 and IntelliJ latest version. I've just tried on a Fedora 42 Linux PC installed from sratch, avoiding IntelliJ, I've downloaded the forged app, unzipped, run with
./gradlew bootRun
from a shell: same result. I'm going to try on a Windows 11 virtual machine, I'll let you know.
Okay done, same error on a brand new Windows virtual machine. I guess something is going on here or something is deeply wrong with my technical patterns.
image.png
NOTE: I've also tried with
--refresh-dependencies
in all three scenarios with no luck
j
Ok, thanks for the extra effort. Does adding the following in build.gradle work around this issue?
maven { url = '<https://repository.apache.org/content/groups/snapshots>' }
g
Yep, it does, it works
And now, commenting that line, it works (cache I suppose)
This error part may help
> Could not find org.apache.grails:grails-bom:7.0.0-SNAPSHOT.
Why is it looking for the SNAPSHOT release when the
$grailsVersion
is
7.0.0-M4
?
j
It's the POM file on https://central.sonatype.com/artifact/com.bertramlabs.plugins/asset-pipeline-grails which points to grails-bom:7.0.0-SNAPSHOT. That will be addressed in a release of asset-pipeline-grails from it's new home https://github.com/wondrify/asset-pipeline For grails-forge on release versions, which includes milestones, the repository list purposely does not include the apache snapshot repo. When Gradle tries to find grails-bom:7.0.0-SNAPSHOT for the asset-pipeline-grails:5.0.9 POM is is not available, given the repository list does not include the snapshot repo. After it resolves it with the workaround, Gradle knows to use grails-bom:7.0.0-M4 instead and that is why it doesn't error afterward and also explains why I was not seeing this locally unless I forced it to happen.
g
Thank you for the explanation 👍 Great, I can start working on grails 7 now 😎
🚀 1