Maven + Tycho:未解决的依赖关系

时间:2015-08-18 07:21:40

标签: java eclipse maven plugins tycho

我最近正在开展一个项目,目标是为palladio构建一个eclipse插件。我的项目是由几个单独的部分构建的,我设法消除所有错误,但最后一个包仍然不想通过。

我正在使用maven(“干净”工作完美,当我尝试maven安装时出现错误)与tycho和Palladio的某些部分。 我试图通过控制台和eclipse调用mvn clean - 错误保持不变。

我怀疑插件最后一部分的pom.xml中存在缺失/错误,因为所有其他部分都可以工作,而且maven可以清理/安装它们而不会出现错误消息。

过去一周我一直在研究这个问题,但似乎无法解决这个问题。任何帮助表示赞赏。

以下是pom :(我更改了用户名+项目名称,所以不要介意)

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
    <groupId>org.myproject</groupId>
    <artifactId>org.myproject.build</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <relativePath>../org.myproject.build/pom.xml</relativePath>
</parent>

<artifactId>org.myproject.repository</artifactId>
<packaging>eclipse-repository</packaging>


<build>
    <plugins>
        <plugin>
            <groupId>org.eclipse.tycho.extras</groupId>
            <artifactId>tycho-p2-extras-plugin</artifactId>
            <version>${tycho-version}</version>
            <executions>
                <execution>
                    <phase>prepare-package</phase>
                    <goals>
                        <goal>mirror</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <source>
                    <repository>
                        <url>https://sdqweb.ipd.kit.edu/eclipse/palladio/core/pcm/releases/3.4.1/</url>
                        <layout>p2</layout>
                    </repository>
                </source>
                <ius>
                    <iu>
                        <id>de.uka.ipd.sdq.simucom.feature.feature.group</id>

                    </iu>
                </ius>
                <destination>${project.build.directory}/repository</destination>
                <followStrictOnly>true</followStrictOnly>
                <includeOptional>false</includeOptional>
                <includeNonGreedy>false</includeNonGreedy>
                <latestVersionOnly>false</latestVersionOnly>
                <mirrorMetadataOnly>false</mirrorMetadataOnly>
                <compress>true</compress>
                <append>true</append>
            </configuration>
        </plugin>
    </plugins>
</build>

这是我得到的错误:

[INFO] Building org.myprojectrepository 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- tycho-packaging-plugin:0.21.0:build-qualifier-aggregator (default-build-qualifier-aggregator) @ org.myproject.repository ---
[INFO] The project's OSGi version is 1.0.0.201508180656
[INFO] 
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean-1) @ org.myproject.repository ---
[INFO] 
[INFO] --- tycho-p2-extras-plugin:0.21.0:mirror (default) @ org.myproject.repository ---
[INFO] Mirroring to /home/user/lib/eclipse EE/eclipse-ee-workspace/org.myproject.repository/target/repository...
–- Mirroring –--

 (Descriptor: canonical: osgi.bundle,de.uka.ipd.sdq.simucomframework.variables,1.0.0.201309282203)
