ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Jackson" <>
Subject OT - Maven woes
Date Fri, 15 Sep 2006 04:56:58 GMT
How the hell did anyone convince anyone else to use this crap?!

With that off my chest - I *have to* use mvn2 on my current project,
anyone have experience getting maven to actually do anything useful?
I don't know maven well and I'm happy to concede that I may be a
witless luser, and if someone can hit me with a cluebat, please do,
but until that moment I have to say that my experience with mvn is
completely negative.

All I want to do is:

1 - get build time (like Ant's <tstamp>) in a particular format
2 - and write this value into the manifest of the created jar.

This should not take me 1 week and still be no closer to getting a
result.  Regardless of mavens other qualities (dependency management),
the fact that I cannot find the documentation that I need to solve
this problem, the fact that parts of the maven website are 404, the
fact that I cannot search the mailing list archives (no MARC, just
some thing), the fact that the FAQ is missing answers...
the list of documentation problems is endless with maven - I now think
Ant's docs are fantastic.

I'm truly at my wit's end regarding such a simple task, here is what I
currently have in my pom.xml:

                                <!-- required for some reason to get
filtering working -->


									<!-- 2006-08-19 15:32:04 -->
									<format property="last.updated" pattern="yyyy-MM-dd hh:mm:ss"/>
								<echo file="" message="build.time=${last.updated}"/>
sanity check - yep ant works fine, thankfully -->
								<echo message="[] - updated with : ${last.updated}"/>


         					<!-- inserts the correct entry in the manifest, but -->
         					<!-- so far no luck on getting the build time -->
            				<Built-Time>XXX - ${build.time}</Built-Time>

Basically I want to set a property build.time, and reference it later.
 As it seems that you can only specify hard-coded properties in the
pom (why oh why?!), I decided to get around this by getting ant to
spit out the correct value into a props file, then use mavens
filter/resources to pull in this new value and then reference it with
${build.time} in the appropriate place.

Of course it doesn't work due to - what, I don't know, is it the goal,
the phase that it executes in?  Basically the docs don't tell me
enough, and neither does the debug, and google-fu has failed me too.

I know some of the maven devs lurk here (from time to time), if any of
them could shed some light on this.

Do I have to write a <tstamp> plugin (mojo?) for this?

This has to be the second most frustrating piece of software I've
encountered - right after Oracle.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message