Workaround to use cache-headers plugin without logging dependency - grails

I'd like to use logback plugin along with cache-headers plugin. The problem is that cache-headers depends on the logging plugin, whereas logback need it to be removed.
Is there a way to get rid of a plugin's plugin dependency in grails (Aether) ?
That dependency is removed in cache-headers version 1.1.6, but it hasn't been released :
http://grails.1312388.n4.nabble.com/cache-headers-1-1-6-release-td4651033.html

I released version 1.1.6 with this fix and some other cleanup.

If there isn't a release planned soon the best solution is to build the plugin yourself and push it to some internal or personal maven repo. You can use the grails release plugin to deploy the code to a maven repo instead of grails central.

Related

Which plugins could replace publish-over-ssh from jenkins?

At the latest jenkins version 2.331, publish-over-ssh has been suspended in conjunction with the publication of a security advisory announcing unresolved security issues.
Official website notice
I can not search out the plugin of publish-over-ssh in Jenkins Plugin Manager
Is there any plugins to replace publish-over-ssh?
Any help is much appreciated.
This plugin has been updated and can be used again. See: https://plugins.jenkins.io/publish-over-ssh/
It looks like it is no longer listed as deprecated.
In Jenkins there is a general SSH Plugin. You can try that. The "Publish over SSH" is the old plugin and is deprecated.
https://plugins.jenkins.io/ssh/
When you look under plugins you should find it.

How to list all older versions of Grails plugins?

The Grails Plugins site only seems to list the latest versions of all the Grails plugins. But what if I wanted to see a list of other available (older) versions for each plugin? Is there a Grails SDK command/target I can issue to see old plugins?
I ask because I'm using a plugin whose current latest release is broke and its version is "2.0-RC2". Since it's a release candidate, I'd like to know what the last stable (non-RC) version is.
You can see the plugins at the main repo site here. The site is referenced via grailsCentral() in the BuildConfig.groovy file which in turn references the repo site in the org.codehaus.groovy.grails.resolve.maven.aether.config.RepositoriesConfiguration.groovy file
There is no such command to see old plugins.
If you are referring to Spring Security Core plugin then corresponding github repository has two branches:
master referring to 2.0-RC2 and 1.x referring to the last stable release 1.2.7.3.
On a side note, if you want to see all installed plugins with their versions then below command can be issued:
grails list-plugins --installed

How to install grails plugin from github repo?

I looked in the Grails docs, but I could not find how to instruct the BuildConfig.groovy to tell my Grails app to get a plugin from a github repo. This is the repo I want to include, https://github.com/westonplatter/backbonejs-grails-plugin.
You have to clone (or fork based on your need) the repo and build the plugin to create a zip and then use the plugin as a plugin dependency in BuildConfig.
Once cloned, you can use grails maven-install on the plugin so that the zip would be available in local .m2 repo if you have one. Follow this for steps and this for a similar answer.
Otherwise, you can directly use the plugin in your app by following this answer or refer Specifying Plugin Locations.

STS / Grails: Workspace dependency resolution

My environment is STS 2.8.0-M2 with Grails 1.3.7. I have a Grails project and a plain Java/Maven project in my workspace.
I am used to M2Eclipse workspace dependency resolution for plain Java/Maven projects and I'd love to see something similar working with Grails. According to the docs it appears like Maven dependencies can only be pulled from a repository or a flat directory but NOT from another plain Java/Maven project in the same workspace. As far as I know, that's a feature coming from M2Eclipse, but enabling this one on the Grails project just causes STS to crash and I assume that it would still conflict with Grails even if I would use the Grails Maven plugin.
Do you guys have any advice or practical experience how to enable workspace dependency resolution with Grails in STS 2.8? I want to avoid having to rebuild a dependent project during development over and over.
Thanks!
For Beta/UAT releases I use artifactory to deploy my jars and grails picks up from the local artifactory with the mavenRepo variable in BuildConfig.groovy pointing to the local artifactory.
eg
mavenRepo "http://maya:8081/artifactory/plugins-release-local/"
Development environment:
1)For plugins I use the line
grails.plugin.location.'plugin-name'="../PluginProject"
2) For normal java project I reference it directly using the build properties of the java project.
BuildConfig.groovy fulfills all my requirements and I never used maven in grails projects

What are the steps to upgrade maven/grails from 1.2.0 to 1.2.1?

I have recently started a new project using the maven grails archetype - at the time, (a few weeks ago), Grails 1.2.0 was the most recent release. Now that there's a newer release, what are the steps to upgrade? I would assume that since Grails dependencies are defined in the POM, that the POM will need to be updated? Are there any instructions on doing this? Does the maven-grails-plugin handle this? Is this documented anywhere?
Appreciate any pointers. Thanks!
According to this thread:
The recommended way of upgrading grails is simply "grails upgrade" in the project dir when you have downloaded the new version of Grails and set up your paths etc...
Note that I've seen at least one person reporting problems with version 1.2.1 (and the Hibernate plugin), see this thread. There is a workaround in the thread but maybe have a look at the Grails Jira first to see if there are any blocking issues with 1.2.1.
There is no "upgrade" target in the maven grails
plugin, so I'm still looking for information on doing this upgrade with maven.

Resources