What about creating a new Maven Web Project and moving the pom.xml
back to your existing Web Project? I mean:
- Backup your projects
- Create a new project with name
MavenWebTest
- Close your original project
- Move the
pom.xml
from the MavenWebTest
project to your original project's folder
- Modify the
pom.xml
's project specific settings (e.g. project name, dependencies)
- Delete the
build.xml
and the whole nbproject
folder
- Move and rename the
web
folder to src/main/webapp
(webapp
is the new name) (use svn mv
if you use Subversion)
- Move
src/java
to src/main/java
(svn mv
here too)
- Open you project again in Netbeans. It should be a Maven project now.
- Delete the unnecessary
MavenWebTest
project
Anyway, creating an empty pom.xml
also should work. You have to list your dependencies in the pom.xml
and you have to set the project's name. Maybe other fine tunings also required to get the same result as Netbeans create without Maven. If you create the pom.xml
with Netbeans (the MavenWebTest above) I suppose that most of Netbeans specific stuff already will be there.
If you are new to Maven I suggest you to check the free pdf/html books on Sonatype's website.