用google才收到了这个。。

http://stackoverflow.com/questions/12197662/maven-java-web-project-not-recognised-when-importing-into-eclipse

就是导入后  是普通的java项目,然后在   project factes  勾上Dynamic Web Module 选3.0   apply  就行了

貌似要FQ才能看  直接发把

A colleague is trying to import a Java web project project into his Eclipse workspace. He's installed the m2e plugin and it recognises the "parent" project and the 3 sub projects it has (which are also Maven projects). However when the projects are imported,
Eclipse doesn't seem to recognise them as Java projects (it doesn't show the usual "Java Resources" and "Deployment Descriptor"). The only two things that appear in the Project Explorer are shown below:

I've imported the same project using my version of Eclipse and it recognises that the project is a Java web project without any issues. Is there something he needs to do/install to get it to work? He has the Eclipse WTP as well as the m2e plugin, so I can't
see any different between his Eclipse installation and mine.

asked Aug 30 '12 at 13:11
Closeratio

190312
 
 
as far as I know it is correct, as the main deployment descriptor would be inside src>main>webapp>web-inf –  Dhruvenkumar
Shah
 Aug
30 '12 at 13:23
 
@DhruvenkumarShah This is inside Eclipse's Project Explorer though, so there should be other items present such as "Deployed
Resources" and "Javascript Resources" (among others) –  Closeratio Aug
30 '12 at 15:33
 
 
How does your colleague import the project? It should be imported as an existing maven project (File -> Import -> Maven
-> Existing Maven Projects). –  yorkw Aug
30 '12 at 21:39
1  
Just like that. It's strange because it detects the projects without any issues, but after importing them it doesn't
seem to recognise that they're Java projects. –  Closeratio Aug
31 '12 at 9:47

4 Answers

As it turns out, we needed to enable project facets in the project properties. I'm not sure why this wasn't enabled by default like it was when it was imported into my Eclipse installation, but enabling the appropriate project facets fixed the issues we were
having.

answered Aug 31 '12 at 13:11
Closeratio

190312
 

