- Manually package with Eclipse
- Right-click the project name
- Select Export ...
- Select Web→war File
- Click Browse and select Export Path
And then the war bag was taken out.
- Using the MAVEN Package command to export
- First of all you need this project itself is Maven project, then right click on the project
- Mouse move to debug as bar select Maven Install
- 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.
- 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.
- 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
- 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