In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "how the tomcat of eclipse runs the maven web project". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Configure maven in eclipse
After the installation is successful, the Maven option will be added to the Installations to add the downloaded Maven
Configure the default warehouse of the native machine in User Settings
2. Select the project path Usedefault Workspace location default workspace
4. Enter Group ID and Artifact ID, and Package
Group ID generally writes large project names. Artifact ID is the name of the subproject.
Package is the default to build a package for you, you don't have to write it
6. To configure the project, you need to add three folders, src/main/java,src/test/java and src/test/resources. Right-click the project root directory and click New-> Source Folder to create the three folders
Note: instead of building an ordinary Folder, it's Source Folder.
7. Change the class path and right-click the project. There should be 4 folders under Java Build Path-> Source. Src/main/java,src/main / resources,src/test/java, src/test/resources
Choose Allow output folders for source folders
Double-click the Output folder for each folder and select the path
Src/main/java,src/main/resources, select target/classes
Src/test/java, src/test/resources, select target/test-classes
To change here: change the order in which folders are displayed: click Order and Export; to change the JDK version: double-click JRE System Library in Libraries, version 1.6
8. Turn the project into a Dynamic Web project. Right-click the project, select Project Facets, and click Convert to faceted fro.
10. Set up the deployment assembly (Web Deployment Assembly)
After the above steps are set, click the OK,Properties window to close and right-click the project to open this window. A Deployment Assembly appears in the list on the left. Click in, as shown below.
11. Build the framework to add the required jar package to pom.xml
Use Maven POM editor to open the pom.xml file in the project, select Dependencies, click Add in the Dependencies column, and first pop up a search button. For example, entering jsf will automatically search for jar packages related to JSF. We choose version 2.0.4 of jsf to add all jsf packages.
Other jar packages to be added are: junit, jstl
Or click pom.xml to edit the pom.xml file directly, so you can directly copy the dependencies content.
Our pom.xml file can directly copy the following:
4.0.0
Com.smile.maven.demo
Maven-demo-web
War
0.0.1-SNAPSHOT
Maven-demo-web Maven Webapp
Http://maven.apache.org
Junit
Junit
3.8.1
Test
Com.sun.faces
Jsf-api
2.0.4-b09
Com.sun.faces
Jsf-impl
Version > 2.0.4-b09
Javax.servlet
Jstl
1.2
Taglibs
Standard
1.1.2
Maven-demo-web
12. Right-click the project point: Run As-> Maven install and then Run As-> Mavenpackage.
After generation, you can run with Tomcat.
This is the end of "how eclipse's tomcat runs the maven web Project". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.