用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. PCL利用RANSAC自行拟合分割平面

    利用PCL中分割算法. pcl::SACSegmentation<pcl::PointXYZ> seg; ,不利用法线参数,只根据模型参数得到的分割面片,与想象的面片差距很大, pcl:: ...

  2. MySQL学习【第四篇mysql体系结构管理】

    一.客户端与服务端模型 1.mysql是一个典型的c/s服务结构 1.mysql自带的客户端程序(/application/mysql/bin) mysql       mysqladmin   my ...

  3. Spark MemoryManager内存模型

  4. 浅析 golang module

    什么是 module?module 解决了什么问题? module 代表一个版本管理单元,它包括一个或者多个 packages. 一般来说,一个版本控制仓库(比如 golang.org/x/text  ...

  5. iOS Bugly符号化使用分析

    前言:一种愉快的开发方式,轻松快速定位BUG,跟开发中的BUG说再见!(公司里开展技术分享会,我就这对Bugly的使用做了个整理) Bugly 使用分析 作者:tangjianfeng 时间:2018 ...

  6. 用CBrother将excel中的数据转换为C语言头文件

    用CBrother将excel中的数据转换为C语言头文件 最近在工作中,产品这边总是要调整一些参数,而我们在这一块要求所有的配置必须用宏定义来做,因为不同型号直接硬编码写死在代码里,但是一但数量大了, ...

  7. Python连接MySQL数据库执行sql语句时的参数问题

    由于工作需要,今天写了一个Python小脚本,其中需要连接MySQL数据库,在执行sql命令时需要传递参数,结果出问题了.在网上查了一下,发现有以下几种方式传递参数: 一.直接把sql查询语句完整写入 ...

  8. [2016北京集训试题6]mushroom-[bitset]

    Description Solution bitset是个好东西啊..强行压位什么的真是够orz. 由于所有的蘑菇上房间的长相是一样的,我们针对每个房间,算出它到根节点的bitset和以它为根的子树的 ...

  9. python爬虫之urllib库介绍

    一.urllib库 urllib是Python自带的一个用于爬虫的库,其主要作用就是可以通过代码模拟浏览器发送请求.其常被用到的子模块在Python3中的为urllib.request和urllib. ...

  10. mvn本地部署命令行

    ---创建mvn项目 mvn archetype:generate 运行结果如下: ---调试mvn仓库 mvn archetype:generate –X 运行结果如下: ---创建依赖 mvn a ...