{
if ( StringUtils.isBlank( groupId ) || StringUtils.isBlank( artifactId ) )
{
return Collections.emptyList();
}
SearchFields searchField = new SearchFields();
searchField.setGroupId( groupId );
searchField.setArtifactId( artifactId );
searchField.setPackaging( StringUtils.isBlank( packaging ) ? "jar" : packaging );
searchField.setRepositories( getObservableRepos() );
try
{
SearchResults searchResults = repositorySearch.search( getPrincipal(), searchField, null );
return getArtifacts( searchResults );