Hello,
In working with on the release plugin I ran into a situation that I
thought would be more elegantly implemented using nested plugin convention
objects, but it doesn't seem to work like I expected it to.
The goal was to supply a structure like the following to users for
configuring SVN repository layout:
[code]
release {
svn {
base = 'http://svn.host/repo/project'
trunk = 'trunk'
branches = 'branches'
tags = 'tags'
}
}
[/code]
This would allow for projects to exist in a non-recommended structure like:
http://svn.host/repo/[trunk|branches|tags]/project
This is all basically to support automatic tag creation from the plugin.
I tried a few variations of the following, but couldn't get it to work and
eventually gave up, and ended up just assuming a recommended repo structure
and using URL pattern matching to pull out the base url.
[code]
class ReleasePluginConvention {
...
def svn = new SvnReleasePluginConvention()
void svn(Closure closure) {
closure.delegate = svn
}
void release(Closure closure) {
closure.delegate = this
closure.call()
}
}
[/code]
Is there a proper way to do this, or a way I can get this to work?
Thanks,
Eric
--
Learn from the past. Live in the present. Plan for the future.
Blog: http://eric-berry.blogspot.com
jEdit <http://www.jedit.org> - Programmer's Text Editor
Bazaar <http://bazaar.canonical.com> - Version Control for Humans