我使用'Tycho'(Maven)进行eclipse插件项目构建 .
我收到错误:
无法解析的构建扩展:插件org.eclipse.tycho:tycho-maven-plugin:0.22.0或其中一个依赖项无法解析:无法读取org.eclipse.tycho的工件描述符:tycho-maven-plugin:jar :0.22.0:无法传输工件org.eclipse.tycho:tycho-maven-plugin:pom:0.22.0 from / to central(https://repo.maven.apache.org/maven2):connect timed out - > [帮助2]
POM.xml文件看起来像
<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>tycho_example</groupId>
<artifactId>com.codeandme.tycho.plugin</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
<tycho.version>0.22.0</tycho.version>
</properties>
<repositories>
<!-- add Mars repository to resolve dependencies -->
<repository>
<id>Mars</id>
<layout>p2</layout>
<url>http://download.eclipse.org/releases/mars/</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<!-- enable tycho build extension -->
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho.version}</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>
2 回答
我相信你的问题已经解决了 . 但是,对于具有相同错误的其他人,解决方案是: Include the tag <pluginManagement> in parent pom.xml file.
<pluginManagement>
只是在所有项目模块中共享相同插件配置的一种方式 . 这是示例父pom.xml文件这不能通过添加来解决
它_1100447_吨从一个回购下载这些插件 . 打开你的Maven控制台,看看它是否在你保存_1700448后打印出来的东西,它可能会告诉你,它无法访问repo或没有maven
settings.xml
被分配给m2e连接器 .在这里找到完整的解决方案:Maven: unresolvable build extension