[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cross-project-issues-dev] setting mirror URL in the p2 repository
|
Hi Andreas
Thank you for the feedback!
Based on your suggestions, I followed a slightly different strategy that
allows me to get everything done (see the small example here:
https://github.com/LorenzoBettini/eclipse-p2.mirrorsURL-example):
- have tycho generate both artifacts.jar and .xml.xz
- use wtp.releng.tools.addRepoProperties to add the properties in
artifacts.jar
- uncompress artifacts.jar into artifacts.xml
- use xz to overwrite artifacts.xml.xz with the new packed artifacts.xml
- remove artifact.xml
This will get you all the compressed stuff (with added properties) and
the p2.index.
Does it make sense?
cheers
Lorenzo
On 18/11/2016 14:25, Andreas Sewe wrote:
> Hi Lorenzo,
>
>> as suggested here https://wiki.eclipse.org/Equinox/p2/p2.mirrorsURL
>> we set the mirror property in our artifacts.jar when releasing.
>>
>> We do that by using org.eclipse.wtp.releng.tools.addRepoProperties
>> as done in other projects, e.g.,
>> https://git.eclipse.org/c/recommenders/org.eclipse.recommenders.git/tree/repositories/pom.xml
>>
>> this has worked up to now, but after we moved to tycho 0.25, which
>> also generates the .xml.xz zipped version, we noted that the mirror
>> property is not set in the artifacts.xml.xz (but only in
>> artifacts.jar).
>>
>> Would mirroring still work?
>
> No, if you follow our template (I wrote the Code Recommenders pom.xml)
> then mirroring will not work when the client downloads the
> artifacts.xml.xz. This is Code Recommenders' Bug 497546 [1].
>
> Now, for us fixing this has rather low priority, as not many people
> download Code Recommenders from its update site, now that it is included
> out-of-the-box in many EPP packages. But your mileage may vary, of course.
>
> For you I see 3 ways out:
>
> 1. Disable XZ compresison in the tycho-p2-repository-plugin and compress
> in a separate step, after the tycho-eclipserun-plugin with
> rg.eclipse.wtp.releng.tools.addRepoProperties has finished. Maybe the
> truezip-maven-plugin [3] or a similar plugin can help here.
>
> 2. Push for Tycho Bug 341744 [4] being fixed in such a way that it does
> not only support p2.statsURI but also p2.mirrorsURL.
>
> 3. Do not set the p2.mirrorsURL in the Tycho build at all, but only when
> promoting it to its final resting place. See Bug 498360 [5].
>
> Option 1 certainly requires the most work, but has the advantage that it
> just might work right *now*. In the long run, however, I think option 3
> is preferable. The build should *not* need to know where the repository
> bits will be offered for download, in particular as this may change over
> time, e.g., if you move things from download.eclipse.org to
> archive.eclipse.org.
>
> Hope that helps.
>
> Andreas
>
> [1] <https://bugs.eclipse.org/bugs/show_bug.cgi?id=497546>
> [2]
> <https://eclipse.org/tycho/sitedocs/tycho-p2/tycho-p2-repository-plugin/assemble-repository-mojo.html#xzCompress>
> [3] <http://www.mojohaus.org/truezip/truezip-maven-plugin/>
> [4] <https://bugs.eclipse.org/bugs/show_bug.cgi?id=341744#c14>
> [5] <https://bugs.eclipse.org/bugs/show_bug.cgi?id=498360>
>
>
>
> _______________________________________________
> cross-project-issues-dev mailing list
> cross-project-issues-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev
>
--
Prof. Lorenzo Bettini, Computer Science, DISIA, Univ. Firenze
HOME: http://www.lorenzobettini.it
Xtext Book:
https://www.packtpub.com/application-development/implementing-domain-specific-languages-xtext-and-xtend-second-edition