Here is what I use that works:
mavenRepo name:'myrepo', urls:new File( System.getProperty(
"user.home" ), ".m2/repository" ).toURL().toString()
I really want to make my own mavenExtended plug-in that does this by
default because it's kind of annoying to put this in every build file. :)
-Paul
tbee wrote:
I've managed to install a version of a jar in the local Maven repository, but
I'm having troubles accessing it. I found this webpage describing how it is
done:
http://mrhaki.blogspot.com/2009/11/gradle-goodness-use-our-local-maven.html
So I added this to my build script:
mavenRepo urls: 'file://' + new File(System.getProperty('user.home'),
'.m2/repository').absolutePath
When running install, this is the output
[INFO] Installing ... to C:\Documents and
Settings\toeu\.m2\repository\nl\knowledgeplaza\KpUtil\1.5\KpUtil-1.5.jar
When I run build on the other component I see this:
==== file://C:\Documents and Settings\toeu\.m2\repository: tried
file://C:\Documents and
Settings\toeu\.m2\repository/nl/knowledgeplaza/KpUtil/1.5/KpUtil-1.5.pom
-- artifact nl.knowledgeplaza#KpUtil;1.5!KpUtil.jar:
file://C:\Documents and
Settings\toeu\.m2\repository/nl/knowledgeplaza/KpUtil/1.5/KpUtil-1.5.jar
The files above are present, but the jar is not found. I suspect this may
have to do with the slashes and backslashes, but I'm not able to use
"getURI()" or "replaceAll('\\','/')", they all give exceptions.
Caused by: groovy.lang.MissingMethodException: No signature of method:
java.io.File.getURI() is applicable for argument types: () values: []
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email