On Jan 9, 2009, at 6:11 AM, Matt Welch wrote:


I've used Maven on my last few projects and it's be "ok". The idea of a script based build system appeals to me a great deal so I've spent some time looking into pretty much everything under the sun: Buildr, Raven, Gant, and a few others; and now Gradle. Of those I've tried, Gradle really stands out.
It's easy to set up, the usage is fairly straightforward, and it's
infinitely flexible and configurable, but I'm starting up a new project and
I find myself once again returning back to Maven. Why? Dependencies,
dependencies, dependencies.

As a matter of fact, dependency management is one of the two things that I really like about Maven. That transitive dependency management of Maven just works (most of the time, anyway). I like simply being able to tell Maven that I want to use Spring 2.5.6 or Hibernate 3.1 and then not having to worry about all of the extras that go along with it. The other half of that equation is the integration with my IDE. I use Intellij Idea and keeping my
dependencies in sync between Maven and Idea is effortless.

When I tried Gradle, I ran into the following obstacles:

1) Specifying the dependencies in Gradle was very nice. It uses an
expressive, meaningful mechanism for this that is flexible enough to handle exclusions and additions to the transitivity of any dependency, but there was no way that I saw to then communicate those dependencies to my IDE. I
had to manually add not only the main dependencies to my Idea project
(Spring, Hibernate, etc) but also all of those library's dependencies as
well. Painful....

Gradle offers functionality to generate Eclipse project/classpath files. Unfortunately It does not offer this yet for IntelliJ. There is an issue for this: http://jira.codehaus.org/browse/GRADLE-190

What you can do as a workaround, is to write a little task in your build script, which copies all dependencies to some project directory, let's call it lib. Then you can declare this lib folder as an IntelliJ jar folder. If dependencies have changed you can rerun this task, an IntelliJ picks up the changes automatically.



2) Gradle did not retrieve the source and javadoc artifacts for the
dependencies. Yikes! Again, this means a huge amount of manual work in my IDE to add those things myself and then the pain of maintaining those links
as dependencies evolved.

I agree. This is another thing we wan to provide in the not too distant future.

- Hans



Since simple, integrated, dependency management is the main reason I use
Maven over anything else, it's tough to switch away from it without
something to replace those capabilities. I am very new to Gradle so perhaps there are ways around these issues. I'd love to hear about them if there are
because I'd really like to use Gradle.



--
View this message in context: 
http://www.nabble.com/Dependencies-and-IDE-tp21366360p21366360.html
Sent from the gradle-user mailing list archive at Nabble.com.


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

   http://xircles.codehaus.org/manage_email



--
Hans Dockter
Gradle Project lead
http://www.gradle.org





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

   http://xircles.codehaus.org/manage_email


Reply via email to