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 >> +-- pom.xml >> `--src >> +--main >> | `--java >> | `--com >> | `--fun >> | `-- App.java >> `--test >> `--java >> `--com >> `--fun >> `-- AppTest.java >> >> should become >> >> ~/dev/maven $tree >> . >> `--helloworld >> +-- pom.xml >> +--src >> | `-- com >> | `-- fun >> | `-- App.java >> `-- test >> `--com >> `--fun >> `-- AppTest.java >> >> >> _______________________________________________ >> m2e-users mailing list >> m2e-users@eclipse.org >> https://dev.eclipse.org/mailman/listinfo/m2e-users >> > > > _______________________________________________ > m2e-users mailing > listm2e-users@eclipse.orghttps://dev.eclipse.org/mailman/listinfo/m2e-users > > > > _______________________________________________ > m2e-users mailing list > m2e-users@eclipse.org > https://dev.eclipse.org/mailman/listinfo/m2e-users > > -- Cordialement, Charlie Mordant
_______________________________________________ m2e-users mailing list m2e-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/m2e-users