ConfigCapability extends CapabilitySupport implements Capability,
		ConfigEntry { private boolean isSnapshot(final String path) { return path.contains("-SNAPSHOT/"); } @Inject  ConfigCapability( //
			final CarrotMailer mailer, //
			final AmazonFactory amazonFactory, //
			@Named("base") final Reporter reporter, //
			@Named("maven2") final GavCalculator calculator, //
			final CapabilityRegistry capaRegistry, //
			final NexusIsActiveCondition nexusCondition, //
			final TaskManager scannerManager, //
			final RepositoryRegistry repoRegistry, //
			final EventBus eventBus, //
			final ConditionFactory conditionFactory //
	); @Override String configId(); @Override ConfigState configState(); @Override boolean isConfigState(final ConfigState state); @Override AmazonService amazonService(); @Override String comboId(); @Override boolean isExcluded(final String path); @Override Set<Report> reportSubscribeSet(); @Override boolean isSubscribed(final Report report); @Override List<String> reportEmailList(); @Override String status(); @Override void onCreate(); @Override void onLoad(); @Override void onUpdate(); @Override void onRemove(); @Override void onActivate(); @Override void onPassivate(); @Override String description(); @Override Condition activationCondition();  }
@Test public void testGAV() { final M2GavCalculator calc = new M2GavCalculator(); { final String path = "/junit/junit/3.8.1/junit-3.8.1.pom"; final Gav gav = calc.pathToGav(path); log(path, gav); assertFalse(gav.isSnapshot()); } { final String path = "junit/junit/1.4.3-SNAPSHOT/junit-1.4.3-20120912.150156-11.pom"; final Gav gav = calc.pathToGav(path); log(path, gav); assertTrue(gav.isSnapshot()); } { final String path = "junit/junit/1.4.3-SNAPSHOT/junit-1.4.3-SNAPSHOT.pom"; final Gav gav = calc.pathToGav(path); log(path, gav); assertTrue(gav.isSnapshot()); } { final String path = "junit/junit/hello/junit-1.4.3-SNAPSHOT.pom"; final Gav gav = calc.pathToGav(path); log(path, gav); assertNull(gav); } { final String path = "/.nexus/junit/junit/3.8.1/junit-3.8.1.pom"; final Gav gav = calc.pathToGav(path); log(path, gav); assertNotNull(gav); } { final String path = "/junit/junit/3.8.1/junit-3.8.1.pom.sha1"; final Gav gav = calc.pathToGav(path); log(path, gav); assertTrue(gav.isHash()); } { final String path = "/junit/junit/3.8.1/junit-3.8.1.pom.md5"; final Gav gav = calc.pathToGav(path); log(path, gav); assertTrue(gav.isHash()); assertFalse(gav.isSnapshot()); } { final String path = "/junit/junit/3.8.1-SNAPSHOT/junit-3.8.1-SNAPSHOT.pom.asc"; final Gav gav = calc.pathToGav(path); log(path, gav); assertTrue(gav.isSignature()); assertTrue(gav.isSnapshot()); } { final String path = "/"; final Gav gav = calc.pathToGav(path); log(path, gav); assertNull(gav); } { final String path = "jboss-releases-thirdparty/esper/esper/2.2.0-JBoss-Nightly/esper-2.2.0-JBoss-Nightly.jar"; final Gav gav = calc.pathToGav(path); log(path, gav); assertNotNull(gav); } }