Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error fetching Archetype: archetype does not exist #128

Closed
ivanskodje opened this issue Oct 8, 2017 · 9 comments
Closed

Error fetching Archetype: archetype does not exist #128

ivanskodje opened this issue Oct 8, 2017 · 9 comments

Comments

@ivanskodje
Copy link

ivanskodje commented Oct 8, 2017

Following the "Create a new project in IntelliJ" guide, I get the following error:

/usr/local/java/jdk1.8.0_144/bin/java -Dmaven.multiModuleProjectDirectory=/tmp/archetypetmp -Dmaven.home=/opt/idea-IC-172.3968.16/plugins/maven/lib/maven3 -Dclassworlds.conf=/opt/idea-IC-172.3968.16/plugins/maven/lib/maven3/bin/m2.conf -Dfile.encoding=UTF-8 -classpath /opt/idea-IC-172.3968.16/plugins/maven/lib/maven3/boot/plexus-classworlds-2.5.2.jar org.codehaus.classworlds.Launcher -Didea.version=2017.2.3 -DinteractiveMode=false -DgroupId=asdadsdasdas -DartifactId=asdasdasdadas -Dversion=1.0-SNAPSHOT -DarchetypeGroupId=pl.codeleak -DarchetypeArtifactId=spring-mvc-quickstart -DarchetypeVersion=5.0.0 -DarchetypeRepository=http://kolorobot.github.io/spring-mvc-quickstart-archetype org.apache.maven.plugins:maven-archetype-plugin:RELEASE:generate [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Stub Project (No POM) 1 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] >>> maven-archetype-plugin:3.0.1:generate (default-cli) > generate-sources @ standalone-pom >>> [INFO] [INFO] <<< maven-archetype-plugin:3.0.1:generate (default-cli) < generate-sources @ standalone-pom <<< [INFO] [INFO] --- maven-archetype-plugin:3.0.1:generate (default-cli) @ standalone-pom --- [INFO] Generating project in Batch mode [WARNING] Archetype not found in any catalog. Falling back to central repository. [WARNING] Add a repsoitory with id 'archetype' in your settings.xml if archetype's repository is elsewhere. [WARNING] The POM for pl.codeleak:spring-mvc-quickstart:jar:5.0.0 is missing, no dependency information available [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.425 s [INFO] Finished at: 2017-10-08T21:08:57+02:00 [INFO] Final Memory: 14M/214M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project standalone-pom: The desired archetype does not exist (pl.codeleak:spring-mvc-quickstart:5.0.0) -> [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] Maven execution terminated abnormally (exit code 1)

Since I am relatively new to Spring and Maven, I hope this is simply a user error.
However, if it is not - I hope this will provide helpful.

Regardless, I would appreciate any help solving this.
Using IntelliJ Community Edition (2017) on Ubuntu 16.4.


Tested this on another computer (Win10) and got the same results.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project standalone-pom: The desired archetype does not exist (pl.codeleak:spring-mvc-quickstart:5.0.0) -> [Help 1]
It does not appear that it can be added by selecting "Add Archetype" in IntelliJ :S


Last additional note:

The IntelliJ guide works if you run the following before attempting to create your project using the Archetype.
git clone https://github.com/kolorobot/spring-mvc-quickstart-archetype.git
cd spring-mvc-quickstart-archetype
mvn clean install

@binarywang
Copy link

I tried just like you did and got the same error message.

@kolorobot
Copy link
Owner

I cleanup up all things locally and rerun and seems like it is all fine:

