Eclipse无法找到使用Maven Tycho构建的插件的依赖关系 [英] Eclipse cannot find dependencies of a plugin built with Maven Tycho

查看:178
本文介绍了Eclipse无法找到使用Maven Tycho构建的插件的依赖关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Maven Tycho编译我的项目,其结构如下:

I am using Maven Tycho to compile my projects which are structured like this :

- plugin1
 - plugin2 (depends on plugin1)
 - plugin3 (depends on plugin1 & 2)
 - plugin4 (depends on plugin1)
 - plugin5 (depends on plugin1 & 4)
 - plugin6 (depends on all previous plugins)
 - plugin7 (depends on all previous plugins)
{all these plugins are compiled as eclipse-plugin}
 - feature1 (contains all previous plugins) {eclipse-feature}
 - updatesite1 {eclipse-repository}
 - generalproject (contains only the parent pom)

我通过Eclipse(maven install)编译,一切正常,我可以访问我的本地存储库,并将我的功能安装在同一个Eclipse中(通过安装新软件)。

I compile this via Eclipse (maven install), everything works and i can access my local repository, and install my feature in the same Eclipse (through "Install new software").

问题是当我尝试将我的功能安装到另一个Eclipse实例时,拒绝安装它,并显示错误:

The problem is when i try to install my feature to another instance of Eclipse, which refuse to install it with the error :

(Missing requirement: Acceleo Texts Module IDE Plug-in 1.0.0.201612161812 (myproject.acceleo.ui 1.0.0.201612161812) requires 'bundle org.eclipse.ocl 0.0.0' but it could not be found)

我知道这是一个非满意的需求问题,但是在Eclipse中我检查过安装过程中联系所有更新站点以查找所需的软件,而我的pom声明包含所有要求的存储库,这里是我的父pom:

I know that this is a non satisfied requirement problem, but in Eclipse i checked "Contact all update sites during install to find required software", and my pom declares repositories containing all requirements, here is my parent pom :

    <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>myproject.project</groupId>
  <artifactId>myproject.general</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>pom</packaging>

   <properties>
  <tycho.version>0.23.0</tycho.version>
   <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 </properties>

  <repositories>
  <repository>
   <id>Mars</id>
   <layout>p2</layout>
   <url>http://download.eclipse.org/releases/mars/</url>
  </repository>

   <repository>
  <id>Sirius</id>
   <layout>p2</layout>
   <url>http://download.eclipse.org/sirius/updates/releases/4.1.2/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>

   <plugin>
    <!-- enable tycho build extension -->
    <groupId>org.eclipse.tycho</groupId>
     <artifactId>target-platform-configuration</artifactId>
    <version>${tycho.version}</version>
    <configuration>
    <environments>
    <environment>
      <os>linux</os>
      <ws>gtk</ws>
      <arch>i386</arch>
    </environment>
     <environment>
          <os>linux</os>
          <ws>gtk</ws>
          <arch>x86_64</arch>
        </environment>
       <environment>
          <os>win32</os>
          <ws>win32</ws>
          <arch>x86</arch>
        </environment>
        <environment>
          <os>win32</os>
          <ws>win32</ws>
          <arch>x86_64</arch>
        </environment>
        <environment>
          <os>macosx</os>
          <ws>cocoa</ws>
          <arch>x86_64</arch>
        </environment>
     </environments>
   </configuration>
   </plugin>

  </plugins>
 </build>

 <modules>
  <module>../myproject</module>
  <module>../myproject.acceleo</module>
  <module>../myproject.acceleo.ui</module>
  <module>../myproject.design</module>
  <module>../myproject.edit</module>
  <module>../myproject.editor</module>
  <module>../myproject.plugin</module>
  <module>../myproject.project</module>
  <module>../myproject.site</module>
 </modules>
</project>

我无法想象如何解决这个问题?我的程序中省略了一些东西吗?
谢谢。

I cannot figure how to resolve this ? did i omit something in my procedure ? Thank you.

推荐答案

我也遇到类似的问题。也许您可以使用 maven-dependency-plugin 来复制依赖项,在这种情况下,您可以将 org.eclipse.ocl 复制到项目中的一个文件夹,如下所述: https://stackoverflow.com/a/34510972/7193339

I struggled with a similar problem. Maybe you could use the maven-dependency-plugin to copy your dependencies, in this case org.eclipse.ocl to a folder within your project, as described here: https://stackoverflow.com/a/34510972/7193339

这应该留下一个更新站点,从而可以在eclipse中安装软件,并且包含所有的依赖项,即使它们中有一些是额外的文件夹。

This should leave you with an update site from which software can be installed in eclipse and that includes all your dependencies, even if some of them are in an extra folder.

这篇关于Eclipse无法找到使用Maven Tycho构建的插件的依赖关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