Discussion:
[tycho-user] "eclipse-feature" Maven dependency to target-platform-configuration
Julien DEHAUDT
2018-02-08 12:39:08 UTC
Permalink
Hi,



First of all thanks for the 1.1.0 release, I used the snapshot version for a while, since it integrates the zip comparator for baselines.



Today I am stuck with the way to integrate a dependency into the target platform.

Some components I must integrate into my Eclipse RCP are published on a Maven repository.

For sure just a basic use-case, but no way to get it working.



Hereafter what I tried:



1) Declare the 3-PP Maven repository (root parent pom.xml)

<distributionManagement>

<repository>

<id>central</id>

<name>releases</name>

<url>https://somewhere.in.the.company</url>

</repository>

</distributionManagement>


2) Define the dependencies; the feature and its plugin built which Tycho/pomless too (root parent pom.xml):
<dependencies>
<dependency>
<type>eclipse-feature</type>
<groupId>some.component.tycho</groupId>
<artifactId>some.component.feature</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<type>eclipse-plugin</type>
<groupId>some.component.tycho</groupId>
<artifactId>some.component.plugin</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
</dependencies>

3) Configure the target platform (root parent pom.xml):
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho.version}</version>
<configuration>
...
<pomDependencies>consider</pomDependencies>
<dependency-resolution>
<extraRequirements>
<requirement>
<type>eclipse-plugin</type>
<id>some.component.plugin</id>
<versionRange>0.0.0</versionRange>
</requirement>
</extraRequirements>
<extraRequirements>
<requirement>
<type>eclipse-feature</type>
<id>some.component.feature</id>
<versionRange>0.0.0</versionRange>
</requirement>
</extraRequirements>
</dependency-resolution>
</configuration>
</plugin>


But "mvn -X clean verify -Dtycho.debug.resolver=true" fails with the following error:
[DEBUG] No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from tycho-extra-1518083760116 0.0.0.1518083760116 to some.component.feature.feature.group 0.0.0.; Unable to satisfy dependency from tycho-1518083760157 0.0.0.1518083760157 to some.component.feature.feature.group 0.0.0.; No solution found because the problem is unsatisfiable.]
[INFO] {osgi.os=linux, osgi.ws=gtk, org.eclipse.update.install.features=true, osgi.arch=x86_64}
[ERROR] Cannot resolve project dependencies:
[ERROR] You requested to install 'some.component.feature.feature.group 0.0.0' but it could not be found


Analyzing the whole log and my .m2/repository highlight that both Maven dependencies are well downloaded from the repository.
Anyway only the plugin looks managed by target-platform-configuration plugin, and something get wrong with the feature.
[DEBUG] P2resolver.addMavenArtifact some.component.tycho:some.component.feature:eclipse-feature:1.0.0-SNAPSHOT:compile

!ENTRY org.eclipse.equinox.p2.publisher.eclipse 4 0 2018-02-08 10:55:39.612
!MESSAGE Unable to acquire PluginConverter service during generation for: /home/me/.m2/repository/some/component/tycho/some.component.feature/1.0.0-SNAPSHOT/some.component.feature-1.0.0-SNAPSHOT.jar.

[DEBUG] P2resolver.addMavenArtifact some.component.tycho:some.component.plugin:eclipse-plugin:1.0.0-SNAPSHOT:compile
[DEBUG] P2Resolver: artifact some.component.tycho:some.component.plugin:1.0.0-SNAPSHOT at location /home/me/.m2/repository/some/component/tycho/some.component.plugin/1.0.0-SNAPSHOT/some.component.plugin-1.0.0-SNAPSHOT.jar resolves installable unit some.component.plugin/1.0.0.201802051352
...
[DEBUG] Available IUs:
all.org.eclipse.xxx
all.my.rcp.features.and.plugins
some.component.plugin
...
[DEBUG] Extra Requirements:
some.component.feature.feature.group 0.0.0
...
[DEBUG] Slice:
Neither plugin and feature


Does someone have any suggestion helping to progress ?
I'm completely stuck with this "feature not found" issue.

Thanks.
Julien
Julien DEHAUDT
2018-02-08 14:41:13 UTC
Permalink
Oups, just to correct my previous mail.



Of course in 1) <distributionManagement> is used for deployment.

I copied the wrong pom.xml section, it should be:



<repositories>

