mirror of
https://github.com/apache/maven.git
synced 2025-02-08 11:05:37 +00:00
Fix for IT0096, IT0097. Now checking session to see if plugin is part of reactor before trying to resolve it.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@701563 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c577d07305
commit
d17fd4ca86
@ -94,9 +94,23 @@ public Artifact resolvePluginArtifact( Plugin plugin,
|
|||||||
|
|
||||||
remoteRepositories.addAll( project.getRemoteArtifactRepositories() );
|
remoteRepositories.addAll( project.getRemoteArtifactRepositories() );
|
||||||
|
|
||||||
MavenProject pluginProject = buildPluginProject( plugin,
|
MavenProject pluginProject = null;
|
||||||
|
for(MavenProject mp : (List<MavenProject>) session.getSortedProjects())
|
||||||
|
{
|
||||||
|
if(mp.getId().equals(project.getId()))
|
||||||
|
{
|
||||||
|
pluginProject = mp;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(pluginProject == null)
|
||||||
|
{
|
||||||
|
pluginProject = buildPluginProject( plugin,
|
||||||
localRepository,
|
localRepository,
|
||||||
remoteRepositories );
|
remoteRepositories );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
checkRequiredMavenVersion( plugin, pluginProject, localRepository, remoteRepositories );
|
checkRequiredMavenVersion( plugin, pluginProject, localRepository, remoteRepositories );
|
||||||
|
|
||||||
@ -121,7 +135,6 @@ public MavenProject buildPluginProject( Plugin plugin,
|
|||||||
Artifact artifact = artifactFactory.createProjectArtifact( plugin.getGroupId(),
|
Artifact artifact = artifactFactory.createProjectArtifact( plugin.getGroupId(),
|
||||||
plugin.getArtifactId(),
|
plugin.getArtifactId(),
|
||||||
plugin.getVersion() );
|
plugin.getVersion() );
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return mavenProjectBuilder.buildFromRepository( artifact,
|
return mavenProjectBuilder.buildFromRepository( artifact,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user