@Test public void extremeSnapshot() throws Exception { MavenPath mavenPath; mavenPath = pathParser.parsePath( "/org/sonatype/nexus/nexus-webapp/1.0.0-beta-5-SNAPSHOT/nexus-webapp-1.0.0-beta-5-SNAPSHOT.tar.gz"); assertThat(mavenPath.getCoordinates(), notNullValue()); assertThat(mavenPath.getCoordinates().getExtension(), equalTo("tar.gz")); assertThat(mavenPath.getCoordinates().getClassifier(), nullValue()); assertThat(mavenPath.getCoordinates().getVersion(), equalTo("1.0.0-beta-5-SNAPSHOT")); assertThat(mavenPath.getCoordinates().getBaseVersion(), equalTo("1.0.0-beta-5-SNAPSHOT")); assertThat(mavenPath.getCoordinates().isSnapshot(), equalTo(true)); mavenPath = pathParser.parsePath( "/org/sonatype/nexus/nexus-webapp/1.0.0-beta-5-SNAPSHOT-1234/nexus-webapp-1.0.0-beta-5-SNAPSHOT-1234.tar.gz"); assertThat(mavenPath.getCoordinates(), notNullValue()); assertThat(mavenPath.getCoordinates().getExtension(), equalTo("tar.gz")); assertThat(mavenPath.getCoordinates().getClassifier(), nullValue()); assertThat(mavenPath.getCoordinates().getVersion(), equalTo("1.0.0-beta-5-SNAPSHOT-1234")); assertThat(mavenPath.getCoordinates().getBaseVersion(), equalTo("1.0.0-beta-5-SNAPSHOT-1234")); assertThat(mavenPath.getCoordinates().isSnapshot(), equalTo(false)); mavenPath = pathParser.parsePath( "/org/sonatype/nexus/nexus-webapp/1.0.0-beta-5-SNAPSHOT/nexus-webapp-1.0.0-beta-5-SNAPSHOT-bundle.tar.gz"); assertThat(mavenPath.getCoordinates(), notNullValue()); assertThat(mavenPath.getCoordinates().getExtension(), equalTo("tar.gz")); assertThat(mavenPath.getCoordinates().getClassifier(), equalTo("bundle")); assertThat(mavenPath.getCoordinates().getVersion(), equalTo("1.0.0-beta-5-SNAPSHOT")); assertThat(mavenPath.getCoordinates().getBaseVersion(), equalTo("1.0.0-beta-5-SNAPSHOT")); assertThat(mavenPath.getCoordinates().isSnapshot(), equalTo(true)); mavenPath = pathParser.parsePath( "/org/sonatype/nexus/nexus-webapp/1.0.0-beta-5-SNAPSHOT-1234/nexus-webapp-1.0.0-beta-5-SNAPSHOT-1234-bundle.tar.gz"); assertThat(mavenPath.getCoordinates(), notNullValue()); assertThat(mavenPath.getCoordinates().getExtension(), equalTo("tar.gz")); assertThat(mavenPath.getCoordinates().getClassifier(), equalTo("bundle")); assertThat(mavenPath.getCoordinates().getVersion(), equalTo("1.0.0-beta-5-SNAPSHOT-1234")); assertThat(mavenPath.getCoordinates().getBaseVersion(), equalTo("1.0.0-beta-5-SNAPSHOT-1234")); assertThat(mavenPath.getCoordinates().isSnapshot(), equalTo(false)); mavenPath = pathParser.parsePath("/org/sonatype/nexus-3148/1.0.SNAPSHOT/nexus-3148-1.0.20100111.064938-1.pom"); assertThat(mavenPath.getCoordinates(), notNullValue()); assertThat(mavenPath.getCoordinates().getExtension(), equalTo("pom")); assertThat(mavenPath.getCoordinates().getClassifier(), nullValue()); assertThat(mavenPath.getCoordinates().getVersion(), equalTo("1.0.20100111.064938-1")); assertThat(mavenPath.getCoordinates().getBaseVersion(), equalTo("1.0.SNAPSHOT")); assertThat(mavenPath.getCoordinates().isSnapshot(), equalTo(true)); }
@Nonnull @Override public MavenPath parsePath(final String path) { return parsePath(path, true); }
Maven2MavenPathParser extends ComponentSupport implements MavenPathParser { @Nonnull @Override public MavenPath parsePath(final String path) { return parsePath(path, true); } }
Maven2MavenPathParser extends ComponentSupport implements MavenPathParser { @Nonnull @Override public MavenPath parsePath(final String path) { return parsePath(path, true); }  }
Maven2MavenPathParser extends ComponentSupport implements MavenPathParser { @Nonnull @Override public MavenPath parsePath(final String path) { return parsePath(path, true); }  @Nonnull @Override MavenPath parsePath(final String path); @Nonnull @Override MavenPath parsePath(final String path, final boolean caseSensitive); @Override boolean isRepositoryMetadata(final MavenPath path); @Override boolean isRepositoryIndex(final MavenPath path); }
Maven2MavenPathParser extends ComponentSupport implements MavenPathParser { @Nonnull @Override public MavenPath parsePath(final String path) { return parsePath(path, true); }  @Nonnull @Override MavenPath parsePath(final String path); @Nonnull @Override MavenPath parsePath(final String path, final boolean caseSensitive); @Override boolean isRepositoryMetadata(final MavenPath path); @Override boolean isRepositoryIndex(final MavenPath path);  }