2017-09-07 9 views
0

org.eclipse.e4.core.di 또는 org.eclipse.core.runtime과 같은 여러 Eclipse 모듈에 의존하는 Eclipse RCP/IDE 플러그인 프로젝트가 있습니다.eclipse RCP maven/tycho missing requirements 'bundle org.eclipse.e4.core.di'

이 프로젝트는 종속성 설정을 위해 .target 파일이있는 Committers 환경 용 Eclipse IDE에서 컴파일됩니다. 다음과 같이

나는 머리가없는 받는다는가/티코 오류의 결과로이 프로젝트에 빌드 추가 할 :

프로젝트 설정은 다음과 같습니다
[ERROR] Cannot resolve project dependencies: 
[ERROR] Software being installed: org.myplugin.someservice 1.0.0 
[ERROR] Missing requirement: org.myplugin.someservice 1.0.0 requires 'bundle org.eclipse.e4.core.di 0.0.0' but it could not be found 

: 나는 자습서 사용했습니다

releng/ 
    org.myplugin.releng/ 
      pom.xml (contains tycho-plugins def, modules, target ref) 
    org.myplugin.target/ 
      Neon.target 
      pom.xml (contains 'eclipse-target-definition') 
plugins/ 
    org.myplugin.someservice/ 
      pom.xml 
      META-INF/ 
       MANIFEST.MF (contains reference to org.eclipse.e4.core.di) 

