Es gibt ein Eclipse RCP/IDE-Plug-in Projekt, das von mehreren Eclipse Modulen wie org.eclipse.e4.core.di
oder org.eclipse.core.runtime
abhängt.eclipse RCP maven/tycho fehlende Anforderung 'bundle org.eclipse.e4.core.di'
Dieses Projekt wird in einer Eclipse-IDE für COMMITTERS-Umgebung mit einer .target
-Datei für die Abhängigkeitseinrichtung kompiliert.
Ich möchte ein kopflos Maven hinzufügen/tycho für dieses Projekt bauen zu Fehlern wie folgt:
[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
Das Projekt Setup sieht wie folgt aus:
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)
ich das Tutorial verwendet haben von Lars Vogel (http://www.vogella.com/tutorials/EclipseTycho/article.html#exercise-using-a-target-platform-for-the-build) zur Grundeinstellung und zum Verständnis.
Der Inhalt der Zieldatei sind:
<?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>
Das fängt meist, was meine Eclipse-Installation Informationen über die installierte Software druckt.
Die target/pom.xml
sieht wie folgt aus:
<?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>
Die releng/pom.xml
ist ziemlich groß und gibt alle Maven/tycho Plugins, die Zieldatei für die Auflösung von Abhängigkeiten, Zielplattformen und allen Plugins und Funktionen als Module zu verwenden.
Für ein Versagen Plugin die pom.xml Datei sieht wie folgt aus:
- Entfernen der Version:
<?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>
ich viele ähnliche Frage hier auf Stackoverflow und versucht, viele der Updates gelesen haben Tag-Ziel/pom.xml,
- den relativen Pfad zu entfernen,
- Verwendung POM anstelle von eclipse-target-Definition
- und einige mehr
Nichts hat funktioniert. Also was fehlt mir hier?
EDIT: Wie ich verstanden die releng/pom.xml
sollte Setup tycho Plugins und Maven Sachen. Die Ausführung des Befehls mvn clean verfiy
sollte dann die Lösung erstellen, während die angegebene Neon.target -Definition in die target/pom.xml
und target/Neon.target
übernimmt, um die Eclipse-Umgebung (einschließlich org.eclipse.e4.core.di
und org.eclipse.core
Zeug) sowie alle weiteren definierten Abhängigkeiten zu erhalten.
EDIT2: Mein eclipse-target-definition
Plugin wird wie folgt konfiguriert:
<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: Ich verwende Tycho Version 1.0.0
EDIT4 Ein Tippfehler in target/pom.xml
wurde behoben.
Können Sie Ihr 'Neon.target' im Eclipse * Target Editor * öffnen. Warten Sie, bis Eclipse die Zielplattform aufgelöst hat und überprüfen Sie dann auf der Registerkarte * Contents *, ob 'org.eclipse.e4.core.di' tatsächlich in Ihrer Zielplattform enthalten ist. –
OK, dein 'Neon.target' ist wirklich ** enthält' org.eclipse.e4.core.di' (habe mich einfach selbst überprüft). Aber hat Ihr 'org.myplugin.someservice'-Plug-In das [target-platform-configuration] (https://wiki.eclipse.org/Tycho/Target_Platform#Target_files) Maven-Plug-in, das in seiner' pom-Konfiguration konfiguriert ist. xml' (oder eines seiner Eltern)? –
Ich habe die Konfiguration des Zielplattform-Konfigurations-Plugins als EDIT2 angehängt. Diese Konfiguration befindet sich in der übergeordneten Datei pom.xml von org.myplugin.releng. – justwellbrock