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

fix: Configure the project for the ProjectBuildingRequest being used. #473

Merged
merged 1 commit into from
Feb 13, 2023

Conversation

michael-simons
Copy link
Contributor

The ProjectBuildingRequest requires a project to be configured. This project is not available by default. The ProjectBuildingRequest is mutable, so I did not use the exiting class variable. Instead, I suggest not storing the request but create one as needed. For that purpose, the Maven session is now kept around.

When requiring a request with a project, the existing copy-constructor is new used and a project is configured as needed.

This change also fixes the tests (expecting 0 instead of 1 dependencies). This change has little effect though, as the MavenProjectLicensesIT does not actually run.

This fixes #377.

The `ProjectBuildingRequest` requires a project to be configured. This project is not available by default. The `ProjectBuildingRequest` is mutable, so I did not use the exiting class variable. Instead, I suggest not storing the request but create one as needed. For that purpose, the Maven session is now kept around.

When requiring a request with a project, the existing copy-constructor is new used and a project is configured as needed.

This change also fixes the tests (expecting 0 instead of 1 dependencies). This change has little effect though, as the `MavenProjectLicensesIT` does not actually run.

This fixes mathieucarbou#377.
@hazendaz hazendaz self-assigned this Feb 13, 2023
@hazendaz hazendaz merged commit 3e5fd79 into mathieucarbou:master Feb 13, 2023
@mathieucarbou mathieucarbou added this to the 4.2 milestone Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

License enforcement fails on 4.2.rc3
3 participants