The Artima Developer Community
Sponsored Link

Java Buzz Forum
megg: user defined project templates

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Jeremy Rayner

Posts: 111
Nickname: j6wbs
Registered: Sep, 2003

jez codes stuff
megg: user defined project templates Posted: Mar 26, 2004 1:34 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Jeremy Rayner.
Original Post: megg: user defined project templates
Feed Title: javanicus
Feed URL: http://www.javanicus.com/blog2/subjects/java-rss.xml
Feed Description: Jeremy Rayner on java and other stuff.
Latest Java Buzz Posts
Latest Java Buzz Posts by Jeremy Rayner
Latest Posts From javanicus

Advertisement
Just added a new megg release that provides the ability to use your own project templates, this has been requested by a number of people, and hopefully is the hook that might get you using megg :-)

Rough guide to template writing

A project template is literally any directory that contains files you need for next project. The special bit comes when you go into one of your files and place the special parameters (velocity style) inside the source files and a controlling megg.xml in the root of the directory.

for example: put the text ${megg.foobar} in your source file, and add <arg name="foobar"/> to megg.xml in the root of the directory. megg will prompt user for this arg, then generate the project on this basis.

Just unpack megg.jar to look at the other templates for ideas...

The search strategy for templates is currently:

  • if you typed java -jar megg.jar foobar
  • megg will look in './foobar'
  • ...then '$MEGG_HOME/.megg/templates/java'
  • ...then '$user.home/.megg/templates/java'
  • ...then in the megg.jar file itself

Give megg a whirl today, and let me know your thoughts...

Read: megg: user defined project templates

Topic: Pruning logfiles with Sed and grep Previous Topic   Next Topic Topic: SeaJUG: Groovy

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use