修改jre后 maven的pom就报错

请教各位高手
问题是:
SVN上拉下来一个项目,本来没问题,但是在build path里把jre从1.5改成1.6后,
maven的pom文件就报错,所有依赖的jar包都找不到了(jar包我本地仓库里都有,也排除了lastUpdated的问题),不知道怎么办,求大神帮忙
备注:IDE:eclipse
图片说明

1个回答

忘了说了,在项目的Library里的maven dependencies里面,那些jar包都在......................

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Python+OpenCV计算机视觉

Python+OpenCV计算机视觉

MyEclipse换JDK之后出错

做Maven的时候要用到JDK1.7,然而Myeclipse自带的时1.6,我想换一下,但是一换就会出错,很是无奈。。。大神们求指教 ![图片说明](https://img-ask.csdn.net/upload/201809/21/1537516516_845569.png) ![图片说明](https://img-ask.csdn.net/upload/201809/21/1537516662_335607.png) ![图片说明](https://img-ask.csdn.net/upload/201809/21/1537516948_734016.png) ![图片说明](https://img-ask.csdn.net/upload/201809/21/1537516891_131201.png) ![图片说明](https://img-ask.csdn.net/upload/201809/21/1537516939_814118.png) maven执行时报错 ``` -Dmaven.multiModuleProjectDirectory system propery is not set. Check $M2_HOME environment variable and mvn script match. ```

maven报错:PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException

<h3>救救孩子吧!</h3> IDEA使用maven下载jar包的时候,出现以下错误: > Could not transfer artifact org.springframework:spring-context:pom:5.1.5.RELEASE from/to alimaven (http://maven.aliyun.com/nexus/content/groups/public/): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target 我试了网上的方法,把证书添加到jre的security文件夹里,之后还是报错。 然后试了加上运行参数,忽略证书,还是报错。 然后换了maven的源,也还是报错。 clean install reimport能试的都试了。总是报这个错误。(报完错之后,对应的jar包在本地仓库里面下载的是一个*.lastupdate文件,没法使用) 有没有大佬救救孩子,昨晚到今天上午一直在弄,快哭出来了....

maven下载之后,在cmd输入命令,mvn报错

maven下载之后,在cmd输入命令,mvn报错。已经配置好本地仓库和镜像。 ![错误截图](https://img-ask.csdn.net/upload/201911/20/1574220070_29967.png) ``` C:\Users\Administrator>mvn [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.056 s [INFO] Finished at: 2019-11-20T11:13:44+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException C:\Users\Administrator>mvn -v Apache Maven 3.6.1 (d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555; 2019-04-05T03:00:29+08:00) Maven home: D:\soft\maven\apache-maven-3.6.1\bin\.. Java version: 1.8.0_121, vendor: Oracle Corporation, runtime: D:\jdk\jre Default locale: zh_CN, platform encoding: GBK OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" ```

在ideaui14中使用maven搭建scala一直不成功

我按照网上的教程搭建环境但是,一直报错,想请教下到底该如何解决,报错信息完全看不懂,谢谢各路大神 这个是写的代码 ![图片说明](https://img-ask.csdn.net/upload/201605/20/1463744165_364132.jpg) 这是报错信息 ![图片说明](https://img-ask.csdn.net/upload/201605/20/1463744176_437250.jpg) 这是pom文件 ``` <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>scala70</groupId> <artifactId>scala70</artifactId> <version>1.0-SNAPSHOT</version> <inceptionYear>2008</inceptionYear> <properties> <scala.version>2.7.0</scala.version> </properties> <repositories> <repository> <id>scala-tools.org</id> <name>Scala-Tools Maven2 Repository</name> <url>http://scala-tools.org/repo-releases</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>scala-tools.org</id> <name>Scala-Tools Maven2 Repository</name> <url>http://scala-tools.org/repo-releases</url> </pluginRepository> </pluginRepositories> <dependencies> <dependency> <groupId>org.scala-lang</groupId> <artifactId>scala-library</artifactId> <version>${scala.version}</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.4</version> <scope>test</scope> </dependency> <dependency> <groupId>org.specs</groupId> <artifactId>specs</artifactId> <version>1.2.5</version> <scope>test</scope> </dependency> </dependencies> <build> <sourceDirectory>src/main/scala</sourceDirectory> <testSourceDirectory>src/test/scala</testSourceDirectory> <plugins> <plugin> <groupId>org.scala-tools</groupId> <artifactId>maven-scala-plugin</artifactId> <executions> <execution> <goals> <goal>compile</goal> <goal>testCompile</goal> </goals> </execution> </executions> <configuration> <scalaVersion>${scala.version}</scalaVersion> <args> <arg>-target:jvm-1.5</arg> </args> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> <configuration> <downloadSources>true</downloadSources> <buildcommands> <buildcommand>ch.epfl.lamp.sdt.core.scalabuilder</buildcommand> </buildcommands> <additionalProjectnatures> <projectnature>ch.epfl.lamp.sdt.core.scalanature</projectnature> </additionalProjectnatures> <classpathContainers> <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer> <classpathContainer>ch.epfl.lamp.sdt.launching.SCALA_CONTAINER</classpathContainer> </classpathContainers> </configuration> </plugin> </plugins> </build> <reporting> <plugins> <plugin> <groupId>org.scala-tools</groupId> <artifactId>maven-scala-plugin</artifactId> <configuration> <scalaVersion>${scala.version}</scalaVersion> </configuration> </plugin> </plugins> </reporting> </project> ```

intellij idea解析maven本地仓库jar包无效怎么办?

公司CTO把一个Java web项目给我,打开后pom.xml有很多dependency,他还把下好的maven repository拷给我了,我在setting中指定了maven home,settings,localrepository之后,reimport没有效果,这是为什么呢? 跪求大神们指点![图片说明](http://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/001/face/83.gif)![图片说明](http://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/001/face/83.gif)![图片说明](http://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/001/face/83.gif)

关于maven控制台编译的错误

![图片说明](https://img-ask.csdn.net/upload/201711/08/1510109842_102597.png) 刚接触Maven,控制台编译Maven时出现了这个错误,不太懂,查了一大堆,网上有人说是编码错误,有人说是jdk,jre错误。。。有没有大佬处理过这个 问题,帮我看下,谢谢!

求java大神帮忙,java使用MAVEN编译时提示找不到类,但是类是属于rt.jar的

java 版本: 1.6.0_10-rc2 maven 版本: 3.0.4 maven编译插件 `<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> <encoding>utf8</encoding> </configuration> </plugin>` 运行mvn clean compile后build failure, 错误原因: `ECG2ServiceImpl.java:18: package com.sun.org.apache.xml.internal.security.exceptions does not exist ECG2ServiceImpl.java:19: package com.sun.org.apache.xml.internal.security.utils does not exist` 这2个类是属于rt.jar里的,也就是JRE里的,为什么会引用不到呢? 已经尝试过在pom中添加 `<compilerArguments> <verbose /> <bootclasspath>${JAVA_HOME}/lib/rt.jar</bootclasspath> </compilerArguments>` 也没有效果,求助!

IDEA+Maven+JDK11与tomcat插件问题

我想请教下是不是jdk11版本不支持在maven里面添加tomcat插件了,导入tomcat7插件pom就一直报错,怎么都没法弄好

maven问题。jar包下载不下来。

项目一下载jar包就报这个错误,而且这个jar包本身是在.m2的文件夹下是存在的,不知道为什么就报错,删除重新下载也不行,整个文件夹删除下载也不行,设置强制下载也不行,我现在都无语了,maven 不知道是怎么回事,是不是重装系统的问题啊,我的配置没问题啊,在cmd下查看版本号环境变量也没问题: C:\Users\dl>mvn -v Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-11T00:41:47+08:00) Maven home: C:\apache-maven-3.3.9\bin\.. Java version: 1.7.0_79, vendor: Oracle Corporation Java home: C:\Program Files\Java\jdk1.7.0_79\jre Default locale: zh_CN, platform encoding: GBK OS name: "windows 8.1", version: "6.3", arch: "amd64", family: "windows" **在cmd下用 mvn help:system 命令可以下载jar包,而且很快,eclipe下右键update就不行,运行一会九堡下边的错误.** 还有就是jar下载特别特别慢,基本上是下载不下来,重装之前不这样啊,下载一会就 报边的错误。.m2文件夹下全是sha1..properties 文件,就是下载不下来jar包,自己下载,放进去也不管用,照样重新下载。 报的下面的错误 Errors occurred during the build. Errors running builder 'Maven Project Builder' on project 'plate-prototype'. Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6 Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6 Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6

maven引入外部jar包,jar包在其他项目的target目录下,引入不成功

<scope>system</scope>  <systemPath>${basedir}/../cachecore/target/cachecore.jar</systemPath>   这是maven引入外部jar包的两个参数。但死活引入不进去,最后把jar包放到targer文件夹外边,路径改成这样 <systemPath>${basedir}/../cachecore/target/cachecore.jar</systemPath> OK啦,为什么放到target目录里面就不行呢?不明白。有了解的朋友请指点一下,感谢!

运行maven install的时候出现错误

**使用是本地maven仓库** **## **Console控制台报下列错误:**** [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for com.hundsun.crm.frame:com.hundsun.crm.frame.pub:jar:1.0.0.0-SNAPSHOT [WARNING] 'version' contains an expression but should be a constant. @ com.hundsun.crm.frame:com.hundsun.crm.frame.pub:${com.hundsun.crm.frame.version}, D:\PPOS\Sources\com.hundsun.crm.frame\com.hundsun.crm.frame.pub\pom.xml, line 9, column 12 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-resources-plugin is missing. @ com.hundsun.crm.frame:com.hundsun.crm.frame.repository-setting:1.0.0.0-SNAPSHOT, D:\m3\com\hundsun\crm\frame\com.hundsun.crm.frame.repository-setting\1.0.0.0-SNAPSHOT\com.hundsun.crm.frame.repository-setting-1.0.0.0-SNAPSHOT.pom, line 48, column 11 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building com.hundsun.crm.frame.pub 1.0.0.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] Downloading: http://repos.hundsun.com:6060/nexus/content/groups/public/org/postgresql/postgresql/9.4.1211.jre6/postgresql-9.4.1211.jre6.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 13.767 s [INFO] Finished at: 2016-11-11T17:04:19+08:00 [INFO] Final Memory: 8M/19M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project com.hundsun.crm.frame.pub: Could not resolve dependencies for project com.hundsun.crm.frame:com.hundsun.crm.frame.pub:jar:1.0.0.0-SNAPSHOT: Failed to collect dependencies at org.postgresql:postgresql:jar:9.4.1211.jre6: Failed to read artifact descriptor for org.postgresql:postgresql:jar:9.4.1211.jre6: Could not transfer artifact org.postgresql:postgresql:pom:9.4.1211.jre6 from/to nexus (http://repos.hundsun.com:6060/nexus/content/groups/public): repos.hundsun.com: Unknown host repos.hundsun.com -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException ![图片说明](https://img-ask.csdn.net/upload/201611/11/1478856385_854063.png)

使用IDEA和maven做注册时候遇到如下问题:

"E:\IntelliJ IDEA 2016.2.1\jdk1.8.0_91\bin\java" "-Dmaven.home=E:\IntelliJ IDEA 2016.2.1\plugins\maven\lib\maven3" "-Dclassworlds.conf=E:\IntelliJ IDEA 2016.2.1\plugins\maven\lib\maven3\bin\m2.conf" -Didea.launcher.port=7533 "-Didea.launcher.bin.path=E:\IntelliJ IDEA 2016.2.1\bin" -Dfile.encoding=UTF-8 -classpath "E:\IntelliJ IDEA 2016.2.1\plugins\maven\lib\maven3\boot\plexus-classworlds-2.4.jar;E:\IntelliJ IDEA 2016.2.1\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher -Didea.version=2016.2.1 tomcat:run [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building zhuce Maven Webapp 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] >>> tomcat-maven-plugin:1.1:run (default-cli) @ zhuce >>> [WARNING] The POM for com.google.guava:guava:jar:15.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for javax.servlet:javax.servlet-api:jar:3.1.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for org.glassfish.jersey.containers:jersey-container-grizzly2-servlet:jar:2.13 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.13 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for commons-io:commons-io:jar:2.4 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for org.glassfish.jersey.core:jersey-client:jar:2.13 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for org.apache.bval:bval-jsr303:jar:0.5 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for log4j:log4j:jar:1.2.14 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for org.apache.httpcomponents:httpclient:jar:4.1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for com.tustcs.java:base:jar:1.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for org.json:json:jar:20140107 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [INFO] [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ zhuce --- [debug] execute contextualize [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ zhuce --- [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent! [INFO] Compiling 2 source files to F:\zhuce\target\classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] Failure executing javac, but could not parse the error: 错误: 读取C:\Users\ZILI\.m2\repository\com\google\guava\guava\15.0\guava-15.0.jar时出错; error in opening zip file 错误: 读取C:\Users\ZILI\.m2\repository\javax\servlet\javax.servlet-api\3.1.0\javax.servlet-api-3.1.0.jar时出错; error in opening zip file 错误: 读取C:\Users\ZILI\.m2\repository\org\glassfish\jersey\containers\jersey-container-grizzly2-servlet\2.13\jersey-container-grizzly2-servlet-2.13.jar时出错; error in opening zip file 错误: 读取C:\Users\ZILI\.m2\repository\org\glassfish\jersey\containers\jersey-container-servlet-core\2.13\jersey-container-servlet-core-2.13.jar时出错; error in opening zip file 错误: 读取C:\Users\ZILI\.m2\repository\commons-io\commons-io\2.4\commons-io-2.4.jar时出错; error in opening zip file 错误: 读取C:\Users\ZILI\.m2\repository\org\glassfish\jersey\core\jersey-client\2.13\jersey-client-2.13.jar时出错; error in opening zip file 错误: 读取C:\Users\ZILI\.m2\repository\org\apache\bval\bval-jsr303\0.5\bval-jsr303-0.5.jar时出错; error in opening zip file 错误: 读取C:\Users\ZILI\.m2\repository\log4j\log4j\1.2.14\log4j-1.2.14.jar时出错; error in opening zip file 错误: 读取C:\Users\ZILI\.m2\repository\org\apache\httpcomponents\httpclient\4.1\httpclient-4.1.jar时出错; error in opening zip file 错误: 读取C:\Users\ZILI\.m2\repository\com\tustcs\java\base\1.0\base-1.0.jar时出错; error in opening zip file 错误: 读取C:\Users\ZILI\.m2\repository\org\json\json\20140107\json-20140107.jar时出错; error in opening zip file 11 个错误 [INFO] 1 error [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 13.436s [INFO] Finished at: Mon Oct 10 10:44:37 CST 2016 [INFO] Final Memory: 10M/77M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project zhuce: Compilation failure [ERROR] Failure executing javac, but could not parse the error: [ERROR] 错误: 读取C:\Users\ZILI\.m2\repository\com\google\guava\guava\15.0\guava-15.0.jar时出错; error in opening zip file [ERROR] 错误: 读取C:\Users\ZILI\.m2\repository\javax\servlet\javax.servlet-api\3.1.0\javax.servlet-api-3.1.0.jar时出错; error in opening zip file [ERROR] 错误: 读取C:\Users\ZILI\.m2\repository\org\glassfish\jersey\containers\jersey-container-grizzly2-servlet\2.13\jersey-container-grizzly2-servlet-2.13.jar时出错; error in opening zip file [ERROR] 错误: 读取C:\Users\ZILI\.m2\repository\org\glassfish\jersey\containers\jersey-container-servlet-core\2.13\jersey-container-servlet-core-2.13.jar时出错; error in opening zip file [ERROR] 错误: 读取C:\Users\ZILI\.m2\repository\commons-io\commons-io\2.4\commons-io-2.4.jar时出错; error in opening zip file [ERROR] 错误: 读取C:\Users\ZILI\.m2\repository\org\glassfish\jersey\core\jersey-client\2.13\jersey-client-2.13.jar时出错; error in opening zip file [ERROR] 错误: 读取C:\Users\ZILI\.m2\repository\org\apache\bval\bval-jsr303\0.5\bval-jsr303-0.5.jar时出错; error in opening zip file [ERROR] 错误: 读取C:\Users\ZILI\.m2\repository\log4j\log4j\1.2.14\log4j-1.2.14.jar时出错; error in opening zip file [ERROR] 错误: 读取C:\Users\ZILI\.m2\repository\org\apache\httpcomponents\httpclient\4.1\httpclient-4.1.jar时出错; error in opening zip file [ERROR] 错误: 读取C:\Users\ZILI\.m2\repository\com\tustcs\java\base\1.0\base-1.0.jar时出错; error in opening zip file [ERROR] 错误: 读取C:\Users\ZILI\.m2\repository\org\json\json\20140107\json-20140107.jar时出错; error in opening zip file [ERROR] 11 个错误 [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException Process finished with exit code 1 ``` ```

SSM+maven项目,请求url的时候404,项目已经启动成功,能正常访问index.jsp

废话不多说,直接上图! 首先是项目结构 ![图片说明](https://img-ask.csdn.net/upload/201708/27/1503825401_76162.png) 然后是application.xml配置文件 springmvc.xml ![图片说明](https://img-ask.csdn.net/upload/201708/27/1503825487_56642.png) service的 ![图片说明](https://img-ask.csdn.net/upload/201708/27/1503825532_517645.png) trans的 ![图片说明](https://img-ask.csdn.net/upload/201708/27/1503825584_662840.png) ![图片说明](https://img-ask.csdn.net/upload/201708/27/1503825625_842187.png) controller方法 ![图片说明](https://img-ask.csdn.net/upload/201708/27/1503826394_409127.png) 控制台没有更多的错误提示,访问时候提示404 ![图片说明](https://img-ask.csdn.net/upload/201708/27/1503825779_382463.png) 各位大佬,我百度了许久也没找到合适的解决办法, 解决思路一开始是想是不是controller没有被扫描到,但是仔细检查以后也没发现扫描问题., 然后想到是不是pom.xml配置没有引入控制事物相关的包的问题 所以尝试了引入下图的包,但是问题也没有得到解决,是版本问题吗? ![图片说明](https://img-ask.csdn.net/upload/201708/27/1503825999_918043.png) 这个是原本就有的,没有删除也没有注释. ![图片说明](https://img-ask.csdn.net/upload/201708/27/1503825985_789377.png) 题主使用 myEclipse2017,maven3.5.0,jdk1.8,jre1.8,win7

idea的maven项目的jsp页面导入jstl标签

一直报错The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application。 pom文件配置: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.cc</groupId> <artifactId>chat</artifactId> <version>1.0-SNAPSHOT</version> <!-- 配置固定信息--> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <maven.compiler.encoding>UTF-8</maven.compiler.encoding> <org.springframework.version>4.0.0.RELEASE</org.springframework.version> <org.mybatis.version>3.4.1</org.mybatis.version> <org.mybatis.spring.version>1.3.0</org.mybatis.spring.version> </properties> <!--依赖导入--> <dependencies> <dependency> <groupId>org.apache.tomcat</groupId> <artifactId>tomcat-servlet-api</artifactId> <version>7.0.64</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-oxm</artifactId> <version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> <version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> <version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjweaver</artifactId> <version>1.7.3</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> <version>${org.mybatis.spring.version}</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>${org.mybatis.version}</version> </dependency> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjrt</artifactId> <version>1.6.11</version> </dependency> <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-mapper-asl</artifactId> <version>1.9.12</version> </dependency> <dependency> <groupId>commons-dbcp</groupId> <artifactId>commons-dbcp</artifactId> <version>1.4</version> <!--<scope>runtime</scope>--> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>1.1.2</version> <scope>compile</scope> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-core</artifactId> <version>1.1.2</version> <scope>compile</scope> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.6</version> </dependency> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>20.0</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>3.5</version> </dependency> <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> <version>3.2.1</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <!--<scope>test</scope>--> </dependency> <dependency> <groupId>joda-time</groupId> <artifactId>joda-time</artifactId> <version>2.3</version> </dependency> <!-- id加密解密 --> <dependency> <groupId>org.hashids</groupId> <artifactId>hashids</artifactId> <version>1.0.1</version> </dependency> <!-- ftpclient --> <dependency> <groupId>commons-net</groupId> <artifactId>commons-net</artifactId> <version>3.1</version> </dependency> <!-- file upload --> <!-- https://mvnrepository.com/artifact/commons-fileupload/commons-fileupload --> <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> <version>1.2.2</version> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.0.1</version> </dependency> <!-- mybatis pager --> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper</artifactId> <version>4.1.0</version> </dependency> <dependency> <groupId>com.github.miemiedev</groupId> <artifactId>mybatis-paginator</artifactId> <version>1.2.17</version> </dependency> <dependency> <groupId>com.github.jsqlparser</groupId> <artifactId>jsqlparser</artifactId> <version>0.9.4</version> </dependency> <!-- alipay --> <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> <version>1.10</version> </dependency> <dependency> <groupId>commons-configuration</groupId> <artifactId>commons-configuration</artifactId> <version>1.10</version> </dependency> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.6</version> </dependency> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.1</version> </dependency> <dependency> <groupId>com.google.zxing</groupId> <artifactId>core</artifactId> <version>2.1</version> </dependency> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> <version>2.3.1</version> </dependency> <dependency> <groupId>org.hamcrest</groupId> <artifactId>hamcrest-core</artifactId> <version>1.3</version> </dependency> <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> <version>2.9.0</version> </dependency> <!--jstl--> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> <version>1.2</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>jsp-api</artifactId> <version>2.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>taglibs</groupId> <artifactId>standard</artifactId> <version>1.1.2</version> </dependency> </dependencies> <build> <finalName>chat</finalName> <plugins> <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plugin</artifactId> <version>1.3.2</version> <configuration> <verbose>true</verbose> <overwrite>true</overwrite> </configuration> </plugin> <!-- geelynote maven的核心插件之-complier插件默认只支持编译Java 1.4,因此需要加上支持高版本jre的配置,在pom.xml里面加上 增加编译插件 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.7</source> <target>1.7</target> <encoding>UTF-8</encoding> <compilerArguments> <extdirs>${project.basedir}/src/main/webapp/WEB-INF/lib</extdirs> </compilerArguments> </configuration> </plugin> </plugins> </build> </project> jsp页面taglib: <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ page isELIgnored="false" %> 求助:怎么才会不报错啊,网上好多方法都尝试了,

在已经安装了JDK,maven配置出现JAVA_HOME错误,怎么解决?

![图片说明](https://img-ask.csdn.net/upload/202005/30/1590826616_727445.png) ![图片说明](https://img-ask.csdn.net/upload/202005/30/1590826627_515356.png) JDK已经正确安装了,但是maven安装的时候JAVAHOME是什么error?应该如何处理?

springboot入门项目打包出错

执行clean package时候报错项目正常运行 [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ demo-test --- [INFO] Deleting E:\EclipseMars\e3-manager\demo-test\target [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ demo-test --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ demo-test --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 2 source files to E:\EclipseMars\e3-manager\demo-test\target\classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? [INFO] 1 error [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 16.689 s [INFO] Finished at: 2018-06-30T16:12:47+08:00 [INFO] Final Memory: 20M/112M [INFO] ------------------------------------------------------------------------ [WARNING] The requested profile "pom.xml" could not be activated because it does not exist. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project demo-test: Compilation failure [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException 百度上说的jre我都试过了,我用的是jdk而且是1.8. Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project demo-test: Compilation failure说找不到3.1 但是我配置这个jar包换个版本却还是报错找不到3.1这个版本。

jpress mvn package失败,求大神指导

报错代码如下: [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:codegen:jar:1.0 [WARNING] 'version' contains an expression but should be a constant. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 10, column 14 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:jpress-commons:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:jpress-core:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:jpress-core:[unknown-version], D:\Program Files\jpress\jpress-core\pom.xml, line 55, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:jpress-web:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:jpress-service-api:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:jpress-service-provider:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:jpress-model:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:jpress-template:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:module-article-model:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:module-article-web:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:module-article-service-api:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:module-article-service-provider:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:module-article:pom:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:module-page-model:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:module-page-web:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:module-page-service-api:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:module-page-service-provider:jar:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:module-page:pom:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:starter:jar:1.0 [WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-remote-resources-plugin @ io.jpress:starter:[unknown-version], D:\Program Files\jpress\starter\pom.xml, line 203, column 21 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:starter:[unknown-version], D:\Program Files\jpress\starter\pom.xml, line 142, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:starter-tomcat:war:1.0 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:starter-tomcat:[unknown-version], D:\Program Files\jpress\starter-tomcat\pom.xml, line 164, column 21 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-war-plugin is missing. @ io.jpress:starter-tomcat:[unknown-version], D:\Program Files\jpress\starter-tomcat\pom.xml, line 221, column 21 [WARNING] [WARNING] Some problems were encountered while building the effective model for io.jpress:parent:pom:1.0 [WARNING] 'version' contains an expression but should be a constant. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 10, column 14 [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ io.jpress:parent:${jpress.version}, D:\Program Files\jpress\pom.xml, line 146, column 21 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] parent [pom] [INFO] codegen [jar] [INFO] jpress-commons [jar] [INFO] jpress-model [jar] [INFO] jpress-service-api [jar] [INFO] jpress-core [jar] [INFO] jpress-web [jar] [INFO] jpress-service-provider [jar] [INFO] jpress-template [jar] [INFO] module-article [pom] [INFO] module-article-model [jar] [INFO] module-article-service-api [jar] [INFO] module-article-service-provider [jar] [INFO] module-article-web [jar] [INFO] module-page [pom] [INFO] module-page-model [jar] [INFO] module-page-service-api [jar] [INFO] module-page-service-provider [jar] [INFO] module-page-web [jar] [INFO] starter [jar] [INFO] starter-tomcat [war] [INFO] [INFO] --------------------------< io.jpress:parent >-------------------------- [INFO] Building parent 1.0 [1/21] [INFO] --------------------------------[ pom ]--------------------------------- [INFO] [INFO] -------------------------< io.jpress:codegen >-------------------------- [INFO] Building codegen 1.0 [2/21] [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ codegen --- [WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent! [INFO] Copying 9 resources [INFO] skip non existing resourceDirectory D:\Program Files\jpress\codegen\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ codegen --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 7 source files to D:\Program Files\jpress\codegen\target\classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? [INFO] 1 error [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] parent 1.0 ......................................... SUCCESS [ 0.228 s] [INFO] codegen ............................................ FAILURE [ 4.318 s] [INFO] jpress-commons ..................................... SKIPPED [INFO] jpress-model ....................................... SKIPPED [INFO] jpress-service-api ................................. SKIPPED [INFO] jpress-core ........................................ SKIPPED [INFO] jpress-web ......................................... SKIPPED [INFO] jpress-service-provider ............................ SKIPPED [INFO] jpress-template .................................... SKIPPED [INFO] module-article ..................................... SKIPPED [INFO] module-article-model ............................... SKIPPED [INFO] module-article-service-api ......................... SKIPPED [INFO] module-article-service-provider .................... SKIPPED [INFO] module-article-web ................................. SKIPPED [INFO] module-page ........................................ SKIPPED [INFO] module-page-model .................................. SKIPPED [INFO] module-page-service-api ............................ SKIPPED [INFO] module-page-service-provider ....................... SKIPPED [INFO] module-page-web .................................... SKIPPED [INFO] starter ............................................ SKIPPED [INFO] starter-tomcat 1.0 ................................. SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 6.688 s [INFO] Finished at: 2018-10-27T17:50:59+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project codegen: Compilation failure [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? [ERROR] [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <goals> -rf :codegen mvn -version运行正常: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-18T02:33:14+08:00) Maven home: D:\Program Files\Apache\maven3.5.4\bin\.. Java version: 1.8.0_141, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jre1.8.0_141 Default locale: zh_CN, platform encoding: GBK OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" 阿里云镜像配置没问题: <mirrors> <!-- mirror | Specifies a repository mirror site to use instead of a given repository. The repository that | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used | for inheritance and direct lookup purposes, and must be unique across the set of mirrors. | <mirror> <id>mirrorId</id> <mirrorOf>repositoryId</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://my.repository.com/repo/path</url> </mirror> --> <mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors>

IntelliJ IDEA中报错:Error: java: 无效的目标发行版本: 11?

**问题描述** IntelliJ IDEA中报错:Error: java: 无效的目标发行版本: 11 ![图片说明](https://img-ask.csdn.net/upload/202003/31/1585659531_198677.png) **尝试过的方法** 在网上搜了一下做法 已经尝试修改,集群里的进程也没有问题,但是问题还是存在 ![图片说明](https://img-ask.csdn.net/upload/202003/31/1585659652_998648.png) ![图片说明](https://img-ask.csdn.net/upload/202003/31/1585659684_642798.png) 现在的设置 pom.xml是这样的 ``` <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.atiguigu</groupId> <artifactId>hdfs0331</artifactId> <version>1.0-SNAPSHOT</version> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>RELEASE</version> </dependency> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-core</artifactId> <version>2.8.2</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-common</artifactId> <version>2.7.2</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-client</artifactId> <version>2.7.2</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-hdfs</artifactId> <version>2.7.2</version> </dependency> <dependency> <groupId>jdk.tools</groupId> <artifactId>jdk.tools</artifactId> <version>1.8</version> <scope>system</scope> <systemPath>${JAVA_HOME}/lib/tools.jar</systemPath> </dependency> </dependencies> </project> ```

spring mvc 4.0.0 release版执行一个post方法报错

下面是报的错 java.lang.NoSuchMethodError: org.springframework.core.MethodParameter.getContainingClass()Ljava/lang/Class; org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.supportsReturnType(RequestResponseBodyMethodProcessor.java:84) 下面是配的pom <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com</groupId> <artifactId>mmall</artifactId> <packaging>war</packaging> <version>1.0-SNAPSHOT</version> <name>mmall Maven Webapp</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <maven.compiler.encoding>UTF-8</maven.compiler.encoding> <org.springframework.version>4.0.8.RELEASE</org.springframework.version> <org.mybatis.version>3.4.1</org.mybatis.version> <org.mybatis.spring.version>1.3.0</org.mybatis.spring.version> </properties> <dependencies> <dependency> <groupId>org.apache.tomcat</groupId> <artifactId>tomcat-servlet-api</artifactId> <version>7.0.64</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-oxm</artifactId> <version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> <version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-tx</artifactId> <version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjweaver</artifactId> <version>1.7.3</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis-spring</artifactId> <version>${org.mybatis.spring.version}</version> </dependency> <dependency> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> <version>${org.mybatis.version}</version> </dependency> <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjrt</artifactId> <version>1.6.11</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-annotations</artifactId> <version>2.8.11</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.8.11</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> <version>2.8.11</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>1.1.2</version> <scope>compile</scope> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-core</artifactId> <version>1.1.2</version> <scope>compile</scope> </dependency> <dependency> <groupId>commons-dbcp</groupId> <artifactId>commons-dbcp</artifactId> <version>1.4</version> <!--<scope>runtime</scope>--> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.6</version> </dependency> <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>20.0</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>3.5</version> </dependency> <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> <version>3.2.1</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <!--<scope>test</scope>--> </dependency> <dependency> <groupId>joda-time</groupId> <artifactId>joda-time</artifactId> <version>2.3</version> </dependency> <!-- id加密解密 --> <dependency> <groupId>org.hashids</groupId> <artifactId>hashids</artifactId> <version>1.0.1</version> </dependency> <!-- ftpclient --> <dependency> <groupId>commons-net</groupId> <artifactId>commons-net</artifactId> <version>3.1</version> </dependency> <!-- file upload --> <!-- https://mvnrepository.com/artifact/commons-fileupload/commons-fileupload --> <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> <version>1.2.2</version> </dependency> <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>2.0.1</version> </dependency> <!-- mybatis pager --> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper</artifactId> <version>4.1.0</version> </dependency> <dependency> <groupId>com.github.miemiedev</groupId> <artifactId>mybatis-paginator</artifactId> <version>1.2.17</version> </dependency> <dependency> <groupId>com.github.jsqlparser</groupId> <artifactId>jsqlparser</artifactId> <version>0.9.4</version> </dependency> <!-- alipay --> <dependency> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> <version>1.10</version> </dependency> <dependency> <groupId>commons-configuration</groupId> <artifactId>commons-configuration</artifactId> <version>1.10</version> </dependency> <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.6</version> </dependency> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1.1</version> </dependency> <dependency> <groupId>com.google.zxing</groupId> <artifactId>core</artifactId> <version>2.1</version> </dependency> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> <version>2.3.1</version> </dependency> <dependency> <groupId>org.hamcrest</groupId> <artifactId>hamcrest-core</artifactId> <version>1.3</version> </dependency> <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> <version>2.9.0</version> </dependency> </dependencies> <build> <finalName>mmall</finalName> <plugins> <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven-plugin</artifactId> <version>1.3.2</version> <configuration> <verbose>true</verbose> <overwrite>true</overwrite> </configuration> </plugin> <!-- geelynote maven的核心插件之-complier插件默认只支持编译Java 1.4,因此需要加上支持高版本jre的配置,在pom.xml里面加上 增加编译插件 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.7</source> <target>1.7</target> <encoding>UTF-8</encoding> <compilerArguments> <extdirs>${project.basedir}/src/main/webapp/WEB-INF/lib</extdirs> </compilerArguments> </configuration> </plugin> </plugins> </build> </project> 下面是写的方法 @RequestMapping(value="login.do",method= RequestMethod.POST) @ResponseBody public ServerResponse<User> login(String username, String password,HttpSession session){ ServerResponse<User> response=iUserService.login(username,password); if(response.isSuccess()){ session.setAttribute(Const.CURRENT_USER,response.getData()); } return response; } 环境是win7 mysql(v5.1.62) jdk1.7.0_80 tomcat是apache-tomcat-7.0.75 请哪位高人看一下哪里错了

2019 Python开发者日-培训

2019 Python开发者日-培训

150讲轻松搞定Python网络爬虫

150讲轻松搞定Python网络爬虫

设计模式(JAVA语言实现)--20种设计模式附带源码

设计模式(JAVA语言实现)--20种设计模式附带源码

YOLOv3目标检测实战:训练自己的数据集

YOLOv3目标检测实战:训练自己的数据集

java后台+微信小程序 实现完整的点餐系统

java后台+微信小程序 实现完整的点餐系统

三个项目玩转深度学习(附1G源码)

三个项目玩转深度学习(附1G源码)

初级玩转Linux+Ubuntu(嵌入式开发基础课程)

初级玩转Linux+Ubuntu(嵌入式开发基础课程)

2019 AI开发者大会

2019 AI开发者大会

玩转Linux:常用命令实例指南

玩转Linux:常用命令实例指南

一学即懂的计算机视觉(第一季)

一学即懂的计算机视觉(第一季)

4小时玩转微信小程序——基础入门与微信支付实战

4小时玩转微信小程序——基础入门与微信支付实战

Git 实用技巧

Git 实用技巧

Python数据清洗实战入门

Python数据清洗实战入门

使用TensorFlow+keras快速构建图像分类模型

使用TensorFlow+keras快速构建图像分类模型

实用主义学Python(小白也容易上手的Python实用案例)

实用主义学Python(小白也容易上手的Python实用案例)

程序员的算法通关课:知己知彼(第一季)

程序员的算法通关课:知己知彼(第一季)

MySQL数据库从入门到实战应用

MySQL数据库从入门到实战应用

机器学习初学者必会的案例精讲

机器学习初学者必会的案例精讲

手把手实现Java图书管理系统(附源码)

手把手实现Java图书管理系统(附源码)

极简JAVA学习营第四期(报名以后加助教微信:eduxy-1)

极简JAVA学习营第四期(报名以后加助教微信:eduxy-1)

.net core快速开发框架

.net core快速开发框架

玩转Python-Python3基础入门

玩转Python-Python3基础入门

Python数据挖掘简易入门

Python数据挖掘简易入门

微信公众平台开发入门

微信公众平台开发入门

程序员的兼职技能课

程序员的兼职技能课

Windows版YOLOv4目标检测实战:训练自己的数据集

Windows版YOLOv4目标检测实战:训练自己的数据集

HoloLens2开发入门教程

HoloLens2开发入门教程

微信小程序开发实战

微信小程序开发实战

Java8零基础入门视频教程

Java8零基础入门视频教程

相关热词 c#跨线程停止timer c#批量写入sql数据库 c# 自动安装浏览器 c#语言基础考试题 c# 偏移量打印是什么 c# 绘制曲线图 c#框体中的退出函数 c# 按钮透明背景 c# idl 混编出错 c#在位置0处没有任何行
立即提问