-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Revert top level ee# version properties change #11977
Revert top level ee# version properties change #11977
Conversation
…tually depend on jetty, but rather Jakarta
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please describe precisely how the definition of properties at the top level pom causes problems.
@@ -32,6 +32,53 @@ | |||
<warSourceDirectory>${project.build.directory}/webapp</warSourceDirectory> | |||
</properties> | |||
|
|||
<dependencyManagement> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is precisely what I was trying to avoid - the duplication of dependency versions between the jetty-eeX
poms and the jetty-demos
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Read the issue text
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The jetty-demos don't depend on Jetty EE, they depend on Jakarta EE.
It was wrong to try to shoehorn them into Jetty EE.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Read the issue text
I have.
The jetty-demos don't depend on Jetty EE, they depend on Jakarta EE. It was wrong to try to shoehorn them into Jetty EE.
The jetty-demos
don't depend on any jetty-eeX
module, they just depend on some of the same dependencies of those jetty-eeX
modules.
The jetty-demos don't depend on Jetty EE, they depend on Jakarta EE. It was wrong to try to shoehorn them into Jetty EE.
I don't understand your argument here. There is no relationship between any jetty-eeX
module and the jetty-demos
modules. The jetty-eeX
modules depend on Jakarta EE and so do the jetty-demos
:
Servlet 4 javax.servlet api
is depended on by: jetty-ee8
and jetty-servlet4-demos
Servlet 5 jakarta.servlet api
is depended on by: jetty-ee9
and jetty-servlet5-demos
Servlet 6 jakarta.servlet api
is depended on by: jetty-ee10
Servlet 6.1 jakarta.servlet.api
is depended on by: jetty-ee11
If you want to declare the various servlet spec dependencies outside of the top level pom, say in servlet4/pom.xml
, servlet5/pom.xml
, servlet6/pom.xml
, servlet6.1/pom.xml
and then have jetty-ee8
and jetty-servlet4-demos
depend on servlet4/pom.xml
, jetty-ee9
and jetty-servlet5-demos
depend on servlet5/pom.xml
, etc etc then fine. That keeps the version information in a single place. My objection is to duplicating the version information across the project.
The environment trees You should think of those trees as belonging to a different git repository for this to make sense. I say those are isolated, as they do not participate in the global versioning of the entire repository. If you yank out the actual version value (the The structure of branch This is no different than if you had a git repo for The |
Also, the failed build of this PR is due to a previous merge of the MultiPart stuff.
|
…vert-top-level-ee-version-properties
@joakime Jan asked me if I can explain what your concern is... I've had a look and a read and I have to say I'm not understanding what the problem is either, or at least not your explanation of it? We already have dependencies with their version specified in the top level as a property, but used within a jetty-ee module. For example I understand that we don't want global properties that affect all the different eeX's in some circumstances. But that's not what is happening in 12.1. Each I think it is a good feature that we can look in our top level pom and see: <ee8.jetty.servlet.api.version>4.0.6</ee8.jetty.servlet.api.version>
<ee9.jakarta.servlet.api.version>5.0.0</ee9.jakarta.servlet.api.version>
<ee10.jakarta.servlet.api.version>6.0.0</ee10.jakarta.servlet.api.version>
<ee11.jakarta.servlet.api.version>6.1.0</ee11.jakarta.servlet.api.version> Having these in the top level makes sure we implement and then test/demo the same things when we say eeX. HOWEVER.... I do question the value of having all the non-API dependencies in the top level. These are things that are private to the implementation and have no need of coordination over multiple sub-modules. So perhaps we should move the non-api dependencies back to the sub-modules..... however, I do see that a lot of other such dependencies are already defined in the top level. So a clear policy for such dependencies should be defined. But I still don't see the actual problem is we decided to declare all our dependencies in the top level, so long as we avoid name clashes. Note that, API version is something that a human needs to explicitly manage. EVEN IF the dependabot tools are broken by having API versions in the top level, I don't see that as a problem as Dependabot should never be doing an upgrade from servlet 6.1 to servlet 6.2. Finally, in this PR, I see you are declaring some dependency version in the DependencyManagement clauses themselves. I really don't like mixing styles like that. I think all our dependency versions should be properties, even if only local or sub module ones. We should never need to go searching for a dependency version.... currently I look for a version in the properties of a pom.xml file, if I don't find it there, then I'm looking at the parent pom, not down the maybe long file at the dependency clauses themselves. |
Unlike prior versions of Jetty (eg: Jetty 9 thru Jetty 11), our code tree is no longer viewed as a single reactor with simple dependency convergence. Now we have separate scopes of dependencies.
For any tooling that relies on knowing or updating dependencies, each of those 5 bullet points represents a single configuration for that tooling. This is because a upgrade to a maven coordinate in say Think of each dependency scope as a standalone git repository (and maven reactor), as that's how our project works right now. This is accomplished by tooling configurations which specify a scanning root directory with include / exclude directories. When the 12.1.x commit yanked the critical versions strings (eg: All those tools see is that the responsibility of versions is not within the scope it being provided, so nothing will be seen, reported, or ugraded. This is exactly the same behavior if you had the following ....
Now you sic tooling at
The example of
See above, this has knee-capped the ability of tooling to do updates, as they are not managed in the right place.
Bad examples, each of those are "Jakarta EE" dependencies, not "Jetty EE" dependencies.
The The new
It's not just Dependabot (we are waiting on dependabot/dependabot-core#4364 before we can turn that on for Jetty 12.0.x trees), but things like Renovatebot (similar to dependabot that we are evaluating), our IDE tooling, and various maven plugins too.
The changes in |
@joakime Reading what you are saying, it comes across as "you stupid idiots you've screwed everything up - yuck!". But what I think you are trying to say is "Oh I see what you've done there removing duplicate dependencies, however, because some of our tooling is not so good, then we might need to consider alternatives". However, even if that is what you are saying, I still don't understand the issue. You say that some of the tool configurations are rooted at jetty-eeX, so any properties defined above that are invisible to it. Then let's not root those configurations at The example of a top level property that I picked Maybe having jakarta EE boms is a good idea... if by that you mean having a pom that lists all the versions for API dependencies.. but isn't that what I was suggesting by just having the API properties in the top level (where we don't want tooling to change them anyway) and moving the implementation dependencies down to the individual modules (and tooling can update them). I think what was suggested is not too far away from what you are describing, but it is very hard to tell with your "it's all totally screwed" language. In short, I absolutely want to see a solution that avoids duplication of API style dependencies versions... be that at the top level or some top level boms. I also think it OK for implementation level dependencies to be declared lower down in the module tree, but I do see many implementation dependencies already specified at the top level and the sky has not yet fallen as a result. So we do need a better policy for deciding where such dependencies go. |
What really struggles me and makes the poms hard/confusing to read is those double interpolation
we are in jetty-ee9 tree why not simply using |
I did it primarily because it was the least disturbance to the poms - no other pom needed to change other than the top level one in the |
Closing, as this solution is undesired by @gregw and @janbartel |
Reverting top level ee# version properties, as it prevents the tooling built around versions to update the
/jetty-ee#/
trees in isolation of each other.Also, changed the
/jetty-demos/
tree to depend on Jakarta EE, not Jetty EE.