Skip to content

Upgrade to Maven Resolver 1.9.7 and Maven Resolver Provider 3.9.1#1415

Closed
prithvitewatia wants to merge 2 commits intospring-io:mainfrom
prithvitewatia:gh-1400
Closed

Upgrade to Maven Resolver 1.9.7 and Maven Resolver Provider 3.9.1#1415
prithvitewatia wants to merge 2 commits intospring-io:mainfrom
prithvitewatia:gh-1400

Conversation

@prithvitewatia
Copy link
Copy Markdown
Contributor

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.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 22, 2023
Copy link
Copy Markdown
Contributor

@snicoll snicoll left a 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.

LocalRepository localRepository = new LocalRepository(cacheLocation.toFile());
this.repositorySystem = serviceLocator.getService(RepositorySystem.class);
session.setLocalRepositoryManager(this.repositorySystem.newLocalRepositoryManager(session, localRepository));
final Properties systemProperties = new Properties();
Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor Author

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 prithvitewatia requested a review from snicoll May 23, 2023 10:07
@snicoll snicoll changed the title Closes #1399 #1400. Upgrade maven resolver to 1.9.7 and maven resolver provider to 3.9.1 Upgrade to Maven Resolver 1.9.7 and Maven Resolver Provider 3.9.1 May 24, 2023
@snicoll snicoll removed the status: waiting-for-triage An issue we've not yet triaged label May 24, 2023
@snicoll snicoll self-assigned this May 24, 2023
@snicoll snicoll added this to the 0.20.0 milestone May 24, 2023
snicoll added a commit that referenced this pull request May 24, 2023
@snicoll snicoll closed this in 16324fd May 24, 2023
@snicoll
Copy link
Copy Markdown
Contributor

snicoll commented May 24, 2023

@prithvitewatia thank you for making your first contribution to Spring Initializr.

@prithvitewatia prithvitewatia deleted the gh-1400 branch June 14, 2023 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants