Examples of Expand


Examples of org.apache.tools.ant.taskdefs.Expand

      {
         // Get the name of a temporary output folder
         File outFolder = FileUtils.getFileUtils().createTempFile(TEMP_FILE_PREFIX, "", null, false, false);

         // Unzip the zip file
         Expand unzipper = (Expand)m_project.createTask("unzip");
         unzipper.setSrc(zipFileSet.getSrc(m_project));
         unzipper.setDest(outFolder);
         unzipper.execute();

         // Change the file set to use the new directory
         zipFileSet.setSrcResource(null);
         zipFileSet.setDir(outFolder);
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.Expand

  private String jarPath;
  private String pathInJar = "";
  private Expand expandTask;

  public ExtractedDirContent() {
    expandTask = new Expand();
    expandTask.setTaskName("unzip");
  }
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.Expand

        if (!installMarker.exists()) {
            log.info("Installing assembly...");

            FileUtils.forceMkdir(geronimoHome);
           
            Expand unzip = (Expand)createTask("unzip");
            unzip.setSrc(assemblyArchive);
            unzip.setDest(installDirectory.getCanonicalFile());
            unzip.execute();

            // Make scripts executable, since Java unzip ignores perms
            Chmod chmod = (Chmod)createTask("chmod");
            chmod.setPerm("ugo+rx");
            chmod.setDir(geronimoHome);
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.Expand

    }

    public static void unzip(Path tempZipFile, Path tempExtractedFolder) {
        LOGGER.info("Unzipping " + tempZipFile + " to " + tempExtractedFolder);

        Expand expand = new Expand();
        expand.setDest(tempExtractedFolder.toFile());
        expand.setSrc(tempZipFile.toFile());

        expand.setProject(AntUtil.builder().getProject());
        expand.setTaskName("unzip");

        expand.execute();
    }
View Full Code Here

Examples of org.apache.tools.ant.taskdefs.Expand

        // delete the contents so that old files won't interfere with new files
        Util.deleteContentsRecursive(destDir);

        try {
            Expand e = new Expand();
            e.setProject(new Project());
            e.setTaskType("unzip");
            e.setSrc(archive);
            e.setDest(destDir);
            e.execute();
        } catch (BuildException x) {
            throw new IOException2("Failed to expand " + archive,x);
        }

        try {
View Full Code Here

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

Examples of org.codehaus.plexus.util.Expand

                        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

Examples of org.codehaus.plexus.util.Expand

                    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

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

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
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.