Package com.sun.enterprise.deployment.deploy.shared

Examples of com.sun.enterprise.deployment.deploy.shared.JarArchiveFactory


       
        AbstractArchiveFactory factory = null;
        if (archive.isDirectory()) {
            factory = new FileArchiveFactory();
        } else {
            factory = new JarArchiveFactory();
        }
        AbstractArchive source = factory.openArchive(archive.getAbsolutePath());
       
        // now copy the archive, let the archivist do the job...
        Archivist archivist = null;
View Full Code Here


    public static void copyArchiveToDir(File source, File dest)
            throws IOException {
        AbstractArchive in = null;
        try {
            in =
                    (new JarArchiveFactory()).openArchive(
                            source.getAbsolutePath());
            copyArchiveToDir(in, dest);
        } finally {
            if (in != null)
                in.close();
View Full Code Here

                    appName.startsWith(JWS_APP)) {
                continue;
            }
            earName=earName+".ear";
            try {
                JarArchiveFactory jaf = new JarArchiveFactory();
                OutputJarArchive targetJar = (OutputJarArchive)jaf.createArchive(new File(targetDir, earName).getAbsolutePath());
                FileArchiveFactory faf = new FileArchiveFactory();
                FileArchive farc = (FileArchive)faf.openArchive((new File(srcDir, earDirName)).getAbsolutePath());
                Enumeration e = farc.entries();
                String lastModuleProcessed = "";
                while(e.hasMoreElements()) {
View Full Code Here

        if (moduleDirName.endsWith("_jar") || moduleDirName.endsWith("_war") || moduleDirName.endsWith("_rar")) {
            moduleName = moduleDirName.substring(0,moduleDirName.lastIndexOf('_'));
        }      
        try {
           
            JarArchiveFactory jaf = new JarArchiveFactory();
            FileArchiveFactory faf = new FileArchiveFactory();
            FileArchive farc = (FileArchive)faf.openArchive(new File(new File(new File(sourceDir, appDir), earDirName), moduleDirName).getAbsolutePath());
            String suffix = ".jar"; //default to .jar
            //File temp;
            Enumeration e = farc.entries();
            //figure out what type of module this is by the existance of the standard dd's
            while(e.hasMoreElements()) {
                String entry = (String)e.nextElement();
                if (entry.equalsIgnoreCase("WEB-INF/web.xml")) {
                    suffix = ".war";
                } else if (entry.equalsIgnoreCase("META-INF/ra.xml")) {
                    suffix = ".rar";
                }
            }
            //temp = File.createTempFile(moduleName, suffix);
            File tempJar = new File(targetDir, moduleName + suffix);
            String path = tempJar.getAbsolutePath();
            //temp.delete();
            OutputJarArchive targetModule = (OutputJarArchive)jaf.createArchive(path);
            logger.fine(stringManager.getString("upgrade.deployment.addingInfoMsg") + targetModule.getArchiveUri());
            e = farc.entries();
            while(e.hasMoreElements()) {
                String entry = (String)e.nextElement();
                InputStream in = farc.getEntry(entry);
View Full Code Here

    /** Creates new Archivist */
    public Archivist() {
        // by default we are dealing with jar files, can be changed with
        // setAbstractArchiveFactory
        abstractArchiveFactory = new JarArchiveFactory();
        annotationErrorHandler = new DefaultErrorHandler();
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.deployment.deploy.shared.JarArchiveFactory

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.