remoteRepository.setUrl( "http://localhost:" + redirectPort );
getRemoteRepositoriesService().updateRemoteRepository( remoteRepository );
RoleManagementService roleManagementService = getRoleManagementService( authorizationHeader );
if ( !roleManagementService.templatedRoleExists( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER,
"internal" ) )
{
roleManagementService.createTemplatedRole( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER, "internal" );
}