Hi,

I have customized my build so that there are 3 artifacts.  I have customized 
uploadArtifacts so all 3 artifacts are uploaded to a remote maven repository.  
Now I want to customize install so that they are installed in the local 
repository.  I have tried this:

> 
> task install(overwrite: true) << {
>   env = System.getenv()
>   sep = File.separator
>   localRepo = env['MAVEN_REPO'] ?: env['HOME']+"${sep}.m2${sep}repository"
>   repository(url: "file://"+localRepo)
>   snapshotRepository(url: "file://"+localRepo)
>   
>   addFilter('lib') { artifact, file ->
>     artifact.name.contains 'print-lib'
>   }
>   
>   addFilter('standalone') { artifact, file ->
>     artifact.name.contains 'print-standalone'
>   }
>   
>   addFilter('war') { artifact, file ->
>     artifact.name.contains 'print-servlet'
>   }
> }

But I get the message:

> FAILURE: Build failed with an exception.
> 
> * Where:
> Build file '/Volumes/Box/Projects/mapfish/src/print/build.gradle' line: 114
> 
> * What went wrong:
> Execution failed for task ':install'.
> Cause: Could not find method repository() for arguments 
> [{url=file:///Users/jeichar/.m2/repository}] on root project 'print'.
> 


What is the correct method to publish the three artifacts?

Thank you,

Jesse

Reply via email to