Package org.codehaus.plexus.util

Examples of org.codehaus.plexus.util.Expand


        System.out.println( "Installing Maven in " + mavenHome );

        FileUtils.deleteDirectory( mavenHome );

        Expand expand = new Expand();
        expand.setSrc( file );
        expand.setDest( new File( destDir ).getParentFile() );
        expand.execute();

        if ( !mavenHome.exists() )
        {
            throw new Exception( "Maven was not installed in " + mavenHome );
        }
View Full Code Here


                        final File tempDir = new File(baseDir, System.currentTimeMillis() + ".dir");
                        if (!tempDir.mkdir()) {
                            throw new IllegalStateException("Failed to create temporary directory");
                        }
                        tempDir.deleteOnExit();
                        final Expand expander = new Expand();
                        expander.setDest(tempDir);
                        expander.setSrc(new File(uri));
                        expander.execute();

                        final File dir = new File(tempDir, resourcePath);
                        if ( dir.exists() && dir.isDirectory() ) {
                            return dir;
                        }
View Full Code Here

                    String fileExtension = source.getName().substring( source.getName().lastIndexOf( '.' ) );
                    if ( fileExtension.equalsIgnoreCase( ".jar" ) || fileExtension.equalsIgnoreCase( ".zip" )
                        || fileExtension.equalsIgnoreCase( ".war" ) || fileExtension.equalsIgnoreCase( ".sar" ) )
                    {
                        log.info( "\t\t\t ... expanding " + source  + "\n\t\t\t => to " + dest );
                        Expand expand = new Expand();
                        expand.setSrc( source );
                        expand.setOverwrite( true );
                        expand.setDest( dest );
                        try
                        {
                            expand.execute();
                            continue;
                        }
                        catch ( Exception e )
                        {
                            throw new MojoFailureException( "Failed to expaned packagedFile " + source + ": " + e.getMessage() );
View Full Code Here

        System.out.println( "Installing Maven in " + mavenHome );

        FileUtils.deleteDirectory( mavenHome );

        Expand expand = new Expand();
        expand.setSrc( file );
        expand.setDest( new File( destDir ).getParentFile() );
        expand.execute();

        if ( !mavenHome.exists() )
        {
            throw new Exception( "Maven was not installed in " + mavenHome );
        }
View Full Code Here

        System.out.println( "Installing Maven in " + mavenHome );

        FileUtils.deleteDirectory( mavenHome );

        Expand expand = new Expand();
        expand.setSrc( file );
        expand.setDest( new File( destDir ).getParentFile() );
        expand.execute();

        if ( !mavenHome.exists() )
        {
            throw new Exception( "Maven was not installed in " + mavenHome );
        }
View Full Code Here

        System.out.println( "Installing Maven in " + mavenHome );

        FileUtils.deleteDirectory( mavenHome );

        Expand expand = new Expand();
        expand.setSrc( file );
        expand.setDest( new File( prefix ) );
        expand.execute();

        if ( !mavenHome.exists() )
        {
            throw new Exception( "Maven was not installed in " + mavenHome );
        }
View Full Code Here

TOP

Related Classes of org.codehaus.plexus.util.Expand

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.