-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Enforce supported Maven versions #13023
Conversation
Our builds are currently not compatible with Maven versions < 3.1.0 and >= 3.3.0. This commit will enforce Maven 3 versions that our builds are known to be compatible with. We will consider these our supported Maven versions. Closes #13022
See #13013 |
Closing as #13013 was already opened earlier to achieve the same. |
Reopened as #13013 was only aimed at the distribution module. |
I agree, this is needed, otherwise we will get strange questions or wacky artifacts being built. Also we need it going forward too, this stuff changes over time, we want build servers to fail hard if they are misconfigured and not leave us debugging something complex. |
I'm -1 on this change sorry for all the reasons I gave there: #13013 (comment) The most important to my heart is this one:
I'm perfectly fine of failing (or warning only is even better) a single "minor" module such as a rpm one. Basically it will be only a constraint for people having Most likely they won't run QA tests when contributing to the project. So they won't hit any maven issue. |
I'm not sure that I see the issue with that. Analogously, we have upper bounds on Java language versions (right now Java 7 even though JDK 7 is past end of life).
People do build and package elasticsearch from source. We get questions it. We even call out the instructions for doing so in our README that is displayed on our project page. If we are going to be supporting and answering issues regarding such topics, we should enforce versions that we know our build works with top to bottom with. Those will be our supported versions. |
I agree with @jasontedor for this, Maven versions should be bounded just like JDK versions are. Users can and will build their own distribution packages and we should ensure they use a non-broken version of Maven to do that. |
Just because Oracle has end-of-life-ed 1.7 doesn't mean its dead. RedHat will continue to support the OpenJDK 7 for a long time. But we've wandered off the point pretty far.
I'm all for this but in that case we have to work harder to get the build working with maven 3.3 because its what you get when you |
That is not germane to this discussion.
That's easily solved with
It's not. You actually get 3.0.5.
Out of the box this won't do anything. You have to set up a repo manually. Done using a common repo gives version 3.2.5. To the best of my knowledge, there is no official repo. As a last point, I don't think the defaults much matter. |
Also, Regardless, the whole point is that if someone does |
+1 |
I'm not totally sure that contributors will appreciate having to change their maven version unless they work only on elasticsearch which I doubt. Again, I'm totally +1 to limit the lower value to at least And what is wrong with 3.3? Only QA multinode module fails if you run it from root dir. mvn clean install -pl !smoke-test-multinode
mvn clean install -pl smoke-test-multinode My cents. |
Given your points above about ubuntu and rhel's default versions I think we can get away with just failing the build on Maven 3.3. I think defaults matter very much as they are the most likely thing to be on a new contributor's laptop. But if 3.0.5 and 3.2.5 are what you normally end up with in deb and rpm land that'll cover at least half of the folks and we aren't leaving too many people having to downgrade. |
To add another data point, as recently as OS X 10.8, Macs shipped with Maven 3.0.3 out of the box, no install required (although you did have to accept the Java 6 download). The defaults vary wildly from platform to platform which is why they should only play a small role in determining which versions we support. |
This is a blocker. Being lenient here is not helpful. Asking to widen the support beyond what works already is irrelevant. If its a pain in the ass to get the versions we support that is irrelevant, it is what it is. When I see stuff like https://discuss.elastic.co/t/error-building-rpm-against-2-0-branch/, then I know we need this PR like, yesterday. Repeat after me: we will start making software that works, we will start making software that works... |
Enforce supported Maven versions
This commit backports the pull request #13023 from master to 2.0.
Removing the blocker label since this has been integrated into master and 2.0. |
Our builds are currently not compatible with Maven versions
< 3.1.0
and>= 3.3.0
. This commit will enforce Maven 3 versions that our builds areknown to be compatible with. We will consider these our supported Maven
versions.
Closes #13022