Best practices with Maven would suggest that you not embed the Java files in the Web project. Rather, you should create a standard jar project, put the Java files there, and then put a <dependency/> in the Web project so that Jar file is brought in when the War is created.
Alternatively, you can simply create the src/main/java directory yourself. The webapp archetype does not create this directory as it does not comply with best practices, but there's nothing stopping you from doing so. I'd suggest reading more about creating J2EE projects with Maven in "Better Builds with Maven" and other online resources. Wayne On 7/18/08, snakelocks <[EMAIL PROTECTED]> wrote: > > When I create a web project using: > mvn archetype:create \ > -DarchetypeGroupId=org.apache.maven.archetypes \ > -DarchetypeArtifactId=maven-archetype-webapp \ > -DgroupId=com.mycompany.app \ > -DartifactId=my-webapp > > I do not get the src/main/java folder created. > > But I do get this created when I create a 'regular' project using: > mvn archetype:create \ > -DarchetypeGroupId=org.apache.maven.archetypes \ > -DgroupId=com.mycompany.app \ > -DartifactId=my-app > But then, of course, I don't get me src/main/resources and src/main/webapp > etc. > > How do I create a web project AND have a src/main/java created as a base > from which to develop? > -- > View this message in context: > http://www.nabble.com/newbie-question---creating-web-projects-tp18530489p18530489.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]