MyEclipse 中Tomcat部署项目:Undefined exploded archive location

来源:互联网 发布:linux安装多个jdk版本 编辑:程序博客网 时间:2024/05/22 16:44

今天下午一个工程突然不能部署了,myeclipse提示Undefined exploded archive location

转自:http://blog.csdn.net/oooooooooooooaaa/article/details/6091401

 

在MyEclipse上往tomcat配置项目时出现了一个问题,发现选中的项目无论如何都无法加载上,在依赖类型为Expolded Archive(development mode)时,完成按钮不能点击。

项目不能部署。错误信息为:
      Undefined exploded archive location


原因:
          在工程转移过程中,导致工程的配置文件出错


解决方法:
          1.在工程目录下的.mymetadata文件可能丢失,或者其中内容可能webrootdir被改无效了(把下面内容拷到你的.mymetadate文件中的相应位置上);或者有可能少了这context-root这个属性;添加上这个属性即可,内容如下:
            context-root="/上面的name属性值"
         
2.关掉Eclipse,再启动Eclipse,接着发布工程,发布成功!

          3. 其中44Managements 为工程名

 

示例的.mymetadate如下:

[xhtml] view plaincopyprint?
  1. <?xmlversion="1.0"encoding="UTF-8"?> 
  2. <project-module 
  3.   type="WEB" 
  4.   name="34-Management"context-root="44Management" 
  5.   id="myeclipse.1289460834781" 
  6.   j2ee-spec="5.0" 
  7.   archive="44Management.war"> 
  8.   <attributes> 
  9.     <attributename="webrootdir"value="WebRoot"/> 
  10.   </attributes> 
  11. </project-module> 

0 0
原创粉丝点击