Right, you don't need the repository and snapshotRepository elements because 
the installer is always going to deploy to your local ~/.m2/repository.

Apologies for the wrong steer there.

On 23/06/2011, at 8:07 AM, Mark Davidson wrote:

> Doh - sorry about that.
> 
> OK I tried with the install block as follows:
> 
> def isWindows = System.properties['os.name'].toLowerCase().contains('windows')
> def strProtocol = isWindows ? 'file:///' : 'file://'
> def localMvnRepo = 
> "$strProtocol${System.getProperty('user.home').replace('\\', 
> '/')}/.m2/repository/"
> 
> install {
>       repositories.mavenInstaller {
>               repository(url: localMvnRepo)
>               snapshotRepository(url: localMvnRepo)
>               components.each { component ->
>                       addFilter(component.name) { artifact, file ->
>                               artifact.name == component.name
>                       }
>               }
>       }
> }
> 
> ..but this generates an error:
> 
> A problem occurred evaluating project ':local-gov-bof'.
> Cause: Could not find method repository() for arguments 
> [{url=file:///C:/Users/dmadmin/.m2/repository/}] on project ':local-gov-bof'.
> 
> I had a look at the Javadocs. I could be wrong but I think that the error is 
> because mavenInstaller is an instance of 
> org.gradle.api.artifacts.maven.MavenResolver - but this doesn't happen to 
> have a setRepository() method.
> 
> Any ideas?
> 
> Mark
> 
> On 22 June 2011 00:10, Luke Daley <[email protected]> wrote:
> 
> On 22/06/2011, at 6:59 AM, Mark Davidson wrote:
> 
> > install {
> >       repositories.mavenDeployer {
> 
> This needs to be…
> 
> install {
>        repositories.mavenInstaller {
> 
> 
> This stuff is all actively being simplified for the 1.0 release so it will 
> get easier.
> 
> --
> Luke Daley
> Principal Engineer, Gradleware
> http://gradleware.com
> 
> Please vote Gradle for JAX Awards » http://vote.jax-awards.com
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>    http://xircles.codehaus.org/manage_email
> 
> 
> 

-- 
Luke Daley
Principal Engineer, Gradleware 
http://gradleware.com

Please vote Gradle for JAX Awards » http://vote.jax-awards.com




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

    http://xircles.codehaus.org/manage_email


Reply via email to