void (CompileContext compileContext, final Artifact artifact) { if (myExtensionProperties.myEnabled) { final Project project = compileContext.getProject(); final AntBuildTarget target = findTarget(AntConfiguration.getInstance(project)); if (target != null) { final DataContext dataContext = SimpleDataContext.getProjectContext(project); List<BuildFileProperty> properties = getAllProperties(artifact); final boolean success = AntConfigurationImpl.executeTargetSynchronously(dataContext, target, properties); if (!success) { String message = AntBundle.message("cannot.build.artifact.using.ant.target", artifact.getName(), target.getDisplayName()); compileContext.addMessage(CompilerMessageCategory.ERROR, message, null, -1, -1); } } } }