|
All,
I'm creating a Grails 2.0.0 app based upon an old 1.3.6 app that worked with my Ivy repository just fine. In my BuildConfig.groovy I defined an Ivy resolver as specified in the documentation's "Custom Resolvers" section (http://grails.org/doc/latest/guide/conf.html#dependencyRepositories). When I do this I get a build error.
BuildConfig.groovy added resolver in repositories section after mavencentral(): /* * Configure our resolver. */ def libResolver = new org.apache.ivy.plugins.resolver.URLResolver() ['libraries', 'builds'].each { libResolver.addArtifactPattern("<a href="http://software.cagrid.org/repository-1.3/[organisation]/[module]/[revision]/[artifact].[ext]">http://software.cagrid.org/repository-1.3/[organisation]/[module]/[revision]/[artifact].[ext]") libResolver.addArtifactPattern("<a href="http://software.cagrid.org/repository-1.3/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]">http://software.cagrid.org/repository-1.3/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]") libResolver.addIvyPattern("<a href="http://software.cagrid.org/repository-1.3/[organisation]/[module]/[artifact]-[revision].[ext]">http://software.cagrid.org/repository-1.3/[organisation]/[module]/[artifact]-[revision].[ext]") libResolver.addIvyPattern("<a href="http://software.cagrid.org/repository-1.3/[organisation]/[module]/[artifact].[ext]">http://software.cagrid.org/repository-1.3/[organisation]/[module]/[artifact].[ext]") } libResolver.name = "my-repository" libResolver.settings = ivySettings
resolver libResolver Error:
| Loading Grails 2.0.0 | Error There was an error loading the BuildConfig: Cannot cast object '{}' with class 'groovy.util.ConfigObject' to class 'org.apache.ivy.plugins.resolver.ResolverSettings' due to: groovy.lang.GroovyRuntimeException: Could not find matching constructor for: org.apache.ivy.plugins.resolver.ResolverSettings(groovy.util.ConfigObject) (Use --stacktrace to see the full trace) The stacktrace option points at this line: "libResolver.settings = ivySettings". Fix? If I comment out the troublesome line reported above, I can successfully resolve artifacts. Is this a documentation error? Thanks, Bill S. |
|
Administrator
|
Yeah i think it is not needed since the resolver method will set the ivySettings
Cheers On Thu, Jan 19, 2012 at 3:36 AM, Bill Stephens <[hidden email]> wrote: > All, > > I'm creating a Grails 2.0.0 app based upon an old 1.3.6 app that worked with > my Ivy repository just fine. In my BuildConfig.groovy I defined an Ivy > resolver as specified in the documentation's "Custom Resolvers" > section (http://grails.org/doc/latest/guide/conf.html#dependencyRepositories). > When I do this I get a build error. > > BuildConfig.groovy > added resolver in repositories section after mavencentral(): > > /* > > * Configure our resolver. > > */ > > def libResolver = new org.apache.ivy.plugins.resolver.URLResolver() > > ['libraries', 'builds'].each { > > > libResolver.addArtifactPattern("http://software.cagrid.org/repository-1.3/[organisation]/[module]/[revision]/[artifact].[ext]") > > > libResolver.addArtifactPattern("http://software.cagrid.org/repository-1.3/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]") > > > libResolver.addIvyPattern("http://software.cagrid.org/repository-1.3/[organisation]/[module]/[artifact]-[revision].[ext]") > > > libResolver.addIvyPattern("http://software.cagrid.org/repository-1.3/[organisation]/[module]/[artifact].[ext]") > > } > > libResolver.name = "my-repository" > > libResolver.settings = ivySettings > > resolver libResolver > > Error: > > | Loading Grails 2.0.0 > > | Error There was an error loading the BuildConfig: Cannot cast object '{}' > with class 'groovy.util.ConfigObject' to class > 'org.apache.ivy.plugins.resolver.ResolverSettings' due to: > groovy.lang.GroovyRuntimeException: Could not find matching constructor for: > org.apache.ivy.plugins.resolver.ResolverSettings(groovy.util.ConfigObject) > (Use --stacktrace to see the full trace) > > The stacktrace option points at this line: "libResolver.settings = > ivySettings". > > Fix? > > If I comment out the troublesome line reported above, I can successfully > resolve artifacts. Is this a documentation error? > > Thanks, > > Bill S. > > -- Graeme Rocher Grails Project Lead SpringSource - A Division of VMware http://www.springsource.com --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Powered by Nabble | Edit this page |
