Package org.apache.maven.scm.provider.local.metadata

Examples of org.apache.maven.scm.provider.local.metadata.LocalScmMetadata


            List<File> list = fileList;
            updatedFiles = update( source, baseDestination, list );

            // process deletions in repository
            LocalScmMetadataUtils metadataUtils = new LocalScmMetadataUtils( getLogger() );
            LocalScmMetadata originalMetadata = metadataUtils.readMetadata( baseDestination );
            if ( originalMetadata != null )
            {
                LocalScmMetadata newMetadata = metadataUtils.buildMetadata( source );
                for ( Iterator<String> it = originalMetadata.getRepositoryFileNames().iterator(); it.hasNext(); )
                {
                    String filename = it.next();
                    if ( !newMetadata.getRepositoryFileNames().contains( filename ) )
                    {
                        File localFile = new File( baseDestination, filename );
                        if ( localFile.exists() )
                        {
                            localFile.delete();
View Full Code Here


        // Assert metadata file
        // ----------------------------------------------------------------------
        File metadataFile = new File( getUpdatingCopy(), ".maven-scm-local" );
        assertTrue( "Expected metadata file .maven-scm-local does not exist", metadataFile.exists() );
        Reader reader = new FileReader( metadataFile );
        LocalScmMetadata metadata;
        try
        {
            metadata = new LocalScmMetadataXpp3Reader().read( reader );
        }
        finally
        {
            IOUtil.close( reader );
        }
        File root = new File( getRepositoryRoot() + "/" + moduleName );
        @SuppressWarnings( "unchecked" )
        List<String> fileNames = FileUtils.getFileNames( root, "**", null, false );
        assertEquals( fileNames, metadata.getRepositoryFileNames() );

    }
View Full Code Here

        // Assert metadata file
        // ----------------------------------------------------------------------
        File metadataFile = new File( getWorkingCopy(), ".maven-scm-local" );
        assertTrue( "Expected metadata file .maven-scm-local does not exist", metadataFile.exists() );
        Reader reader = new FileReader( metadataFile );
        LocalScmMetadata metadata;
        try
        {
            metadata = new LocalScmMetadataXpp3Reader().read( reader );
        }
        finally
        {
            IOUtil.close( reader );
        }
        File root = new File( getRepositoryRoot() + "/" + module );
        @SuppressWarnings( "unchecked" )
        List<String> fileNames = FileUtils.getFileNames( root, "**", null, false );
        assertEquals( fileNames, metadata.getRepositoryFileNames() );
    }
View Full Code Here

            List<File> list = fileList;
            updatedFiles = update( source, baseDestination, list );

            // process deletions in repository
            LocalScmMetadataUtils metadataUtils = new LocalScmMetadataUtils( getLogger() );
            LocalScmMetadata originalMetadata = metadataUtils.readMetadata( baseDestination );
            if ( originalMetadata != null )
            {
                LocalScmMetadata newMetadata = metadataUtils.buildMetadata( source );
                for ( Iterator<String> it = originalMetadata.getRepositoryFileNames().iterator(); it.hasNext(); )
                {
                    String filename = it.next();
                    if ( !newMetadata.getRepositoryFileNames().contains( filename ) )
                    {
                        File localFile = new File( baseDestination, filename );
                        if ( localFile.exists() )
                        {
                            localFile.delete();
View Full Code Here

        // Assert metadata file
        // ----------------------------------------------------------------------
        File metadataFile = new File( getWorkingCopy(), ".maven-scm-local" );
        assertTrue( "Expected metadata file .maven-scm-local does not exist", metadataFile.exists() );
        Reader reader = new FileReader( metadataFile );
        LocalScmMetadata metadata;
        try
        {
            metadata = new LocalScmMetadataXpp3Reader().read( reader );
        }
        finally
        {
            IOUtil.close( reader );
        }
        File root = new File( getRepositoryRoot() + "/" + module );
        @SuppressWarnings( "unchecked" )
        List<String> fileNames = FileUtils.getFileNames( root, "**", null, false );
        assertEquals( fileNames, metadata.getRepositoryFileNames() );
    }
View Full Code Here

        // Assert metadata file
        // ----------------------------------------------------------------------
        File metadataFile = new File( getUpdatingCopy(), ".maven-scm-local" );
        assertTrue( "Expected metadata file .maven-scm-local does not exist", metadataFile.exists() );
        Reader reader = new FileReader( metadataFile );
        LocalScmMetadata metadata;
        try
        {
            metadata = new LocalScmMetadataXpp3Reader().read( reader );
        }
        finally
        {
            IOUtil.close( reader );
        }
        File root = new File( getRepositoryRoot() + "/" + moduleName );
        @SuppressWarnings( "unchecked" )
        List<String> fileNames = FileUtils.getFileNames( root, "**", null, false );
        assertEquals( fileNames, metadata.getRepositoryFileNames() );

    }
View Full Code Here

TOP

Related Classes of org.apache.maven.scm.provider.local.metadata.LocalScmMetadata

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.