maven Error resolving version for plugin 'org.apache.maven.plugins:maven-eclipse-plugin' from the repositories 解決


報錯:Error resolving version for plugin 'org.apache.maven.plugins:maven-eclipse-plugin' from the repositories,查找后發現本地用戶目錄倉庫下只有maven-eclipse-plugin文件夾,並沒有jar包

本地倉庫沒有maven-eclipse-plugin jar包,沒裝上maven-eclipse-plugin,解決

在項目的根目錄添加:

修改pop.xml

<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.10</version>
<configuration>
<pde>true</pde>  安裝玩后改成false,true位從遠程倉庫拿包  
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

 

 

 

 

 

整改pom.xl

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>helloworld</groupId>
<artifactId>helloworld</artifactId>
<version>1.1</version>
<packaging>jar</packaging>


<repositories>
<repository>
<id>helloworld</id>
<name>Team nexus Repository</name>
<url>http://192.168.0.78/nexus/ceontent/groups/public</url>
</repository>
<repository>
<id>Remote</id>
<name>Team nexus Remote</name>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
</repositories>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.10</version>
<configuration>
<pde>false</pde>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM