简体   繁体   中英

Building Eclipse plugin with Tycho from mirrored P2 Repository in Nexus

After endless reading and testing out different things, I now have to ask my specific question.

A few information about my project: I would like to build a Eclipse plugin with Maven to integrate it in our CI/CD process. We're using Eclipse-2019-06. I'm in a separate developing network where I only have access to the internet via proxy. A Nexus is running which is mirroring all the needed Maven repositories (Central and so).

Because of the proxy problem I installed the P2 Nexus plugin and bridge to add the Eclipse P2 repository https://download.eclipse.org/releases/2019-06/201906191000/ in our Nexus to mirror it locally. So the Nexus repository points now from the official P2 download site to the localhttp://nexus:8081/nexus/content/repositories/eclipse-repository address.

The first thing I tried then, was to add the update sitehttp://nexus:8081/nexus/content/repositories/eclipse-repository to the running Eclipse installation to access all the plugins and so on. This works fine!

So now I'm trying to build the official Eclipse Plugin Tycho demo itp01 from https://github.com/eclipse/tycho-demo .

And here comes the problem: I changed the repositories section in the official pom.xml to

 <repositories>
   <repository>
     <id>eclipse-repo</id>
     <layout>p2</layout>
     <url>http://nexus:8081/nexus/content/repositories/eclipse-repository</url>
   </repository>
 </repositories>here

When I now try to build the itp01 project I get the so often seen error:

[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: tycho.demo.itp01 1.0.0.qualifier
[ERROR]   Missing requirement: tycho.demo.itp01 1.0.0.qualifier requires 'osgi.bundle; org.eclipse.core.runtime 3.15.300' but it could not be found
[ERROR] 
[ERROR] See http://wiki.eclipse.org/Tycho/Dependency_Resolution_Troubleshooting for help.
[ERROR] Cannot resolve dependencies of MavenProject: tycho.demo.itp01:tycho.demo.itp01:1.0.0-SNAPSHOT @ /home/frto100/git/org.eclipse.tycho-demo/itp01/tycho.demo.itp01/pom.xml: See log for details -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MavenExecutionException

It looks like it's not possible for Tycho to read the artifacts from the P2 repository in Nexus. Secondhand I'm not sure if Tycho even evaluates the given repository URL. Is it possible to check if Tycho is really using the correct URL?

Can somebody maybe give me a hint where the problem could be? Or maybe somebody already solved this problem.

Thanks so much!

If you are using Maven 3.6.1 (which is embedded in Eclipse 2019-06 and 2019-09), you probably ran into the following issue:

Using a different Maven version than 3.6.1 should solve the issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM