Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] jetty-all 9.3 dependency retrieval

This is not a bug, nor a mistake.

jetty-all as an component on central.maven.org was never meant to be used by other projects in their builds.
jetty-all.jar existed to only be used as a component for our documentation and its quickstart chapters.

With Jetty 9.0, It was never complete, it was never "all" of anything.
In fact, it was technically impossible for it to exist as "all", as there are multiple implementations of core components which would conflict with each other if they were all included.

We encountered many bugs with projects that made the assumption that jetty-all was a component that contained "all" of jetty.
Those projects were including jetty-all in their own builds, and using the jetty-all component from the global central repository (central.maven.org)
This meant that they now had 2 of every class in their build, as the main artifact for jetty-all contained (nearly) every class of the dependencies of jetty-all.  This made includes/excludes/conflict resolution/etc very problematic for developers that chose, incorrectly, to use jetty-all in their builds.

So a decision was made, jetty-all as a component for documentation, and jetty-all as a coordinate space for maven projects were to be fixed.

First thing we did is to ensure that jetty-all is now a structural project that has no main artifact.
This structural pom now references all of the dependencies that make up the former jetty-all dependency.
This allows projects to properly manage their dependencies (like if they want to use an alternate jsp impl, or jstl lib, for example).
The lack of main artifact for the project also means that there is now no longer duplicate classpath entries everywhere, eliminating a common problem with the old jetty-all artifact.

Next we build out a proper uber jar, that created a similar jar like what was used before, but without being attached as the main artifact.
This allows the documentation to still use this artifact like it was originally designed for.

As for the source jar, the source for all of the classes found in the jetty-all uber jar can be found in its dependencies (for the jetty classes, and the non-jetty classes it contains).  In other words, normal global central repository behavior for transitive dependencies.

Linking to recently closed about this for others that stumble across this in the future.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=472640


Joakim Erdfelt / joakim@xxxxxxxxxxx

On Mon, Jul 20, 2015 at 12:31 AM, Jonas <barney2k7@xxxxxxxxx> wrote:
Hi all,

we use jetty-all as dependency in our project, which works perfectly fine with jetty 9.2, as there are jar and source.jar in maven central.
Now with jetty-all 9.3, this seems to have changed (bug track 466774). There isn't a source jar anymore, plus there is now a 'uber.jar' instead of a regular jar.
Obviously the retrieval of the source jar thus no longer works, but we even have trouble retrieving the uber.jar. We always end up with no uber.jar and what's worse is that all the jars that are actually contained in uber.jar are retrieved, which doesn't make any sense. This seems to be caused by the fact that those jars are no longer marked as 'provided' in the pom.xml.

We use ivy to handle dependencies, but I suspect maven has the same issue.

Any hints on how to fix this, how to properly define dependencies on jetty-all 9.3?
Any chance jetty-all 9.3 pom can be fixed, so it will show up in maven central again just like it did in jetty 9.2?

Thanks!

Cheers,
Jonas



_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users


Back to the top