我从私有存储库下载了一个项目,当我尝试安装时,显示了我需要一个Maven2的错误。问题是,当我下载IntelliJ IDEA时,我下载的是提供Maven3的最新版本。
问题是。有没有可能在IntelliJ中改变Maven的版本?
因为其他问题是当我安装项目时,在控制台中显示下一个错误。
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-site-plugin/2.0-beta-7/maven-site-plugin-2.0-beta-7.jar
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-site-plugin:maven-plugin:2.0-beta-7' from repository central (http://repo1.maven.org/maven2): Error transferring file: repo1.maven.org
[INFO] Skipping missing optional mojo: org.apache.maven.plugins:maven-site-plugin:attach-descriptor
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.2/maven-install-plugin-2.2.jar
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-install-plugin:maven-plugin:2.2' from repository central (http://repo1.maven.org/maven2): Error transferring file: repo1.maven.org
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] A required plugin was not found: Plugin could not be found - check that the goal name is correct: Unable to download the artifact from any repository
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.apache.maven.plugins -DartifactId=maven-install-plugin -Dversion=2.2 -Dpackaging=maven-plugin -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.apache.maven.plugins -DartifactId=maven-install-plugin -Dversion=2.2 -Dpackaging=maven-plugin -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
org.apache.maven.plugins:maven-install-plugin:maven-plugin:2.2
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
org.apache.maven.plugins:maven-install-plugin:maven-plugin:2.2
from the specified remote repositories:
central (http://repo1.maven.org/maven2)但我认为问题不在于代理,问题在于repo1.maven.org是为maven3服务的。
发布于 2019-07-05 19:08:59
IntelliJ IDEA (Mac上的版本2019.1.3 )设置路径以更改maven主目录。
Preferences | Build, Execution, Deployment | Build Tools | Maven
https://stackoverflow.com/questions/56901540
复制相似问题