} );
Iterator<FileMetadata> iterator = filesToAdd.iterator();
boolean pomGenerated = false;
while ( iterator.hasNext() )
{
FileMetadata fileMetadata = iterator.next();
log.debug( "fileToAdd: {}", fileMetadata );
saveFile( repositoryId, fileMetadata, generatePom && !pomGenerated, groupId, artifactId, version,
packaging );
pomGenerated = true;
deleteFile( fileMetadata.getServerFileName() );
}
filesToAdd = Iterables.filter( fileMetadatas, new Predicate<FileMetadata>()
{
public boolean apply( FileMetadata fileMetadata )
{
return fileMetadata != null && fileMetadata.isPomFile();
}
} );
iterator = filesToAdd.iterator();
while ( iterator.hasNext() )
{
FileMetadata fileMetadata = iterator.next();
log.debug( "fileToAdd: {}", fileMetadata );
savePomFile( repositoryId, fileMetadata, groupId, artifactId, version, packaging );
deleteFile( fileMetadata.getServerFileName() );
}
return Boolean.TRUE;
}