maven项目常见问题
2024-08-25 21:15:37
问题1:Maven项目,右键-update project后报错如下的解决办法:
1)、DescriptionResourcePathLocationType
Java compiler level does not match the version of the installed Java project facet.SSMDemo Maven WebUnknownFaceted Project Problem (Java Version Mismatch)
2)、DescriptionResourcePathLocationType
JAX-RS (REST Web Services) 2.0 requires Java 1.7 or newer.SSMDemo Maven Webline 1Maven Java EE Configuration Problem
3)、DescriptionResourcePathLocationType
One or more constraints have not been satisfied.SSMDemo Maven Webline 1Maven Java EE Configuration Problem
4). Type One or more constraints have not been satisfied.
解决办法:在pom.xml配置文件中加入如下语句:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7(JDK的版本)</source>
<target>1.7(JDK的版本)</target>
</configuration>
</plugin>
</plugins>
或者
<profiles>
<profile>
<id>jdk-1.8</id>
<!-- 另外一种激活方式 -->
<activation>
<activeByDefault>true</activeByDefault>
<jdk>1.8</jdk>
</activation>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
</properties>
</profile>
</profiles>
然后再update project就好了,jdk版本问题。
问题2:
1). The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path index.jsp /user_cms/src/main/webapp
2). javax.servlet.jsp cannot be resolved to a type main.jsp /midware_web/src/main/webapp/WEB-INF/view/common/decorators line 14 JSP Problem
解决方法:
1).
2).选择项目->properties->project facets修改java版本和Dynamic web module
同时修改项目路径文件
工程路径\.settings\org.eclipse.wst.common.project.facet.core.xml
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="wst.jsdt.web"/>
<installed facet="java" version="1.7"/>
<installed facet="jst.web" version="3.0"/>
<installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>
<faceted-project>
<fixed facet="wst.jsdt.web"/>
<installed facet="java" version="1.7"/>
<installed facet="jst.web" version="3.0"/>
<installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>
3).修改properties->java compiler中java版本
4).解决只显示resource文件
最新文章
- Myeclipse 构建工作空间出错
- lucene5学习 - 索引基本操作(创建,查询,更新,删除,分页)
- GGXX的卡通渲染实现 真的好变态......
- Unity3D Optimizing Graphics Performance for iOS
- fr
- 数据库数据导入导出系列之五 C#实现动态生成Word(转)
- Altium Designer 画";差分线";
- 鼠标hover事件
- 【C#版本详情回顾】C#3.0主要功能列表
- 基于MDK编程STM32程序无法使用,硬件仿真在汇编窗口看到停留在“0x0800XXXX BEAB BKPT 0xAB //进入调试模式”
- 剑指Offer (汇总)
- 如何以system身份运行指定的程序?
- 在Unity中使用Lua脚本
- 六、K3 WISE 开发插件《直接SQL报表开发新手指导 - BOM成本报表》
- 【文文殿下】Win7打开无线热点
- delphi 获取网卡信息(支持多网卡)
- vsftpd for Anonymous Downloads on Ubuntu 16.04
- MS10-070 ASP.NET Padding Oracle信息泄露漏洞项目测试
- 前端基础-BOM和DOM的介绍
- AccessTokens