Package org.apache.maven.util

Examples of org.apache.maven.util.MD5Sum


        {
            return;
        }

        String actualChecksum;
        MD5Sum md5;

        try
        {
            md5 = new MD5Sum();
            md5.setFile( getFile() );
            md5.execute();

            actualChecksum = FileUtils.fileRead( checksumFile.getCanonicalPath() );
            actualChecksum = actualChecksum.substring( 0, actualChecksum.length() - 1 );
        }
        catch ( Exception e )
        {
            return;
        }

        log.debug( "Actual checksum: '" + actualChecksum + "'" );
        log.debug( "MD5 checksum: '" + md5.getChecksum() + "'" );

        if ( !actualChecksum.equals( md5.getChecksum() ) )
        {
            throw new ChecksumVerificationException( MavenUtils.getMessage( "checksum.verification.error", getPath() ) );
        }
    }
View Full Code Here


        {
            return;
        }

        String actualChecksum;
        MD5Sum md5;

        try
        {
            md5 = new MD5Sum();
            md5.setFile( getFile() );
            md5.execute();

            actualChecksum = FileUtils.fileRead( checksumFile.getCanonicalPath() );
            actualChecksum = actualChecksum.substring( 0, actualChecksum.length() - 1 );
        }
        catch ( Exception e )
        {
            return;
        }

        LOGGER.debug( "Actual checksum: '" + actualChecksum + "'" );
        LOGGER.debug( "MD5 checksum: '" + md5.getChecksum() + "'" );

        if ( !actualChecksum.equals( md5.getChecksum() ) )
        {
            throw new ChecksumVerificationException( MavenUtils.getMessage( "checksum.verification.error", getPath() ) );
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.util.MD5Sum

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.