@AllowConcurrentEvents @Subscribe public void on(final RepositoryItemEventStore eventStore) { if (isRpmItemEvent(eventStore)) { final Yum yum = yumRegistryProvider.get().get(eventStore.getRepository().getId()); if (yum != null && yum instanceof YumHosted) { ((YumHosted) yum).markDirty(getItemVersion(eventStore.getItem())); ((YumHosted) yum).addRpmAndRegenerate(eventStore.getItem().getPath()); } } }
private void onItemStore(RepositoryItemEventStore evt) throws IOException, ArtifactDescriptorException { // we only care about POM files StorageItem item = evt.getItem(); if (item instanceof StorageFileItem && item.getPath().endsWith(".pom")) { calculator.calculateArtifactUsage((StorageFileItem) item); } }