Navigation Menu

Skip to content
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

Upgrade to MySQL 8.0.31 and extend dependency management to new Maven identifiers #32747

Closed
wants to merge 1 commit into from

Conversation

hpoettker
Copy link
Contributor

This PR upgrades MySQL Connector/J to version 8.0.31, switches to the new group id and artifact id, and extends dependency management to the new identifiers.

As of 8.0.31, the Maven group id and artifact id of MySQL Connector/J have been changed to com.mysql and mysql-connector-j, respectively. The previous ids will still work in the near future as relocation POMs are published to forward to the new coordinates: https://dev.mysql.com/doc/relnotes/connector-j/8.0/en/news-8-0-31.html

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 16, 2022
@wilkinsona
Copy link
Member

Thanks for the proposal. Unfortunately, I don't think we can merge this as it will break people's applications due to what appears to be a mistake in the artifacts published to Maven Central.

If an existing application depends on mysql:mysql-connector-java:8.0.30 and we upgrade to 8.0.31, building that application will try to resolve the pom file for mysql:mysql-connector-java:8.0.31. Unfortunately, it does not exist. It looks to me as if the relocation pom has been misnamed as the artifact id in its path does not match the artifact id in the file name:

https://repo.maven.apache.org/maven2/mysql/mysql-connector-java/8.0.31/mysql-connector-j-8.0.31.pom

Here's a failure for a Maven build that's trying to use 8.0.31 but with the previous coordinates:

 ./mvnw package
[INFO] Scanning for projects...
[INFO] 
[INFO] --------------------< com.example:mysql-relocation >--------------------
[INFO] Building mysql-relocation 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for mysql:mysql-connector-java:jar:8.0.31 is missing, no dependency information available
Downloading from central: https://repo.maven.apache.org/maven2/mysql/mysql-connector-java/8.0.31/mysql-connector-java-8.0.31.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.907 s
[INFO] Finished at: 2022-10-17T08:29:43+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project mysql-relocation: Could not resolve dependencies for project com.example:mysql-relocation:jar:0.0.1-SNAPSHOT: Could not find artifact mysql:mysql-connector-java:jar:8.0.31 in central (https://repo.maven.apache.org/maven2) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

Please report this to the MySQL project. We can consider this again if they fix the relocation pom.

@wilkinsona wilkinsona closed this Oct 17, 2022
@wilkinsona wilkinsona added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged labels Oct 17, 2022
@hpoettker
Copy link
Contributor Author

Thanks! I only tested the new identifiers and checked that there was a pom online.

A bug has been opened in the MySQL bug tracker: https://bugs.mysql.com/bug.php?id=108799

@wilkinsona
Copy link
Member

Thanks for the link to the MySQL issue. I've subscribed to it.

@fjssilva
Copy link

You are absolutely right, there's a mistake in the relocation POM name. We are fixing it as soon as possible.

Mind that we'll be publishing relocation POMs for a limited number of releases and you should move on to using the new maven coordinates as soon as possible.

Thank you for making us aware of the issue.

@hpoettker
Copy link
Contributor Author

The relocation pom seems to have been added with the correct file name:

https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.31/mysql-connector-java-8.0.31.pom

The artifact resolution through the relocation pom also works smoothly in the builds that I tested.

@wilkinsona wilkinsona reopened this Oct 19, 2022
@wilkinsona wilkinsona added type: dependency-upgrade A dependency upgrade and removed status: declined A suggestion or change that we don't feel we should currently apply labels Oct 19, 2022
@wilkinsona wilkinsona added this to the 2.6.x milestone Oct 19, 2022
@wilkinsona wilkinsona added the status: noteworthy A noteworthy issue to call out in the release notes label Oct 19, 2022
@wilkinsona
Copy link
Member

Thanks very much, @fjssilva and @hpoettker.

@wilkinsona wilkinsona modified the milestones: 2.6.x, 2.6.13 Oct 19, 2022
@hpoettker hpoettker deleted the mysql-connector-j branch October 19, 2022 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: noteworthy A noteworthy issue to call out in the release notes type: dependency-upgrade A dependency upgrade
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants