archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven/content/ManagedDefaultRepositoryContent.java
/**
     * Moves the file to the artifact destination
     */
Moves the file to the artifact destination
Moves the file to the artifact destination
@Override
    public void addArtifact( Path sourceFile, Artifact destination ) throws IllegalArgumentException, ContentAccessException
    {
        try
        {
            StorageAsset asset = destination.getAsset( );
            if (!asset.exists()) {
                asset.create();
            }
            asset.replaceDataFromFile( sourceFile );
        }
        catch ( IOException e )
        {
            log.error( "Could not push data to asset source={} destination={}. {}", sourceFile, destination.getAsset().getFilePath(), e.getMessage( ) );
            throw new ContentAccessException( e.getMessage( ), e );
        }
    }
@ Override public void addArtifact ( Path sourceFile , Artifact destination ) throws IllegalArgumentException , ContentAccessException { try { StorageAsset asset = destination . getAsset ( ) ; if ( ! asset . exists ( ) ) { asset . create ( ) ; } asset . replaceDataFromFile ( sourceFile ) ; } catch ( IOException e ) { log . error ( "Could not push data to asset source={} destination={}. {}" , sourceFile , destination . getAsset ( ) . getFilePath ( ) , e . getMessage ( ) ) ; throw new ContentAccessException ( e . getMessage ( ) , e ) ; } }
Moves the file to the artifact destination
Moves the file to the artifact destination