score:59
Same problem here, solved.
I will explain the problem and the solution, to help others.
My software is:
Windows 7
Eclipse 4.4.1 (Luna SR1)
m2e 1.5.0.20140606-0033
(from eclipse repository: http://download.eclipse.org/releases/luna)
And I'm accessing internet through a proxy.
My problem was the same:
- Just installed m2e, went to menu: File > New > Other > Maven > Maven project > Next > Next.
- Selected "Catalog: All catalogs" and "Filter: maven-archetype-quickstart", then clicked on the search result, then on button Next.
- Then entered "Group Id: test_gr" and "Artifact Id: test_art", then clicked on Finish button.
- Got the "Could not resolve archetype..." error.
After a lot of try-and-error, and reading a lot of pages, I've finally found a solution to fix it. Some important points of the solution:
- It uses the default (embedded) Maven installation (3.2.1/1.5.0.20140605-2032) that comes with m2e.
- So no aditional (external) Maven installation is required.
- No special m2e config is required.
The solution is:
- Open eclipse.
- Restore m2e original preferences (if you changed any of them): Click on menu: Window > Preferences > Maven > Restore defaults. Do the same for all tree items under "Maven" item: Archetypes, Discovery, Errors/Warnings, Instalation, Lifecycle Mappings, Templates, User Interface, User Settings. Click on "OK" button.
- Copy (for example to a notepad window) the path of the user settings file. To see the path, click again on menu: Window > Preferences > Maven > User Settings, and the path is at the "User settings" textbox. You will have to write the path manually, since it is not posible to copy-and-paste. After coping the path to the notepad, don't close the Preferences window.
- At the Preferences window that is already open, click on the "open file" link. Close the Preferences window, and you will see the "settings.xml" file already openned in a Eclipse editor.
- The editor will have 2 tabs at the bottom: "Design" and "Source". Click on "Source" tab. You will see all the source code (xml).
- Delete all the source code: Click on the code, press control+a, press "del".
- Copy the following code to the editor (and customize the uppercased values):
<settings> <proxies> <proxy> <active>true</active> <protocol>http</protocol> <host>YOUR.PROXY.IP.OR.NAME</host> <port>YOUR PROXY PORT</port> <username>YOUR PROXY USERNAME (OR EMPTY IF NOT REQUIRED)</username> <password>YOUR PROXY PASSWORD (OR EMPTY IF NOT REQUIRED)</password> <nonProxyHosts>YOUR PROXY EXCLUSION HOST LIST (OR EMPTY)</nonProxyHosts> </proxy> </proxies> </settings>
- Save the file: control+s.
- Exit Eclipse: Menu File > Exit.
- Open in a Windows Explorer the path you copied (without the filename, just the path of directories).
- You will probaly see the xml file ("settings.xml") and a directoy ("repository"). Remove the directoy ("repository"): Right click > Delete > Yes.
- Start Eclipse.
- Now you will be able to create a maven project: File > New > Other > Maven > Maven project > Next > Next, select "Catalog: All catalogs" and "Filter: maven-archetype-quickstart", click on the search result, then on button Next, enter "Group Id: test_gr" and "Artifact Id: test_art", click on Finish button.
Finally, I would like to give a suggestion to m2e developers, to make config easier. After installing m2e from the internet (from a repository), m2e should check if Eclipse is using a proxy (Preferences > General > Network Connections). If Eclipse is using a proxy, the m2e should show a dialog to the user:
m2e has detected that Eclipse is using a proxy to access to the internet.
Would you like me to create a User settings file (settings.xml) for the embedded
Maven software?
[ Yes ] [ No ]
If the user clicks on Yes, then m2e should create automatically the "settings.xml" file by copying proxy values from Eclipse preferences.
score:0
I am using Spring STS 3.8.3. I had a similar problem. I fixed it by using information from this thread And also by fixing some maven settings. click Spring Tool Suite -> Preferences -> Maven and uncheck the box that says "Do not automatically update dependencies from remote depositories" Also I checked the boxes that say "Download Artifact Sources" and "download Artifact javadoc".
score:0
If you're behind a proxy, the very first thing to do is, add settings.xml
with proxy configs under C:\Users\{username}\.m2
folder, and replicate same proxy configs under Window > Preferences > Network Connections
(you may need to prefix your user name with domain eg. DOMAIN\username
):
<settings>
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>webproxy.net</host>
<port>8080</port>
<username>username</username>
<password>password</password>
<nonProxyHosts>localhost|127.0.0.1</nonProxyHosts>
</proxy>
<proxy>
<active>true</active>
<protocol>https</protocol>
<host>webproxy.net</host>
<port>8080</port>
<username>username</username>
<password>password</password>
<nonProxyHosts>localhost|127.0.0.1</nonProxyHosts>
</proxy>
</proxies>
Delete C:\Users\{username}\.m2\repository
folder as well.
score:0
It worked for = I just removed "archetypes" folder from below location
C:\Users\Lenovo.m2\repository\org\apache\maven
But you may change following for experiment - download latest binary zip of Maven, add to you C:\ drive and change following....
Change Proxy
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username></username>
<password></password>
<host>10.23.73.253</host>
<port>8080</port>
<nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>
score:0
Today this issue, consumed nearly entire day of mine. Hence, thought to share learning if it can save time of others.
It seems Eclipse Luna had issue. I tried bunch of things, but problem remain unresolved with Eclipse Luna.
Subsequently, I tried Eclipse Neon and problem is auto-resolved with Neon. It seems when the issue was posted here (as it's quite old), Neon version may not have been released.
So in summary, If anyone is yet using Java-8, Maven than by using Eclipse Neon you should not face an issue.
Also, what I learnt is that Maven-be it embedded (Internal to Eclipse) or external (which we install separately) don't make any difference here.
So now my working stack - JDK 8, Maven 3, Eclipse Neon
Ref: Eclipse Neon link for download - https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/neon/3/eclipse-jee-neon-3-win32-x86_64.zip
PS - Also, I tried latest version of Eclipse (R) named as "eclipse-jee-2021-03-R-win32-x86_64", however it requires minimal version as Java-11, so for Java 8 we can't use it.
score:1
I had the same error show up while creating the project but I wasn't behind a proxy and hence the above solutions did not work for me.
I found this forum. It suggested to:
- Delete or Rename .m2 directory from your HOME directory
In Windows - C:\Users\<username>\Windows
OR
In Linux - /home/<username>
- restart the Eclipse / STS spring tool suite (which am using)
It worked!
score:3
I GOT THIS problem too, and I solved it finally, this is the solution:
go to windows-->preference-->maven-->user settings
Change the settings.xml
path to a valid path.
The path maybe not under .m2 directory (in your home directory)..
score:3
In my case following solution worked.
- Delete RELEASE directory & resolver-status.properties file in your local Maven repository under directory .m2/../maven-archetype-quickstart.
- Create Maven project in Eclipse or STS (Spring Tool Suite). It will automatically download quickstart archetype & work as expected.
I hope this may help someone.
score:3
It's actually easy and straight forward.
just navigate to your .m2 folder.
.m2/repository/org/apache/maven
inside this maven folder, you will see a folder called Archetypes... delete this folder and the problem is solved.
but if you don't feel like deleting the whole folder, you can navigate into the archetype folder and delete all the archetype you want there. The reason why it keeps failing is because, the archetype you are trying to create is trying to tell you that she already exists in that folder, hence move away...
summarily, deleting the archetype folder in the .m2 folder is the easiest solution.
score:14
Just delete the ${user.home}/.m2/repository/org/apache/maven/archetypes to refresh all files needed, it worked fine to me!
score:35
For me the solution was a bit simpler, I just had to clean the repository : .m2/repository/org/apache/maven/archetypes
Source: stackoverflow.com
Related Query
- Cannot create Maven Project in eclipse
- Cannot create a new Maven project in eclipse
- Create a Maven project in Eclipse complains "Could not resolve archetype"
- Cannot create a new Android Project using Eclipse
- How to create Jar file from Maven project in eclipse
- Create complete EAR Project with Maven and Eclipse Helios
- Cannot import local git into Eclipse to create a new project (throws error "Connecting Git team provider failed")
- create eclipse groovy-java project with maven
- eclipse maven error: Archive for required library in project cannot be read or is not a valid ZIP file
- How to create a Maven project in Eclipse with AspectJ support?
- Cannot create FXML file in JavaFX project in Eclipse
- How to create runnable jar with resources in Eclipse from Maven project
- Cannot select the project in the Create Servlet dialog in Eclipse
- Cannot import maven project in eclipse due to error
- Cannot create a maven project from my archetype
- Eclipse Maven Plugin fails to create groovy-maven-archetype project
- Converting eclipse java project to maven doesn't create src/test/java directory
- Cannot create a GWT Web Application Project in Eclipse
- Create a maven webapp project using the eclipse kelper, I got an eclipse error
- Unable to create Maven project in eclipse
- Eclipse or Spring Suit Error - Maven Project - Dynamic Web module cannot be changed to 3.1
- Eclipse cannot create new Android Application Project after updating the Android SDK Tools
- not able to create maven project in eclipse juno
- How to create a Maven project in Eclipse
- Create Maven project with eclipse
- Eclipse NetSuite SuiteScript Plugin Cannot Create New Project
- How to create a maven project which will work in eclipse and from command line
- Cannot create new project after Eclipse update
- Create an eclipse plugin with dependency on a maven project
- Cannot create a C++ project in eclipse
More Query from same tag
- How to make an old Eclipse project work on Android Studio w/Gradle?
- Program not executed with SDL
- Retrieve active key binding using a commandId
- Clover+Maven+Eclipse
- Unable to use GL tracer on my Android app due to long initalization time
- How does jboss server handles migrated .ear and .war files?
- Gradle DSL - Eclipse Equivalent for IDEA Module Property
- JavaFX style by classname
- How to bypass SSL certificates issue in JBOSS REST ClientRequest
- How do I integrate the Java EE docs / API into Eclipse?
- 'Open Declaration' in Eclipse navigates to class files instead of to source files for Android Libraries
- Find server in JBoss Studio 8 through eclipse
- Create WAR using ANT compatible with JBOSS
- Hadoop mapper constructor, when and how?
- java.lang.NullPointerException in Splash - Android Eclipse
- RCPTT Maven Plugin procedures
- Could not parse Master URL
- JNI: No rule to make target issue
- app has stopped in eclipse
- Error occurred during initialization of VM: java.lang.UnsatisfiedLinkError: java.lang.Class.desiredAssertionStatus0(Ljava/lang/Class;)
- ADB server didn't Acknowledge
- passing argument 1 of ‘gtk_label_set_selectable’ from incompatible pointer type
- Jsp page return "The superclass "jakarta.servlet.http.HttpServlet" was not found" error
- Stop Eclipse from autocompleting
- Java J2ee plugin installtion has dependency errors
- Glassfish webapp auto-deployment
- Communicating to an iso 14443 card with android nfc
- Importing example projects using Android into Eclipse Helios fails
- eclipse dynamic web project file locations
- Missing tools.jar in SpringTools Suite when invoking via command line