How to add maven support pom.xml after a dynamic web project is created

This topic contains 3 replies, has 2 voices, and was last updated by  support-swapna 10 months, 3 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #528481 Reply

    eugenejsn
    Participant

    ME 2016 on Linux.

    First created a dynamic web project (New –> Web Project). Normally, I could add the Maven support WHILE I was creating the web project. BUT, I did not go that way.

    Instead, after I first created the web project and did the development for sometime. Now, I want to add the Maven support (pom) to the existing web project, how can I do it?

    Thanks.

    Eugene

    P.S. After the completion, the project will still remain as a dynamic web project, just with the Maven support added. In another word, I do NOT want the project to be converted into a Maven based project.

    #528540 Reply

    support-swapna
    Moderator

    Eugene,

    You can add the Maven capabilities to the project by right clicking on the project > MyEclipse > Project Facets[Capabilities] and select of the two facets for Maven Support. Alternatively, you can also add the required facet from the project properties page. Right click on the project > Properties > MyEclipse > Project Facets and select the one you want to install to your project.

    The Maven Support – Dependencies Only Facet allows you to benefit from Maven’s dependency resolution, without having to move your projects to a fully Maven based build. You can make any changes to pom.xml; however, only dependency information is respected, and the Maven Dependencies container will be updated accordingly. All other project configuration metadata is ignored.

    For more details about the Dependencies only facet, please check this link : https://www.genuitec.com/products/myeclipse/learning-center/maven/maven-dependency-manager/#2_Maven_Support_-_Dependencies_Only_Facet

    The Maven Support for Java EE Projects facet is for a full Maven based build including other aspects of Maven as well (plugins, goals, builds, etc.). This is the facet which gets added to the project when you select ‘Add maven support’ during the web project creation.

    Hope this helps. Let us know if you have any questions.

    –Swapna
    MyEclipse Support

    #528567 Reply

    eugenejsn
    Participant

    The Maven Support for Java EE Projects facet is for a full Maven based build including other aspects of Maven as well (plugins, goals, builds, etc.). This is the facet which gets added to the project when you select ‘Add maven support’ during the web project creation.

    — When I create a web project (say, WebTest) with the Maven support added, I can create a EAR project (WebTestEAR) in the same workspace, then add this EAR project to the server for testing. Is this a full Maven based build? If so, on ME, one can create a full Maven based project buy going through the route of New –> Maven Project that will create a full Maven based build.

    Can both the above method creating the full Maven based build projects? if so, what is the difference between the two?

    Thanks.

    Eugene

    #528658 Reply

    support-swapna
    Moderator

    Eugene,

    Projects created in both the ways are fully Maven based. I have already responded to one of your previous queries about the differences between the projects here : https://www.genuitec.com/forums/topic/creation-of-web-project-with-maven-support-vs-creation-of-a-maven-project/

    Hope this helps.

    –Swapna
    MyEclipse Support

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: How to add maven support pom.xml after a dynamic web project is created