zoukankan      html  css  js  c++  java
  • maven项目常见问题

    问题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).
     
    新建Maven+Spring项目错误集锦0 
    2).选择项目->properties->project facets修改java版本和Dynamic web module 
    新建Maven+Spring项目错误集锦1 
     
    同时修改项目路径文件
    工程路径.settingsorg.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> 
     
    3).修改properties->java compiler中java版本
    新建Maven+Spring项目错误集锦2 
     
    4).解决只显示resource文件
    新建Maven+Spring项目错误集锦3 
  • 相关阅读:
    简单的语句统计所有用户表尺寸大小
    CodeSmith 介绍
    Oracle Partition By 的使用
    Oracle Contact By的使用
    正则提取 html 里<input> 标记的value 值
    IOS 7 风格Checkbox
    aspose words 介绍
    大规模web 服务开发技术
    数学之美 读后感
    工作流简介--(转)
  • 原文地址:https://www.cnblogs.com/damowang/p/6017816.html
Copyright © 2011-2022 走看看