grails-core: Unable to resolve dependencies -- https://repo.grails.org/grails/core returns 404

Go to start.grails.org, download an app.

Unzip it and run ./gradlew help

 ./gradlew help       

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'myapp-2'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not find org.grails:grails-gradle-plugin:4.0.10.
     Searched in the following locations:
       - https://repo.grails.org/grails/core/org/grails/grails-gradle-plugin/4.0.10/grails-gradle-plugin-4.0.10.pom
       - https://repo.grails.org/grails/core/org/grails/grails-gradle-plugin/4.0.10/grails-gradle-plugin-4.0.10.jar
     Required by:
         project :
   > Could not find gradle.plugin.com.github.erdi.webdriver-binaries:webdriver-binaries-gradle-plugin:2.0.
     Searched in the following locations:
       - https://repo.grails.org/grails/core/gradle/plugin/com/github/erdi/webdriver-binaries/webdriver-binaries-gradle-plugin/2.0/webdriver-binaries-gradle-plugin-2.0.pom
       - https://repo.grails.org/grails/core/gradle/plugin/com/github/erdi/webdriver-binaries/webdriver-binaries-gradle-plugin/2.0/webdriver-binaries-gradle-plugin-2.0.jar
     Required by:
         project :
   > Could not find org.grails.plugins:hibernate5:7.0.4.
     Searched in the following locations:
       - https://repo.grails.org/grails/core/org/grails/plugins/hibernate5/7.0.4/hibernate5-7.0.4.pom
       - https://repo.grails.org/grails/core/org/grails/plugins/hibernate5/7.0.4/hibernate5-7.0.4.jar
     Required by:
         project :
   > Could not find com.bertramlabs.plugins:asset-pipeline-gradle:3.2.4.
     Searched in the following locations:
       - https://repo.grails.org/grails/core/com/bertramlabs/plugins/asset-pipeline-gradle/3.2.4/asset-pipeline-gradle-3.2.4.pom
       - https://repo.grails.org/grails/core/com/bertramlabs/plugins/asset-pipeline-gradle/3.2.4/asset-pipeline-gradle-3.2.4.jar
     Required by:
         project :

* 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

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 19
  • Comments: 63 (21 by maintainers)

Commits related to this issue

Most upvoted comments

It seems like somehow artifactory URL is changed to https://repo.grails.org/artifactory/core

The repository is currently back online. Thank you everyone for your patience as we work through these issues.

@danieljoeblack for me adding following repo worked in Grails 2.3.1

mavenRepo 'https://grails.jfrog.io/grails/core/'
mavenRepo 'https://grails.jfrog.io/grails/plugins/'

and with following command worked using Java7

grails -Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2 clean --stacktrace

@danieljoeblack I have also faced same issue on Grails 2.3.11 as well. It looks more like SSL related in Java7. I have tried things but didn’t get it working yet. Did you get any clue?

@JasonTypesCodes I’m running 2.3.9 for the record. When I explicitly set the repo url to https://repo.grails.org/grails/plugins/ I’m getting: Error Could not transfer artifact org.grails.plugins:tomcat:zip:7.0.53 from/to repo_grails_org_grails_plugins_ (https://repo.grails.org/grails/plugins/): peer not authenticated Changing it to http://repo.grails.org/grails/plugins/ I get: Could not transfer artifact org.grails.plugins:webxml:pom:1.4.1 from/to repo_grails_org_grails_plugins_ (http://repo.grails.org/grails/plugins/): Permanent Redirect (308) Was the repo URL accessible via http before? It seems to force https now…

Update: We still have validation to do but the repository is responding successfully to at least some scenarios that were problematic during the outage. I am not sure the issue if the issue is 100% resolved yet or not, but progress has been made.

