Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GitHub Releases to host an Eclipse P2 Repository | Fred's safe space #2

Open
utterances-bot opened this issue Apr 27, 2023 · 4 comments

Comments

@utterances-bot
Copy link

Use GitHub Releases to host an Eclipse P2 Repository | Fred's safe space

Hosting an Eclipse P2 repository is a great way to share your awesome Eclipse plugins with the rest of the world. However, finding a host can be a challenge. Who wants to pay for hosting nowadays? For some time, people (including me) have (ab)used Github pages as a hosting solution. Lorenzo Bettini has a pretty thorough blog post about this. Even though Git is not meant to host binaries, it’ll be good enough for most users.

https://fbricon.github.io/posts/use-github-releases-as-p2-repo/

Copy link

Hello Fred,
thank you for this post, it just saved me a lot of time (and probably a headache) as I needed to publish a P2 for a project hosted on GitHub. It works like a charm, thanks to you.

Copy link

haubi commented Feb 23, 2024

Hi Fred,
I've been asking myself the very same question, and the "flat" P2 Update Site works indeed, thanks!

But then, eventually I have found an easier/better way:
Simply provide the P2 Update Site as Zip file on Github Releases.

For consuming such a P2 Update Site from within a Zip file, using this URL scheme seems to work:
jar:https://url.to/site.zip!/

At least I have found it working for:

  • Install Eclipse extension
  • Consume within Target Platform (.target)
  • Consume within Target Platform DSL (.tpd)

Thanks!
haubi

Copy link
Owner

fbricon commented Feb 26, 2024

@haubi I suspected something like that could be possible. So it is indeed even a simpler solution.

Although the flat repo hack is still interesting if you want to access download stats of your plugin.

@haubi
Copy link

haubi commented Feb 26, 2024

Thinking about that again, there's another drawback of having a P2 repo as Zip file:
Downloading the index only of some repo does not work any more, which would allow to check whether there's something new at all. Instead, the whole content is downloaded again and again, just to detect whether this content is already installed.

After all, this drawback actually outweighs the comfort of providing a Zip file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants