如上圖所示,這是我解決好的,剛開始的時(shí)候爆紅有這些:
?我按照在網(wǎng)上查找的方法,一一試了。
首先,maven?安裝的路徑和和本地倉(cāng)庫(kù)的目錄必須要保持一致
打開setting-Build,Excution,Deployment-Build Tools-Maven,將其修改一致(我還是爆紅)
?
?接著,在maven\apache-maven-3.5.4\conf下的setting.xml中,找到<mirrors></mirrors>標(biāo)簽,在其中添加了阿里鏡像(我自己還是爆紅)
<!-- 阿里鏡像 -->
<mirror>
<id>alimaven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
</mirror>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>central</id>
<name>Maven Repository Switchboard</name>
<url>http://repo1.maven.org/maven2/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>repo2</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://repo2.maven.org/maven2/</url>
</mirror>
<mirror>
<id>ibiblio</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url>
</mirror>
<mirror>
<id>jboss-public-repository-group</id>
<mirrorOf>central</mirrorOf>
<name>JBoss Public Repository Group</name>
<url>http://repository.jboss.org/nexus/content/groups/public</url>
</mirror>
<mirror>
<id>google-maven-central</id>
<name>Google Maven Central</name>
<url>https://maven-central.storage.googleapis.com
</url>
<mirrorOf>central</mirrorOf>
</mirror>
<!-- 中央倉(cāng)庫(kù)在中國(guó)的鏡像 -->
<mirror>
<id>maven.net.cn</id>
<name>oneof the central mirrors in china</name>
<url>http://maven.net.cn/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
最后,試了另一種辦法,解決了
方法就是在pom中加上相關(guān)的依賴,例如下面這個(gè):
打開pom,在<dependencies></dependencies>中添加如下代碼:
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.4</version>
</dependency>
?再點(diǎn)擊,刷新下載,之后就完成了~
?其他爆紅的用同樣的方法,成功解決!
參考:
IDEA日常填坑:Cannot resolve plugin org.apache.maven.plugins:maven-war-plugin_^Being^的博客-CSDN博客文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-401689.html
maven plugins爆紅_comeilmforever的博客-CSDN博客_maven plugins 爆紅文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-401689.html
到了這里,關(guān)于[遇到的問題-已解決]Cannot resolve plugin org.apache.maven.plugins:maven-compiler-plugin:3.1的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!