in src/main/java/org/apache/maven/artifact/ant/AbstractArtifactWithRepositoryTask.java [151:175]
public void addConfiguredRemoteRepository( RemoteRepository remoteRepository )
{
if ( remoteRepository.getRefid() != null )
{
// check that the refid points to a repository that is properly defined
String refid = remoteRepository.getRefid();
if ( getProject().getReference( refid ) == null )
{
throw new BuildException( "Unknown remote repository refid='" + refid + "'." );
}
}
// Validate the url and id parameters before adding the repository
if ( remoteRepository.getUrl() == null )
{
throw new BuildException( "Each remote repository must specify a url." );
}
if ( remoteRepository.getId() == null || remoteRepository.getId().equals( remoteRepository.getUrl() ) )
{
log( "Each remote repository must specify a unique id. For backward-compatibility, "
+ "a default id will be used. In future releases, a missing repository id will raise an error.",
Project.MSG_WARN );
remoteRepository.setId( generateDefaultRepositoryId( remoteRepository ) );
}
remoteRepositories.add( remoteRepository );
}