开发者

How to deploy a Maven Project from Eclipse IDE to Tomcat Server

I have created a New Other --->Maven Project from Eclipse IDE and added Archetpe as org.apache.maven.archetypes --- maven-archetype-webapp and provided these values

Group Id : com.mypack Artifact Id : MYWEBAPP ve开发者_Python百科rsion : 0.0.1-SNAPSHOT package : com.mypack

Then from the command Prompt ,Went to that POM.xml directory ,and i have done these things

mvn clean mvn install mvn eclipse:eclipse

In all these cases the BUILD SUCCESSFUL came

Then from the Eclipse , i added the server Tomcat and wanted to install these MYWEBAPP to the server , but a popup appeared saying

There are no resources that can be added or removed from the Server .

Please tell me if this is the correct procedure or not .


A maven webapp unfortunately has a slightly different layout from an Eclipse webapp (WTP) project. The easiest way to get them to play nice together is do specify the wtpversion parameter for the maven-eclipse plugin. This will ensure that when the Eclipse project settings are generated, it includes WTP settings, making your project a valid Eclipse webapp project which you can run directly from Eclipse.

Like so:

mvn -Dwtpversion=1.0 eclipse:eclipse
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