Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 344714

Summary: Jetty download does not contain source bundles
Product: [RT] Jetty Reporter: Rüdiger Herrmann <ruediger.herrmann>
Component: buildAssignee: Hugues Malphettes <hmalphettes>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jetty-inbox, ruediger.herrmann
Version: 7.4.0   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Rüdiger Herrmann CLA 2011-05-04 10:40:11 EDT
When downloading the jetty-distribution-7.4.0.v20110414.zip from http://download.eclipse.org/jetty/7.4.0.v20110414/dist/ there are no source bundles included.
Comment 1 Jesse McConnell CLA 2011-05-04 10:59:31 EDT
Source is available in a number of locations and the standard now-a-days in via source bundles on a per artifact basis.  The distribution is just an assembly of a lot of artifacts so we don't mess with putting source in it anymore, its just not appropriate given the layout of the distribution is no longer setup like it was in jetty6 and pushing out a bundle of source would effectively be and svn export of the release tag and that is easily grabbed by other means.

I would recommend getting source via svn to either trunk or the svn tag of the version your trying to get source for, or using something like m2eclipse to load up the project and it will pull down source bundles on a per artifact basis automatically.

cheers,
jesse
Comment 2 Rüdiger Herrmann CLA 2011-05-04 13:11:45 EDT
(In reply to comment #1)
> Source is available in a number of locations and the standard now-a-days in via
> source bundles on a per artifact basis.  The distribution is just an assembly of
> a lot of artifacts so we don't mess with putting source in it anymore, its just
> not appropriate given the layout of the distribution is no longer setup like it
> was in jetty6 and pushing out a bundle of source would effectively be and svn
> export of the release tag and that is easily grabbed by other means.
I am afraid, I don't understand *where* exactly these "number of locations" are.

> I would recommend getting source via svn to either trunk or the svn tag of the
> version your trying to get source for, or using something like m2eclipse to load
> up the project and it will pull down source bundles on a per artifact basis
> automatically.
Installing an SVN client (leave alone m2eclipse), finding the repository URL(s), checking out, etc. is very inconvenient if one just wants to have the source code to be able step through while debugging. 
Eclipse projects usually deliver a (distinct) build where each bundle comes with a corresponding source bundle. This eases consuming such builds a lot as the Eclipse (classic) IDE comes with excellent tooling to work with these artefacts. So I am wondering why Jetty makes an exception here.
p2 repositories (were I would suspect to find source bundles) aren't available either. The 'p2' links on http://download.eclipse.org/jetty/ are broken.

> 
> cheers,
> jesse
Best, 
Rüdiger
Comment 3 Jesse McConnell CLA 2011-05-04 13:23:39 EDT
try

http://download.eclipse.org/jetty/updates/jetty-bundles-7.x/

cheers,
jesse
Comment 4 Jesse McConnell CLA 2011-05-04 13:25:14 EDT
generally someone consuming jetty through osgi would not ever bother with the distribution which is another reason we don't release a source artifact for the actual distribution, if you want it from a p2 repo, we provide that as well
Comment 5 Jesse McConnell CLA 2011-05-04 13:28:26 EDT
Also see the OSGI Update Repo section on the following page:

http://wiki.eclipse.org/Jetty/Howto/Install_Jetty

if this is a documentation issue on not being able to find it, let us know where you got pointed wrong and we'll fix that, the wiki has been undergoing some improvements in usability but it takes time.

I'll mark it resolved for now, let us know if there is something else you need
Comment 6 Rüdiger Herrmann CLA 2011-05-04 13:35:12 EDT
(In reply to comment #5)
> Also see the OSGI Update Repo section on the following page:
> 
> http://wiki.eclipse.org/Jetty/Howto/Install_Jetty
> [ ... ]
Thanks for the pointer. As I am ambedding Jetty I am only interesed in bundles.
Comment 7 Rüdiger Herrmann CLA 2011-05-04 13:36:05 EDT
Sorry to bother you again. The software repo isn't quite working.
Attempting to install both (bundles and sourcce) gives me:
Cannot satisfy dependency:
  Missing requirement: Jetty :: AJP 7.4...

When checking the source feature I only get
Problems downloading artefact: ...
  MD5 hash is not as expected. ...
Comment 8 Jesse McConnell CLA 2011-05-04 13:40:58 EDT
Hugues, can you take a look?
Comment 9 Hugues Malphettes CLA 2011-05-04 21:33:24 EDT
Hi Rudiger,

Could you describe how you are using the p2 repository?

I'll venture a few guesses.

I am reading the instructions on this page and I suspect that the p2repository it points at is not the one you would want to use.
http://download.eclipse.org/jetty/updates/jetty-bundles-7.x/
publishes only the jetty jars: none of their dependencies.

If you are provisioning a target platform from PDE you could:
Untick the checkbox that tells p2 to look for the dependencies and provision them.

You could point at a different repository where we publish a set of dependencies for jetty: http://download.eclipse.org/jetty/updates/jetty-rt-3.7milestones

If you are using jetty's API directly from your code, at the moment, it is not trivial support webapps: https://bugs.eclipse.org/bugs/show_bug.cgi?id=337586
If you want to use the existing jetty-osgi integration, you can make a bundle "my.jetty.config"that contains etc/jetty.xml where you configure jetty. Then setup the property -Djetty.home.bundle=my.jetty.config and make sure that the bundle org.eclipse.jetty.osgi.boot is started.
To have this jetty host the HttpOsgi service make sure you start the bundle org.eclipse.jetty.osgi.httpservice
To support webapp-bundles make sure that your jetty.xml defines the OSGi App provider.
Comment 10 Hugues Malphettes CLA 2011-05-04 21:35:03 EDT
Marking as fixed. The source bundles are in place. The p2 repository can be used to provision them and is intentionally containing only the jetty bundles.
Comment 11 Rüdiger Herrmann CLA 2011-05-05 09:07:15 EDT
Hugues,

thanks for the pointers. I want to assemble a target platform that consists of RAP + (parts of) Equinox + Jetty7 (no HttpServer, just Jetty 7 Server as a bundle). Resolving the dependencies is not an issue. RAP and Equinox are already there so I started out the the Jetty 7 download. This worked fine as longas I didn't need to delve iinto the source code. When I realized that I was in need of the sources, the Odyssey began.

The link to the RT milestones repo (http://download.eclipse.org/jetty/updates/jetty-rt-3.7milestones) works, though the bundles (Jetty - Bundles: all the jetty bundles) and the source bundles (Jetty - Bundles: all the jetty bundles) feature have different version. Sources are 7.4.x, whereas the code is 7.2.x. Any idea?
However the source bundles from the p2 repo seem to match the code bundles from the 'distribution' download (see description) - thus in the end I was able to manually put together a target platform with source bundles.

From the 7.x repo (http://download.eclipse.org/jetty/updates/jetty-bundles-7.x/) I still get wrong MD5 checksums (according to p2 target provisioning), maybe you want to fix this and/or remove the link form your documentation.

As said before, the links to the p2 repos from the downloads page (http://download.eclipse.org/jetty/)  are all broken (404).
Comment 12 Hugues Malphettes CLA 2011-05-05 21:07:22 EDT
(In reply to comment #11)
> Hugues,
> 
> thanks for the pointers. I want to assemble a target platform that consists of
> RAP + (parts of) Equinox + Jetty7 (no HttpServer, just Jetty 7 Server as a
> bundle). Resolving the dependencies is not an issue. RAP and Equinox are
> already there so I started out the the Jetty 7 download. This worked fine as
> longas I didn't need to delve iinto the source code. When I realized that I was
> in need of the sources, the Odyssey began.
> 
> The link to the RT milestones repo
> (http://download.eclipse.org/jetty/updates/jetty-rt-3.7milestones) works,
> though the bundles (Jetty - Bundles: all the jetty bundles) and the source
> bundles (Jetty - Bundles: all the jetty bundles) feature have different
> version. Sources are 7.4.x, whereas the code is 7.2.x. Any idea?
It is a composite repository I am guessing that one of the existing bundles in your target platform explicitly depends on 7.2.x.
So p2 picks up the 7.2.x runtime and then the latest available source bundles 7.4.x
Here is the link to the exact milestone with 7.4.x: http://download.eclipse.org/jetty/updates/jetty-rt-3.7milestones/S-3.7.M7-201105030934
And the one to the milestone with 7.2.x:
http://download.eclipse.org/jetty/updates/jetty-rt-3.7milestones/S-3.7.M4-201101210140


> However the source bundles from the p2 repo seem to match the code bundles from
> the 'distribution' download (see description) - thus in the end I was able to
> manually put together a target platform with source bundles.
> 
> From the 7.x repo
> (http://download.eclipse.org/jetty/updates/jetty-bundles-7.x/) I still get
> wrong MD5 checksums (according to p2 target provisioning), maybe you want to
> fix this and/or remove the link form your documentation.
So far this repository is consumed by different other builds, the actual jetty-eclipse-release-train builds and the eclipse.org/rtp build.
I have not seen the MD5 checksums issues but maybe I am using it slightly differently than you do.
If you can confirm exactly how you get the MD5 error and what is the exact error message, it would help to identify which one of the child repository is corrupted.

> 
> As said before, the links to the p2 repos from the downloads page
> (http://download.eclipse.org/jetty/)  are all broken (404).
OK, this one is for Jesse: I manually fixed the links a few times, it looks like it gets overwritten.
Comment 13 Rüdiger Herrmann CLA 2011-05-06 05:22:48 EDT
Hugues,

thanks for you patience, the hint to use the exact milestone repos directly helped.
For the issues with the MD5 checksums, I opened bug 344936.
Comment 14 Hugues Malphettes CLA 2011-05-06 07:59:07 EDT
Rüdiger, thanks for the kudo.
I thank you for your patience on the quest for the source code.
Thanks for opening the other bug.
Should we mark this bug as solved in the mean time?
Comment 15 Rüdiger Herrmann CLA 2011-05-06 12:00:54 EDT
(In reply to comment #14)
> Rüdiger, thanks for the kudo.
> I thank you for your patience on the quest for the source code.
> Thanks for opening the other bug.
> Should we mark this bug as solved in the mean time?
Though the documentation should be updated, from my POV it can be marked as FIXED.
Thanks again.
Comment 16 Jesse McConnell CLA 2011-05-10 17:32:47 EDT
as per comment #15
Comment 17 Hugues Malphettes CLA 2011-05-24 21:33:17 EDT
This bug is reported in a few other places in bugzilla now.
For example: bug 347041
At the moment we are not affected by this bug even for the jetty bundles:
- for the jetty bundles, I uploaded a local un-signed build.
- for the jetty-rt build, we are using a fork of tycho and a fork of Jesse's original plugin to sign the bundles. Those forks were made by myself 1 year ago and the signed repos are correct.
Comment 18 Hugues Malphettes CLA 2011-05-26 04:10:27 EDT
Now that the signing plugin is fixed (347041) I have upgraded the jetty-bundles build to use the fixed signing plugin so http://download.eclipse.org/jetty/updates/jetty-bundles-7.x/ should not have the MD5 checksum errors anymore.