Just google and you can find a guide for creating an archetype. Mainly it means creating a new project which its artifact is the project template and archetype project descriptor packed in one jar. The template is a directory containing the Pom XML as you configured and sample java files to getting started.
On Tuesday, November 19, 2013, Russell Bateman wrote: > Thanks, Charlie. > > Yes, I see that I'm really asking Maven instead of Eclipse-Maven questions > and I do tell people in the Eclipse newcomers list when they start doing > that. Thanks for putting up with me. > > Best regards and thanks to all, > > Russ > > On 11/18/2013 2:55 PM, Charlie Mordant wrote: > > Hi, > > You can configure sourceDirectory, testDirectory, etc... in your pom ( > http://maven.apache.org/pom.html#Build_Element). > And I think that archetype generation (mvn archetype:create-from-project) > will not cause trouble, even if your directory structure is not so Maven > friendly. > > Also, archetype generation as nothing to do with m2e: > http://maven.apache.org/archetype/maven-archetype-plugin/index.html > > Welcome back on the Maven world! > > > > > 2013/11/18 Russell Bateman <r...@windofkeltia.com> > > Thanks very much for these ideas. After Asaf wrote, I Googled around to > figure out what he was referring to and found doc that enabled me both to > amend my *pom.xml* and to understand why amending it worked (found out > about the Super POM), which it did and my project now looks the way I want > it to and also works. > > My next question is also a simple one about the next logical step. > > Having fixed my project's *pom.xml *to accept the simplified, > Eclipse-like subdirectory structure,* what can I do such that typing* > > $ mvn archetype:generate > > *to create my next project will result in a **pom.xml **and subdirectory > structure already fixed up this way?* > > In other words, I think, I'm asking how to create my own archetype. > > Eventually, I'm hoping also to do this for Eclipse Dynamic Web projects > (what I really do), that is, create an archetype that will set them up just > as Eclipse sets up this kind of project instead of how the available > archetypes do it. > > I think armed with these answers, I'll be back into Maven and over the > annoyances that I originally experienced years ago prior to working on > teams that eschewed Maven in favor of just ant or ant and Ivy. I would > just stick with ant/Ivy, but I'm going to be working on a team that uses > Maven, so I have to get back into it. > > Many thanks for your patience, guys! > > Russ > > > On 11/18/2013 11:43 AM, Asaf Mesika wrote: > > In the Pom.xml under build element there are several elements allowing you > to change source directory and testSource directory. > Go wild :) > > On Monday, November 18, 2013, Russell Bateman wrote: > > I'm a not-too-savvy Maven user. What I would like to do, and it probably > violates some sacred religious Maven principle, is alter subdirectory > structure to imitate a non-Maven Eclipse project. Please see the > illustration below. > > Is it Maven that imposes the extra, traditional substructure or a function > of the archetype that can be modified (if only I knew how)? > > Many thanks for comments. > > > ~/dev/maven $tree > . > `--helloworld > >
_______________________________________________ m2e-users mailing list m2e-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/m2e-users