似水的流年
2017-12-31
1110浏览量
1)右键项目,选择Project Facets,点击Convert to faceted from
2) 配置Project Facets
更改Dynamic Web Module的Version为2.5。(3.0为Java7的)。
如果提示错误,可能需要在Java Compiler设置Compiler compliance level 为1.6。或者需要在此窗口的Java的Version改成1.6。
3) 配置 Modify Faceted Project
点击Further configuration available…,弹出Modify Faceted Project窗口
此处是设置web.xml文件的路径,我们输入src/main/webapp。
Generate web.xml deployment descriptor自动生成web.xml文件,可选可不选。
2. 经过1的project转换后,应该能够看到Deployment Assembly出现了,但如果还么出现,很有可能在Eclipse中Deployment Assembly被disable了,那么我们需要做的就是将Deployment Assembly选项enable。
在项目所在的工作区间有一个.project文件,打开该文件增加如下这一行用于enable Deployment Assembly属性。
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
如下面的.project file.
<?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>test</name> <comment></comment> <projects> </projects> <buildSpec> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> <buildCommand> <name>org.eclipse.wst.common.project.facet.core.builder</name> <arguments> </arguments> </buildCommand> <buildCommand> <name>com.google.gdt.eclipse.core.webAppProjectValidator</name> <arguments> </arguments> </buildCommand> <buildCommand> <name>com.google.gwt.eclipse.core.gwtProjectValidator</name> <arguments> </arguments> </buildCommand> <buildCommand> <name>org.eclipse.m2e.core.maven2Builder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> <nature>org.eclipse.m2e.core.maven2Nature</nature> <nature>org.eclipse.wst.common.project.facet.core.nature</nature> <nature>com.google.gwt.eclipse.core.gwtNature</nature> <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> </natures> </projectDescription>然后刷新或重启, 就可在Project的properties中看到Deployment Assembly选项了。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
集结各类场景实战经验,助你开发运维畅行无忧