Search code examples
eclipseeclipse-plugineclipse-cdttycho

Maven Tycho cannot satisfy plugin dependency


I have an eclipse product which I am configuring from a target definition.
I define the CDT version 9.4.3 to be used.

<location...>
<unit id="org.eclipse.cdt.feature.group" version="9.4.3.201802261533"/>
<unit id="org.eclipse.cdt.gdb.feature.group" version="9.4.3.201802261533"/>
<unit id="org.eclipse.cdt.gdb.source.feature.group" version="9.4.3.201802261533"/>
<unit id="org.eclipse.cdt.gnu.build.feature.group" version="9.4.3.201802261533"/>
<unit id="org.eclipse.cdt.gnu.build.source.feature.group" version="9.4.3.201802261533"/>
<unit id="org.eclipse.cdt.gnu.debug.feature.group" version="9.4.3.201802261533"/>
<unit id="org.eclipse.cdt.gnu.debug.source.feature.group" version="9.4.3.201802261533"/>
<unit id="org.eclipse.cdt.gnu.dsf.feature.group" version="9.4.3.201802261533"/>
<unit id="org.eclipse.cdt.gnu.dsf.source.feature.group" version="9.4.3.201802261533"/>
<unit id="org.eclipse.cdt.native.feature.group" version="9.4.3.201802261533"/>
<unit id="org.eclipse.cdt.native.source.feature.group" version="9.4.3.201802261533"/>
<unit id="org.eclipse.cdt.platform.feature.group" version="9.4.3.201802261533"/>
<unit id="org.eclipse.cdt.platform.source.feature.group" version="9.4.3.201802261533"/>
<unit id="org.eclipse.cdt.sdk.feature.group" version="9.4.3.201802261533"/>
<repository location="http://download.eclipse.org/releases/oxygen/"/>
</location>

In eclipse the target loads succesfully, but when I try to build the product with maven tycho ( running mvn clean install), it complains a bout a missing plugin dependency com.google.gson:

[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: PLUGIN.id 4.5.5.5
[ERROR]   Missing requirement: org.eclipse.cdt.core 6.4.0.201802261533 requires
'bundle com.google.gson 0.0.0' but it could not be found
[ERROR]   Cannot satisfy dependency: PLUGIN.id 4.5.5.5 depends on: com.domain.plugin.feature.feature.group [1.0.0,1.0.1)
[ERROR]   Cannot satisfy dependency: com.domain.plugin.feature.feature.group
 1.0.0.qualifier depends on: org.eclipse.cdt.core 0.0.0
[ERROR]
[ERROR] See http://wiki.eclipse.org/Tycho/Dependency_Resolution_Troubleshooting
for help.
[ERROR] Cannot resolve dependencies of MavenProject: com.domain.plugin:com.domain.plugin:1.0.0-SNAPSHOT @ D:\Dev\Sources\src\plugin\plugins\com.domain.plugin\pom.xml: See log for details -> [Help 1]

How can I provide this dependency and why it's not collected directly from the eclipse oxygen p2 repo?


Solution

  • I think com.google.gson is not part of the eclipse oxygen standard repo since it's a 3rd party lib. Eclipse orbit repo maintains these libraries.

    <location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="false" type="InstallableUnit">
      <unit id="com.google.gson" version="0.0.0"/>
    
       <repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20170919201930/repository"/>
    </location>
    

    Hope that helps!