Seems like you forgot to call the closure passed to the svn() method. If you
need some more guidance, have a look at the Gradle codebase, for example the
Sonar plugin.

--
Peter Niederwieser
Principal Engineer, Gradleware 
http://gradleware.com
Creator, Spock Framework 
http://spockframework.org
Twitter: @pniederw


Eric Berry wrote:
> 
> 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
> 


--
View this message in context: 
http://gradle.1045684.n5.nabble.com/nested-plugin-convention-objects-tp4760581p4760760.html
Sent from the gradle-user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to