Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] configuring the same target-platform in eclipse like tycho is using

On 07/16/2014 08:11 AM, Gaberell, Adrian wrote:

hi mickael,


thanks for you answer, but as described in my post, I tried this solution but recognized 2 problems:

1st ) when I configure a target definition file, then I have exactly to know in which feature my bundles and all of the dependent bundles are located and select them as desired features/groups… and with this the manifest first approach of osgi and tycho is useless.

Not really, if you use the "planner" mode, then you don't have to list all transitive dependencies. Only the top-level ones are enough.
Indeed, by doing it, you somehow do manually a part of work that Tycho does automatically, but it's generally better like this.

2nd ) when I set a target definition file as my target-platform in eclipse, all contained bundles are downloaded to the local cache in eclipse. but I want just the needed bundles to be downloaded from the p2 repository to my local cache (eclipse and/or maven) like the tycho build does.

Please report this as an enhancement request to PDE.

I found a workaround for this problem, but I am not sure if this is a tycho-minded solution:

I defined a p2updatesite-project with a packaging-type eclipse-repository and set the value of includeAllDependency to true in the build-configuration of the tycho-p2-repository-plugin.

after the tycho-build I add the subfolder target/repository of the p2updatesite-projec to my target-definition in my eclipse preferences.

So instead of sharing a file, you now have your Eclipse target-platform relying from the output of a Tycho build. I don't feel it is easier than using .target files.

I am not so deep in tycho, but when tycho compiles my bundles, isn’t there a temporary target-platform where tycho resolves and compiles my bundles against? if yes, is there no way to reuse this target-platform definition for my eclipse workbench?

There is most likely a TargetPlatform object, but it is in memory, artifacts are fetched on filesystem so it doesn't immediately maps to a Target Definition. After Tycho resolves artifact, it probably doesn't care about the source any more. So it seems complicated to deduce where the resolver fetched artifacts just by a resolved list of dependencies.

Mickael Istria
Eclipse developer at JBoss, by Red Hat
My blog - My Tweets

Back to the top