I don't know if this is the correct forum, I tried to find somethig about maven but I didn't find anything.
I am new working with maven, I am trying to create an old web application as a maven project, I don't know how to create the directory structure for that. I used the archetype maven-archetype-webapp, but now I don't know where to put my jsps and everything. I have a classes folder in my WEB-INF folder, but I don't know if I have to take it off, because maven has a directory called target where it puts all complied classes.
was it really so hard to find information? I've often heard or read that Maven documentation was really poor in the past but by now there's quite a lot of information on the Maven homepage itself and there are tons of other articles etc.
Here you can see the directory layout it expects for any project. You can still customize it but you save time and trouble just by following the Maven conventions. For web applications all the "web" specific part go to the "src/main/webapp" directory, that is HTMLs, JSPs and WEB-INF for example. I hope this helps solving your problem
For general information and examples about Maven Sonatype is a very good source of information. As I said the Maven homepage and various other pages are really valuable, too.
Joined: Mar 12, 2009
Thank you very much Marco, I did found the first link you told me, but I wanted more information. The second one its very good also.
Thank you again for your help and for your kindness, have a great day
You're welcome ;-) If you have more questions just let us know...
If you take some time to learn you will surely see the full advantages of Maven based projects. Once you know how everything works and if you agree to the conventions (like the directory structure) it's really, really easy to use. And it simply works! Use it from the command line, any of the popular IDEs or other tools like continuous integration servers and it just works without any manual configuration.
Plus there are lots of helpful plugins for additional tasks. For example you could use a plugin which can automatically deploy your web application in case of a successful build and test run etc.
We definitely do encourage people to RTFM, although it's a point of pride that we don't flame people into it here at the JavaRanch like some forums do.
Still, here's a freebie, since it will save you a lot of pain:
Don't put files in the target directory!
The entire target directory and its children are subject to being deleted by maven. In fact, "mvn clean" will do exactly that. So anything you want not to get deleted shouldn't go there. In fact, you really shouldn't put anything there. It belongs to maven, and if maven wants something there, it will put it there.
Because Maven deletes target and its children, when using a source code control system such as Subversion or CVS, you should put the target directory into the project vcs "ignore" list.
An IDE is no substitute for an Intelligent Developer.