我无法在Spring Test Suite中创建新的Maven项目。出现以下错误
Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:1.4 from any of the configured repositories.
Could not resolve artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.4
Failure to transfer org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.4 from ${env.ARTIFACTORY_URL} 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.4 from/to central (${env.ARTIFACTORY_URL}): Cannot access ${env.ARTIFACTORY_URL} with type default using the available connector factories: AetherRepositoryConnectorFactory, BasicRepositoryConnectorFactory
Failure to transfer org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.4 from ${env.ARTIFACTORY_URL} 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.4 from/to central (${env.ARTIFACTORY_URL}): Cannot access ${env.ARTIFACTORY_URL} with type default using the available connector factories: AetherRepositoryConnectorFactory, BasicRepositoryConnectorFactory
Failure to transfer org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.4 from ${env.ARTIFACTORY_URL} 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.4 from/to central (${env.ARTIFACTORY_URL}): Cannot access ${env.ARTIFACTORY_URL} with type default using the available connector factories: AetherRepositoryConnectorFactory, BasicRepositoryConnectorFactory
Failure to transfer org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.4 from ${env.ARTIFACTORY_URL} 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.4 from/to central (${env.ARTIFACTORY_URL}): Cannot access ${env.ARTIFACTORY_URL} with type default using the available connector factories: AetherRepositoryConnectorFactory, BasicRepositoryConnectorFactory
答案 0 :(得分:0)
<mirrors>
<mirror>
<id>UK</id>
<name>UK Central</name>
<url>http://uk.maven.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
将以上内容添加到setting.xml中将解决上述错误