eclipse tomcat部署问题, eclipse web tools platform

来源:互联网 发布:淘宝开店怎么开 编辑:程序博客网 时间:2024/04/30 09:23

tomcat部署时,有时web工程依赖的其他工程没有被正确打包成jar包,而是变成jar目录(folder with metadata but no jar)。

经多番尝试,重新关闭所有工程,再打开主web工程,依赖的工程会自动打开,重新clean tomcat,jar包正常了。

之所以jar包会变成目录,感觉是web工程添加了新的工程依赖,原来的工程依赖并没有正确更新,只是手动打开新的依赖工程,最终导致tomcat部署时未能理解新的工程依赖,错误的将jar包弄成目录拷贝到tomcat部署目录的lib下。



相关资料:

folder with metadata but no jar

web tools platform userguide

eclipse project build and tomcat publish

When you run "project > Build" , eclipse will compile all sources in folders on the build path to the .class files and put the .class files into the output folder you specified. Both of these folders can be configured fromProject-> Properties-> Java Build Path . Note that eclipse has the incremental build feature that will only compile the sources that have changed since the last time the project is build.

If you enable Auto-build for the project ( via "Project-> Build Automatically" ) , the"project > Build" will run automatically when you add, remove, or modify the source files on the build path , so you don't have to call "project > Build" manually in this case.

The Publish option in the server tab will deploy the application to your Tomcat instance by copying the project resources such as xml configuration files , web resource (html ,css, js etc) , and the compiled .class files you get from the"project > Build" to the correct location of the Tomcat instance .

So , "Project > Build" is about compiling java sources to the .class files while the options in the server tab is about deploying the application to the tomcat instance and maintaining the tomcat instance .

You can find the information about the "server tab" (i.e. Web Tools Platform) from the following links:http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.wst.server.ui.doc.user/topics/tpublish.htmlhttp://wiki.eclipse.org/WTP_Tomcat_FAQ


0 0
原创粉丝点击