db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <fisc...@seitenbau.net>
Subject overriding generator templates [was: Re: file structure of generator release]
Date Thu, 21 Jul 2005 08:50:35 GMT




Hi Serge,

at the moment, the only way I see at the moment to allow for template
overriding is to use the classpath for template loading and make sure the
modified templates are first in the classpath. However, messing with the
classpath is not something I would do if there was an alternative.
I do not know velocity well enough to know whether there is another
alternative. The velocity users list is a place where you could ask (the
Torque generator uses velocity texen tasks)
In my opinion, a good alternative to overriding is to unjar the templates,
modify them and reference them via the generator properties. To separate
the overridden templates from the original ones, you could replace the
original templates with symbolic links to another location, where only
modified templates are stored.

    Thomas

Serge Huber <shuber2@jahia.com> schrieb am 18.07.2005 11:04:23:

>
> Hi Thomas,
>
> I just wanted to say that I really appreciate the fact that you're
> trying to improve the integration of the generator with Maven. I have
> been using it on a few projects and any improvement here would be very
> welcome.
>
> Often, it is only a few templates that need to be tweaked. I was
> wondering if there would be a way to "override" templates, much in the
> way Maven allows for overriding JARs.
>
> Of course in an ideal work the templates would always be up to date, but
> this would require more frequent updates of the generator :)
>
> cheers,
>   Serge...
>
> Thomas Fischer wrote:
>
> > Hi,
> >
> > I just found out that for the Torque maven-plugin to work, the
> > templates need to be in some kind of jar known to maven. The easiest
> > way to do this is to put the templates into the torque-ge.jar, but
> > this makes the Torque-gen.jar quite a mess. People wishing to modify
> > the templates will be very annoyed by this.
> > I'll try if one can get along by creating a separate
> > torque-gen-templates.jar
> >
> > If anyone feels this is the wrong way to tackle the problem, please
> > speak up.
> >
> >     Thomas
> >
> > On Thu, 14 Jul 2005, Thomas Fischer wrote:
> >
> >> Hi,
> >>
> >> In Torque 3.1.1 .tar.gz and .zip binary distributions of the
> >> generator, a single jar was created with all the class files and
> >> templates in it. In torque 3.1, the templates came outside the jar
> >> file ina an extra directory.
> >>
> >> I would like to build the 3.2 releases like the 3.1 release, i.e. the
> >> templates are outside the jar for .tar.gz and .zip release. This has
> >> two advantages, 1) the templates are more easily accessible for
> >> people wanting to modify them, and the jar file is not such a big
mess.
> >> In the .jar release, the templates should be in the jar (obviously)
> >>
> >> any objections, comments etc. to that ?
> >>
> >>  Thomas
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
> >> For additional commands, e-mail: torque-dev-help@db.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
> > For additional commands, e-mail: torque-dev-help@db.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-dev-help@db.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message