mavenLocal() should definitely *not* be in the repositories { ... }
declaration
<https://github.com/apache/incubator-geode/blob/rel/v1.0.0-incubating.M1/build.gradle#L47-L48>
[0]
of build.gradle.
I am actually quite surprised this passed either the Apache or Sonatype's
release process. Sonatype is usually quite strict about listing any
dependencies in you POM that cannot be resolved from Maven Central.
The problem with declaring mavenLocal() in build.gradle (as I mentioned
before) is that a developer could inadvertently use a dependency or version
of a dependency that is not available in Maven Central, thus causing the
resolution of transitive dependencies to fail when someone is using Apache
Geode for development.
It is a simple matter to add mavenLocal() to your personal
~/.gradle/init.gradle file if necessary...
allprojects {
repositories {
mavenLocal()
maven { url "http://dist.gemstone.com/maven/release"}
...
}
}
By default, Gradle, like Maven, should pull automatically from Maven
Central, thus making the explicit mavenCentral() declaration unnecessary.
Cheers,
John
[0] -
https://github.com/apache/incubator-geode/blob/rel/v1.0.0-incubating.M1/build.gradle#L47-L48
On Mon, Feb 8, 2016 at 5:08 PM, Anthony Baker <[email protected]> wrote:
> I think we should remove mavenLocal() from the repositories list.
>
> Anthony
>
>
> > On Feb 8, 2016, at 2:40 PM, Dan Smith <[email protected]> wrote:
> >
> > Thanks, that worked! I think it's looking in ~/.m2 because we've added
> > mavenLocal as a maven repository in our gradle build. I must have at some
> > point sucked down jetty into my local maven repo.
> >
> > It seems like it still should have worked, but maybe there is a gradle
> bug
> > here with a local maven repository and a classifier on the artifact.
> >
> > -Dan
> >
> > On Mon, Feb 8, 2016 at 2:29 PM, Jens Deppe <[email protected]> wrote:
> >
> >> I wonder why it's trying to resolve from your maven repo and not
> ~/.gradle?
> >> Can you try after deleting
> >>
> /home/dsmith/.m2/repository/org/eclipse/jetty/jetty-http/9.3.6.v20151106?
> >>
> >> --Jens
> >>
> >> On Mon, Feb 8, 2016 at 2:23 PM, Dan Smith <[email protected]> wrote:
> >>
> >>> Anyone else hitting this after the merge of the modules? It looks like
> >> it's
> >>> trying to find a jetty-http-tests.jar and failing for some reason.
> >>>
> >>> This is with c8c26e6.
> >>>
> >>> -Dan
> >>>
> >>>
> >>>> open> ./gradlew clean build
> >>> ...
> >>>
> >>> What went wrong:
> >>> Could not resolve all dependencies for configuration
> >>> ':extensions/gemfire-modules-session:testCompile'.
> >>>> Could not find jetty-http-tests.jar
> >>> (org.eclipse.jetty:jetty-http:9.3.6.v20151106).
> >>> Searched in the following locations:
> >>>
> >>>
> >>>
> >>
> file:/home/dsmith/.m2/repository/org/eclipse/jetty/jetty-http/9.3.6.v20151106/jetty-http-9.3.6.v20151106-tests.jar
> >>>
> >>
>
>
--
-John
503-504-8657
john.blum10101 (skype)