how to add a local maven repository?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

how to add a local maven repository?

rintcius-2-3
Hi,

I am trying to convert an existing maven project to gradle, but I can't get it working in combination with my local maven repository (trying a "gradle compile"). Weird thing is that it seems to look at the correct place because it gives this output:

....
:: problems summary ::
:::: WARNINGS
                module not found: ext#gwittir-core;0.4.4
.....
          -- artifact ext#gwittir-core;0.4.4!gwittir-core.jar:

          file://C:/Docume~1/rintcius/.m2/repository/ext/gwittir-core/0.4.4/gwittir-core-0.4.4.jar

        ==== myrepo_jars: tried
....

and when I copy/paste this url into firefox then it does find this file.

So probably I am missing something here?

I tried several things with addMavenRepo and addMavenStyleRepo but this is my last attempt for build.gradle:

project.group = 'myproject'
project.version = '1.0'

usePlugin('java')
dependencies {
  addMavenRepo('file://C:/Docume~1/rintcius/.m2/repository')
  addMavenStyleRepo('myrepo', 'file://C:/Docume~1/rintcius/.m2/repository', "http://repo1.maven.org/maven2/")
  compile('com.google.gwt:gwt-user:1.5-RC1')
  compile('ext:gwittir-core:0.4.4')
}
sourceCompatibility = 1.5
targetCompatibility = 1.5
srcDirNames = ['main/gwt']

Note:
- i digged addMavenStyleRepo call somewhere from this user forum
- i don't really know what the difference is between addMavenRepo and addMavenStyleRepo so i added them both

Can anyone point out to me what I am doing wrong?

Thanks, Rintcius
Reply | Threaded
Open this post in threaded view
|

Re: how to add a local maven repository?

Marko Bauhardt-3

On Jul 28, 2008, at 4:09 PM, Rintcius wrote:

>
> Hi,
>

hi

>
> usePlugin('java')
> dependencies {
>  addMavenRepo('file://C:/Docume~1/rintcius/.m2/repository')

maybe one more slash after file. e.g. file:///C:.....
another problem can be spaces in folder names. has the folder  
"Docume~1" spaces within the folder name?


marko


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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: how to add a local maven repository?

rintcius-2-3
Ah, right! The extra slash after file worked. I was thinking that trying the url in the browser would eliminate typos, but it appeared to be a typo anyway... Thanks a lot Marko!