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
Make sure “latest”/“release” version on Maven Central is not the jre6/jre7 version #1551
Comments
This has nothing to do with release order. It is caused by how maven
handles semantic versions. Anything with an additional version “segment” is
considered newer.
…On Wed, Aug 28, 2019 at 11:40 AM maffe ***@***.***> wrote:
*I'm submitting a ...*
- bug report
- feature request
*Describe the issue*
The “latest version” as reported by the Central Repository Search Engine
<https://search.maven.org/search?q=g:org.postgresql%20AND%20a:postgresql>
(linked on the pgjdbc download page
<https://jdbc.postgresql.org/download.html>) and the Versions Maven Plugin
<https://www.mojohaus.org/versions-maven-plugin/> (mvn
versions:display-dependency-updates
<https://www.mojohaus.org/versions-maven-plugin/display-dependency-updates-mojo.html>)
report the jre7 version as the latest version:
[INFO] org.postgresql:postgresql ...................... 42.2.6 ->
42.2.6.jre7
*Driver Version?*
42.2.6
*To Reproduce*
Look at
https://repo.maven.apache.org/maven2/org/postgresql/postgresql/maven-metadata.xml
*Expected behaviour*
Metadata shows
<latest>42.2.6.jre7</latest>
<release>42.2.6.jre7</release>
but should read
<latest>42.2.6</latest>
<release>42.2.6</release>
Maybe this could be solved by changing the order of deployments or via
#347 <#347>. I just wanted to
track this specific issue (mainly wrong reports by automated tools like the
Versions plugin) independent of any planned changes which may or may not
resolve the display of the latest version number.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1551?email_source=notifications&email_token=AAW3U3NXCCPBWGATKSZUOOTQG2TANA5CNFSM4IRMHVOKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HH7IKRA>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAW3U3KEVJWCREWM7XDSMSDQG2TANANCNFSM4IRMHVOA>
.
|
Why don't all the releases have suffixes? The non-suffix version currently requires JDK 8 which already is is of varying degrees of EOL. Why not explicitly suffix it with ".jre8" so that when a ".jre11" (or whatever is next) comes along there's no ambiguity. Otherwise it'd be a different min JDK version for the same Maven coordinates depending on the driver version. I thought this topic came up once before but I can't find anything on GitHub or the mailing list referencing it so posting it here. |
Well hopefully once we EOL 6 and 7 we would only have 1 jar... Is that realistic ? |
We could use classifiers if we migrate to Gradle. |
@davecramer I don't think so as the JDBC spec itself could change across versions. Ditto for possibly non-backwards compatible changes in the JDK. It's not likely that anything like that would break code in the driver but it's possible so nice to have an escape hatch. |
@vlsi Why does that require gradle? And would that still work for someone pulling the artifacts via regular Maven? |
Currently we use It makes no sense to patch Gradle provides much better developer experience.
Yes. Lots of libraries use Gradle for build and they are consumable by Maven just fine. |
FYI, migrating to Gradle is #1440. |
@vlsi is the expert at migrating to gradle! |
You might want to try https://github.com/apache/jmeter Gradle-based build. It is something I've implemented, so pgjdbc's build would likely look and feel very close to that. Some Gradle commands to try can be found in https://github.com/apache/jmeter/blob/master/gradle.md Here's an asciinema of the release process: https://asciinema.org/a/259862 |
Maven Central still shows the Also the
The project now uses Gradle (#1440), does this mean it’s now possible to fix the metadata to not have the |
IIRC, the versions maven plug-in is simply using maven’s semantic
versioning rules.
Additional segments on the version are judged to be “newer”.
…On Mon, Jun 28, 2021 at 2:49 PM maffe ***@***.***> wrote:
Maven Central
<https://search.maven.org/search?q=g:org.postgresql%20AND%20a:postgresql>
still shows the .jre7 JAR as the latest release.
Also the .jre7 JAR shows up as an update in
org.codehaus.mojo:versions-maven-plugin:2.8.1:display-dependency-updates:
The following dependencies in Dependencies have newer versions:
org.postgresql:postgresql .................... 42.2.22 -> 42.2.22.jre7
The project now uses Gradle (#1440
<#1440>), does this mean it’s now
possible to fix the metadata
<https://repo.maven.apache.org/maven2/org/postgresql/postgresql/maven-metadata.xml>
to not have the .jre7as the latest and release version?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1551 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAW3U3PJDHDSFFCSZFM4ZY3TVDG5FANCNFSM4IRMHVOA>
.
|
I fixed the versions plugin by ignoring the JRE6/7 artifacts with the following ruleset:
Unfortunately it’s not possible to put these rules directly in a POM. See this answer for how to reference the file from a dependency to benefit from Maven’s resolution mechanism. Now only Maven Central and the metadata display the |
I guess there are two approaches here: |
I'm liking option a) above, then we can move forward with some things. |
I'm submitting a ...
Describe the issue
The “latest version” as reported by the Central Repository Search Engine (linked on the pgjdbc download page) and the Versions Maven Plugin (
mvn versions:display-dependency-updates
) report thejre7
version as the latest version:[INFO] org.postgresql:postgresql ...................... 42.2.6 -> 42.2.6.jre7
Driver Version?
42.2.6
To Reproduce
Look at https://repo.maven.apache.org/maven2/org/postgresql/postgresql/maven-metadata.xml
Expected behaviour
Metadata shows
but should read
Maybe this could be solved by changing the order of deployments or via #347. I just wanted to track this specific issue (mainly wrong reports by automated tools like the Versions plugin) independent of any planned changes which may or may not resolve the display of the latest version number.
The text was updated successfully, but these errors were encountered: