ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dana Cordes" <dcor...@gte.net>
Subject Package Renaming Task
Date Sat, 07 Sep 2002 06:39:15 GMT
All,

I've just written at task that will parse through a Java source tree renaming the stated packages
in the java files, so you can then compile that files into a different tree than the files
originally existed in.  Is this of interest to anyone?  If so, I'll go through the submittal
process.  

I was in need of this functionality because we run our fairly large java app against a DB2/400
database, and I needed to support multiple instances of our Java stored procedures in the
single jvm that the RDBMS runs itself.  Each instance of our application needed to run a seperate
set of stored procedures based on the same code out of CVS (for our development environment),
but needed to be indepedant so it could be modified seperatly without affecting the other
developers.  So, say we had a set of classes in a com.mycompany.database.storedprocedure package
in CVS, and I need those files to end up in a myinstance.mycompany.database.storedprocedure
(yes, that breaks package naming convention, but it's just for the purposes of deployment)
so I could also have a yourinstance.mycompany.database.storedprocedure in the same space.

Once those files are processed into a new source tree, they can be compiled, and packaged
for immediate deployment.

It currently takes in source directory, destination directory, package removal depth (number
of tree levels to strip off of the front of the package name), and replacement package the
gets prepended to the modified package name.  It'll process a whole tree of files.

The code is well documented and ready for submittal, but I don't know much about jUnit so
it would be a pain for me to write the test cases.  But if anyone else is interested in the
functionality I'll do it.  I suppose I need to learn that sometime.

-Dana Cordes

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message