Results 1 to 3 of 3

Thread: How to integrate maven in existing spring mvc 2.5 project?

  1. #1
    Join Date
    Mar 2011
    Posts
    27

    Default 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. #2
    Join Date
    Jun 2011
    Location
    Seville, Spain
    Posts
    7

    Default

    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.

  3. #3
    Join Date
    Mar 2011
    Posts
    27

    Default

    Thank you very much

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •