-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 Maven Resolver 1.9.7 and Maven Resolver Provider 3.9.1 #1415
Conversation
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.
Thanks for the PR! I've left a comment for you when you have time.
@@ -81,6 +82,15 @@ class MavenResolverDependencyManagementVersionResolver implements DependencyMana | |||
LocalRepository localRepository = new LocalRepository(cacheLocation.toFile()); | |||
this.repositorySystem = serviceLocator.getService(RepositorySystem.class); | |||
session.setLocalRepositoryManager(this.repositorySystem.newLocalRepositoryManager(session, localRepository)); | |||
final Properties systemProperties = new Properties(); |
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.
Can you explain this change and why you think it's necessary. I remember that something was off so I'd like to understand how you found out about this.
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.
Sure,
When we upgrade from maven provider 3.8.7 to 3.9.1, we get ModelBuildingException as you mentioned in #1399.
This exception occurs at line 65 in JdkVersionProfileActivator class when the value for
java.version is accessed from system properties.
In version 3.8.7, system properties value was already being set in MavenRepositorySystemUtils 3.8.7 but were not being set in MavenRepositorySystemUtils 3.9.1.
Thus I simply added the missing system properties in the way originally present in MavenRepositorySystemUtils 3.8.7.
@prithvitewatia thank you for making your first contribution to Spring Initializr. |
This PR closes issues #1399 and #1400.
Maven resolver provider 3.9.1 has dependency maven resolver 1.9.7. Thus, this PR may close both the issues.