Apr 27th, 2012, 03:41 AM
How to integrate maven in existing spring mvc 2.5 project?
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
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:
+++++ java (all classes)
+++++ resources (properties,xml)
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.
Apr 29th, 2012, 03:30 AM