Question

I have watched a video about how to work with maven archetypes in netbeans : from a project "A" an archetype is generated and then another project "B" is generated from that archetype. It was ok as netbeans make it all easy. But now i have to change to eclipse and it seems to be more complicated there. So, before i start i would like to understand why working with maven archetypes worth it and why as "B" is exactly the same as "A". i could just copy/paste the project and refactor/rename the maven project and it's done! So i think i don't really need such as complicated process.

Was it helpful?

Solution

Yes, the output of a maven archetype is a new copy to be used as a template for your project. It is almost the same copy each time, you can insert your own groupId, artifactId and version. You could achieve the same result if you downloaded and expanded a template zip, and replaced tour artifact/groupId. Then you would need some catalog and a place to keep the zips etc. Maven just organizes this for you in a simple uniform way. Think of a company which uses the same mechanism for company-specific templates.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top