-
Apr 27th, 2012, 03:41 AM
#1
How to integrate maven in existing spring mvc 2.5 project?
Hello friends,
I am learning maven, i have already worked on few projects in spring mvc 2.5 In those projects all dependencies were added manually by me in WEB-INF/lib. Now I want maven to take care of all those dependencies in that existing project. Is there any way to do that?
Thanks in advanced.
-
Apr 28th, 2012, 07:12 AM
#2
Hello, all projects are adaptable to maven. The maven project structure is quite diferent a J2EE project structure (dynamic web in Eclipse). First, I recommed you to transform your project to maven structure, it is very easy, see the reference, for example:
Project
----------pom.xml
----------src
+++++ main
+++++ java (all classes)
+++++ resources (properties,xml)
+++++ webapp
++++++ WEB-INF
++++++ views
++++++ resources
+++++++ test
Then, you must create correctly POM.xml (to add al dependencies of any repoitory, to add repository, to add pluigin eclipse, to define perfils if it is necesary....)
Third, you must to create a eclipse project with this command: mvn eclipse:clean eclipse:eclipse , and to download all dependencies to local repository (.m2 folder) with this command: mvn install , for to skip test: mvn install -Dmaven.test.skip=true
Fourth, to import the project in maven, to add .M2_HOME to your classpath and to add project facet to the project for transform en dinamic web project eclipse and to use eclipse emmbeded server (tocmat, jboss,...)
This is a basic step, no complet guide.
Regars.
-
Apr 29th, 2012, 03:30 AM
#3
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules