Java – create Maven project, unable to parse prototype, reject connection

I suspect I have Maven agency problems When I create a new project:

1) File – > New – > Maven project

2) I choose the prototype: in org apache. maven. Archetypes – > Maven's prototype – web application

3) I get this error:

Details:

Yes Log file:

We can see the root cause of the problem: the connection is rejected

I have already done this:

1) Window – > preferences – > General – > network connection I entered manual for HTTP protocol in the URL and port of my proxy It works because spring tool suite doesn't want to update before After that, it doesn't matter

2) Window – > preferences – > maven – > user settings In global settings, it is blank In "user settings", I set the path to settings xml. In this file, I have:

<settings>
  <proxies>
   <proxy>
      <active>true</active>
      <protocol>http</protocol>
      <host>my.proxy.fr</host>
      <port>3128</port>
    </proxy>
  </proxies>
</settings>

In this topic: create a maven project in eclipse compounds "could not resolve Archetype" by adding a remote directory http://repo1.maven.org/maven2/archetype-catalog.xml The problem was solved For me, it says the directory is empty

My configuration: Windows 7 Pro 64 bit, spring tool suite 3.6 4. Release is based on eclipse Luna Sr1 (4.4.2), java version 8 update 45, and there is no authentication agent

Why can't I create a new Maven project?

Solution

I have the same problem. I think at some point you try to create a maven application without a connection like me, which is the reason for this problem Because for the first time Maven created an empty directory and tried to download anything needed to create the project After any Maven project you create, Maven has been looking for that directory and downloading things from the Internet I believe the easiest way to solve this problem is to close eclipse (or STS) and delete the file located in (in my case) "C: / users / myname /. M2" M2 catalogue Then reopen the IDE you are using Good luck

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>