How to Package a Java project into a war package

Source: Internet
Author: User

    • Manually package with Eclipse

    1. Right-click the project name

    2. Select Export ...

    3. Select Web→war File

    4. Click Browse and select Export Path

And then the war bag was taken out.

  • Using the MAVEN Package command to export

      1. First of all you need this project itself is Maven project, then right click on the project

      2. Mouse move to debug as bar select Maven Install

      1. when we see the build success, it means that the project has been compiled, then right-click on the project, choose Debug As→maven Clean, Delete the content under the target directory of the MAVEN project.

      2. Then we'll still see the words "build success" and so on ( note!) Attention! This step must be done! ) Updated the engineering information

        Right-click Project Maven→update Project, then click OK.

      3. Once this is done, we can start packing.

        Right-click on the project Debug As→maven build ...

        Enter the package command in the Goals box and click Debug to Pack

      4. When we find the Targer folder under the project path, we will find that the war package has been directed.

How to Package a Java project into a war package

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.