code: public static RepositoryId getRepository(final MavenProject project,
  			final String owner, final String name) {
  		// Use owner and name if specified
  		if (!StringUtils.isEmpty(owner, name))
  			return RepositoryId.create(owner, name);
  
  		if (project == null)
  			return null;
  
  		RepositoryId repo = null;
  		// Extract repository from SCM URLs first if present
  		final Scm scm = project.getScm();
  		if (scm != null) {
  			repo = RepositoryId.createFromUrl(scm.getUrl());
  			if (repo == null)
  				repo = extractRepositoryFromScmUrl(scm.getConnection());
  			if (repo == null)
  				repo = extractRepositoryFromScmUrl(scm.getDeveloperConnection());
  		}
  
  		// Check project URL last
  		if (repo == null)
  			repo = RepositoryId.createFromUrl(project.getUrl());
  
  		return repo;
  	}
docs: Get repository
  
  @param project
  @param owner
  @param name
  
  @return repository id or null if none configured