Show Navigation

Updated Grails Wrapper for Grails 3 and 4 projects

By Jason Schindler

June 10, 2021

Recently, the Grails Framework Artifactory instance was updated. As a result, the Grails wrapper now fails under certain conditions because the URL it uses to retrieve information is no longer supported.

We are preparing a patch release of Grails framework 4 and Grails framework 3 to make new applications work with the change, but for existing Grails framework 3 and Grails framework 4 applications, the grailsw command will fail if the necessary assets haven't already been cached on the machine.

The error received is:

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>".

Updating Existing Projects

To fix this, replace the grails-wrapper.jar file in the base of your existing project with one of the updated wrappers below:

Running the grailsw command from within the project should now work as expected.

Changing Repository URL

In addition to fixing the URL, we have also added the ability to change the base URL that the wrapper uses.

There are two possible mechanisms for doing this:

  • Setting an environment variable named GRAILS_CORE_ARTIFACTORY_BASE_URL
  • Setting the grails.core.artifactory.baseUrl system property

The default value is, and we do not expect that to change.

Wrapping Up

We apologize for any inconvenience you may have experienced by this recent change. We will post a more detailed post-mortem on these events in the next few days. Please continue to report any issues you encounter.

You might also like ...