Search code examples
javamavenjgrapht

Maven "The desired archetype does not exist (org:maven-archetype-jgrapht:1)"


I am using Maven for a java project I'm working on because I wish to include a library for graph structures (jgrapht) which cannot be used without Maven (afaik), but I have no used Maven before so I am not very familiar with how to use it.

I downloaded and unzipped the files for jgrapht and attempted to execute the command provided on the jgrapht github to create a project which includes jgrapht. However, when I execute this command I get the error

"[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate (default-cli) on project ever-dark: The desired archetype does not exist (org:maven-archetype-jgrapht:1)"

I noticed that the command provided on the github has the wrong version number, so I tried correcting that, but there was no change.

The command given is

"mvn archetype:generate -DarchetypeGroupId=org.jgrapht.archetypes -DarchetypeArtifactId=maven-archetype-jgrapht -DarchetypeVersion=1.2.0"


Solution

  • I think I found a solution. If I simply run 'mvn archetype:generate" it will show a long list, of which I can simply find and select jgrapht. This seems to have worked for now :)