Lars Vogel (http://www.vogella.com/tutorials/EclipseTycho/article.html#exercise-using-a-target-platform-for-the-build)의 기본 설정 및 이해. 대상 파일의

내용은 다음과 같습니다

<?xml version="1.0" encoding="UTF-8" standalone="no"?> 
<?pde version="3.8"?><target name="Neon" sequenceNumber="43"> 
    <locations> 
     <location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="false" type="InstallableUnit"> 
      <unit id="org.eclipse.platform.sdk" version="4.6.3.M20170301-0400"/> 
      <unit id="org.eclipse.pde.feature.group" version="3.12.3.v20170301-0400"/> 
      <unit id="org.eclipse.pde.source.feature.group" version="3.12.3.v20170301-0400"/> 
      <unit id="org.eclipse.platform.ide" version="4.6.3.M20170301-0400"/> 
      <unit id="org.eclipse.equinox.sdk.feature.group" version="3.12.0.v20170209-1843"/> 
      <unit id="org.eclipse.rcp.feature.group" version="4.6.3.v20170301-0400"/> 
      <repository location="http://download.eclipse.org/eclipse/updates/4.6"/> 
     </location> 
     <location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="false" type="InstallableUnit"> 
      <unit id="org.eclipse.emf.cdo.epp.feature.group" version="4.5.0.v20160607-1511"/> 
      <unit id="org.eclipse.emf.sdk.feature.group" version="2.12.0.v20160526-0356"/> 
      <unit id="org.eclipse.emf.compare.diagram.papyrus.feature.group" version="3.2.1.201608311750"/> 
      <unit id="org.eclipse.xtext.sdk.feature.group" version="2.10.0.v201605250459"/> 
      <unit id="org.eclipse.gmf.runtime.sdk.feature.group" version="1.10.0.201606071959"/> 
      <unit id="org.eclipse.gmf.runtime.notation.sdk.feature.group" version="1.10.0.201606071631"/> 
      <unit id="org.eclipse.uml2.sdk.feature.group" version="5.2.3.v20170227-0935"/> 
      <unit id="org.eclipse.emf.compare.ide.ui.feature.group" version="3.2.1.201608311750"/> 
      <repository location="http://download.eclipse.org/releases/neon"/> 
     </location> 
    </locations> 
</target> 

이 내 이클립스 설치 정보가 설치된 소프트웨어에 대한 출력한다 무엇을 주로 잡는다.

<?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"> 
    <modelVersion>4.0.0</modelVersion> 
    <parent> 
     <groupId>org.myplugin</groupId> 
     <artifactId>org.myplugin.releng</artifactId> 
     <version>1.0.0-SNAPSHOT</version> 
     <relativePath>../org.myplugin.releng/pom.xml</relativePath> 
    </parent> 
    <groupId>org.myplugin</groupId> 
    <artifactId>org.myplugin.target</artifactId> 
    <version>1.0.0-SNAPSHOT</version> 
    <packaging>eclipse-target-definition</packaging> 
</project> 

releng/pom.xml이 매우 크고, 모든 받는다는/티코 플러그인, 의존성 해결, 대상 플랫폼과 모듈 등 모든 플러그인 및 기능에 사용하는 대상 파일을 지정합니다

target/pom.xml은 다음과 같습니다. I에 유래 여기에 많은 비슷한 질문을 읽고 수정의 많은 노력했습니다

<?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"> 
    <modelVersion>4.0.0</modelVersion> 
    <parent> 
    <groupId>org.myplugin</groupId> 
    <artifactId>org.myplugin.releng</artifactId> 
    <version>1.0.0-SNAPSHOT</version> 
    <relativePath>../../org.myplugin.releng/pom.xml</relativePath> 
    </parent> 
    <groupId>org.myplugin</groupId> 
    <artifactId>org.myplugin.someservice</artifactId> 
    <version>1.0.0-SNAPSHOT</version> 
    <packaging>eclipse-plugin</packaging> 
</project> 

: 버전을 제거

  • 를 pom.xml 파일을 플러그인 하나 개의 실패에 대한

    은 다음과 같습니다 태그 target/pom.xml,

  • 상대 경로 제거,
  • eclipse-target-definition 대신 pom 사용
  • 및 일부

아무 것도 효과가 없습니다. 그래서 나는 무엇을 여기에서 놓치고 있냐?

편집 : 내가 인식하는 releng/pom.xml해야 설정 티코 플러그인과 받는다는 물건. mvn clean verfiy 명령을 실행하면 솔루션을 빌드해야합니다. 지정한 Neon.target 정의가 releng/pom.xml 인 경우 target/pom.xmltarget/Neon.target을 사용하여 Eclipse 환경 (org.eclipse.e4.core.diorg.eclipse.core 포함)과 더 정의 된 종속성을 얻습니다.

EDIT2 :eclipse-target-definition 플러그인은 다음과 같이 구성되어

<profile> 
    <id>Neon.target</id> 
    <activation> 
     <activeByDefault>false</activeByDefault> 
    </activation> 
    <properties> 
     <xtext-version>2.10.0</xtext-version> 
    </properties> 
    <build> 
     <plugins> 
      <plugin> 
       <groupId>org.eclipse.tycho</groupId> 
       <artifactId>target-platform-configuration</artifactId> 
       <version>${tycho-version}</version> 
       <configuration> 
        <includePackedArtifacts>true</includePackedArtifacts> 
        <target> 
         <artifact> 
          <groupId>org.myplugin</groupId> 
          <artifactId>org.myplugin.target</artifactId> 
          <version>1.0.0-SNAPSHOT</version> 
          <classifier>org.myplugin.target</classifier> 
         </artifact> 
        </target> 
       </configuration> 
      </plugin> 
     </plugins> 
    </build> 
</profile> 

EDIT3 :을 나는 티코 버전 1.0을 사용하고 있습니다.0

EDIT4target/pom.xml의 오타가 수정되었습니다.

+0

Eclipse * Target Editor *에서 Neon.target을 열 수 있습니까? Eclipse가 대상 플랫폼을 해결할 때까지 기다렸다가 org.eclipse.e4.core.di가 대상 플랫폼에 실제로 포함되는지 여부 * 내용 * 탭을 다시 확인하십시오. –

+0

OK, 네온 타겟은 실제로'org.eclipse.e4.core.di'를 포함하고 있습니다. 그러나 당신의 org.myplugin.someservice' 플러그인은'pom에 구성된 Maven 플러그인의 [target-platform-configuration] (https://wiki.eclipse.org/Tycho/Target_Platform#Target_files) 플러그인을 가지고 있습니까? xml' (또는 부모 중 하나)? –

+0

target-platform-configuration 플러그인의 구성을 EDIT2로 추가했습니다. 이 설정은 org.myplugin.releng의 부모 pom.xml에 있습니다. – justwellbrock

답변

0

<profile>을 활성화하려면 -P Neon.target으로 Maven을 실행해야합니다. 그렇지 않으면 target-platform-configuration이 빌드에 포함되지 않습니다.

개인적으로 항상<profile> 외부의 기본값이 target-platform-configuration입니다. 예를 들어 Eclipse의 현재 릴리스에 대한 타겟 정의 일 수 있습니다 (이 글의 작성 시점 : Oxygen). 나는`에 대해 예전의 이클립스 릴리스 (네온의 경우)와 같은 특이한 타겟 정의에만 사용합니다. 하지만 그것은 내 개인적인 모범 사례 일뿐입니다.

-1

사실 나는 내 문제를 해결했지만 기대했던 것과 같지 않았습니다. 내가 지금 어떻게 작동하는지 작동하지만, 여기에해야처럼되지 않습니다 가정

내가 this question에 대한 대답에 따라 org.myplugin.releng/pom.xml 부모 치어 다음과 같은 설정에 추가

: 그 전에했던

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

, D

이 사실 나는 여전히 대상에서 해당 정보를 얻을해야한다고 생각 :하지만 난 이미 실패의 원인이 내 분노에 해당 트랙의 손실있어 pom.xml 파일에 저장소 섹션 다른 곳에 있다고 놓쳤다 파일. 성공적인 빌드에서 대상 파일이 상위 폴더 다음에 평가되므로 대상 정의 파일을 처리하기 전에 모든 종속성이 필요하다는 상황이 발생합니다.

내 구성에는 여전히 잘못된 것이 있지만 적어도 지금은 빌드됩니다. 아무 래도 나에게 어떤 도움이 될지 모르지만 누군가가 어떤 생각을 가지고 있다면 :)

+0

맞습니다 : ''은 꼭 필요한 것은 아닙니다. 'eclipse-target-definition'은 모든 일을해야합니다. "부모 모자가 끝난 후에 대상 파일이 평가됩니다."하지만 ** building ** ** 모든 프로젝트 전에 Tycho는 모든 ** 프로젝트의 대상 플랫폼을 해결하려고 시도합니다. 그렇게하기 위해서, (아직 빌드되지 않은)'eclipse-target-definition' 프로젝트는 모두'.target' 파일의 명명 규칙을 엄격하게 준수해야합니다 (https://wiki.eclipse.org/Tycho/Packaging_Types # eclipse-target-definition). 그러면 Tycho가 프로젝트 디렉토리에서 대상 파일을 찾을 수 있습니다. –