Java 在Intellij(Linux-VM)中创建Maven项目时出错

Java 在Intellij(Linux-VM)中创建Maven项目时出错,java,maven,intellij-idea,Java,Maven,Intellij Idea,我试图在Linux16中用Intellij创建一个Maven项目。它总是给我一个错误。尝试网络上可用的解决方案,但没有任何效果 这就是我得到的错误: /usr/lib/jvm/java-7-oracle-cloudera/bin/java -Dmaven.multiModuleProjectDirectory=/tmp/archetypetmp -Dmaven.multiModuleProjectDirectory -Dmaven.home=/usr/share/maven -Dclass

我试图在Linux16中用Intellij创建一个Maven项目。它总是给我一个错误。尝试网络上可用的解决方案,但没有任何效果

这就是我得到的错误:

/usr/lib/jvm/java-7-oracle-cloudera/bin/java 
-Dmaven.multiModuleProjectDirectory=/tmp/archetypetmp 
-Dmaven.multiModuleProjectDirectory -Dmaven.home=/usr/share/maven 
-Dclassworlds.conf=/usr/share/maven/bin/m2.conf -Dfile.encoding=UTF-8 
-classpath /usr/share/maven/boot/plexus-classworlds-2.x.jar 
org.codehaus.classworlds.Launcher -Didea.version=2018.3.5 
-DinteractiveMode=false -DgroupId=com.test.java "-DartifactId=Java Proj" 
-Dversion=1.0-SNAPSHOT -DarchetypeGroupId=org.apache.maven.archetypes 
-DarchetypeArtifactId=maven-archetype-quickstart 
-DarchetypeVersion=RELEASE org.apache.maven.plugins:maven-archetype-
plugin:RELEASE:generate
[INFO] Scanning for projects...
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins
/maven-archetype-plugin/maven-metadata.xml

[WARNING] Could not transfer metadata org.apache.maven.plugins:maven-
archetype-plugin/maven-metadata.xml from/to central 
(https://repo.maven.apache.org/maven2): Received fatal alert: 
protocol_version
[INFO] 

------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] 
------------------------------------------------------------------------
[INFO] Total time: 1.460 s
[INFO] Finished at: 2019-03-08T01:41:55-05:00
[INFO] Final Memory: 7M/146M
[INFO] 
------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-archetype-plugin:RELEASE or 
one of its dependencies could not be resolved: Failed to read artifact 
descriptor for org.apache.maven.plugins:maven-archetype-
plugin:jar:RELEASE: Failed to resolve version for 
org.apache.maven.plugins:maven-archetype-plugin:jar:RELEASE: Could not 
find metadata org.apache.maven.plugins:maven-archetype-plugin/maven-
metadata.xml in local (/home/vishnu/.m2/repository) -> [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
/PluginResolutionException
[ERROR] Maven execution terminated abnormally (exit code 1)

好吧,我解决了。我没有更改JRE,所以请不要忘记JRE。张贴答案,以便将来对某人有用。附加图像以供参考

对VM选项也使用此选项

 -Dmaven.multiModuleProjectDirectory

是什么maven命令导致此错误?你的pom.xml看起来像什么?谢谢Ruslan。我已经在下面发布了答案。Intellij默认情况下不会在runner设置中选择jre。要将central repository与Java 7一起使用,您需要定义
-Dhttps.protocols=TLSv1.2
,因为central在很久以前就改变了这一点。。。