我想使用 Jenkins 自动化 Eclipse 插件构建。为此,我使用 Tycho Maven 插件。插件构建工作正常,但我无法通过 Eclipse 中的安装新软件...选项安装它。我必须使用导出选项手动部署此插件。
有没有办法自动执行此任务?我创建了另一个项目,一个功能项目,并使用 Maven 构建它。包装是eclipse-feature
。
但是,输出目录结构与执行“导出”时创建的目录结构不同。
这是 pom.xm
我的插件:
<?xml version="1.0" encoding="UTF-8"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<repositories>
<repository>
<id>luna</id>
<url>http://download.eclipse.org/releases/luna</url>
<layout>p2</layout>
</repository>
</repositories>
<modelVersion>4.0.0</modelVersion>
<groupId>com.acme.viewer</groupId>
<artifactId>ViewerPlugin</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>0.23.0</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>
这是 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>ViewerPlugin.Feature</groupId>
<artifactId>ViewerPlugin.Feature</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
<repositories>
<repository>
<id>luna</id>
<url>http://download.eclipse.org/releases/luna</url>
<layout>p2</layout>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>0.23.0</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>
最佳答案
安装新软件...
预计 eclipse repository structure .
您需要创建更新站点项目并将打包用作eclipse-repository
检查第谷包装类型here
code and me博客讲述了如何使用 Maven 和 tycho 构建 Eclipse 存储库的分步教程
关于eclipse - 如何使用 Maven/Tycho 构建 Eclipse 插件以在 "Install New Software"对话框中使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30752472/