Map<String, Profile> profilesAsMap = settings.getProfilesAsMap();
if ( profileIds != null && !profileIds.isEmpty() )
{
for ( String profileId : profileIds )
{
Profile profile = profilesAsMap.get( profileId );
List<Repository> repos = profile.getRepositories();
if ( repos != null && !repos.isEmpty() )
{
for ( Repository repo : repos )
{
remoteRepositories.add( artifactRepositoryFactory.createArtifactRepository( repo.getId(), repo