Yep, this is the preferred syntax for maven repositories. It looks to me
that you have 3 maven repositories configured.
So the correct syntax would be:
repositories {
mavenCentral()
maven { url: 'http://download.java.net/maven/1' }
maven { url: 'http://downlaod.java.net/maven/2' }
}
The 'artifactUrls' property is only used to look for artifacts, when they
are in a different location to the pom files. If poms and artifacts are
under the same base url (they are in your case), then a single 'url'
property is all that's required.
Let me know if this works for you. More info at:
http://gradle.org/current/docs/userguide/dependency_management.html#sec:repositories
Daz
On 29 November 2011 10:18, Kenneth Kousen <[email protected]> wrote:
> For an app I have that used the wsimport task from ant, I had in my
> build.gradle file:
>
> repositories {
> mavenCentral()
> mavenRepo urls:['http://download.java.net/maven/1', '
> http://download.java.net/maven/2']
> }
>
> With milestone 6, this gives me error messages. I found that now I have to
> write:
>
> repositories {
> maven {
> url 'http://repo1.maven.org/maven2'
> artifactUrls 'http://download.java.net/maven/1', '
> http://download.java.net/maven/2'
> }
> }
>
> That works, but it re-downloads everything I had before the first time I
> run it. I wasn't able to find a way to mix mavenCentral() with the other
> urls, either.
>
> My question is, is this going to be the preferred mechanism in the future?
> Am I using it correctly?
>
> Thanks,
>
> Ken
> --
> Kenneth A. Kousen
> President
> Kousen IT, Inc.
>
>
--
Darrell (Daz) DeBoer
Principal Engineer, Gradleware
http://www.gradleware.com