-
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
Ensure all eeX versions of the plugin use prefix "jetty" #9156
Ensure all eeX versions of the plugin use prefix "jetty" #9156
Conversation
how do you know which version you are using when simply using |
@olamy but sure you must declare the plugin in the pom of your webapp, so there's no confusion as to which one you are using? It would be highly unlikely that anyone would declare multiple versions of jetty plugin for the same webapp. |
If someone has more than 1 of them in their local repo, the use of You could setup a specific one via it's groupId in the Perhaps we need only 1 |
There's nothing new here. If you have multiple previous versions of jetty (7, 8, 9, 10, 11 etc) in your repo the same would be true. Note that if I don't define the plugin in the pom - or don't get the right maven coordinates - jetty-8 runs and it's not even in my repo.
Maybe that could be a future enhancement. However, we don't do that for standalone jetty (eg the deployer doesn't work out what modules to run based on your webapp) because it's difficult and error-prone. If we work out a good algorithm for stand-alone jetty we could look at applying it to the plugin in the future. The solution for running multiple different |
…9155-jetty-plugin-prefix
we need to check as well what is the side effect for users who have registered a |
@olamy, well, if they specified |
Not sure how this will work with multi module build (e.g using Furthermore we have been quite good to fix all the wrong maven naming convention we had with jetty-12.0.x, I don't like much the idea to reintroduce a new one. |
@olamy I don't see the problem with multi-module builds, can you explain that?
We comply with maven naming conventions. Our artifacts are named |
This is the part that bothers me. With this proposed change, using If this is your concern, then the solution should be ...
Basically, correct bad behavior, not introduce more bad behavior. The second bullet point should happen, regardless of what else we do with this issue. |
Not true. In order to resolve a command line like "mvn jetty:run" you must either: specify the
By not specifying the version of the plugin in your pom, you are also asking for a non-repeatable build, as maven will pick whatever is the highest version of the plugin matching the So it has never been the case that you can just type "mvn jetty:run" at the command line and expect it to work without configuring something. There is nothing different about the change I'm proposing for jetty-12. Those users who have fully specified a pre-jetty-12 version of plugin in their pom are using "jetty:run", and will not be using the jetty-12 version unless they change that specification. For either of these sets of users, with the change I'm proposing, after updating either their I think if we change the well-known goal name then we will have to well document that but also be in for a lot of posts to the jetty email groups that "mvn jetty:run" doesn't work any more. I just don't see any end-user benefit in changing to "mvn jetty-eeX:run". If there is some significant benefit, can you explain what it is? |
a few organisations use the concept of huge mono repo and so with maven modules still in ee8 living with modules already converted to ee9/ee10.
Maybe I'm wrong but I really feel this more in the spirit/convention/etc... we did with jetty 12.
|
@olamy I'm still not seeing the problem. I'm attaching a multimodule project that has 2 webapps and one tld that both webapps depend on. |
There is the problem I was expecting. In the tld module the wrong plugin is used.
BTW the |
But the jetty plugin is not used by the tld module.
It's not a trick, I'm just following the maven documentation :) See https://maven.apache.org/guides/plugin/guide-java-plugin-development.html. Nothing about having to declare your plugins differently whether they are or aren't bound to a phase. Now, with your extra insight into maven, maybe they should be, which means the maven documentation is wrong, which means millions of other users like me are "doin' it 'rong" and have been for years. Can you clarify how you think having multiple different jetty-12 jetty plugin artifacts is any different to having multiple different pre-jetty-12 jetty plugin artifacts in a multimodule build? It seems an identical situation to me. |
@janbartel @olamy @joakime Throwing in my 2c from a 20,000 ft mixed metaphor view... without having read the detail.... We've not renamed If we REALLY need to put the "eeX" name in there, then it should be |
But it is executed and with the wrong version! anyway if you want to merge this just do it. I'm just 0 as I feel it's wrong because of the naming. |
Irrelevant, If you want to go down this path, then this further enforces the idea that we should not have multiple |
I totally agree, the typical maven plugin lookup is based on start.jar is environment neutral, and even supports environments that we haven't even thought of yet. |
The We've always been able to just do If we introduce env prefixes now, and then in 12.0.1 or 12.1.0 we work out how to have a single plugin with multiple env support, then we have thrown away decades of legacy to momentarily support a new command structure that exposes a temporary internal implementation. |
This is not true. You can configure different plugins in different modules or put different plugins in different profiles. It is no different to how we have always been able to test against different versions of jetty. |
Closes #9155.
Ensure all jetty maven plugins use the prefix
jetty
, rather than the default generatedjetty-eeX
prefix.