TheRealRave
TheRealRave

Reputation: 373

Cannot get any archetypes from Maven when using the remote catalog URL

I'm trying to create a new Maven project but I can't. I tried the command line and also through Eclipse.

The error I get when trying to use the command line is along the lines of

[ERROR] No plugin found for prefix 'archetype' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\MY_NAME.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]

[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/NoPluginFoundForPrefixException

After searching around for the solution to the error, the problem seems to occur because I'm behind a firewall/proxy here at work.

I was then advised to go into Eclipse and try adding the remote catalog URL to Eclipse. What I done was I went to Windows > Preferences > Maven > Archetypes > Add Remote Catalog. I then put it http://repo1.maven.org/maven2/archetype-catalog.xml for the "Catalog File" field and maven catalog for the "Description" field.

I then click Verify to see if it was working and I got a warning saying that the "Remote catalog is empty".

I went ahead and tried to create a new Maven project anyway. After filling out my groupId and all that, I click finish. Another error comes up saying

Could not resolve archetype

org.apache.maven.archetypes:maven-archetype-webapp:1.0 form any of the configured repositories.

How do I get around this?

Upvotes: 4

Views: 23448

Answers (7)

Abhishek Kumar Yadav
Abhishek Kumar Yadav

Reputation: 11

You need to add archetype catalog, you can use the Remote archetype catalog.

Old links which are shared are not working

Use - https://repo.maven.apache.org/maven2/archetype-catalog.xml

Upvotes: 1

anirban
anirban

Reputation: 704

Remote url should be https://repo1.maven.org/maven2/archetype-catalog.xml

instead

http://repo1.maven.org/maven2/archetype-catalog.xml

it worked for me in 2021 Jan

enter image description here

Upvotes: 1

Milaan Mandal
Milaan Mandal

Reputation: 17

I fixed it today by firstly downloading the file in the browser then adding it as local file. You need to include http (s) Try the below link:- https://repo1.maven.org/maven2/archetype-catalog.xml

Upvotes: 1

Cosburn
Cosburn

Reputation: 11

http://repo1.maven.org/maven2/archetype-catalog.xml is the "given" link to get access the the remote archetype.

However it may be outdated. You need to include http (s) therefore https://repo1.maven.org/maven2/archetype-catalog.xml is what is required to get the remote archetypes to appear in eclipse or your favorite browser.

Upvotes: 1

mohd mohsin
mohd mohsin

Reputation: 7

just look at the address you havnt put https https://repo1.maven.apache.org/maven2 try this it will halpful to

Upvotes: -2

jimmy
jimmy

Reputation: 165

This works for me. I downloaded and saved the archtype-catalog xml file to local drive and then added using "Add Local Catalog".

Upvotes: 0

zicheng gan
zicheng gan

Reputation: 61

I fixed it today by firstly downloading the file in the browser then adding it as local file

Upvotes: 6

Related Questions