Package org.codehaus.plexus.archiver

Examples of org.codehaus.plexus.archiver.FileSet


                         final String[] excludes, final int permissions )
        {
            this.resource = resource;
            if ( resource instanceof FileSet )
            {
                final FileSet fs = (FileSet) resource;
                directory = fs.getDirectory();
                this.destination = fs.getPrefix();
                this.includes = fs.getIncludes();
                this.excludes = fs.getExcludes();
                this.permissions = permissions;
            }
            else
            {
                if ( resource instanceof File && ( (File) resource ).isDirectory() )
View Full Code Here


            {

                @Override
                protected boolean argumentMatches( final Object expected, final Object actual )
                {
                    final FileSet e = (FileSet) expected;
                    final FileSet a = (FileSet) actual;

                    if ( !eq( e.getDirectory(), a.getDirectory() ) )
                    {
                        System.out.println( "FileSet directory expected: " + e.getDirectory() + "\nActual: "
                                        + a.getDirectory() );

                        return false;
                    }

                    if ( !eq( e.getPrefix(), a.getPrefix() ) )
                    {
                        System.out.println( "FileSet prefix expected: " + e.getPrefix() + "\nActual: " + a.getPrefix() );

                        return false;
                    }

                    if ( !areq( e.getIncludes(), a.getIncludes() ) )
                    {
                        System.out.println( "FileSet includes expected: " + arToStr( e.getIncludes() ) + "\nActual: "
                                        + arToStr( a.getIncludes() ) );

                        return false;
                    }

                    if ( !areq( e.getExcludes(), a.getExcludes() ) )
                    {
                        System.out.println( "FileSet excludes expected: " + arToStr( e.getExcludes() ) + "\nActual: "
                                        + arToStr( a.getExcludes() ) );

                        return false;
                    }

                    return true;
                }

                @Override
                protected String argumentToString( final Object argument )
                {
                    final FileSet a = (FileSet) argument;

                    return argument == null ? "Null FileSet" : "FileSet:[dir=" + a.getDirectory() + ", prefix: "
                                    + a.getPrefix() + "\nincludes:\n" + arToStr( a.getIncludes() ) + "\nexcludes:\n"
                                    + arToStr( a.getExcludes() ) + "]";
                }

                private String arToStr( final String[] array )
                {
                    return array == null ? "-EMPTY-" : StringUtils.join( array, "\n\t" );
View Full Code Here

            {

                @Override
                protected boolean argumentMatches( final Object expected, final Object actual )
                {
                    final FileSet e = (FileSet) expected;
                    final FileSet a = (FileSet) actual;

                    if ( !eq( e.getDirectory(), a.getDirectory() ) )
                    {
                        System.out.println( "FileSet directory expected: " + e.getDirectory() + "\nActual: "
                                        + a.getDirectory() );

                        return false;
                    }

                    if ( !eq( e.getPrefix(), a.getPrefix() ) )
                    {
                        System.out.println( "FileSet prefix expected: " + e.getPrefix() + "\nActual: " + a.getPrefix() );

                        return false;
                    }

                    if ( !areq( e.getIncludes(), a.getIncludes() ) )
                    {
                        System.out.println( "FileSet includes expected: " + arToStr( e.getIncludes() ) + "\nActual: "
                                        + arToStr( a.getIncludes() ) );

                        return false;
                    }

                    if ( !areq( e.getExcludes(), a.getExcludes() ) )
                    {
                        System.out.println( "FileSet excludes expected: " + arToStr( e.getExcludes() ) + "\nActual: "
                                        + arToStr( a.getExcludes() ) );

                        return false;
                    }

                    return true;
                }

                @Override
                protected String argumentToString( final Object argument )
                {
                    final FileSet a = (FileSet) argument;

                    return argument == null ? "Null FileSet" : "FileSet:[dir=" + a.getDirectory() + ", prefix: "
                                    + a.getPrefix() + "\nincludes:\n" + arToStr( a.getIncludes() ) + "\nexcludes:\n"
                                    + arToStr( a.getExcludes() ) + "]";
                }

                private String arToStr( final String[] array )
                {
                    return array == null ? "-EMPTY-" : StringUtils.join( array, "\n\t" );
View Full Code Here

                         final String[] excludes, final int permissions )
        {
            this.resource = resource;
            if ( resource instanceof FileSet )
            {
                final FileSet fs = (FileSet) resource;
                directory = fs.getDirectory();
                this.destination = fs.getPrefix();
                this.includes = fs.getIncludes();
                this.excludes = fs.getExcludes();
                this.permissions = permissions;
            }
            else
            {
                if ( resource instanceof File && ( (File) resource ).isDirectory() )
View Full Code Here

TOP

Related Classes of org.codehaus.plexus.archiver.FileSet

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.