facebook

How to create WAR file for Maven project

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #520669 Reply

    eugenejsn
    Participant

    ME 2017 on Windows 7.

    For a Dynamic Web Project, this was how I created an WAR file: I went to my Web Project, then right mouse clicked on the project –> Export –> Java EE –> WAR. The created WAR file was then deployed to an application server such as TomCat.

    But this time, I created a MAVEN project (File –> New –> Maven Project). Inside this project, there are web related files and java files. I intended to create a WAR file for the project. I then will deploy the WAR file to the TomCat server.

    What are the steps to create the WAR on this Maven project?

    Thanks

    Eugene

    • This topic was modified 7 years, 7 months ago by eugenejsn.
    #520829 Reply

    support-tony
    Keymaster

    Eugene,

    Sorry for the delay in replying. My guess is that you have simply created a maven project without using an archetype to create the project, from which the project creation wizard would pick up the need to add certain facets. That is, your project is not recognized as a web project and so doesn’t offer the export WAR option. If the project icon in the MyEclipse Explorer doesn’t have the earth/globe decoration, then it’s not seen as a web project. You can try adding the appropriate facet from the project properties pages, or simply create the project from a web archetype or use the create Web Project wizard and check the maven support option.

    Please let us know if this helps.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: How to create WAR file for Maven project

You must be logged in to post in the forum log in