首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >IntelliJ IDEA - Maven2 -安装

IntelliJ IDEA - Maven2 -安装
EN

Stack Overflow用户
提问于 2019-07-05 18:45:12
回答 1查看 272关注 0票数 0

我从私有存储库下载了一个项目,当我尝试安装时,显示了我需要一个Maven2的错误。问题是,当我下载IntelliJ IDEA时,我下载的是提供Maven3的最新版本。

问题是。有没有可能在IntelliJ中改变Maven的版本?

因为其他问题是当我安装项目时,在控制台中显示下一个错误。

代码语言:javascript
复制
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服务的。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-07-05 19:08:59

IntelliJ IDEA (Mac上的版本2019.1.3 )设置路径以更改maven主目录。

Preferences | Build, Execution, Deployment | Build Tools | Maven

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56901540

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档