You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Igor Postelnik <el...@yahoo.com> on 2002/01/28 04:50:28 UTC

Proposed contribution to Velocity/tools project

Hello,

I've written a Velocity-based text generation tool,
similar to Texen, that I would like to contribute back
to the Velocity community. The tool uses Velocity and
an XML control file to manage templatized
configuration files. It is similar to the configure
utility, in that the control file drives the process
of gathering values for settings which are then merged
into a template. The name/value pairs can be saved in
a .properties file to let you run the tool again
without prompting the user. There's also a companion
tool that can read a template and generate a
bare-bones control file that would gather values
needed for that template.

Do you think this would be a worthwhile addition? If
so, can someone point me to some info on how I would
go about contributing the source.

Thanks,
Igor Postelnik

__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Proposed contribution to Velocity/tools project

Posted by Igor Postelnik <el...@yahoo.com>.
--- "Geir Magnusson Jr." <ge...@optonline.net> wrote:

-snip-
 
> A few questions.  Don't assume any point-of-view
> motivating these - just
> trying to figure out what this is :
> 
> 1) Can you show us what this does?  I didn't get it
> from the above
> description.  Maybe show us input and output?

I've attached 3 files to this e-mail that demonstrate
a contrived use case. server.vm is stripped down
version of a Tomcat's configuration file (server.xml);
server.jConf is a control file; and user.txt is the
user interaction. The idea is that the program prompts
user to enter parameters based on questions defined in
the .jConf control file. Then it merges them into a
template to generate output.

This gets more interesting if your config files are
more complex, or if you are deploying an app on
several machines. 

> 2) Can this be done with texen?
> 3) If so, what advantages does it have over texen?
> 4) If not, can you merge Texen and your tool?  Why
> not if not? :)

The main difference is that the proposed tool is a
deployment time utility, rather than build time. It's
meant to be used from command-line, not ant build.
Also, unlike Texen, the control file only describes
how to obtain the context info, not what goes into the
context.

I think this is sufficiently different that it should
live under a separate Java package.

-Igor Postelnik

__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

Re: Proposed contribution to Velocity/tools project

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 1/27/02 10:50 PM, "Igor Postelnik" <el...@yahoo.com> wrote:

> Hello,
> 
> I've written a Velocity-based text generation tool,
> similar to Texen, that I would like to contribute back
> to the Velocity community. The tool uses Velocity and
> an XML control file to manage templatized
> configuration files. It is similar to the configure
> utility, in that the control file drives the process
> of gathering values for settings which are then merged
> into a template. The name/value pairs can be saved in
> a .properties file to let you run the tool again
> without prompting the user. There's also a companion
> tool that can read a template and generate a
> bare-bones control file that would gather values
> needed for that template.
> 
> Do you think this would be a worthwhile addition? If
> so, can someone point me to some info on how I would
> go about contributing the source.


A few questions.  Don't assume any point-of-view motivating these - just
trying to figure out what this is :

1) Can you show us what this does?  I didn't get it from the above
description.  Maybe show us input and output?

2) Can this be done with texen?

3) If so, what advantages does it have over texen?

4) If not, can you merge Texen and your tool?  Why not if not? :)


-- 
Geir Magnusson Jr.                                     geirm@optonline.net
System and Software Consulting
"They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety." - Benjamin Franklin



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>