简体   繁体   English

如何在本地服务器上运行eclipse m2e webapp项目?

[英]How to run an eclipse m2e webapp project on a local server?

I'm trying to create a simple webapp as a maven project with m2e to help me manage dependencies, but I'm must be missing something, because I'm not able to run the project from eclipse. 我正在尝试使用m2e创建一个简单的webapp作为maven项目来帮助我管理依赖项,但我必须遗漏一些东西,因为我无法从eclipse运行该项目。

To put a bit more context, here is what I do: 为了更多的背景,这是我做的:

First, I choose to create a "Maven project" 首先,我选择创建一个“Maven项目”

在此输入图像描述

Then, I select the "maven-webapp-archetype" 然后,我选择“maven-webapp-archetype”

在此输入图像描述

Finally, I fill the basic project information form of the next step and finalize project creation. 最后,我填写下一步的基本项目信息表并完成项目创建。 Everything looks fine at this point. 在这一点上,一切看起来都很好。

The problem is that when I try to run the project, I don't find anything suitable to run the project on a local server: 问题是当我尝试运行项目时,我找不到任何适合在本地服务器上运行项目的东西:

在此输入图像描述

Also, from the "Add and remove..." context menu entry of the local server, my project doesn't appear in the list of web projects. 此外,从本地服务器的“添加和删除...”上下文菜单项,我的项目不会出现在Web项目列表中。

Did I miss a step in the setup, or is there an other more suitable way to start the project? 我是否错过了设置中的一个步骤,还是有其他更合适的方式来启动项目?

You should install the m2e-wtp connector. 您应该安装m2e-wtp连接器。

You can install this from: Window , Preferences , Maven , Discovery , click Open Catalog and search for wtp . 您可以从以下位置安装: WindowPreferencesMavenDiscovery ,单击Open Catalog并搜索wtp Check the box next to m2e-wtp, and click Finish . 选中m2e-wtp旁边的框,然后单击“ 完成”

Once the installation process has completed, allow it to restart Eclipse. 安装过程完成后,允许它重新启动Eclipse。 After that, you may need to right click on the project, choose Maven and Update project . 之后,您可能需要右键单击该项目,选择Maven更新项目

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM