On 7/09/2010 1:52 PM, Jeremias Maerki wrote:
Well, Ivy has one fundamental problem in common with Maven that many regard
as a great feature: the repository. Numerous times, I couldn't get a Maven
build to complete successfully because some artifact was temporarily or
First: I'd like to note that none of the following is meant to sound
like some kind of "ra ra ra you should use maven and only maven, maven
is the truth and the light". It's just a tool, and like all tools has
things it's good for and things it's not so good for.
That said, I've never had issues with remote repositories - I routinely
use sonatype nexus (jboss) repos, Central, java.net, and a couple of
I guess it helps that once files are fetched by maven and cached in the
local repository, that's it. Unless you change a dependency's version or
use snapshot versions, there's no more network access.
There's always the option of doing the same thing you currently do with
ant - bundle copies of the dependencies in shipping versions or maintain
a separate "3rd pty dependencies" repo under version control. I guess I
don't really see the difference.
Here I keep a common repo under version control, but that's mostly to
save download time on big files, and is exactly the same thing I do for
non-Maven resources like JDK snapshots. It would insulate me a bit from
transient failures in remote repositories, though.
(I do wish that Maven would print a warning and use the last-downloaded
-SNAPSHOT version if it didn't have network access and snapshot updates
were enabled, though. It's the only area where connectivity requirements
do cause me issues.)
> And how many times did a Maven/Ivy build
download half the Internet just to build a small project?
Generally only if it's misconfigured, or that small project uses
plugins/libraries with a lot of dependencies. In the latter case, you're
going to need to get them one way or the other.
> My Eclipse's Maven and Ivy plug-ins are
long uninstalled because of the trouble they caused.
Aaah. I don't use Eclipse - and given the nature of my experences with
it when I've tried using it for something, I wouldn't be surprised by
I use NetBeans for most work, and the command line where convenient.
I don't suppose you were relying on any SNAPSHOT version plugins or
libraries? Because if you were and you had snapshot updates enabled (the
default - unfortunately IMO) then I can certainly see it seeming like it
wants to download the internet whenever you run a build.
Another problem of an external repository is the lack of license
management. ASF projects have clear requirements what kinds of
dependencies are allowed. If you can't control transitive dependencies
based on a license policy you're bound to run into a problem there.
Now that can be a problem. Again, though, I'm not sure how different it
is to a 3rd party library you use bundling libraries of unknown
licensing as dependencies. Either way, you have to check.
release Maven artifacts won't change dependencies without a version
change, and you have to do that kind of checking whenever you update
anything, maven-based or not.
I can check out (or extract) FOP and build at least a basic version
locally with no outside connection. I like that and would like it to
stay that way.
The same is true with Maven. It doesn't have to try to download the
Internet, nor does it need 'net access for builds. I routinely do (re)
builds on my laptop while disconnected.
I have the required artifacts in my local ~/.m2 repository already, and
that's all I need. If I was using an Ant project I'd have to have
obtained the required dependencies to put on the classpath somehow; same
deal. Whether I populate my ~/.m2 from Internet repositories, or check
out a private pre-populated maven repo from version control, I still
have to obtain it somehow.
That said, I do find that the way it doesn't tend to include most of the
core plugins in the initial Maven download - and therefore fetches them
when you first do a build - to be annoying.
Tech-related writing at http://soapyfrogs.blogspot.com/