<repository>

<id>third-party-components</id>

<name>Third Party Components</name>

<url>https://somewhere.in.the.company</url>

</repository>

</repositories>



Thanks,

Julien

From: Julien DEHAUDT
Sent: jeudi 8 février 2018 13:39
To: tycho-***@eclipse.org
Subject: "eclipse-feature" Maven dependency to target-platform-configuration


Hi,



First of all thanks for the 1.1.0 release, I used the snapshot version for a while, since it integrates the zip comparator for baselines.



Today I am stuck with the way to integrate a dependency into the target platform.

Some components I must integrate into my Eclipse RCP are published on a Maven repository.

For sure just a basic use-case, but no way to get it working.



Hereafter what I tried:



1) Declare the 3-PP Maven repository (root parent pom.xml)

<distributionManagement>

<repository>

<id>central</id>

<name>releases</name>

<url>https://somewhere.in.the.company</url<https://somewhere.in.the.company%3c/url>>

</repository>

</distributionManagement>


2) Define the dependencies; the feature and its plugin built which Tycho/pomless too (root parent pom.xml):
<dependencies>
<dependency>
<type>eclipse-feature</type>
<groupId>some.component.tycho</groupId>
<artifactId>some.component.feature</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<type>eclipse-plugin</type>
<groupId>some.component.tycho</groupId>
<artifactId>some.component.plugin</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
</dependencies>

3) Configure the target platform (root parent pom.xml):
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho.version}</version>
<configuration>
...
<pomDependencies>consider</pomDependencies>
<dependency-resolution>
<extraRequirements>
<requirement>
<type>eclipse-plugin</type>
<id>some.component.plugin</id>
<versionRange>0.0.0</versionRange>
</requirement>
</extraRequirements>
<extraRequirements>
<requirement>
<type>eclipse-feature</type>
<id>some.component.feature</id>
<versionRange>0.0.0</versionRange>
</requirement>
</extraRequirements>
</dependency-resolution>
</configuration>
</plugin>


But "mvn -X clean verify -Dtycho.debug.resolver=true" fails with the following error:
[DEBUG] No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from tycho-extra-1518083760116 0.0.0.1518083760116 to some.component.feature.feature.group 0.0.0.; Unable to satisfy dependency from tycho-1518083760157 0.0.0.1518083760157 to some.component.feature.feature.group 0.0.0.; No solution found because the problem is unsatisfiable.]
[INFO] {osgi.os=linux, osgi.ws=gtk, org.eclipse.update.install.features=true, osgi.arch=x86_64}
[ERROR] Cannot resolve project dependencies:
[ERROR] You requested to install 'some.component.feature.feature.group 0.0.0' but it could not be found


Analyzing the whole log and my .m2/repository highlight that both Maven dependencies are well downloaded from the repository.
Anyway only the plugin looks managed by target-platform-configuration plugin, and something get wrong with the feature.
[DEBUG] P2resolver.addMavenArtifact some.component.tycho:some.component.feature:eclipse-feature:1.0.0-SNAPSHOT:compile

!ENTRY org.eclipse.equinox.p2.publisher.eclipse 4 0 2018-02-08 10:55:39.612
!MESSAGE Unable to acquire PluginConverter service during generation for: /home/me/.m2/repository/some/component/tycho/some.component.feature/1.0.0-SNAPSHOT/some.component.feature-1.0.0-SNAPSHOT.jar.

[DEBUG] P2resolver.addMavenArtifact some.component.tycho:some.component.plugin:eclipse-plugin:1.0.0-SNAPSHOT:compile
[DEBUG] P2Resolver: artifact some.component.tycho:some.component.plugin:1.0.0-SNAPSHOT at location /home/me/.m2/repository/some/component/tycho/some.component.plugin/1.0.0-SNAPSHOT/some.component.plugin-1.0.0-SNAPSHOT.jar resolves installable unit some.component.plugin/1.0.0.201802051352
...
[DEBUG] Available IUs:
all.org.eclipse.xxx
all.my.rcp.features.and.plugins
some.component.plugin
...
[DEBUG] Extra Requirements:
some.component.feature.feature.group 0.0.0
...
[DEBUG] Slice:
Neither plugin and feature


Does someone have any suggestion helping to progress ?
I'm completely stuck with this "feature not found" issue.

Thanks.
Julien

Loading...