【问题标题】:How to build an Eclipse plugin with Maven/Tycho for use in the "Install New Software" dialog [duplicate]如何使用 Maven/Tycho 构建 Eclipse 插件以在“安装新软件”对话框中使用 [重复]
【发布时间】:2015-06-10 09:31:39
【问题描述】:

我想使用 Jenkins 自动构建 Eclipse 插件。为此,我正在使用 Tycho Maven 插件。插件构建工作正常,但我无法通过 Eclipse 中的 Install New Software... 选项安装它。我必须使用 Export 选项手动部署此插件。

有没有办法自动化这个任务?我创建了另一个项目,一个 Feature Project,并使用 Maven 构建它。包装是eclipse-feature。 但是,输出目录结构与执行 Export 时创建的目录结构不同。

这是我的插件的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>

【问题讨论】:

  • 你想在哪里部署你的插件?
  • @AleksandrM:最好是一些文件,比如 zip。

标签: eclipse maven tycho


【解决方案1】:

Install New Software... 期望 eclipse repository structure

您需要创建更新站点项目并使用包装为eclipse-repository

查看第谷包装类型here

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-03-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-12-12
    • 2017-05-04
    • 1970-01-01
    相关资源
    最近更新 更多