Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ant: List source files and date last modifed?

 
Jillian Kay
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I've been asked to find a tool/script/way to do this, and haven't had much luck so far.

Final goal is to be able to compare two versions of a jar/ear/war and tell which *source* files changed between versions, and when those changes happened. The idea I was asked to explore would be to list all of the source files and the date each was last modified (not the build date). Original thought is to list these in the manifest, though another included file would be acceptable. I expect we'll build a script that would extract and compare the lists.

This way we could look at a huge jar and say "oh, this jar is using the December 11, 2008 version of abc.java, while this other jar that is breaking is using the March 15, 2009 version of abc.java - that was around the time we made such and such design decision" And then know where to debug.

This sounds like something that would be useful enough to have been done before....but I can't seem to find any code or tools that do it. Maybe I'm just not using the right terminology to search? Any ideas?

Thanks in advance!
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

Do you actually include the source files as part of your deployments? Typically it's only .class files that get included.

Do you have source control? Typically it's _much_ easier to do these comparisons from source control, e.g. You tag the source control whenever you do a release and you can then do a diff between those..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic