db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Monroe" <Greg.Mon...@DukeCE.com>
Subject Proposal: Supporting local and add-on Generator "Override" jars
Date Thu, 03 Aug 2006 16:06:40 GMT
I've been looking at how to package, document, contribute
my betwixt map/dtd generation code.  As Thomas pointed out, 
it's not truely mainstream Torque but might be a useful 
addon. Anyway, this got me thinking about how to best 
support template and/or generator local modifications or 
add-on. 
 
If the generator build scripts supplied by the Torque 
distro had classpaths that first tried to add any 
*-override.jar files before the distro files, then 
Templates and generator classes could easily be locally 
overriden.  This is trivial to do with the Ant 
torque-build.xml.  I assume that it would be easy in Maven?  
 
If no *override.jar files exist, it's a standard install.  
But if you've got local changes to implement or want to 
use a supplied add-on, just add *override.jar files to the
correct directory(s) and use the standard generation
processes.
 
IMHO, this seems cleaner than trying to maintain a full
customized template or generator distros.  If a new 
version comes out, just grab the standard, check for
any gottcha's between it and your modified code, add back
in your override jars.  All the benefits of a new version
with your local mods included.
 
In a lot of cases, like changes to sql generation 
templates (e.g. MySQL Table options ) or new db 
adaptor support (like Informix/MSSQL7), this will be 
very easy.  These areas don't change a lot or are
mostly new templates. 
 
It also allows for easier add-on contributions.  An add-on
could be supplied as a set of jars that are simply put in
the correct directories using common How-To instructions.
The add-in supplier just needs to document any additional
settings.
 
It's not perfect since add-on's can override each other 
and break... but it's better than it was.
 
Anyway, if folks think this is worth it, I'll sign up for a 
first pass at documenting and changing the build scripts. 
 
However, I'm not a Maven maven so can anyone suggest the
correct way to do this in Maven?  I pretty sure it involves
changing torque:init goal classpath in the plugin.jelly file.
But not exactly sure how to do this.  (but learnings half
the fun...lol)
 
Greg

Greg Monroe <Monroe@DukeCE.com> (919)680-5050
C&IS Solutions Team Lead
Duke Corporate Education, Inc.
333 Liggett St.
Durham, NC 27701


 

Duke CE Privacy Statement
Please be advised that this e-mail and any files transmitted with it are confidential communication
or may otherwise be privileged or confidential and are intended solely for the individual
or entity to whom they are addressed.  If you are not the intended recipient you may not rely
on the contents of this email or any attachments, and we ask that you  please not read, copy
or retransmit this communication, but reply to the sender and destroy the email, its contents,
and all copies thereof immediately.  Any unauthorized dissemination, distribution or copying
of this communication is strictly prohibited.



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