Grails Inline Plugins: Cannot update a plugin configured through BuildConfig.groovy

Our application is divided into the main application and several plugins. We use built-in plugins through the BuildConfig.groovy file. When it is time for WAR everything for production, I get the following message:

You cannot update the plugin that is configured through BuildConfig.groovy, remove the configuration to continue.

And then Grails wants to remove the plugin because it cannot find it in application.properties. But during development, having it in application.properties causes problems. So, when we are ready to create a WAR for production, how do we get around this without commenting on the plugins in BuildConfig.groovy every time?

+6
source share
1 answer

BuildConfig.groovy is read quite early in the process, so not all environment data is still available. However, it is interpreted as a regular groovy script, so you can try to take advantage of the fact that the military task is performed in a production environment:

// BuildConfig.groovy if (System.getProperty("grails.env") == "development") { // specify the inplace plugin normally here } 
+2
source

Source: https://habr.com/ru/post/891236/


All Articles