Skip to content

Commit

Permalink
Fix #348 - Use repositories defined in project for artifact resolving
Browse files Browse the repository at this point in the history
  • Loading branch information
slawekjaranowski committed Mar 25, 2023
1 parent 1be6c77 commit 35e1fe0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/codehaus/mojo/flatten/FlattenMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ private ModelBuildingRequest createModelBuildingRequest(File pomFile) {
repositorySystem,
trace,
context,
RepositoryUtils.toRepos(session.getProjectBuildingRequest().getRemoteRepositories()),
project.getRemoteProjectRepositories(),
getReactorModelsFromSession());
Properties userProperties = this.session.getUserProperties();
List<String> activeProfiles = this.session.getRequest().getActiveProfiles();
Expand Down Expand Up @@ -1028,7 +1028,7 @@ private void createFlattenedDependenciesAll(
final Artifact projectArtifact = this.project.getArtifact();

CollectRequest collectRequest = new CollectRequest();
collectRequest.setRepositories(project.getRemotePluginRepositories());
collectRequest.setRepositories(project.getRemoteProjectRepositories());
collectRequest.setRootArtifact(RepositoryUtils.toArtifact(projectArtifact));
for (Dependency dependency : projectDependencies) {
collectRequest.addDependency(RepositoryUtils.toDependency(
Expand Down

0 comments on commit 35e1fe0

Please sign in to comment.