mvn archetype:generate -DarchetypeGroupId=pl.codeleak -DarchetypeArtifactId=spring-mvc-quickstart -DarchetypeVersion=5.0.0 -DgroupId=pl.codeleak -DartifactId=arch-sdfasdf -Dpackage=pl.codeleak.arch55 -Dversion=1.0.0 -DarchetypeRepository=http://kolorobot.github.io/spring-mvc-quickstart-archetype
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.4:generate (default-cli) @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.4:generate (default-cli) @ standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:2.4:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Interactive mode
[INFO] Archetype defined by properties
Downloading: http://kolorobot.github.io/spring-mvc-quickstart-archetype/pl/codeleak/spring-mvc-quickstart/5.0.0/spring-mvc-quickstart-5.0.0.jar
[WARNING] Checksum validation failed, no checksums available from the repository for http://kolorobot.github.io/spring-mvc-quickstart-archetype/pl/codeleak/spring-mvc-quickstart/5.0.0/spring-mvc-quickstart-5.0.0.jar
Downloaded: http://kolorobot.github.io/spring-mvc-quickstart-archetype/pl/codeleak/spring-mvc-quickstart/5.0.0/spring-mvc-quickstart-5.0.0.jar (203 KB at 129.8 KB/sec)
Downloading: http://kolorobot.github.io/spring-mvc-quickstart-archetype/pl/codeleak/spring-mvc-quickstart/5.0.0/spring-mvc-quickstart-5.0.0.pom
[WARNING] Checksum validation failed, no checksums available from the repository for http://kolorobot.github.io/spring-mvc-quickstart-archetype/pl/codeleak/spring-mvc-quickstart/5.0.0/spring-mvc-quickstart-5.0.0.pom
Downloaded: http://kolorobot.github.io/spring-mvc-quickstart-archetype/pl/codeleak/spring-mvc-quickstart/5.0.0/spring-mvc-quickstart-5.0.0.pom (2 KB at 2.4 KB/sec)
[INFO] Using property: groupId = pl.codeleak
[INFO] Using property: artifactId = arch-sdfasdf
[INFO] Using property: version = 1.0.0
[INFO] Using property: package = pl.codeleak.arch55
Confirm properties configuration:
groupId: pl.codeleak
artifactId: arch-sdfasdf
version: 1.0.0
package: pl.codeleak.arch55
Y: :

@paulobatista
Copy link

I had the same error and "workarounded" it by intalling the archetype locally. However I have another machine which the remote worked flawless.

There are any configuration mismatch which we can find between the two machines? I can do some tests if necessary.

By the way: thanks for the code!

@kolorobot
Copy link
Owner

Installing locally is what I always do (or did) with this archetype, but indeed some people are reporting issues with accessing the remote repo. I don't what's what's that - maybe maven version? Should be published to maven central, but this takes time.

@paulobatista
Copy link

I'm afraid that the version is not the problem:

In the workarounded machine:

paulo@manjericao:~$ cat /etc/issue
Ubuntu 16.04.2 LTS \n \l

paulo@manjericao:~$ mvn -version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T14:41:47-02:00)
Maven home: /home/paulo/apps/apache-maven-3.3.9
Java version: 1.8.0_131, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-68-generic", arch: "amd64", family: "unix"

In the working machine:

paulo@madoka:~$ cat /etc/issue
Ubuntu 14.04.5 LTS \n \l

paulo@madoka:~$ mvn -version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T14:41:47-02:00)
Maven home: /usr/share/maven3
Java version: 1.8.0_131, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-83-generic", arch: "amd64", family: "unix"

@chrisn1992
Copy link

The issue seems to be the repo denying access from the IDE of some people(like me).
What I did before realizing this:
1/ Try install archetype from IntelliJ Idea - via both creating new maven project with archetype and simple maven project then run mvn manually. Result: both failed
2/ Try on STS with both methods as same as IntelliJ Idea. Result: failed
As information: POM and JAR for archetype cannot be retrieved, hence the error "missing"
3/ Try accessing both "missing" through browser: success, browser manually downloaded both file.

@annaskulimowska
Copy link

I've got the same problem, but after installing locally everything works fine

@gmlupatelli
Copy link

I had the same problem using Eclipse. I don't know if it has any correlation, but it worked after I logged in github from a web browser and living it open.

@kolorobot
Copy link
Owner

This is duplicate of #130. See comments there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants