使用我的本地p2存储库与必要的jar文件时项目依赖错误 [英] Project dependency error when using my local p2 repository with necessary jar files

查看:798
本文介绍了使用我的本地p2存储库与必要的jar文件时项目依赖错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个eclipse插件,我需要将eclipse插件项目转换为maven,以便在Tycho.when的帮助下将其转换为maven,当我尝试执行eclipse应用程序时,它可以正常工作。但是当我

  [INFO]扫描项目... 
[INFO]无法完成请求。生成细节。
[INFO]无法完成请求。生成细节。
[INFO] {osgi.ws = gtk,osgi.os = linux,osgi.arch = x86,org.eclipse.update.install.features = true}
[ERROR]无法解析项目依赖关系:
[ERROR]正在安装的软件:xxx 1.0.0.qualifier
[ERROR]缺少需求:xxx 1.0.0.qualifier需要'bundle
org.eclipse.ui 0.0.0'没有找到
[ERROR]
[ERROR]内部错误:java.lang.RuntimeException:找不到解决方案,因为问题是
不能令人满意:[无法满足xxx 1.0的依赖关系.0.qualifier到
bundle org.eclipse.ui 0.0.0 .;无法满足从xxx
1.0.0.qualifier到bundle的依赖关系org.eclipse.core.runtime 0.0.0;无法满足从
xxx 1.0.0.qualifier到bundle org.eclipse.jdt.core 3.9.2的依赖关系。无法从xxx 1.0.0.qualifier到bundle org.eclipse.core.resources
3.8.101中的
依赖关系。无法满足xxx 1.0.0.qualifier到bundle的依赖关系
org.eclipse.jdt.ui 3.9.2。无法满足从xxx
1.0.0.qualifier到bundle org.eclipse.ui.console 3.5.200的依赖关系。无法满足从
xxx 1.0.0.qualifier到bundle org.eclipse.ui.editors 3.8.100的依赖关系。无法
满足从xxx 1.0.0.qualifier到bundle
com.test.dependency.bundles 1.0.0的依赖关系。无法满足从xxx
1.0.0.qualifier到包org.eclipse.jface.text 0.0.0的依赖关系。无法从test-
automation-plugin 1.0.0.qualifier到包org.eclipse.jface.text.presentation 0.0.0; unable
以满足从txxx 1.0.0.qualifier到包org.eclipse.jface.text.rules 0.0.0的依赖关系。
无法满足从xxx 1.0.0.qualifier到package org.eclipse.jface.text.source
0.0.0的依赖关系。找不到解决方案,因为问题不能令人满意。] - > [帮助1]
在org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
在org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
在org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
在org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
在太阳.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang .reflect.Method.invoke(Unknown Source)
在org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
在org.codehaus.plexus.classworlds.launcher。 Launcher.launch(Launcher.java:230)
在org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
在org.codehaus.plexus.classworlds.launcher。 Launcher.main(Launcher.java:352)
导致:java.lang.RuntimeException:找不到解决方案,因为问题不能令人满意:
[Unable满足从xxx 1.0.0.qualifier到bundle org.eclipse.ui 0.0.0的依赖关系。无法
满足从xxx 1.0.0.qualifier到bundle的依赖关系org.eclipse.core.runtime 0.0.0;无法
满足从xxx 1.0.0.qualifier到bundle的依赖关系org.eclipse.jdt.core 3.9.2。无法
满足从xxx 1.0.0.qualifier到bundle的依赖关系org.eclipse.core.resources 3.8.101;

我的pom.xml文件:

 <?xml version =1.0encoding =UTF-8?> 
< project>
< modelVersion> 4.0.0< / modelVersion>
< groupId> xxx< / groupId>
< artifactId>父< / artifactId>
< version> 1.0.0-SNAPSHOT< / version>
< packaging> pom< / packaging>
< modules>
< module> ../ xxx< / module>
< / modules>

< properties>
< tycho.version> 0.19.0< /tycho.version>
< tycho-extras.version> 0.19.0< /tycho-extras.version>
< kepler-repo.url> http://download.eclipse.org/releases/kepler< /kepler-repo.url>
< / properties>

< repository>
< id> third-party-eclipse-plugins< / id>
< layout> p2< / layout>
< url> $ {project.baseUri} dependency / p2-repo< / url>
< / repository>
< pluginRepositories>
< pluginRepository>
< id> tycho< / id>
< url> $ {tycho-r​​epo.url}< / url>
< releases>
< enabled> false< / enabled>
< / releases>
< snapshots>
< enabled> true< / enabled>
< / snapshots>
< / pluginRepository>
< / pluginRepositories>



< build>
< plugins>
< plugin>
< groupId> org.eclipse.tycho< / groupId>
< artifactId> tycho-maven-plugin< / artifactId>
< version> $ {tycho.version}< / version>
< extensions> true< / extensions>
< / plugin>

< plugin>
< groupId> org.eclipse.tycho< / groupId>
< artifactId> target-platform-configuration< / artifactId>
< configuration>

< pomDependencies>考虑< / pomDependencies>
< environments>
< environment>
< os> linux< / os>
< ws> gtk< / ws>
< arch> x86< / arch>
< / environment>
< environment>
< os> linux< / os>
< ws> gtk< / ws>
< arch> x86_64< / arch>
< / environment>
< environment>
< os> win32< / os>
< ws> win32< / ws>
< arch> x86< / arch>
< / environment>
< environment>
< os> win32< / os>
< ws> win32< / ws>
< arch> x86_64< / arch>
< / environment>
< environment>
< os> macosx< / os>
< ws>可可< / ws>
< arch> x86_64< / arch>
< / environment>
< / environments>
< / configuration>
< / plugin>

< plugin>
< groupId> org.eclipse.tycho< / groupId>
< artifactId> tycho-source-plugin< / artifactId>
<执行>
< execution>
< id> plugin-source< / id>
< goals>
< goal> plugin-source< / goal>
< / goals>
< / execution>
< / executions>
< / plugin>
< / plugins>

< pluginManagement>
< plugins>

< plugin>
< groupId> org.eclipse.tycho< / groupId>
< artifactId> target-platform-configuration< / artifactId>
< version> $ {tycho.version}< / version>
< / plugin>

< plugin>
< groupId> org.eclipse.tycho< / groupId>
< artifactId> tycho-compiler-plugin< / artifactId>
< version> $ {tycho.version}< / version>



< configuration>
< compilerArguments>
< inlineJSR />
< enableJavadoc />
< encoding> ISO-8859-1< / encoding>
< / compilerArguments>
< / configuration>

< / plugin>

< plugin>
< groupId> org.eclipse.tycho< / groupId>
< artifactId> tycho-packaging-plugin< / artifactId>
< version> $ {tycho.version}< / version>


< configuration>
< strictBinIncludes> false< / strictBinIncludes>
< format>'vyyyyMMdd-HHmm< / format>
< timestampProvider> jgit< / timestampProvider>
< jgit.ignore>
pom.xml
< / jgit.ignore>
< jgit.dirtyWorkingTree> $ {jgit.dirtyWorkingTree}< / jgit.dirtyWorkingTree>
< sourceReferences>
< generate> true< / generate>
< / sourceReferences>
< archive>
< addMavenDescriptor> false< / addMavenDescriptor>
< / archive>
< additionalFileSets>
< fileSet>
< directory> $ {project.build.directory}< / directory>
< includes>
< include> .api_description< / include>
< / includes>
< / fileSet>
< / additionalFileSets>
< / configuration>
< / plugin>



< plugin>
< groupId> org.eclipse.tycho< / groupId>
< artifactId> tycho-surefire-plugin< / artifactId>
< version> $ {tycho.version}< / version>
< / plugin>

< plugin>
< groupId> org.eclipse.tycho< / groupId>
< artifactId> tycho-source-plugin< / artifactId>
< version> $ {tycho.version}< / version>
< configuration>
< strictSrcIncludes> false< / strictSrcIncludes>
< / configuration>
< / plugin>

< plugin>
< groupId> org.eclipse.tycho< / groupId>
< artifactId> tycho-p2-director-plugin< / artifactId>
< version> $ {tycho.version}< / version>
< / plugin>


<! - 本地插件库的依赖性折中 - >



< plugin>
< groupId> org.eclipse.tycho< / groupId>
< artifactId> tycho-p2-repository-plugin< / artifactId>
< version> $ {tycho.version}< / version>
<执行>
< execution>
< phase> package< / phase>
< goals>
< goal> verify-repository< / goal>
< goal> archive-repository< / goal>
< / goals>
< configuration>
< compress> false< / compress>
< includeAllDependencies> true< / includeAllDependencies>
< / configuration>
< / execution>
< / executions>
< / plugin>



< plugin>
< groupId> org.eclipse.tycho< / groupId>
< artifactId> tycho-p2-publisher-plugin< / artifactId>
< version> $ {tycho-version}< / version>
< configuration>
< publishArtifacts> true< / publishArtifacts>
< / configuration>
< / plugin>


< plugin>
< groupId> org.eclipse.tycho.extras< / groupId>
< artifactId> tycho-source-feature-plugin< / artifactId>
< version> $ {tycho-extras.version}< / version>
< / plugin>



< plugin>
< groupId> org.eclipse.tycho.extras< / groupId>
< artifactId> tycho-custom-bundle-plugin< / artifactId>
< version> $ {tycho-extras.version}< / version>
< / plugin>

< plugin>
< groupId> org.eclipse.tycho< / groupId>
< artifactId> tycho-p2-plugin< / artifactId>
< version> $ {tycho.version}< / version>
< configuration>
< baselineMode> warn< / baselineMode>
< baselineReplace> none< / baselineReplace>
< baselineRepositories>
< repository>
< url> http://download.eclipse.org/eclipse/updates/4.2< / url>
< / repository>
< / baselineRepositories>
< / configuration>
< / plugin>




<! - 此插件的配置仅用于存储Eclipse m2e设置。它对Maven构建本身没有影响.-->
< plugin>
< groupId> org.eclipse.m2e< / groupId>
< artifactId>生命周期映射< / artifactId>
< version> 1.0.0< / version>
< configuration>
< lifecycleMappingMetadata>
< pluginExecutions>


< pluginExecution>
< pluginExecutionFilter>
< groupId> org.eclipse.tycho< / groupId>
< artifactId> tycho-compiler-plugin< / artifactId>
< versionRange> 0.19.0< / versionRange>
< goals>
< goal> compile< / goal>
< / goals>
< / pluginExecutionFilter>
< action>
< ignore />
< / action>
< / pluginExecution>


< pluginExecution>
< pluginExecutionFilter>
< groupId>
org.eclipse.tycho
< / groupId>
< artifactId>
tycho-packaging-plugin
< / artifactId>
< versionRange>
[0.19.0,]
< / versionRange>
< goals>
< goal> build-qualifier< / goal>
< goal> validate-version< / goal>
< goal> validate-id< / goal>

< / goals>
< / pluginExecutionFilter>
< action>
< ignore>< / ignore>
< / action>
< / pluginExecution>
< / pluginExecutions>
< / lifecycleMappingMetadata>
< / configuration>
< / plugin>
< / plugins>
< / pluginManagement>

< / build>



我已经google了,不能缩小其原因。我已经经历了 Tycho无法解析依赖关系,尽管存在于目标文件,但我无法获得解决方案。我是新的这个tycho.please建议一些解决方案如何能够添加这些依赖关系到我的本地存储库中的



content.xml文件:

 <?xml version ='1.0'encoding ='UTF-8'?> 
<?metadataRepository version ='1.1.0'?>
< repository name ='file:/ C:/ p2-repo / - 元数据'
type ='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository'version ='1 >
< properties size ='2'>
< property name ='p2.timestamp'value ='1414673338570'/>
< property name ='p2.compressed'value ='true'/>
< / properties>
< / repository>

artifacts.xml:

 <?xml version ='1.0'encoding ='UTF-8'?> 
<?artifactRepository version ='1.1.0'?>
< repository name ='file:/ C:/ p2-repo / - artifacts'
type ='org.eclipse.equinox.p2.artifact.repository.simpleRepository'version ='1'> ;
< properties size ='2'>
< property name ='p2.timestamp'value ='1414673338667'/>
< property name ='p2.compressed'value ='true'/>
< / properties>
< mappings size ='3'>
< rule filter ='(& amp;(classifier = osgi.bundle))'
output ='$ {repoUrl} / plugins / $ {id} _ $ {version} .jar' />
< rule filter ='(& amp;(classifier = binary))'output ='$ {repoUrl} / binary / $ {id} _ $ {version}'/>
< rule filter ='(& amp;(classifier = org.eclipse.update.feature))'
output ='$ {repoUrl} / features / $ {id} _ $ {version }的.jar'/>
< / mappings>
< artifacts size ='0'/>
< / repository>


解决方案

您为Kepler存储库位置指定了一个属性,但你没有告诉Tycho来使用它。尝试将以下内容添加到您的pom.xml中:

 < repositories> 
< repository>
< id> eclipse-kepler< / id>
< layout> p2< / layout>
< url> $ {kepler-repo.url}< / url>
< / repository>
< / repositories>

要创建自己的Eclipse p2存储库,首先下载所需的eclipse版本( http://www.eclipse.org/downloads/ )并将其解压缩到本地文件夹(让我们说/ myfolder为这个例子)。在myfolder里面,你应该有一个eclipse文件夹,然后是plugins和features文件夹以及其他各种文件和文件夹。



命令创建P2存储库:

  /myfolder/eclipse.exe -consolelog -nosplash -application org.eclipse.equinox.p2 .publisher.FeaturesAndBundlesPublisher -metadataRepository文件:/ myfolder / p2-repo / -artifactRepository文件:/ myfolder / p2-repo / -source / myfolder / eclipse -publishArtifacts 


I have created a eclipse plugin and I am in need of converting the eclipse plugin project into maven so that I converted it into maven with the help of Tycho.when i try to execute as eclipse application it works fine.But when i try to maven clean it fails.

[INFO] Scanning for projects...
[INFO] Cannot complete the request.  Generating details.
[INFO] Cannot complete the request.  Generating details.
[INFO] {osgi.ws=gtk, osgi.os=linux, osgi.arch=x86, org.eclipse.update.install.features=true}
[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: xxx 1.0.0.qualifier
[ERROR]   Missing requirement: xxx 1.0.0.qualifier requires 'bundle       
org.eclipse.ui 0.0.0' but it could not be found
[ERROR] 
[ERROR] Internal error: java.lang.RuntimeException: No solution found because the problem is      
unsatisfiable.: [Unable to satisfy dependency from xxx 1.0.0.qualifier to 
bundle org.eclipse.ui 0.0.0.; Unable to satisfy dependency from xxx
1.0.0.qualifier to bundle org.eclipse.core.runtime 0.0.0.; Unable to satisfy dependency from 
xxx 1.0.0.qualifier to bundle org.eclipse.jdt.core 3.9.2.; Unable to satisfy 
dependency from xxx 1.0.0.qualifier to bundle org.eclipse.core.resources 
3.8.101.;     Unable to satisfy dependency from xxx 1.0.0.qualifier to bundle 
org.eclipse.jdt.ui 3.9.2.; Unable to satisfy dependency from xxx
1.0.0.qualifier to bundle org.eclipse.ui.console 3.5.200.; Unable to satisfy dependency from 
xxx 1.0.0.qualifier to bundle org.eclipse.ui.editors 3.8.100.; Unable to 
satisfy dependency from xxx 1.0.0.qualifier to bundle 
com.test.dependency.bundles 1.0.0.; Unable to satisfy dependency from xxx   
1.0.0.qualifier to package org.eclipse.jface.text 0.0.0.; Unable to satisfy dependency from test-
automation-plugin 1.0.0.qualifier to package org.eclipse.jface.text.presentation 0.0.0.; Unable 
to satisfy dependency from txxx 1.0.0.qualifier to package org.eclipse.jface.text.rules 0.0.0.; 
Unable to satisfy dependency from xxx 1.0.0.qualifier to package org.eclipse.jface.text.source 
0.0.0.; No solution found because the problem is unsatisfiable.] -> [Help 1]
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.lang.RuntimeException: No solution found because the problem is unsatisfiable.:  
[Unable to satisfy dependency from xxx 1.0.0.qualifier to bundle org.eclipse.ui 0.0.0.; Unable to 
satisfy dependency from xxx 1.0.0.qualifier to bundle org.eclipse.core.runtime 0.0.0.; Unable to 
satisfy dependency from xxx 1.0.0.qualifier to bundle org.eclipse.jdt.core 3.9.2.; Unable to 
satisfy dependency from xxx 1.0.0.qualifier to bundle org.eclipse.core.resources 3.8.101.; 

my pom.xml file :

 <?xml version="1.0" encoding="UTF-8"?>
    <project>
     <modelVersion>4.0.0</modelVersion>
     <groupId>xxx</groupId>
     <artifactId>parent</artifactId>
     <version>1.0.0-SNAPSHOT</version>
     <packaging>pom</packaging>
     <modules>
     <module>../xxx</module>
      </modules>

     <properties>
      <tycho.version>0.19.0</tycho.version>
      <tycho-extras.version>0.19.0</tycho-extras.version>
      <kepler-repo.url>http://download.eclipse.org/releases/kepler</kepler-repo.url>    
     </properties> 

     <repository>
         <id>third-party-eclipse-plugins</id>
         <layout>p2</layout>
         <url>${project.baseUri}dependency/p2-repo</url>    
     </repository> 
   <pluginRepositories>
    <pluginRepository>
        <id>tycho</id>
        <url>${tycho-repo.url}</url>
        <releases>
            <enabled>false</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </pluginRepository>
</pluginRepositories>



  <build>
   <plugins>
    <plugin>
    <groupId>org.eclipse.tycho</groupId>
    <artifactId>tycho-maven-plugin</artifactId>
    <version>${tycho.version}</version>
    <extensions>true</extensions>
  </plugin>

  <plugin>
    <groupId>org.eclipse.tycho</groupId>
    <artifactId>target-platform-configuration</artifactId>
    <configuration>

     <pomDependencies>consider</pomDependencies>
      <environments>
        <environment>
          <os>linux</os>
          <ws>gtk</ws>
          <arch>x86</arch>
        </environment>
        <environment>
          <os>linux</os>
          <ws>gtk</ws>
          <arch>x86_64</arch>
        </environment>
        <environment>
          <os>win32</os>
          <ws>win32</ws>
          <arch>x86</arch>
        </environment>
        <environment>
          <os>win32</os>
          <ws>win32</ws>
          <arch>x86_64</arch>
        </environment>
        <environment>
          <os>macosx</os>
          <ws>cocoa</ws>
          <arch>x86_64</arch>
        </environment>
      </environments>
    </configuration>
  </plugin>

  <plugin>
            <groupId>org.eclipse.tycho</groupId>
            <artifactId>tycho-source-plugin</artifactId>
            <executions>
                <execution>
                    <id>plugin-source</id>
                    <goals>
                        <goal>plugin-source</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
</plugins>

<pluginManagement>
        <plugins>

            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>target-platform-configuration</artifactId>
                <version>${tycho.version}</version>
            </plugin>

            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-compiler-plugin</artifactId>
                <version>${tycho.version}</version>



                <configuration>
                    <compilerArguments>
                        <inlineJSR />
                        <enableJavadoc />
                        <encoding>ISO-8859-1</encoding>
                    </compilerArguments>
                </configuration>

            </plugin>

            <plugin>
                <groupId>org.eclipse.tycho</groupId>
               <artifactId>tycho-packaging-plugin</artifactId>
                <version>${tycho.version}</version>


      <configuration>
        <strictBinIncludes>false</strictBinIncludes>
        <format>'v'yyyyMMdd-HHmm</format>
        <timestampProvider>jgit</timestampProvider>
        <jgit.ignore>
          pom.xml
        </jgit.ignore>
        <jgit.dirtyWorkingTree>${jgit.dirtyWorkingTree}</jgit.dirtyWorkingTree>
        <sourceReferences>
          <generate>true</generate>
        </sourceReferences>
        <archive>
          <addMavenDescriptor>false</addMavenDescriptor>
        </archive>
        <additionalFileSets>
          <fileSet>
            <directory>${project.build.directory}</directory>
            <includes>
              <include>.api_description</include>
            </includes>
          </fileSet>
        </additionalFileSets>
      </configuration>
      </plugin>



            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-surefire-plugin</artifactId>
                <version>${tycho.version}</version>
            </plugin>

            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-source-plugin</artifactId>
                <version>${tycho.version}</version>
                <configuration>
                    <strictSrcIncludes>false</strictSrcIncludes>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-p2-director-plugin</artifactId>
                <version>${tycho.version}</version>
            </plugin>


            <!-- dependency  compromise of local plugin repository   -->



            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-p2-repository-plugin</artifactId>
                <version>${tycho.version}</version>
                <executions>
                  <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>verify-repository</goal>
                        <goal>archive-repository</goal>
                    </goals>
                    <configuration>
                        <compress>false</compress>
                        <includeAllDependencies>true</includeAllDependencies>
                    </configuration>
                    </execution>
                </executions>
                </plugin>



            <plugin>  
              <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-p2-publisher-plugin</artifactId>
                <version>${tycho-version}</version>
                <configuration>
                    <publishArtifacts>true</publishArtifacts>
                </configuration>
            </plugin>


            <plugin>
                <groupId>org.eclipse.tycho.extras</groupId>
                <artifactId>tycho-source-feature-plugin</artifactId>
                <version>${tycho-extras.version}</version>
            </plugin>



            <plugin>
                <groupId>org.eclipse.tycho.extras</groupId>
                <artifactId>tycho-custom-bundle-plugin</artifactId>
                <version>${tycho-extras.version}</version>
            </plugin>

            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-p2-plugin</artifactId>
                <version>${tycho.version}</version>
                <configuration>
                    <baselineMode>warn</baselineMode>
                    <baselineReplace>none</baselineReplace>
                    <baselineRepositories>
                        <repository>
                            <url>http://download.eclipse.org/eclipse/updates/4.2</url>
                        </repository>
                    </baselineRepositories>
                </configuration>
            </plugin>




            <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
            <plugin>
                <groupId>org.eclipse.m2e</groupId>
                <artifactId>lifecycle-mapping</artifactId>
                <version>1.0.0</version>
                <configuration>
                    <lifecycleMappingMetadata>
                        <pluginExecutions>


                              <pluginExecution>
                                  <pluginExecutionFilter>
                                  <groupId>org.eclipse.tycho</groupId>
                                    <artifactId>tycho-compiler-plugin</artifactId>
                                     <versionRange>0.19.0</versionRange>
                                        <goals>
                                            <goal>compile</goal>
                                         </goals>
                                      </pluginExecutionFilter>
                                           <action>
                                            <ignore/>
                                            </action>
                                 </pluginExecution>


                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>
                                        org.eclipse.tycho
                                    </groupId>
                                    <artifactId>
                                        tycho-packaging-plugin
                                    </artifactId>
                                    <versionRange>
                                        [0.19.0,)
                                    </versionRange>
                                    <goals>
                                        <goal>build-qualifier</goal>
                                        <goal>validate-version</goal>
                                        <goal>validate-id</goal>

                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore></ignore>
                                </action>
                            </pluginExecution>
                        </pluginExecutions>
                    </lifecycleMappingMetadata>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>

</build>

I have googled and not able to narrow down the cause of it.i have gone through Tycho cannot resolve dependency to bundle although present in the target file but i am not able to get teh solution. I am new to this tycho.please suggest some solutions how iam able to add these dependencies to tycho?

content.xml file in my local repository:

  <?xml version='1.0' encoding='UTF-8'?>
 <?metadataRepository version='1.1.0'?>
 <repository name='file:/C:/p2-repo/ - metadata'     
 type='org.eclipse.equinox.internal.p2.metadata.repository.LocalMetadataRepository' version='1'>
 <properties size='2'>
  <property name='p2.timestamp' value='1414673338570'/>
  <property name='p2.compressed' value='true'/>
  </properties>
 </repository>

artifacts.xml:

 <?xml version='1.0' encoding='UTF-8'?>
 <?artifactRepository version='1.1.0'?>
 <repository name='file:/C:/p2-repo/ - artifacts'     
  type='org.eclipse.equinox.p2.artifact.repository.simpleRepository' version='1'>
  <properties size='2'>
   <property name='p2.timestamp' value='1414673338667'/>
   <property name='p2.compressed' value='true'/>
  </properties>
  <mappings size='3'>
  <rule filter='(&amp; (classifier=osgi.bundle))'     
   output='${repoUrl}/plugins/${id}_${version}.jar'/>
   <rule filter='(&amp; (classifier=binary))' output='${repoUrl}/binary/${id}_${version}'/>
   <rule filter='(&amp; (classifier=org.eclipse.update.feature))'    
   output='${repoUrl}/features/${id}_${version}.jar'/>
  </mappings>
  <artifacts size='0'/>
 </repository>

解决方案

You've specified a property for the Kepler repository location, but you haven't told Tycho to use it. Try adding the following to your pom.xml:

<repositories>
    <repository>
        <id>eclipse-kepler</id>
        <layout>p2</layout>
        <url>${kepler-repo.url}</url>
    </repository>
</repositories>

To create your own Eclipse p2 repository first download the required version of eclipse (http://www.eclipse.org/downloads/) and extract it to a local folder (lets say "/myfolder" for this example). Inside "myfolder" you should have an "eclipse" folder, then under that a "plugins" and "features" folder plus various other files and folders.

Use the following command to create the P2 repository:

/myfolder/eclipse.exe -consolelog -nosplash -application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher -metadataRepository file:/myfolder/p2-repo/ -artifactRepository file:/myfolder/p2-repo/ -source /myfolder/eclipse -publishArtifacts

这篇关于使用我的本地p2存储库与必要的jar文件时项目依赖错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