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>

posted on 2016-03-23 15:49  yang68h  阅读(9873)  评论(0编辑  收藏  举报