Rookie Programmer
Rookie Programmer

Reputation: 55

Error in creating Maven project in Intellij (Linux - VM)

I was trying to create a Maven project in Intellij in Linux 16. It keeps throwing me an error. Trying the solutions available on the net but nothing worked.

This is the error I am getting:

/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)

Upvotes: 0

Views: 147

Answers (1)

Rookie Programmer
Rookie Programmer

Reputation: 55

Okay, so I solved it. I did not change the JRE, so just dont forget the JRE. Posting the answer so that it will be useful for somebody in the future. Attaching an image for reference.

Also use this for the VM options.

 -Dmaven.multiModuleProjectDirectory

Snapshot of the solution

Upvotes: 1

Related Questions