简体   繁体   中英

eclipse: Run on server disappear

I have a maven project created with maven-archetype-webapp. As i use on Windows machine, the project generated by Maven has a "Run on Server" but when i create it on Linux machine, it doesnt have. Please tell me how can i enable it.

Thanks

Does that other eclipse has the WTP plugin installed ?
As this page on WTP-Maven integration illustrates , WTP is needed for running on a server.

See also " Maven Integration for Eclipse/ Integration with WTP / WTP mini howto "

替代文字

If you have WTP on the other eclipse, check other causes in this SO question .

I have the same problem. I think it is a bug in the M2Eclipse plugin that often appears (but I still don't know what are the conditions of this bug).

When M2Eclipse creates the Eclipse project, it doesn't associate the project with the "web nature". I have a solution, which is not very clean but it works.

  1. Create your Maven webapp project
  2. Create an Eclipse Dynamic web project
  3. Fusion the eclipse config files (.project, .classpath and the .settings directory) in the Maven project. The web nature will be added to your project and the "Run on server" option will appear.

PS: after updating the config files, you'll have to close/open your project to update the configuration.

If someone has a better solution, I am interested too !

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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