@Override protected String buildTitle(NexusArtifactEvent event) { return buildFileName(event); }
private String buildFileName(NexusArtifactEvent event) { return buildFilePath(event).substring(buildFilePath(event).lastIndexOf("/") + 1); }
@Override protected String buildDescriptionMsgItem(NexusArtifactEvent event) { StringBuilder msg = new StringBuilder(); msg.append("The file '"); msg.append(buildFileName(event)); msg.append("' in repository '"); msg.append(getRepositoryName(event)); msg.append("' with path '"); msg.append(buildFilePath(event)); msg.append("'"); return msg.toString(); }
@Override public boolean shouldBuildEntry(final NexusArtifactEvent event) { if (!super.shouldBuildEntry(event)) { return false; } final Gav gav = buildGAV(event); if (gav != null) { if (gav.isHash() || gav.isSignature()) { return false; } } final String path = event.getNexusItemInfo().getPath(); if (path.contains("maven-metadata.xml")) { return false; } return true; }