I failed to start Maven project. The error showing:
Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:1.1 from any of the configured repositories.
Could not resolve artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1
Failure to transfer org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error:
Could not transfer artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from/to central (https://repo.maven.apache.org/maven2): Connect timed out
Failure to transfer org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error:
Could not transfer artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from/to central (https://repo.maven.apache.org/maven2): Connect timed out
In my previous project, I also cannot install JAR with Maven install in Spring Tools Suite, so I install with command prompt mvn install
. I had create the setting proxy in settings.xml
with same proxy like browser setting.
settings.xml:
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<pluginGroups>
</pluginGroups>
<proxies>
<proxy>
<id>myproxy</id>
<active>true</active>
<protocol>http</protocol>
<host>idnproxy.pru.intranet.asia</host>
<port>8080</port>
<username>c76266</username>
<password>Password09</password>
<nonProxyHosts>localhost|128.*.*.*|10.*.*.*|*.intranet.asia|*.group.local</nonProxyHosts>
</proxy>
</proxies>
<servers>
</servers>
<mirrors>
<mirror>
<name>Spring Milestones</name>
<id>spring-milestones-secure</id>
<url>http://repo.spring.io/libs-milestone</url>
<mirrorOf>spring-milestones</mirrorOf>
</mirror>
</mirrors>
<profiles>
</profiles>
</settings>
How to solve this problem? When I install JAR with command prompt, it succeeds. Why? Thanks.