Examples of calculateChecksum()


Examples of liquibase.Liquibase.calculateCheckSum()

            } else if ("clearCheckSums".equalsIgnoreCase(command)) {
                liquibase.clearCheckSums();
                return;
            } else if ("calculateCheckSum".equalsIgnoreCase(command)) {
                CheckSum checkSum = null;
                checkSum = liquibase.calculateCheckSum(commandParams.iterator().next());
                System.out.println(checkSum);
                return;
            } else if ("dbdoc".equalsIgnoreCase(command)) {
                if (commandParams.size() == 0) {
                    throw new CommandLineParsingException("dbdoc requires an output directory");
View Full Code Here

Examples of org.apache.archiva.checksum.ChecksummedFile.calculateChecksum()

        //  in the later parse call with the desired checksum and use that
        String checksumSha1;
        ChecksummedFile checksummedFile = new ChecksummedFile( artifactFile );
        try
        {
            checksumSha1 = checksummedFile.calculateChecksum( ChecksumAlgorithm.SHA1 );
        }
        catch ( IOException e )
        {
            throw new ConsumerException( e.getMessage(), e );
        }
View Full Code Here

Examples of org.apache.archiva.checksum.ChecksummedFile.calculateChecksum()

        metadata.setWhenGathered( new Date() );
        metadata.setFileLastModified( file.lastModified() );
        ChecksummedFile checksummedFile = new ChecksummedFile( file );
        try
        {
            metadata.setMd5( checksummedFile.calculateChecksum( ChecksumAlgorithm.MD5 ) );
        }
        catch ( IOException e )
        {
            log.error( "Unable to checksum file " + file + ": " + e.getMessage() );
        }
View Full Code Here

Examples of org.apache.archiva.checksum.ChecksummedFile.calculateChecksum()

        {
            log.error( "Unable to checksum file " + file + ": " + e.getMessage() );
        }
        try
        {
            metadata.setSha1( checksummedFile.calculateChecksum( ChecksumAlgorithm.SHA1 ) );
        }
        catch ( IOException e )
        {
            log.error( "Unable to checksum file " + file + ": " + e.getMessage() );
        }
View Full Code Here

Examples of org.apache.archiva.checksum.ChecksummedFile.calculateChecksum()

        throws IOException
    {
        ChecksummedFile checksum = new ChecksummedFile( new File( repoLocation,
                                                                  "/org/apache/archiva/artifact-upload/" + version + "/"
                                                                      + MetadataTools.MAVEN_METADATA ) );
        String sha1 = checksum.calculateChecksum( ChecksumAlgorithm.SHA1 );
        String md5 = checksum.calculateChecksum( ChecksumAlgorithm.MD5 );

        String contents = FileUtils.readFileToString( new File( repoLocation,
                                                                "/org/apache/archiva/artifact-upload/" + version + "/"
                                                                    + MetadataTools.MAVEN_METADATA + ".sha1" ) );
View Full Code Here

Examples of org.apache.archiva.checksum.ChecksummedFile.calculateChecksum()

    {
        ChecksummedFile checksum = new ChecksummedFile( new File( repoLocation,
                                                                  "/org/apache/archiva/artifact-upload/" + version + "/"
                                                                      + MetadataTools.MAVEN_METADATA ) );
        String sha1 = checksum.calculateChecksum( ChecksumAlgorithm.SHA1 );
        String md5 = checksum.calculateChecksum( ChecksumAlgorithm.MD5 );

        String contents = FileUtils.readFileToString( new File( repoLocation,
                                                                "/org/apache/archiva/artifact-upload/" + version + "/"
                                                                    + MetadataTools.MAVEN_METADATA + ".sha1" ) );
        assertTrue( StringUtils.contains( contents, sha1 ) );
View Full Code Here

Examples of org.apache.archiva.checksum.ChecksummedFile.calculateChecksum()

    private void verifyProjectMetadataChecksums( String repoLocation )
        throws IOException
    {
        ChecksummedFile checksum = new ChecksummedFile(
            new File( repoLocation, "/org/apache/archiva/artifact-upload/" + MetadataTools.MAVEN_METADATA ) );
        String sha1 = checksum.calculateChecksum( ChecksumAlgorithm.SHA1 );
        String md5 = checksum.calculateChecksum( ChecksumAlgorithm.MD5 );

        String contents = FileUtils.readFileToString(
            new File( repoLocation, "/org/apache/archiva/artifact-upload/" + MetadataTools.MAVEN_METADATA + ".sha1" ) );
        assertTrue( StringUtils.contains( contents, sha1 ) );
View Full Code Here

Examples of org.apache.archiva.checksum.ChecksummedFile.calculateChecksum()

        throws IOException
    {
        ChecksummedFile checksum = new ChecksummedFile(
            new File( repoLocation, "/org/apache/archiva/artifact-upload/" + MetadataTools.MAVEN_METADATA ) );
        String sha1 = checksum.calculateChecksum( ChecksumAlgorithm.SHA1 );
        String md5 = checksum.calculateChecksum( ChecksumAlgorithm.MD5 );

        String contents = FileUtils.readFileToString(
            new File( repoLocation, "/org/apache/archiva/artifact-upload/" + MetadataTools.MAVEN_METADATA + ".sha1" ) );
        assertTrue( StringUtils.contains( contents, sha1 ) );
View Full Code Here

Examples of org.apache.archiva.checksum.ChecksummedFile.calculateChecksum()

        String sha1;
        String md5;
        String contents;
        checksum = new ChecksummedFile(
            new File( repoLocation, "/org/apache/archiva/artifact-upload/" + version + "/" + artifact + ".pom" ) );
        sha1 = checksum.calculateChecksum( ChecksumAlgorithm.SHA1 );
        md5 = checksum.calculateChecksum( ChecksumAlgorithm.MD5 );

        contents = FileUtils.readFileToString(
            new File( repoLocation, "/org/apache/archiva/artifact-upload/" + version + "/" + artifact + ".pom.sha1" ) );
        assertTrue( StringUtils.contains( contents, sha1 ) );
View Full Code Here

Examples of org.apache.archiva.checksum.ChecksummedFile.calculateChecksum()

        String md5;
        String contents;
        checksum = new ChecksummedFile(
            new File( repoLocation, "/org/apache/archiva/artifact-upload/" + version + "/" + artifact + ".pom" ) );
        sha1 = checksum.calculateChecksum( ChecksumAlgorithm.SHA1 );
        md5 = checksum.calculateChecksum( ChecksumAlgorithm.MD5 );

        contents = FileUtils.readFileToString(
            new File( repoLocation, "/org/apache/archiva/artifact-upload/" + version + "/" + artifact + ".pom.sha1" ) );
        assertTrue( StringUtils.contains( contents, sha1 ) );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.