Announcement Announcement Module
Collapse
No announcement yet.
How to integrate maven in existing spring mvc 2.5 project? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

  • #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.

    Comment


    • #3
      Thank you very much

      Comment

      Working...
      X