}
}
protected void setDefaultIvyDescriptor() {
Project project = getProject();
TaskContainer tasks = project.getTasks();
Configuration archiveConfig = project.getConfigurations().findByName(Dependency.ARCHIVES_CONFIGURATION);
if (archiveConfig == null) {
log.warn("Cannot publish Ivy descriptor if ivyDescriptor not set in task '{}' " +
"and no '{}' configuration exists in project '{}'.", Dependency.ARCHIVES_CONFIGURATION,
project.getPath());
} else {
// Flag to publish the Ivy XML file, but no ivy descriptor file inputted, activate default upload${configuration}.
// ATTENTION: Tasks not part of the execution graph have withType(Upload.class) false ?!? Need to check for type our self.
Task candidateUploadTask = tasks.findByName(archiveConfig.getUploadTaskName());
if (candidateUploadTask == null) {
log.warn("Cannot publish Ivy descriptor if ivyDescriptor not set in task '{}' " +
"and task '{}' does not exist." +
"\nAdding \"apply plugin: 'java'\" or any other plugin extending the 'base' plugin" +
"will solve this issue.",