Writing the archetype generator into java program.