Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Exporting a Target Definition file

What is the purpose of the local P2 repository? To you need it for
performance and reliability reasons or for something else?

In any case, I do not believe it is not currently possible to generate
local p2 repository from .target file directly, but you should be able
to setup eclipse-repository project to do that. It should also be
possible to develop tycho extensions plugin to do what you want, I can
give some pointers if you are interested.

Also, .target file with mode=slicer guarantees reproducible builds, i.e.
the build will either use specific and stable set of dependencies or it
will fail if some of the dependencies are not available. If build
reproducibility is your main concern, you can use .target file directly,
without intermediate p2 repository. The intermediate repository can be
tricky to keep up-to-date on all developer machines.

--
Regards,
Igor

On 11-11-23 9:12 AM, Aaron Digulla wrote:
Hello,

The story so far. Since the mirror options in the p2 ant tasks either
download too much (the whole site with all versions of all IUs, >> 1Gb
for Indigo) or too little, I used a script to download features.

Basically the script installs Eclipse, runs the ant task to install the
feature(s) I want and then deletes all the files which came from the
install ZIP. Which leaves me with a set of files in features/plugins
which work with the least amount of effort.

Then I was told that Eclipse has a Target Definition editor which could
do the same for me.

I was able to create a Target Definition file (took me only 3 days
because of various bugs in the editor; that's about the same amount of
work my first approach took, so I'm not sure how much there is to be
gained here... in fact with my own tool set, I know what every part does
and how to fix it.)

When I click the "Export" button, Eclipse considers my puny request for
half an hour and then creates a directory with features and plugins.
This p2 repo is broken - Tycho won't find the SWT fragments in it, for
example - but it's a start. Using the
org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher, I can
convert this into something that Tycho will like.

But I'd like something that I can pass on to a fellow developer without
many explanations: I want to 100% automate the process.

Is there an ant task or a Tycho plugin to export a *.target file into a
p2 repository?

Is there a better way to do this?

Regards,



Back to the top