eclipseでmavenプロジェクト作成失敗について
archetypeは「maven-archetype-quickstart」を選択する場合、下記の異常がある。
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
この事象はproxyを利用する場合のみ発生します。
対処方法:
archetype-catalog.xmlを「~/.m2/archetype-catalog.xml」にダウンロードする
eclipseにて
Open Window > Preferences > Maven > Archetypes
Click ‘Add Local Catalog’
and add the following:
Catalog File: ~/.m2/archetype-catalog.xml
Description: maven catalog
Location of catalog files
The Archetype Plugin knows by default about its internal catalog. It also knows about the local and remote catalogs.
local represents the ~/.m2/archetype-catalog.xml catalog file.
remote represents the https://repo.maven.apache.org/maven2/archetype-catalog.xml catalog file.
The Archetype Plugin can also read catalogs from filesystem/HTTP by providing the path/URL of a catalog file or of a directory containing an archetype-catalog.xml file.
How does the Archetype Plugin know about archetypes?
create-a-maven-project-in-eclipse-complains-could-not-resolve-archetype