How to fix Cannot change version of project facet Dynamic Web Module to 3.0 Error in Eclipse---转载
How to fix Cannot change version of project facet Dynamic Web Module to 3.0 Error in Eclipse
原文:http://crunchify.com/how-to-fix-cannot-change-version-of-project-facet-dynamic-web-module-to-3-0-error-in-eclipse/
Today while converting Dynamic Web Project to Maven project I got below Error:
1
2
|
Cannot change version of project facet Dynamic Web Module to 3.0
One or more constraints have not been satisfied
|
What steps I’ve performed to fix this?
In order to fix this first thing I did is to change Project Facets settings.
Right click on Project
in Eclipse- Click on
Properties
- Click on
Project Facets
Tab - Change value from
3.1
to3.0
for Dynamic Web Module as mentioned in below image.
Did it work? Nope.
But unfortunately I was not able to apply setting as Apply and OK button was grayed out with error msg:Cannot change version of project facet Dynamic Web Module to 3.0
.
I was literally stuck at this point.
Then I’ve looked at my pom.xml
file. I’ve converted Dynamic Web Project to Maven Project by following steps in article.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
|
By default Eclipse adds above <build> block to pom.xml file and that is THE problem for this error: Cannot change version of project facet Dynamic Web Module to 3.0
.
How to fix?
Step-1
Just replace <build> block with this one.
1
2
3
4
5
6
7
8
9
10
11
12
13
|
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
|
Step-2
- Right Click on Project
- Click Maven
- Click Update Project
or
- use Quick Fix from error console
How to fix Cannot change version of project facet Dynamic Web Module to 3.0 Error in Eclipse---转载的更多相关文章
- maven项目报错--Cannot change version of project facet Dynamic Web Module to 3.0 Error in Eclipse
错误原因: 使用ecplise构建的maven骨架默认支持的是web2.3的版本,当使用这个创建3.0版本的web项目时则会报这样的错误: Cannot change version of proje ...
- 解决Cannot change version of project facet Dynamic web module to 3.0
我们用Eclipse创建Maven结构的web项目的时候选择了Artifact Id为maven-artchetype-webapp,由于这个catalog比较老,用的servlet还是2.3的,而一 ...
- Maven导入时,Cannot change version of project facet Dynamic Web Module to 3.0.
今天手贱,在eclipse里面把项目删掉了,重新maven导入时,报出Cannot change version of project facet Dynamic Web Module to 3.0. ...
- 解决maven项目Cannot change version of project facet Dynamic web module to 3.0
问题描述 用Eclipse创建Maven结构的web项目的时候选择了Artifact Id为maven-artchetype-webapp,由于这个catalog比较老,用的servl ...
- ERROR: Cannot change version of project facet Dynamic Web Module to 3.0?
Issue: When you create web app in eclipse with maven configuration, you may get following error. Can ...
- maven eclipse web 项目 问题 cannot change version of project facet dynamic web module to 3.0
cannot change version of project facet dynamic web module to 3.0 修改 web.xml 头部 xsi:schemaLocation=&q ...
- Cannot change version of project facet Dynamic Web Module to 3.0 异常问题处理
如何解决Tomcat服务器在初始化应用的时候的以下异常问题 1,Cannot change version of project facet Dynamic Web Module to 3.0 2,O ...
- eclipse中Cannot change version of project facet Dynamic Web Module to 3.0的问题解决
在做web配置的时候,希望将web Module(Web模块)更换为3.0,发生如下错误: cannot change version of project facet Dynamic Web Mod ...
- eclipse maven Cannot change version of project facet Dynamic web module to 3.0
eclipse maven Cannot change version of project facet Dynamic web module to 3.0 (eclipse 修改maven项目的 ...
随机推荐
- Java高级架构师(一)第33节:Nginx常用核心模块指令
error_log:错误日志级别 http://www.nginx.cn/doc/ Nginx中文文档 # 并发总数是 worker_processes 和 worker_connections 的 ...
- PHP与mysql数据库
1.PHP访问数据库的一般步骤 连接MySQL服务器 选择MySQL数据库 执行SQL语句(增,删,改,查) 关闭结果集,释放资源 关闭MySQL服务器的连接 需要查的表的数据: 2.连接和关闭实例 ...
- c语言下的变量类型及计算
源码 补码 反码 机器数:一个数在计算机中的二进制表示形式, 叫做这个数的机器数.机器数是带符号的,在计算机用一个数的最高位存放符号, 正数为0, 负数为1. 真值:第一位是符号位,将带符号位的 ...
- ENVI裁剪
一.basic tools-->resize data进行规则裁剪 虽然是进行图像重采样工具,但也可以用于简单快速的裁剪 1. 选中要裁剪的图像: 对话框下面选择spatial subset(构 ...
- 关于DeploymentConfig的思考
为什么是deploymentconfig而不是Kubernetes的deployment 在new-app的时候openshift直接创建了一个deploymentconfig并部署成rc,开始并不理 ...
- Windows Server 2008 远程桌面连接拒绝
(1)远程连接的时候在本地用户名添加域名 现象:在Windows2008R2配置成域控制器前,还没有安装AD,管理员Admistrator以及新创建的用户(创建的时候将该用户加入远程桌面管理组),发现 ...
- iOS:2015年07月最新苹果IOS上架App Store商店步骤
苹果官方在2015年05-06月开发者中心进行了改版,网上的APP Store上架大部分都不一样了,自己研究总结一下,一个最新的上架教程以备后用. 原文地址:http://www.16css.com/ ...
- MFC 带Ribbonbar的窗口 实现全屏和取消全屏
void CMainFrame::FullScreen(){ m_wndRibbonBar.ShowWindow(SW_HIDE);//隐藏工具栏 m_wndStatusBar. ...
- UVa 615 - Is It A Tree?
题目:给你一些有向边(端点,长度为1).推断给定的图是否是一棵树. 分析:图论.并查集.树是一个全部点都连接的有向无环图(不连接的是森林). 依照树的定义推断是否有环就可以,有环分成两种: 1.链状环 ...
- C语言面试问题
内容源自:C语言面试题大汇总 P.S.只摘取了自己觉得可能会被问到的以及不会的. static有什么用途?(请至少说明两种) 1.限制变量的作用域2.设置变量的存储域 引用与指针有什么区别? 1) 引 ...