[INFO] 
[INFO] --- target-platform-configuration:0.21.0:target-platform (default-target-platform) @ org.myproject.repository ---
[INFO] 
[INFO] --- tycho-p2-publisher-plugin:0.21.0:publish-products (default-publish-products) @ org.myproject.repository ---
[INFO] Cannot complete the request.  Generating details.
[INFO] Cannot complete the request.  Generating details.
[INFO] {osgi.ws=gtk, osgi.os=linux, osgi.arch=x86_64, org.eclipse.update.install.features=true}
[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: org.X.repository raw:1.0.0.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):1.0.0-SNAPSHOT
[ERROR]   Missing requirement: org.myproject.featurepatch.feature.group 1.0.0.201508180656 requires 'de.uka.ipd.sdq.simucom.feature.feature.group 0.0.0' but it could not be found
[ERROR]   Cannot satisfy dependency: org.myproject.repository raw:1.0.0.'SNAPSHOT'/format(n[.n=0;[.n=0;[-S]]]):1.0.0-SNAPSHOT depends on: org.myproject.featurepatch.feature.group 0.0.0
[ERROR] 
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] ....
[INFO] ....
[INFO] ....
[INFO] [six other project parts]  ................. SUCCESS [0.218s]
[INFO] org.myproject.repository ................... FAILURE [7.073s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:34.649s
[INFO] Finished at: Tue Aug 18 08:56:40 CEST 2015
[INFO] Final Memory: 170M/2870M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-p2-publisher-plugin:0.21.0:publish-products (default-publish-products) on project org.myproject.repository: Execution default-publish-products of goal org.eclipse.tycho:tycho-p2-publisher-plugin:0.21.0:publish-products failed: No solution found because the problem is unsatisfiable.: [Unable to satisfy dependency from org.eclipse.jdt.core 3.8.1.v_OTDT_r210_201206090452 to org.eclipse.objectteams.otdt.core.patch.feature.group [2.0.0,3.0.0).; Unable to satisfy dependency from org.eclipse.jdt.core 3.8.2.v_OTDT_r211_201209011847 to org.eclipse.objectteams.otdt.core.patch.feature.group [2.0.0,3.0.0).; Unable to satisfy dependency from org.eclipse.jdt.core 3.8.3.v_OTDT_r212_201301271217 to org.eclipse.objectteams.otdt.core.patch.feature.group [2.0.0,3.0.0).; Unable to satisfy dependency from org.myproject.featurepatch.feature.group 1.0.0.201508180656 to de.uka.ipd.sdq.simucom.feature.feature.group 0.0.0.; No solution found because the problem is unsatisfiable.] -> [Help 1]
[ERROR] 

myproject.featurepatch的feature.xml

<?xml version="1.0" encoding="UTF-8"?>
<feature
      id="org.myproject.featurepatch"
      label="SDC Patch for SimuCom CBSE Simulation"
      version="1.0.0.qualifier"
      provider-name="myproject.org">

   <description url="http://myproject.org">
      Patches the SimuCom CBSE Simulation feature.
Adds configuration options required for the SDS plugin.
   </description>

   <license url="https://www.eclipse.org/legal/epl-v10.html">
      Eclipse Public License - v 1.0

   </license>

   <requires>
      <import feature="de.uka.ipd.sdq.simucom.feature" version="3.4.1.201309282203" patch="true"/>
   </requires>

   <plugin
         id="de.uka.ipd.sdq.codegen.simucontroller"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

   <plugin
         id="de.uka.ipd.sdq.simulation"
         download-size="0"
         install-size="0"
         version="0.0.0"
         unpack="false"/>

</feature>

simucom的特色xml:

    <feature id="de.uka.ipd.sdq.simucom.feature" label="SimuCom CBSE Simulation" version="3.4.1.201309282203" provider-name="sdq.ipd.kit.edu" plugin="de.uka.ipd.sdq.branding"><description url="http://sdq.ipd.kit.edu">
          Simulation framework for PCM instances. Uses Model-2-Text transformation
    to generate a plugin which is executed directly using OSGi dynamic
    loader.
       </description><copyright>
          This plugin is protected by copyright held by the members of
    the Palladio Research Group, University of Karlsruhe.
       </copyright><license url="http://www.eclipse.org/legal/epl-v10.html">
    </license><url><update label="Palladio Update Site" url="http://sdqweb.ipd.uka.de/eclipse/PCM/"/></url><requires><import plugin="de.uka.ipd.sdq.identifier"/><import plugin="de.uka.ipd.sdq.probfunction"/><import plugin="de.uka.ipd.sdq.stoex"/><import plugin="de.uka.ipd.sdq.pcm" version="3.1.0" match="greaterOrEqual"/><import plugin="de.uka.ipd.sdq.completions" version="1.0.0" match="greaterOrEqual"/><import plugin="de.uka.ipd.sdq.featureconfig" version="1.0.0" match="greaterOrEqual"/><import plugin="de.uka.ipd.sdq.featuremodel"/><import plugin="de.uka.ipd.sdq.pcm.resources"/><import plugin="de.uka.ipd.sdq.pcm.stochasticexpressions"/><import plugin="org.eclipse.ocl"/><import plugin="org.eclipse.ocl.ecore" version="1.2.1" match="greaterOrEqual"/><import plugin="org.eclipse.xtend.typesystem.emf"/><import plugin="org.eclipse.xpand"/><import plugin="org.eclipse.xtend"/><import plugin="org.eclipse.uml2.uml.ecore.importer"/><import plugin="de.uka.ipd.sdq.scheduler" version="1.0.0" match="greaterOrEqual"/><import plugin="de.fzi.se.quality" version="1.0.0" match="greaterOrEqual"/><import plugin="org.eclipse.xtend.util.stdlib" version="1.0.1" match="greaterOrEqual"/><import plugin="de.uka.ipd.sdq.sensorframework"/><import plugin="org.apache.log4j" version="1.2.13" match="greaterOrEqual"/><import plugin="org.eclipse.core.runtime"/><import plugin="org.eclipse.emf.ecore.change"/><import plugin="de.uka.ipd.sdq.statistics" version="1.0.0" match="greaterOrEqual"/><import plugin="de.uka.ipd.sdq.probfunction.math" version="2.0.0" match="greaterOrEqual"/><import plugin="de.uka.ipd.sdq.workflow.pcm" version="1.0.0" match="greaterOrEqual"/><import plugin="de.uka.ipd.sdq.probespec.framework" version="1.0.0" match="greaterOrEqual"/><import plugin="de.uka.ipd.sdq.pipesandfilters" version="1.0.0" match="greaterOrEqual"/><import plugin="de.uka.ipd.sdq.pipesandfilters.framework" version="1.0.0" match="greaterOrEqual"/><import plugin="org.jscience" version="4.1.3" match="greaterOrEqual"/><import plugin="de.uka.ipd.sdq.pipesandfilters.framework.recorder.sensorframework" version="1.0.0" match="greaterOrEqual"/><import plugin="de.uka.ipd.sdq.simulation.abstractsimengine" version="1.0.0" match="greaterOrEqual"/><import plugin="de.uka.ipd.sdq.errorhandling" version="1.0.0" match="greaterOrEqual"/><import plugin="de.fzi.se.accuracy" version="1.0.0" match="greaterOrEqual"/><import plugin="de.uka.ipd.sdq.reliability.core" version="3.1.0" match="greaterOrEqual"/><import plugin="de.uka.ipd.sdq.featuremodel" version="2.0.0" match="greaterOrEqual"/><import plugin="de.uka.ipd.sdq.simulation" version="1.0.0" match="greaterOrEqual"/><import plugin="de.uka.ipd.sdq.stoex.analyser"/><import plugin="org.eclipse.debug.ui"/><import plugin="org.eclipse.jdt.core"/>
<import plugin="org.eclipse.jdt.launching"/>
<import plugin="org.eclipse.pde.ui"/><import plugin="org.eclipse.emf.common.ui"/>
<import plugin="de.uka.ipd.sdq.workflow.launchconfig" version="1.1.0" match="greaterOrEqual"/>
<import plugin="de.uka.ipd.sdq.sensorframework.dialogs"/>
<import plugin="de.uka.ipd.sdq.pcm.dialogs"/>
<import plugin="org.eclipse.osgi.services"/>
<import plugin="ch.ethz.iks.r_osgi.remote" version="1.0.0" match="greaterOrEqual"/>
<import plugin="org.junit4" version="4.3.1" match="greaterOrEqual"/>
<import plugin="org.eclipse.emf.query.ocl" version="1.2.0" match="greaterOrEqual"/>
<import plugin="de.uka.ipd.sdq.workflow.mdsd" version="1.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.emf.mwe.core" version="0.7.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.xpand" version="0.7.0" match="greaterOrEqual"/><import plugin="org.eclipse.xtend" version="0.7.0" match="greaterOrEqual"/><import plugin="de.uka.ipd.sdq.dialogs" version="2.0.1" match="greaterOrEqual"/>
<import plugin="org.eclipse.ui.ide" version="3.5.0" match="greaterOrEqual"/><import plugin="de.uka.ipd.sdq.featureinstance.editor" version="1.0.0" match="greaterOrEqual"/>
<import plugin="de.uka.ipd.sdq.pcm.edit"/>
<import plugin="org.eclipse.emf.edit.ui" version="2.5.0" match="greaterOrEqual"/>
<import plugin="de.uka.ipd.sdq.pcmbench.ui" version="2.0.0" match="greaterOrEqual"/>
<import plugin="org.apache.commons.lang" version="2.3.0" match="greaterOrEqual"/>
<import plugin="de.uka.ipd.sdq.sensorframework.storage"/>
<import plugin="org.eclipse.core.runtime" version="3.5.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.emf.ecore"/><import plugin="org.eclipse.equinox.event" version="1.1.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.osgi"/>
<import plugin="org.eclipse.emf.ecore.xmi"/>
<import plugin="org.eclipse.emf.query"/>
<import plugin="de.uka.ipd.sdq.units"/>
<import plugin="org.eclipse.emf.edit"/>
<import plugin="de.uka.ipd.sdq.identifier.edit"/>
<import plugin="de.uka.ipd.sdq.probfunction.edit"/>
<import plugin="de.uka.ipd.sdq.stoex.edit"/>
<import plugin="de.uka.ipd.sdq.units.edit"/>
<import plugin="org.eclipse.uml2.common.edit"/>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.ui"/><import plugin="de.uka.ipd.sdq.simucomframework.simucomstatus" version="1.0.0" match="greaterOrEqual"/>
<import feature="de.uka.ipd.sdq.simulation.abstractsimengine.feature" version="3.3.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.core.runtime" version="3.7.0" match="compatible"/></requires><plugin id="de.uka.ipd.sdq.pcm.codegen.m2m" download-size="0" install-size="0" version="3.1.0.201309282203"/>
<plugin id="de.uka.ipd.sdq.simucomframework" download-size="0" install-size="0" version="1.0.0.201309282203" unpack="false"/>
<plugin id="de.uka.ipd.sdq.simucomframework.variables" download-size="0" install-size="0" version="1.0.0.201309282203" unpack="false"/>
<plugin id="de.uka.ipd.sdq.codegen.simucontroller" download-size="0" install-size="0" version="1.0.0.201309282203" unpack="false"/>
<plugin id="de.uka.ipd.sdq.scheduler" download-size="0" install-size="0" version="1.0.0.201309282203" unpack="false"/>
<plugin id="de.uka.ipd.sdq.branding" download-size="0" install-size="0" version="1.0.0.201309282203" unpack="false"/>
<plugin id="ch.ethz.iks.r_osgi.remote" download-size="0" install-size="0" version="1.0.0.201309282203" unpack="false"/>
<plugin id="de.uka.ipd.sdq.simucomframework.simulationdock" download-size="0" install-size="0" version="1.0.0.201309282203" unpack="false"/>
<plugin id="de.uka.ipd.sdq.simucomframework.simucomstatus" download-size="0" install-size="0" version="1.0.0.201309282203" unpack="false"/>
<plugin id="de.uka.ipd.sdq.reliability.core" download-size="0" install-size="0" version="3.1.0.201309282203" unpack="false"/>
<plugin id="de.fzi.se.quality" download-size="0" install-size="0" version="1.0.0.201309282203" unpack="false"/>
<plugin id="de.fzi.se.quality.edit" download-size="0" install-size="0" version="1.0.0.201309282203" unpack="false"/>
<plugin id="de.fzi.se.quality.editor" download-size="0" install-size="0" version="1.0.0.201309282203" unpack="false"/>
<plugin id="de.fzi.se.accuracy" download-size="0" install-size="0" version="1.0.0.201309282203" unpack="false"/>
<plugin id="de.uka.ipd.sdq.statistics" download-size="0" install-size="0" version="1.0.0.201309191158" unpack="false"/>
<plugin id="de.uka.ipd.sdq.simulation" download-size="0" install-size="0" version="1.0.0.201309282203" unpack="false"/>
</feature>

1 个答案:

答案 0 :(得分:0)

org.myproject.featurepatch.feature.group似乎需要de.uka.ipd.sdq.simucom.feature.feature.group,它可能在前者的manifest.mf中找到(Require-Bundle) 。我想这个要求的版本信息是不正确的,因为日志说它需要版本0.0.0。