@Test void getTypeFromClassifierAndExtension( ) { assertType( "javadoc", "javadoc", "jar" ); assertType( "war", "", "war" ); assertType( "ear", "", "ear" ); assertType( "rar", "", "rar" ); assertType( "java-source", "sources", "jar" ); assertType( "ejb-client", "client", "jar" ); assertType( "pom", "", "pom" ); assertType( "test-jar", "tests", "jar" ); }
static String getTypeFromClassifierAndExtension( String classifierArg, String extensionArg ) { String extension = extensionArg.toLowerCase( ).trim( ); String classifier = classifierArg.toLowerCase( ).trim( ); if ( StringUtils.isEmpty( extension ) ) { return ""; } else if ( StringUtils.isEmpty( classifier ) ) { return extension; } else if ( classifier.equals( "tests" ) && extension.equals( "jar" ) ) { return "test-jar"; } else if ( classifier.equals( "client" ) && extension.equals( "jar" ) ) { return "ejb-client"; } else if ( classifier.equals( "sources" ) && extension.equals( "jar" ) ) { return "java-source"; } else if ( classifier.equals( "javadoc" ) && extension.equals( "jar" ) ) { return "javadoc"; } else { return extension; } }
MavenContentHelper { static String getTypeFromClassifierAndExtension( String classifierArg, String extensionArg ) { String extension = extensionArg.toLowerCase( ).trim( ); String classifier = classifierArg.toLowerCase( ).trim( ); if ( StringUtils.isEmpty( extension ) ) { return ""; } else if ( StringUtils.isEmpty( classifier ) ) { return extension; } else if ( classifier.equals( "tests" ) && extension.equals( "jar" ) ) { return "test-jar"; } else if ( classifier.equals( "client" ) && extension.equals( "jar" ) ) { return "ejb-client"; } else if ( classifier.equals( "sources" ) && extension.equals( "jar" ) ) { return "java-source"; } else if ( classifier.equals( "javadoc" ) && extension.equals( "jar" ) ) { return "javadoc"; } else { return extension; } } }
MavenContentHelper { static String getTypeFromClassifierAndExtension( String classifierArg, String extensionArg ) { String extension = extensionArg.toLowerCase( ).trim( ); String classifier = classifierArg.toLowerCase( ).trim( ); if ( StringUtils.isEmpty( extension ) ) { return ""; } else if ( StringUtils.isEmpty( classifier ) ) { return extension; } else if ( classifier.equals( "tests" ) && extension.equals( "jar" ) ) { return "test-jar"; } else if ( classifier.equals( "client" ) && extension.equals( "jar" ) ) { return "ejb-client"; } else if ( classifier.equals( "sources" ) && extension.equals( "jar" ) ) { return "java-source"; } else if ( classifier.equals( "javadoc" ) && extension.equals( "jar" ) ) { return "javadoc"; } else { return extension; } } MavenContentHelper(); }
MavenContentHelper { static String getTypeFromClassifierAndExtension( String classifierArg, String extensionArg ) { String extension = extensionArg.toLowerCase( ).trim( ); String classifier = classifierArg.toLowerCase( ).trim( ); if ( StringUtils.isEmpty( extension ) ) { return ""; } else if ( StringUtils.isEmpty( classifier ) ) { return extension; } else if ( classifier.equals( "tests" ) && extension.equals( "jar" ) ) { return "test-jar"; } else if ( classifier.equals( "client" ) && extension.equals( "jar" ) ) { return "ejb-client"; } else if ( classifier.equals( "sources" ) && extension.equals( "jar" ) ) { return "java-source"; } else if ( classifier.equals( "javadoc" ) && extension.equals( "jar" ) ) { return "javadoc"; } else { return extension; } } MavenContentHelper(); void setMetadataReader( MavenMetadataReader metadataReader ); static String getNamespaceFromNamespacePath( final StorageAsset namespacePath); String getArtifactVersion( StorageAsset artifactDir, ItemSelector selector); String getLatestArtifactSnapshotVersion( StorageAsset artifactDir, String snapshotVersion); }
MavenContentHelper { static String getTypeFromClassifierAndExtension( String classifierArg, String extensionArg ) { String extension = extensionArg.toLowerCase( ).trim( ); String classifier = classifierArg.toLowerCase( ).trim( ); if ( StringUtils.isEmpty( extension ) ) { return ""; } else if ( StringUtils.isEmpty( classifier ) ) { return extension; } else if ( classifier.equals( "tests" ) && extension.equals( "jar" ) ) { return "test-jar"; } else if ( classifier.equals( "client" ) && extension.equals( "jar" ) ) { return "ejb-client"; } else if ( classifier.equals( "sources" ) && extension.equals( "jar" ) ) { return "java-source"; } else if ( classifier.equals( "javadoc" ) && extension.equals( "jar" ) ) { return "javadoc"; } else { return extension; } } MavenContentHelper(); void setMetadataReader( MavenMetadataReader metadataReader ); static String getNamespaceFromNamespacePath( final StorageAsset namespacePath); String getArtifactVersion( StorageAsset artifactDir, ItemSelector selector); String getLatestArtifactSnapshotVersion( StorageAsset artifactDir, String snapshotVersion); static final Pattern UNIQUE_SNAPSHOT_NUMBER_PATTERN; static final String METADATA_FILENAME; static final String METADATA_REPOSITORY_FILENAME; }