Skip to content

Make Maven 4 loads real projects (with CI friendly version processing) #217

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ void addDependencySet(
: null;

for (final Artifact depArtifact : dependencyArtifacts) {
ProjectBuildingRequest pbr = getProjectBuildingRequest(configSource);
boolean isProjectArtifact = depArtifact.getRepository() == null;
ProjectBuildingRequest pbr = getProjectBuildingRequest(configSource, isProjectArtifact);
MavenProject depProject;
try {
ProjectBuildingResult build = projectBuilder1.build(depArtifact, pbr);
Expand All @@ -165,10 +166,15 @@ void addDependencySet(
}
}

private ProjectBuildingRequest getProjectBuildingRequest(AssemblerConfigurationSource configSource) {
return new DefaultProjectBuildingRequest(configSource.getMavenSession().getProjectBuildingRequest())
.setValidationLevel(ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL)
.setProcessPlugins(false);
private ProjectBuildingRequest getProjectBuildingRequest(
AssemblerConfigurationSource configSource, boolean isProjectArtifact) {
DefaultProjectBuildingRequest pbr =
new DefaultProjectBuildingRequest(configSource.getMavenSession().getProjectBuildingRequest());
if (!isProjectArtifact) {
pbr.setValidationLevel(ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL)
.setProcessPlugins(false);
}
return pbr;
}

private boolean isUnpackWithOptions(DependencySet dependencySet) {
Expand Down
Loading