Current situation: I am very new in developing on Eclipse Platform. I have old Eclipse RCP multi-module application (Java 6), I mavenized it (each module has its own pom.xml with dependencies) and I tried to integrate Maven Tycho (version 0.22.0) into it - main goal is to produce client distribution for windows platform (zip with exe file, eclipse plugins and features and some conf and init files).
I have problem (or I think that I have problem) with setup feature and target-platform.
Feature has its own module with these files: pom.xml
, feature.xml
, Client.product
, config.ini
and build.properties
.
Feature's pom.xml
:
<parent>
...
</parent>
<groupId>myproject</groupId>
<artifactId>feature</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>0.22.0</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
feature.xml
contains
version="1.0.0.qualifier
and for example constains also includes
and plugins
like that:
<includes
id="org.eclipse.rcp"
version="0.0.0"/>
<plugin
id="org.eclipse.equinox.preferences"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
Question is how can I setup target-platform module
with target-platform.target
file to locate properly my plugins as JAR files?
target-platform's pom.xml
:
<parent>
...
</parent>
<groupId>myproject</groupId>
<artifactId>target-platform</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-target-definition</packaging>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>0.22.0</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
target-platform.target
file:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.6"?>
<target name="target-platform" sequenceNumber="9">
<locations>
<location path="v3_7_2/eclipse-platform" type="Directory"/>
</locations>
<environment>
<os>win32</os>
<ws>win32</ws>
<nl>cs_CZ</nl>
</environment>
<targetJRE
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<launcherArgs>
<vmArgs>-Xmx1024m</vmArgs>
<programArgs>-consoleLog</programArgs>
</launcherArgs>
</target>
Pom files I created, other files were part of eclipse RCP project. When I call maven install
a got this error:
...
[DEBUG] Using default execution environment 'JavaSE-1.6'
[DEBUG] Registered artifact repository org.eclipse.tycho.repository.registry.facade.RepositoryBlackboardKey(uri=file:/resolution-context-artifacts@/tigra/cz.tigra.spl.client.feature)
[DEBUG] Added 0 locally built units to the target platform
[INFO] Resolving dependencies of MavenProject: cz.tigra.spl:cz.tigra.spl.client.feature:1.0.0-SNAPSHOT @ /tigra/cz.tigra.spl.client.feature/pom.xml
[DEBUG] No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from cz.tigra.spl.client.feature.feature.group 1.0.0.qualifier to org.eclipse.rcp.feature.group 0.0.0.; Unable to satisfy dependency from cz.tigra.spl.client.feature.feature.group 1.0.0.qualifier to org.eclipse.equinox.preferences 0.0.0.;
etc....
...
[ERROR] Cannot resolve project dependencies:
[ERROR] Software being installed: cz.tigra.spl.client.feature.feature.group 1.0.0.qualifier
[ERROR] Missing requirement: cz.tigra.spl.client.feature.feature.group 1.0.0.qualifier requires 'org.eclipse.rcp.feature.group 0.0.0' but it could not be found
I also read this article, which helps me to setup maven tycho - https://www.vogella.com/tutorials/EclipseTycho/article.html