Monday, July 06, 2009

Another Not-so-well-known Gem: Ant Maven Task

Ok: I thought it was common knowledge that:

  1. Maven repositories are great for storing versions of product artifacts (jars), but
  2. Converting projects to Maven is sometimes big hassle, since it requires everything to be set up the Way Maven Wants (which is the key to keeping configuration to minimum, convention-over-configuration)

and that these two points are somewhat conflicting.
So: while it is an absolutely great idea to provide jars of non-Maven projects through Maven repositories, it may be royal PITA to get that done by Mavenizing builds. Or, well, at least extra work that is easily deferred, given half a chance.

But fortunately you can both ship your dog food, and staunchly refuse to eat it: just use Ant Maven Task to publish ("deploy") any Ant-produced (or whatever you use) into Maven repositories (including snapshot repos)! And allow those diligent Maven users (or smarties who use, say, Ivy, but with Maven repos!) to use your great library, without giving in to demands of converting to this new religion. :-)

So why am I writing this entry? Because it looks like there are still developers who do not know this nifty shortcut! But no more -- you have been advised: get the artifacts out; it's good for you and others.

ps. This is quite similar to how you REALLY should also make sure your jars are actual OSGi bundles. How? By either: (a) using Maven (which has bundle generation targets), or (b) Just Use Ant (JUA), with the nifty -- yes, you guessed it! -- Ant OSGi Bundle task... :-)

blog comments powered by Disqus

Sponsored By

Related Blogs

(by Author (topics))

Powered By

About me

  • I am known as Cowtowncoder
  • Contact me
Check my profile to learn more.