Reputation: 26589
How to integrate maven 2 in an existing netbeans project ?
I dont want to do it by creating a new maven web app project and moving my files manually to the new project(as I have versions of this project in my subversion repositories which I wont be able to link if I create new project), rather I need to integrate that in my already existing netbeans project. How do I go about it ? Would creating a pom.xml work ?
Maven 2 already installed on my machine.
Upvotes: 8
Views: 6528
Reputation: 28845
What about creating a new Maven Web Project and moving the pom.xml
back to your existing Web Project? I mean:
MavenWebTest
pom.xml
from the MavenWebTest
project to your original project's folderpom.xml
's project specific settings (e.g. project name, dependencies)build.xml
and the whole nbproject
folderweb
folder to src/main/webapp
(webapp
is the new name) (use svn mv
if you use Subversion)src/java
to src/main/java
(svn mv
here too)MavenWebTest
projectAnyway, 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.
Upvotes: 9