public void beginScan( ManagedRepositoryConfiguration repository ) throws ConsumerException { this.managedRepository = new ManagedDefaultRepositoryContent(); this.managedRepository.setRepository( repository ); }
/** * Convert a path to an artifact reference. * * @param path the path to convert. (relative or full location path) * @throws LayoutException if the path cannot be converted to an artifact reference. */ public ArtifactReference toArtifactReference( String path ) throws LayoutException { if ( ( path != null ) && path.startsWith( repository.getLocation() ) ) { return legacyPathParser.toArtifactReference( path.substring( repository.getLocation().length() ) ); } return legacyPathParser.toArtifactReference( path ); }
private String toPath( String groupId, String artifactId, String version, String classifier, String type ) { StringBuffer path = new StringBuffer(); path.append( groupId ).append( PATH_SEPARATOR ); path.append( getDirectory( type ) ).append( PATH_SEPARATOR ); if ( version != null ) { path.append( artifactId ).append( '-' ).append( version ); if ( StringUtils.isNotBlank( classifier ) ) { path.append( '-' ).append( classifier ); } path.append( '.' ).append( ArtifactExtensionMapping.getExtension( type ) ); } return path.toString(); }
String classifier = ArtifactClassifierMapping.getClassifier( expectedType ); if ( classifier != null ) artifact.setType( ArtifactExtensionMapping.mapExtensionAndClassifierToType( classifier, extension, defaultExtension ) ); String expectedExtension = ArtifactExtensionMapping.getExtension( artifact.getType() );
/** * Convert a path to an artifact reference. * * @param path the path to convert. (relative or full location path) * @throws LayoutException if the path cannot be converted to an artifact reference. */ public ArtifactReference toArtifactReference( String path ) throws LayoutException { if ( ( path != null ) && path.startsWith( repository.getLocation() ) ) { return defaultPathParser.toArtifactReference( path.substring( repository.getLocation().length() ) ); } return defaultPathParser.toArtifactReference( path ); }
private String toPath( String groupId, String artifactId, String baseVersion, String version, String classifier, String type ) { StringBuffer path = new StringBuffer(); path.append( formatAsDirectory( groupId ) ).append( PATH_SEPARATOR ); path.append( artifactId ).append( PATH_SEPARATOR ); if ( baseVersion != null ) { path.append( baseVersion ).append( PATH_SEPARATOR ); if ( ( version != null ) && ( type != null ) ) { path.append( artifactId ).append( ARTIFACT_SEPARATOR ).append( version ); if ( StringUtils.isNotBlank( classifier ) ) { path.append( ARTIFACT_SEPARATOR ).append( classifier ); } path.append( GROUP_SEPARATOR ).append( ArtifactExtensionMapping.getExtension( type ) ); } } return path.toString(); } }