File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Experiences with Megg Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Experiences with Megg" Watch "Experiences with Megg" New topic
Author

Experiences with Megg

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61756
    
  67

The tool Megg has been brought up in a number of posts this week.

Could those that use it pipe in with their experiences? I've always found the task of setting up a new project skeleton quite tedious and this sounds like it could be just the ticket.
[ September 22, 2004: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Craig Demyanovich
Ranch Hand

Joined: Sep 25, 2000
Posts: 173
I started with Mike's template. With that working, I made a copy and modified it to suit my preferred layout, which is very similar to that described in PPA. Finally, I wrote a very brief Windows batch file that sets up the environment and runs Megg with a supplied parameter or two. Now, I run the batch file, answer a few questions and begin working right away!

Craig
Mike Clark
author
Ranch Hand

Joined: Aug 15, 2003
Posts: 83
I'm known to be a minimalist when it comes to tools. I (heart) simple tools that have a lot of mechanical advantage, so to speak. Megg fits that criteria for me. It gives me an easy way to build a template for directory structures and file contents, then distribute that template across a team or community by posting the template on the web.

In a sense, Megg is a very lightweight version of Maven, though Megg doesn't handle dependency management and such. It's not a fair comparison, I grant you.

Mike


Mike Clark<br />Author of <a href="http://www.amazon.com/exec/obidos/ASIN/0974514039/ref=jranch-20" target="_blank" rel="nofollow">Pragmatic Project Automation</a>
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Just something I remember thinking about when I first stumbled on Megg the first time:

Hmm. You know, I like this tool a lot but it's a bit too "small" and rarely used to really stick with you. Every time, you need to go and download the megg.jar file, figure out whether you had to provide some command line arguments, and then run the jar file. Wouldn't it be easier for someone like me to have a website that asks me all those questions about the template I've selected (including selecting the template) and have me download the resulting project structure as a .zip file?

As I said, just something I remember thinking about. Obviously there are very good reasons for preferring a "local" Megg, but there's still something about not having to download the .jar file first.

What do others thing?


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Lasse Koskela:

As I said, just something I remember thinking about. Obviously there are very good reasons for preferring a "local" Megg, but there's still something about not having to download the .jar file first.

What do others thing?


I could also imagine a webstart version. Though I'm not sure wether that'd still pass for being simple...


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Simon Brown
sharp shooter, and author
Ranch Hand

Joined: May 10, 2000
Posts: 1913
    
    6
I've sent Jeremy (creator of megg) a link to this thread so perhaps he'll chime in at some stage.
Mike Clark
author
Ranch Hand

Joined: Aug 15, 2003
Posts: 83
Originally posted by Simon Brown:
I've sent Jeremy (creator of megg) a link to this thread so perhaps he'll chime in at some stage.


I attempted to contact Jeremy a while back to send him a complimentary copy of the book for his work on Megg, but his email address (a bigfoot account) bounced. If you could hook us up somehow, I'd love to send him a copy.

Thanks!

Mike
Jeremy Rayner
Greenhorn

Joined: Sep 23, 2004
Posts: 1

Originally posted by Bear Bibeault:
> The tool Megg has been brought up in a number of posts this week.
> Could those that use it pipe in with their experiences?

I wrote megg to fulfill a very specific purpose.

I have a train journey each day, and was finding half of my
journey involved setting up the project structure before
I could even start on the problem at hand.

The driving requirements for me were
  • best practices on even the smallest projects

  • - I distilled best ant practices from the wonderful Ant book (Hatcher+Loughran) into the default java template
  • make the project structure templates into one tangible chunk

  • - they can be zipped or tar.gz files at any URL you specify
  • make the templates 'purpose' independant

  • - you can setup _any_ kind of directory structure with megg, not just java projects
  • small/simple to use

  • - megg will do something useful, when invoked with java -jar megg.jar

    I still use megg at the start of each project myself and find it invaluable
    in providing a consistent and useful project structure.





    Originally posted by Lasse Koskela:
    > Wouldn't it be easier for someone like me to have a website that
    > asks me all those questions about the template I've selected
    > (including selecting the template) and have me download the
    > resulting project structure as a .zip file?


    This is a really nice idea, I'll have a play with writing a web application
    wrapper for megg, that leads the user all the way through the process.




    Originally posted by Ilja Preuss:
    > I could also imagine a webstart version.

    This is doable, were you thinking of a Swing parameter Q&A, or would console based user prompting be enough?

    I was thinking that megg could quite easily be an IntelliJ/Eclipse plugin too.

    You'll notice that the templates are actually ignorant when it comes to what
    actual tool is manipulating them. I'm hoping that I can write versions of
    megg using .net, perl etc... The key factor is the templates would be the
    same format for all platforms (zipped or tar.gz directory structures)


    Originally posted by Craig Demyanovich:
    > After reading his book, I combined his best practices with what
    > I was using for a very nice layout, and I've used Megg to make
    > it easy to begin each new project

    Craig, I'd be interested in seeing your templates, or anyones for that
    matter, always looking for cool templates...


    Thanks to Mike for all the publicity for megg, it gives me the warm
    fuzzies to see that a tool I use is actually useful to everyone else
    too.

    I'll hang around this list for a while, if anyone has any more questions, ideas :-)

    jez.
    [ September 23, 2004: Message edited by: Jeremy Rayner ]

    --<br />http://javanicus.com/blog2
    Craig Demyanovich
    Ranch Hand

    Joined: Sep 25, 2000
    Posts: 173
    I've sent my Megg template to Jeremy privately. I don't have much bandwidth to spare, so I won't share a URL here, but I'd be happy to share the template with anyone who wants it. Remember, since I was already using a project structure like Mike's, I just copied his template and tweaked it for use here at my company.

    Craig
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Experiences with Megg