Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » P2 » Get dependencies of Installable Unit
Get dependencies of Installable Unit [message #1694855] Fri, 08 May 2015 13:45 Go to next message
Orlando Hill is currently offline Orlando HillFriend
Messages: 5
Registered: March 2015
Junior Member
Hi,

Is there a way to get the dependencies of an Installable Unit without creating a partial mirror of a p2 repository?

Thanks,
Orlando

[Updated on: Wed, 13 May 2015 12:54]

Report message to a moderator

Re: Get list of jar files, given name/version of plugin [message #1698895 is a reply to message #1694855] Thu, 18 June 2015 14:56 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1735
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 08/05/2015 15:45, Orlando Hill wrote:
> Hi,
>
> I am hoping that someone with knowledge of the p2 or Tycho codebases can
> point me in the right direction.
>
> I have plugins and their dependencies stored in two p2 repositories.
> These repositories are used as the target platform, when building the
> plugins with Tycho.
>
> I would like to get the list of jar files for a plugin and its
> dependencies, given the name and version of the plugin. This list of jar
> files will then be used to populate the classpath, before running code
> within the plugin.

Hi

do you mean running Junit Plug-in tests with the target platform
populated with such plugins?

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
Re: Get list of jar files, given name/version of plugin [message #1698971 is a reply to message #1698895] Fri, 19 June 2015 08:58 Go to previous message
Orlando Hill is currently offline Orlando HillFriend
Messages: 5
Registered: March 2015
Junior Member
Hi Lorenzo,

The use case is a command-line tool which executes a JVM-based scripting language. The tool is given a set of bundles as command-line arguments, and needs to make the classes and resources of those bundles accessible from within the script.

I have this working by running Maven/Tycho in the background (packaging=eclipse-repository, add bundles to category.xml), getting the jar file names from the created p2 repo, and then invoking a new JVM (classpath populated) to run the actual script.

Since Mave/Tycho takes 20-30 seconds to run, I cache the result per bundle set.

It would be nice, if Tycho or p2 provided an API to access this kind of dependency information.
Previous Topic:Installing RTC P2 eclipse extension on existing 4.3.1 eclipse environment
Next Topic:Target platform reloading on startup (Mars)
Goto Forum:
  


Current Time: Wed Oct 18 03:59:04 GMT 2017

Powered by FUDForum. Page generated in 0.02168 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software