mirror of https://github.com/apache/maven.git
Final fix for the problem where snapshot plugin repositories from external profiles were not being used. Added code for setting remote repos to MavenProject, after profile injection.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@733655 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9c67a22ddc
commit
192af339c6
|
@ -25,6 +25,7 @@ import java.text.SimpleDateFormat;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -335,7 +336,25 @@ public class DefaultMavenProjectBuilder
|
|||
projectProfiles.addAll( profileAdvisor.applyActivatedExternalProfiles( project.getModel(), project.getFile(), externalProfileManager ) );
|
||||
|
||||
project.setActiveProfiles( projectProfiles );
|
||||
try
|
||||
{
|
||||
LinkedHashSet repoSet = new LinkedHashSet();
|
||||
if ( ( model.getRepositories() != null ) && !model.getRepositories().isEmpty() )
|
||||
{
|
||||
repoSet.addAll( model.getRepositories() );
|
||||
}
|
||||
|
||||
if ( ( model.getPluginRepositories() != null ) && !model.getPluginRepositories().isEmpty() )
|
||||
{
|
||||
repoSet.addAll( model.getPluginRepositories() );
|
||||
}
|
||||
|
||||
project.setRemoteArtifactRepositories( mavenTools.buildArtifactRepositories( new ArrayList( repoSet ) ) );
|
||||
}
|
||||
catch ( Exception e )
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
return project;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue