ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Maven: Trove of Tips
Subject:   Almost a maven convert
Date:   2004-08-05 06:08:56
From:   tlaurenzo1
I was almost a maven convert a couple of months ago. Even though understated by the maven developers, I believe that the achilles heal is the constraint that each project can only produce one artifact. I know that there are philosophies all about this, but the truth of the matter is (as I have found it, anyway) that it is pretty convenient to be able to spit out multiple artifacts from time to time (think: rmi stubs, jax-rpc stubs, a lite and full version of a library). What's more is that many old projects do just this. Converting them to the "maven way" can be an exercise in futility.


When I stepped back from maven a bit, I found that the main feature I was using it for was autmatic dependency management. Even this left something to be desired since dependencies are not tracked recursively (ie. I cannot say go get apache axis 1.1, spring 1.0, or hibernate 2.0 without worrying about the dependency tree -- and the dependencies on those libraries is the hardest part to keep straight).


With this in mind, I set out to write some ant tasks/types that simulated the Maven dependency management and possibly extended it. A little way into my work, I read an article on the serverside about a tool called Savant that does just this (try to look past the line break problems in this article... it is a good read). It took me a couple of hours to figure it out, setup a site local repository and specify dependencies for my commonly used libraries (and submit a bug-fix for a FileNotFoundException when resolving library dependencies in some situations). Its really great because it works with the Ant classpath and fileset references instead of trying to tromp them. It also makes publishing arbitrary artifacts (with their dependencies) a snap. It does rely on ant 1.6, so its time to upgrade.



Anyway, that's just my observations. Your mileage will vary. I still use Maven for simple projects.


1 to 3 of 3
  1. Almost a maven convert
    2004-09-04 14:41:37  khote [View]

  2. Almost a maven convert
    2004-08-09 10:47:01  schaefera [View]

  3. Savant
    2004-08-05 08:14:19  jimothy [View]

    • Savant
      2004-08-06 08:53:58  jimothy [View]

1 to 3 of 3