grailsCentral (https://repo.grails.org/grails/core) appears to be down. It simply returns:

{
  "errors" : [ {
    "status" : 404,
    "message" : "Not Found"
  } ]
}

@ShurikAg Thank you, we are aware of current issues with the JFrog artifactory and we are in touch with the JFrog team to help us get the artifactory back online. We will share the further updates as soon as we get them.

Sorry for the inconvenience.

Grails 2.3 workaround seems to be to do:

// grailsCentral()
mavenRepo(root: 'https://repo.grails.org/artifactory/plugins', name: 'grailsCentral')

Grails 2.5 workaround seems to be to do:

// grailsCentral()
mavenRepo url: 'https://repo.grails.org/artifactory/plugins', name: 'grailsCentral'

That overrides the defaults supplied by org.codehaus.groovy.grails.resolve.config.RepositoriesConfigurer

@JasonTypesCodes Thank you for looking into this issue.
Do you have a sense of about how long this URL change will last? before it reverts back to “https://repo.grails.org/grails/core” ? We are trying to determine whether or not we need to re-release our plugins with the new URL, to avoid blocking users.

@cosenmarco We do not intend for this URL change to be permanent.

We have reached out to JFrog for assistance with this issue. We’ll update here when we have more information.

Workaround for existing projects: By setting the following in build.gradle

...
repositories {
    mavenLocal()
    // maven { url "https://repo.grails.org/grails/core" } // --> broken
    maven { url "https://repo.grails.org/artifactory/core" }
}
...

the problem can be solved. Under linux a simple sed -i 's|repo.grails.org/grails/core|repo.grails.org/artifactory/core|g' build.gradle does the job 😉.

Workaround for new projects If for example grails create ... command fails you have to add in your user home directory the file USER_HOME/.grails/settings.groovy with the following content:

grails {
  profiles {
    repositories {
      grailsCentral {
        url ="https://repo.grails.org/artifactory/core"
        snapshotsEnabled = false
      }
    }
  }
}

After creating the new project, you still have to fix the build.gradle in the newly create project folder.

DISCLAIMER: I can not guarantee that this is safe/a good idea as i am not a grails contributer! @puneetbehl could you confirm this or propose a better solution?

@JasonTypesCodes Running both 2.3.11 & 2.5.4.

Taking no action beyond overriding the definition of grailsCentral() in BuildConfig.

The workaround is very simple to apply, but I am wondering if we should plan to apply it permanently as the challenge my organisation faces is 100+ grails projects that need updating.

It is not a deal breaker, just something that needs to be done if http:// urls aren’t coming back

@martin-walsh Thank you, that is good information to have.

If the HTTP URLs do resume working without a redirect that will be for a limited period. I would not suggest reverting any updates you have already made to the HTTPS repository URLs. I would also strongly consider taking the time to update your remaining applications.

Will the old http:// urls be restored (without redirect) or should we make plans to workaround this issue permanently?

Facing same issue when created a new Grails App with vue profile and try to run up

` A problem occurred configuring project ‘:server’.

Could not resolve all artifacts for configuration ‘:server:classpath’. Could not find grails-gradle-plugin.jar (org.grails:grails-gradle-plugin:4.0.10). Searched in the following locations: https://repo.grails.org/grails/core/org/grails/grails-gradle-plugin/4.0.10/grails-gradle-plugin-4.0.10.jar Could not find grails-shell.jar (org.grails:grails-shell:4.0.10). Searched in the following locations: https://repo.grails.org/grails/core/org/grails/grails-shell/4.0.10/grails-shell-4.0.10.jar Could not find grails-gradle-model.jar (org.grails:grails-gradle-model:4.0.10). Searched in the following locations: https://repo.grails.org/grails/core/org/grails/grails-gradle-model/4.0.10/grails-gradle-model-4.0.10.jar Could not find groovy-ant.jar (org.codehaus.groovy:groovy-ant:2.5.14). Searched in the following locations: https://repo.grails.org/grails/core/org/codehaus/groovy/groovy-ant/2.5.14/groovy-ant-2.5.14.jar Could not find groovy-json.jar (org.codehaus.groovy:groovy-json:2.5.14). Searched in the following locations: https://repo.grails.org/grails/core/org/codehaus/groovy/groovy-json/2.5.14/groovy-json-2.5.14.jar Could not find groovy-jmx.jar (org.codehaus.groovy:groovy-jmx:2.5.14). Searched in the following locations: https://repo.grails.org/grails/core/org/codehaus/groovy/groovy-jmx/2.5.14/groovy-jmx-2.5.14.jar Could not find grails-bootstrap.jar (org.grails:grails-bootstrap:4.0.10). Searched in the following locations: https://repo.grails.org/grails/core/org/grails/grails-bootstrap/4.0.10/grails-bootstrap-4.0.10.jar Could not find groovy-templates.jar (org.codehaus.groovy:groovy-templates:2.5.14). Searched in the following locations: https://repo.grails.org/grails/core/org/codehaus/groovy/groovy-templates/2.5.14/groovy-templates-2.5.14.jar Could not find groovy-xml.jar (org.codehaus.groovy:groovy-xml:2.5.14). Searched in the following locations: https://repo.grails.org/grails/core/org/codehaus/groovy/groovy-xml/2.5.14/groovy-xml-2.5.14.jar Could not find groovy.jar (org.codehaus.groovy:groovy:2.5.14). Searched in the following locations: https://repo.grails.org/grails/core/org/codehaus/groovy/groovy/2.5.14/groovy-2.5.14.jar Could not find spring-boot-gradle-plugin.jar (org.springframework.boot:spring-boot-gradle-plugin:2.1.18.RELEASE). Searched in the following locations: https://repo.grails.org/grails/core/org/springframework/boot/spring-boot-gradle-plugin/2.1.18.RELEASE/spring-boot-gradle-plugin-2.1.18.RELEASE.jar Could not find gradle-bintray-plugin.jar (com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5). Searched in the following locations: https://repo.grails.org/grails/core/com/jfrog/bintray/gradle/gradle-bintray-plugin/1.8.5/gradle-bintray-plugin-1.8.5.jar Could not find dependency-management-plugin.jar (io.spring.gradle:dependency-management-plugin:1.0.11.RELEASE). Searched in the following locations: https://repo.grails.org/grails/core/io/spring/gradle/dependency-management-plugin/1.0.11.RELEASE/dependency-management-plugin-1.0.11.RELEASE.jar Could not find ant-junit.jar (org.apache.ant:ant-junit:1.9.15). Searched in the following locations: https://repo.grails.org/grails/core/org/apache/ant/ant-junit/1.9.15/ant-junit-1.9.15.jar Could not find ant.jar (org.apache.ant🐜1.9.15). Searched in the following locations: https://repo.grails.org/grails/core/org/apache/ant/ant/1.9.15/ant-1.9.15.jar Could not find spring-boot-cli.jar (org.springframework.boot:spring-boot-cli:2.1.18.RELEASE). Searched in the following locations: https://repo.grails.org/grails/core/org/springframework/boot/spring-boot-cli/2.1.18.RELEASE/spring-boot-cli-2.1.18.RELEASE.jar Could not find snakeyaml.jar (org.yaml:snakeyaml:1.28). Searched in the following locations: https://repo.grails.org/grails/core/org/yaml/snakeyaml/1.28/snakeyaml-1.28.jar Could not find spring-boot-loader-tools.jar (org.springframework.boot:spring-boot-loader-tools:2.1.18.RELEASE). Searched in the following locations: https://repo.grails.org/grails/core/org/springframework/boot/spring-boot-loader-tools/2.1.18.RELEASE/spring-boot-loader-tools-2.1.18.RELEASE.jar Could not find spring-core.jar (org.springframework:spring-core:5.1.19.RELEASE). Searched in the following locations: https://repo.grails.org/grails/core/org/springframework/spring-core/5.1.19.RELEASE/spring-core-5.1.19.RELEASE.jar Could not find ant-launcher.jar (org.apache.ant:ant-launcher:1.9.15). Searched in the following locations: https://repo.grails.org/grails/core/org/apache/ant/ant-launcher/1.9.15/ant-launcher-1.9.15.jar Could not find groovy-groovydoc.jar (org.codehaus.groovy:groovy-groovydoc:2.5.14). Searched in the following locations: https://repo.grails.org/grails/core/org/codehaus/groovy/groovy-groovydoc/2.5.14/groovy-groovydoc-2.5.14.jar Could not find ant-antlr.jar (org.apache.ant:ant-antlr:1.9.15). Searched in the following locations: https://repo.grails.org/grails/core/org/apache/ant/ant-antlr/1.9.15/ant-antlr-1.9.15.jar Could not find spring-security-crypto.jar (org.springframework.security:spring-security-crypto:5.1.13.RELEASE). Searched in the following locations: https://repo.grails.org/grails/core/org/springframework/security/spring-security-crypto/5.1.13.RELEASE/spring-security-crypto-5.1.13.RELEASE.jar Could not find httpclient.jar (org.apache.httpcomponents:httpclient:4.5.13). Searched in the following locations: https://repo.grails.org/grails/core/org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.jar Could not find spring-jcl.jar (org.springframework:spring-jcl:5.1.19.RELEASE). Searched in the following locations: https://repo.grails.org/grails/core/org/springframework/spring-jcl/5.1.19.RELEASE/spring-jcl-5.1.19.RELEASE.jar

Possible solution:

`

Also, any change to get access to that fork? 😃 Or the generated jar?

@ShurikAg That wrapper error can be resolved by using an updated grails-wrapper.jar.

Please see: https://grails.org/blog/2021-06-10-grails-wrapper-update.html

The issue for this bug is here: https://github.com/grails/grails-wrapper/issues/7

@jeffbrown now both URL’s are not available. So, basically, nothing works. even the workaround.

The issue seems to be partially resolved. With the $HOME/.grails/wrapper cache I can run the ./grailsw locally or in our pipelines and everything works, but when there is no cache and the grailsw are runned for the first time I receive this message:

You must be connected to the internet the first time you use the Grails wrapper
org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 3; The element type "hr" must be terminated by the matching end-tag "</hr>".

@luiszimmermann Which version of Grails are you running?

@luiszimmermann We were running into this yesterday and this is the workaround we used https://github.com/grails/grails-core/issues/11825#issuecomment-856250177

@JasonTypesCodes I’m running 2.3.9 for the record.

When I explicitly set the repo url to https://repo.grails.org/grails/plugins/ I’m getting:

Error Could not transfer artifact org.grails.plugins:tomcat:zip:7.0.53 from/to repo_grails_org_grails_plugins_ (https://repo.grails.org/grails/plugins/): peer not authenticated

Changing it to http://repo.grails.org/grails/plugins/ I get:

Could not transfer artifact org.grails.plugins:webxml:pom:1.4.1 from/to repo_grails_org_grails_plugins_ (http://repo.grails.org/grails/plugins/): Permanent Redirect (308)

Was the repo URL accessible via http before? It seems to force https now…

The issue seems to be partially resolved. With the $HOME/.grails/wrapper cache I can run the ./grailsw locally or in our pipelines and everything works, but when there is no cache and the grailsw are runned for the first time I receive this message:

You must be connected to the internet the first time you use the Grails wrapper
org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 3; The element type "hr" must be terminated by the matching end-tag "</hr>".

Looks like URL issues resolved now.

I can access https://repo.grails.org/grails/core/

Is there a workaround for Grails 2 apps?

Using https://repo.grails.org/artifactory/core should work for now.

Affects legacy apps also. Grails 2 plugins are missing. tomcat, csv, spring-security-core etc.

Is there a workaround for Grails 2 apps?


==== grailsCentral: tried
--
&nbsp; | http://repo.grails.org/grails/plugins/org/grails/plugins/tomcat/8.0.50/tomcat-8.0.50.pom
&nbsp; | -- artifact org.grails.plugins#tomcat;8.0.50!tomcat.zip:
&nbsp; | http://repo.grails.org/grails/plugins/org/grails/plugins/tomcat/8.0.50/tomcat-8.0.50.zip

Any workaround for existing projects

I believe all of the artifacts should be available at https://repo.grails.org/artifactory/core for now.

Can’t even run my projects. This is a blocking issue. Any workaround for existing projects??

Thanks in advance.