@Test public void extremeExtAndClassifier() throws Exception { MavenPath mavenPath; mavenPath = pathParser.parsePath("/org/sonatype/nexus/nexus-webapp/1.0.0-beta-5/nexus-webapp-1.0.0-beta-5.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")); assertThat(mavenPath.getCoordinates().getBaseVersion(), equalTo("1.0.0-beta-5")); assertThat(mavenPath.getCoordinates().isSnapshot(), equalTo(false)); mavenPath = pathParser.parsePath("/org/sonatype/nexus/nexus-webapp/1.0.0-beta-5/nexus-webapp-1.0.0-beta-5-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")); assertThat(mavenPath.getCoordinates().getBaseVersion(), equalTo("1.0.0-beta-5")); assertThat(mavenPath.getCoordinates().isSnapshot(), equalTo(false)); mavenPath = pathParser.parsePath( "/org/codehaus/tycho/tycho-distribution/0.3.0-SNAPSHOT/tycho-distribution-0.3.0-SNAPSHOT-bin.tar.gz"); assertThat(mavenPath.getCoordinates(), notNullValue()); assertThat(mavenPath.getCoordinates().getExtension(), equalTo("tar.gz")); assertThat(mavenPath.getCoordinates().getClassifier(), equalTo("bin")); assertThat(mavenPath.getCoordinates().getVersion(), equalTo("0.3.0-SNAPSHOT")); assertThat(mavenPath.getCoordinates().getBaseVersion(), equalTo("0.3.0-SNAPSHOT")); assertThat(mavenPath.getCoordinates().isSnapshot(), equalTo(true)); mavenPath = pathParser.parsePath("/org/codehaus/tycho/tycho-distribution/SNAPSHOT/tycho-distribution-SNAPSHOT-bin.tar.gz"); assertThat(mavenPath.getCoordinates(), notNullValue()); assertThat(mavenPath.getCoordinates().getExtension(), equalTo("tar.gz")); assertThat(mavenPath.getCoordinates().getClassifier(), equalTo("bin")); assertThat(mavenPath.getCoordinates().getVersion(), equalTo("SNAPSHOT")); assertThat(mavenPath.getCoordinates().getBaseVersion(), equalTo("SNAPSHOT")); assertThat(mavenPath.getCoordinates().isSnapshot(), equalTo(true)); mavenPath = pathParser.parsePath( "/org/codehaus/tycho/tycho-distribution/0.3.0-SNAPSHOT/tycho-distribution-0.3.0-20080818.153246-33-bin.tar.gz"); assertThat(mavenPath.getCoordinates(), notNullValue()); assertThat(mavenPath.getCoordinates().getExtension(), equalTo("tar.gz")); assertThat(mavenPath.getCoordinates().getClassifier(), equalTo("bin")); assertThat(mavenPath.getCoordinates().getVersion(), equalTo("0.3.0-20080818.153246-33")); assertThat(mavenPath.getCoordinates().getBaseVersion(), equalTo("0.3.0-SNAPSHOT")); assertThat(mavenPath.getCoordinates().isSnapshot(), equalTo(true)); mavenPath = pathParser.parsePath("/org/sonatype/nexus/nexus-webapp/1.0.0-beta-4.2/nexus-webapp-1.0.0-beta-4.2-javadoc.jar"); assertThat(mavenPath.getCoordinates(), notNullValue()); assertThat(mavenPath.getCoordinates().getExtension(), equalTo("jar")); assertThat(mavenPath.getCoordinates().getClassifier(), equalTo("javadoc")); assertThat(mavenPath.getCoordinates().getVersion(), equalTo("1.0.0-beta-4.2")); assertThat(mavenPath.getCoordinates().getBaseVersion(), equalTo("1.0.0-beta-4.2")); assertThat(mavenPath.getCoordinates().isSnapshot(), equalTo(false)); mavenPath = pathParser.parsePath( "/org/codehaus/tycho/tycho-distribution/0.3.0-SNAPSHOT/tycho-distribution-0.3.0-20080818.153246-33-bin.zip"); assertThat(mavenPath.getCoordinates(), notNullValue()); assertThat(mavenPath.getCoordinates().getExtension(), equalTo("zip")); assertThat(mavenPath.getCoordinates().getClassifier(), equalTo("bin")); assertThat(mavenPath.getCoordinates().getVersion(), equalTo("0.3.0-20080818.153246-33")); assertThat(mavenPath.getCoordinates().getBaseVersion(), equalTo("0.3.0-SNAPSHOT")); assertThat(mavenPath.getCoordinates().isSnapshot(), equalTo(true)); mavenPath = pathParser.parsePath( "/org/sonatype/nexus/tools/nexus-migration-app/1.0.0-beta-6-SNAPSHOT/nexus-migration-app-1.0.0-beta-6-20080809.181715-2-cli.jar"); assertThat(mavenPath.getCoordinates(), notNullValue()); assertThat(mavenPath.getCoordinates().getExtension(), equalTo("jar")); assertThat(mavenPath.getCoordinates().getClassifier(), equalTo("cli")); assertThat(mavenPath.getCoordinates().getVersion(), equalTo("1.0.0-beta-6-20080809.181715-2")); assertThat(mavenPath.getCoordinates().getBaseVersion(), equalTo("1.0.0-beta-6-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);  }