Skip to content

Commit 02e72e2

Browse files
Revert change from #480 - plugin dependencies must be resolved from plugin repositories
1 parent 18a21ea commit 02e72e2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/main/java/org/codehaus/mojo/exec/AbstractExecMojo.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ protected Set<Artifact> determineRelevantPluginDependencies() throws MojoExecuti
320320
} else {
321321
getLog().debug("Selected plugin Dependencies will be included.");
322322
Artifact executableArtifact = this.findExecutableArtifact();
323-
relevantDependencies = this.resolveExecutableDependencies(executableArtifact);
323+
relevantDependencies = this.resolveExecutablePluginDependencies(executableArtifact);
324324
}
325325
} else {
326326
relevantDependencies = Collections.emptySet();
@@ -336,11 +336,13 @@ protected Set<Artifact> determineRelevantPluginDependencies() throws MojoExecuti
336336
* @return a set of Artifacts
337337
* @throws MojoExecutionException if a failure happens
338338
*/
339-
private Set<Artifact> resolveExecutableDependencies(Artifact executableArtifact) throws MojoExecutionException {
339+
private Set<Artifact> resolveExecutablePluginDependencies(Artifact executableArtifact)
340+
throws MojoExecutionException {
340341
try {
341342
CollectRequest collectRequest = new CollectRequest();
342343
collectRequest.setRoot(new Dependency(RepositoryUtils.toArtifact(executableArtifact), classpathScope));
343-
collectRequest.setRepositories(project.getRemoteProjectRepositories());
344+
// as this method is called only determineRelevantPluginDependencies, se we need a plugin repository here
345+
collectRequest.setRepositories(project.getRemotePluginRepositories());
344346

345347
DependencyFilter classpathFilter = DependencyFilterUtils.classpathFilter(classpathScope);
346348

0 commit comments

Comments
 (0)