You need to install m2eclipse-wtp 0.15.x (fromhttp://download.jboss.org/jbosstools/updates/m2eclipse-wtp/).
It contains the necessary configurators to properly set the required project facets of Java EE projects, according to your pom.xml configuration.

Please note that m2eclipse-wtp is moving to the Eclipse foundation and is superceded by m2e-wtp.
m2e-wtp 0.16.0 will be released on sept 28th 2012. Until then you can try playing with the latestrelease
candidate

answered Sep 14 '12 at 15:41
Fred Bricon

2,216719
 

Try selecting the project in the Package Explorer and performing Maven --> Update Project Configuration

answered Aug 30 '12 at 13:20
Chris Gerken

9,32651535
 

I experienced something like this once when I was using the "project explorer" view when I thought I was actually using the "package explorer" view. These two views will display your project differently.

answered Aug 30 '12 at 18:47
herrtim

1,031516


 

版权声明:本文为博主原创文章,未经博主允许不得转载。

myeclipse 导入 import maven web project的更多相关文章

  1. spring boot:创建一个简单的web(maven web project)

    1.新建一个maven web project; 2.在pom.xml文件中添加相应的依赖包: 3.新建一个HelloController请求控制类: 4.编写index.jsp页面: 5.编写启动类 ...

  2. maven web project打包为war包,目录结构的变化

    一个maven web project工程目录: 资源管理器中的目录层级如下: 导出为war包之后的目录层级为: 我们会发现,其实并没有如下的这些目录层级: 所以这两个目录层级只是IDE为我们添加的, ...

  3. 创建一个maven web project

    几经周折总算是找到了和高杨学长一样的web  project的方法.感谢学长的一语点醒.我之前以为,既是maven又是web project的项目得要是通过dynamic web project转换到 ...

  4. MyEclipse Web Project导入Eclipse Dynamic Web Project,无法部署到tomcat问 题

    做作业遇到一个小问题,将MyEclipse Web Project导入到Eclipse中开发.在部署到tomcat时,发现无法发布这个项目. 问题分析: MyEclipse Web Project被识 ...

  5. myeclipse下构建maven web项目

    首先创建一个Maven的Project如下图 我们勾选上Create a simple project (不使用骨架) 这里的Packing 选择 war的形式 由于packing是war包,那么下面 ...

  6. myeclipse 2014新建maven web 项目步骤

    首先在myeclipse中配置maven的安装路径: 在pom.xml中加上: 1 2 3 4 5 6 7 8 9 10  <plugins>           <plugin&g ...

  7. Maven Web Project设置Webcontent路径

    1,新建maven-archetype-webapp 2,右键项目-->Properties-->选中Project Facets中的Runtimes标签,然后Java版本改为1.8,Dy ...

  8. MyEclipse - 问题集 - maven update project 后,项目jdk的版本变化

    解决方法: 进入maven安装根目录,conf/settings.xml <profiles> <profile> <id>jdk-1.7</id> & ...

  9. myeclipse eclipse创建maven web项目时 index.jsp报错

    第一种办法 解决办法: ---------------------------------------------------------------------------------------- ...

随机推荐

  1. Vue.js下载方式及基本概念

    Vue.js 简介 说明及下载 Vue.js使用文档已经写的很完备和详细了,通过以下地址可以查看: https://cn.vuejs.org/v2/guide/ vue.js如果当成一个库来使用,可以 ...

  2. Git知多少!!!

    第一次写博客,内心有点小激动呀!首先祝大家圣诞快乐~~啦啦啦~~好了,我要步入正题啦!今天是上班第二周,终于开始写需求啦!开森~~撒花~~ 来这里第一个要学的就是git的操作啦!入职第一天发了一个大大 ...

  3. 第一篇 深入嵌入式之Linux裸机

    { 个人心得: 嵌入式底层重要的是在CPU(各种架构)或SOC基础上,利用u-boot初始化系统,并启动OS,建立实时多任务环境.文件系统等,再根据功能要求设计上层程序:而对硬件的需有足够掌握. } ...

  4. Circuit Breaker模式

    Circuit Breaker模式会处理一些需要一定时间来重连远程服务和远端资源的错误.该模式可以提高一个应用的稳定性和弹性. 问题 在类似于云的分布式环境中,当一个应用需要执行一些访问远程资源或者是 ...

  5. 【转载】D3D中的Texture应用示例

    原文:D3D中的texture应用示例 本文列举了Direct3D中各种纹理应用实现:黑暗贴图,发光贴图,漫反射映射贴图,细节纹理,纹理混合,有较详尽的注解.其中黑暗贴图,发光贴图,细节纹理都是采用多 ...

  6. 01- ajax, 登录验证,json数据,文件上传

    1.ajax简介 1.向服务器发送请求的途径 # 向服务器发送请求的途径 1. 浏览器地址栏,默认get请求 2. form表单: get请求 post请求 3. a标签,默认get请求 4. Aja ...

  7. Java并发工具类(二):同步屏障CyclicBarrier

    作用 CyclicBarrier是一个同步辅助类,它允许一组线程互相等待,直到到达某个公共屏障点 (common barrier point),才继续执行. 简介 CyclicBarrier 的字面意 ...

  8. Spring boot jpa @Column命名大小写问题

    一.问题 驼峰命名会被自动转成数据库下划线命名,指定@Column的name也不起作用 举例: @Column(nullable = false,name = "resolvedDate&q ...

  9. Mac电脑如何快速下载YouTube视频

    如果你想下载一些教育类的视频资源,或者是一些学习的教程,那么YouTube是一个很好的视频资源平台.YouTube上面各种各样的资源都有,而且质量都很有保证,尤其是那些订阅量很多的人.可惜的是,You ...

  10. Vue随性小笔记

    1 前端MVC 和 后端MVC不同: 可以看出前端MVC其实为了解决前端复杂js模块化的问题,从后端MVC的V分离出来的 2     MVC / MVP / MVVM 三者区别  Model View ...