Future proofing Grails 2 build

56 views
Skip to first unread message

Mikael Andersson

unread,
Jul 17, 2020, 11:23:29 AM7/17/20
to Grails Dev Discuss
Hi

I'm looking after an application which is based on Grails 2, a pretty big application depending on a bunch of plugins; not feasible to migrate to Grails 3/4 or pure spring.

I am worried that artifacts the build depends on will one day disappear off the internet breaking the build.

What steps can I take to prevent this from happening allowing me to fix issues even after plugin repos etc. disappears.

I have started to create a little base docker image into which I've copied started to copy grails home plugins content and ivy cache.

I'm curious what others have done and if folks can recommend/confirm which folders (plugins/ivy/.m2/etc.) I need to make sure to backup.
If there was a way to mirror everything I need into something like an S3 bucket that'd be brilliant.

Many thanks,
Micke

nutmix

unread,
Jul 17, 2020, 12:48:30 PM7/17/20
to Grails Dev Discuss
I know several companies and projects in the same boat- big grails 2 applications, with no upgrade path, nor compelling reason to upgrade.  This is one of the biggest criticism of the otherwise excellent grails framework - making significant braking changes to the frameworks with little relative benefit and not fixing bugs or creating a stable platform.  There should be LTS versions of each major version, which would solve our issue, and make grails a viable platform again.

Mihai Glont

unread,
Jul 17, 2020, 2:09:23 PM7/17/20
to grails-de...@googlegroups.com

If it's just mitigating against external dependencies becoming unavailable, I think a hosted Artifactory instance should be enough.

One you have it running, you just need to put this in the top section of the repositories block of BuildConfig:

mavenRepo("https://artifactory.mycompany.com/repo") {
    authentication(username: "username", password: "pwd")
}
Mihai
--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/610e2eb5-6765-4780-8b9d-8984c415a983o%40googlegroups.com.

Mikael Andersson

unread,
Jul 18, 2020, 6:40:33 AM7/18/20
to grails-de...@googlegroups.com
Good suggestion.

Are there affordable artifactory hosting options? 
Just checked JFrog's site and that is too expensive (I'm a small independent dev), and I don't really want to self host.

I was looking at the new AWS CodeArtifact with hopes that it would do the trick, but at the moment it is extremely limited in what I can do due to only allowing very few pre-configured external repositories (e.g. maven central). Quite disappointing I couldn't specify a custom repository.

Ideally I would like to somehow upload everything into an S3 bucket, but not sure which repo format is used for various bits and if the repo format is replicated locally...

Back in the day when grails 3 was released I would have migrated if it wasn't such a drastic change with plugins I depended on being unavailable.

Thanks for all suggestions, please keep them coming : )

- Micke

John Underwood

unread,
Jul 18, 2020, 7:04:42 AM7/18/20
to grails-de...@googlegroups.com
We self-host Artifactory, installed via Docker. Wasn't too bad to get up and running.

- John Underwood

Mikael Andersson

unread,
Oct 31, 2021, 5:33:21 AM10/31/21
to grails-de...@googlegroups.com
Hi All,
apologies for not replying back on this until now, but was hoping for information advice on self-hosted Artifactory setup.

E.g. which repositories you configured in Artifactory and if there were any gotchas.

Cheers,
Micke

Mikael Andersson

unread,
Nov 3, 2021, 5:54:25 PM11/3/21
to grails-de...@googlegroups.com
Any advice on how to get grails 2.2.4 authentication against a self-hosted Artifactory instance to work?

I've tried 
- grails.project.ivy.authentication credentials closure in BuildConfig.groovy
- settings.groovy in user.home with above bits
- .m2/settings.xml file

So far from what I can tell from the logs, when requirests hit my Artifactory instance they come through as anonymous...

2021-11-03T21:42:31.059Z| | |non_authenticated_user|HEAD|/virtual-all/org/bouncycastle/bcpg-jdk16/1.45/bcpg-jdk16-1.45.pom|401|-1|0|9|Apache Ivy/2.2.0
2021-11-03T21:42:31.156Z| | |non_authenticated_user|HEAD|/virtual-all/org/bouncycastle/bcpg-jdk16/1.45/bcpg-jdk16-1.45.jar|401|-1|0|2|Apache Ivy/2.2.0

Cheers,
Micke
Reply all
Reply to author
Forward
0 new messages