Using Maven or Ivy for JNode dependencies.
Recently I've started using Maven 2 for a lot of my "day job" projects. My initial reason for doing this was to keep some dependency management issues from getting out of hand, and to move away from the need to checkin lots of large 3rd-party JARs. But I'm starting to see the benefit of Maven in other areas as well.
So, I'm wondering if Maven (or Ivy) might be the long term answer to our dependency issues. For example, the "big classlib JAR file" issue might be addressed by creating a POM for classlib and uploading the JARs to a Maven repository. Versioning of classlib could be taken care of using POM versioning. (The same approach could be applied to the builder tools JAR ... if we created one.)
Another area that Maven would help is in managing our dependencies on 3rd party libraries. You simply identify the library and version needed in (e.g.) the central Maven repository, then declare the dependency your POM file. Maven takes care of the rest, including downloading the JARs and adding them to the relevant classpaths. (We currently "handle" this by variously checking in JAR files in lib directories or checkin in source code, but it is hard to know for sure what versions we are actually using. And there are always potential 'license' issues with checked in JARs, etc.)
In the really long term, we could even develop Maven "mojos" for dealing with JNode plugins and plugin dependencies. For example, it might be feasible to translate a POM for some 3rd party JAR into a JNode plugin descriptor ... and have this happen automatically as a result of declaring a Maven dependency.
And of course, Maven allows you to generate a lot of website content automatically from your project's POM files. I've never played with this, but co-workers say that it is good value.
The downside of Maven is that it imposes some tight constraints on the organization of your project's source-code tree. You can (in theory) fight this, but this is extra work, and tends to cause trouble down the track. It is possible that Ivy may be a better fit to our project for this reason.
- Login to post comments
Maven pops up from time to
Maven pops up from time to time as a proposed build system for JNode but the rigid project structure it needs has been a serious drawback.
Ivy looks more interesting to me though: more to the point (managing dependencies) and flexibe.
Probably migrating to Maven would be a major task while using Ivy is more like an incremental change.
The Maven project structure ...
... wouldn't be that hard to live with, though it would be a major upheaval and significant work to convert to, especially given that we need to preserve SVN history.
Another issue is that our current build files would need a lot of work to Maven-ize.
We use ivy at work and trust
We use ivy at work and trust me, it's a nightmare on big project. I use maven a little too and, yes the structure of project could be a constraint but it's a easier to work with it.
Fabien L.
Followup with Fabien ...
I emailed Fabien about this (in a different context), and he told me that the "nightmare" he was talking about is more to do with the complexity of the project's dependencies than to Ivy itself.
So if we do decide to do something about JNode dependency management at some point in the (distant) future, we should not dismiss Ivy out of hand.