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

Examples of com.sun.enterprise.deployment.deploy.shared.FileArchive.entries()


        FileArchive source = new FileArchive();
        OutputJarArchive destination = new OutputJarArchive();
        try {
            source.open(sourcePath);
            destination.create(destinationPath);
            for (Enumeration entries = source.entries();
                 entries.hasMoreElements();) {
                String entry = String.class.cast(entries.nextElement());
                InputStream is = null;
                OutputStream os = null;
                try {
View Full Code Here


    throws IOException {
        FileArchive source = new FileArchive();
        OutputJarArchive destination = new OutputJarArchive();
        try {
            source.open(sourcePath);
            Enumeration entries = source.entries();
            destination.create(destinationPath);
            while(entries.hasMoreElements()) {
                String entry = String.class.cast(entries.nextElement());
                InputStream is = null;
                OutputStream os = null;
View Full Code Here

        ClosureCompiler closureCompiler=getVerifierContext().getClosureCompiler();;
        try {
                String uri = getAbstractArchiveUri(descriptor);
                FileArchive arch = new FileArchive();
                arch.open(uri);
                entries = arch.entries();
                arch.close();
        } catch(Exception e) {
            e.printStackTrace();
            result.failed(smh.getLocalString(getClass().getName() + ".exception",
                                             "Error: [ {0} ] exception while loading the archive [ {1} ].",
View Full Code Here

        // let's get the rar file
        try {
            String uri=getAbstractArchiveUri(desc);
            FileArchive arch = new FileArchive();
            arch.open(uri);
            for(Enumeration en = arch.entries();en.hasMoreElements();) {                   
                String entry = (String)en.nextElement();
                if (entry.endsWith(".jar")) {
                    // we found a jar file, let's load it
                    JarInputStream jis = new JarInputStream(arch.getEntry(entry));
                    try {
View Full Code Here

            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()) {
                    String s = (String)e.nextElement();
                    String moduleDir;
                    try {
View Full Code Here

            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";
View Full Code Here

            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);
                if (entry.equals("WEB-INF/web.xml")) {
                    InputStream fixedDescriptor = fixWebServiceDescriptor(farc);
View Full Code Here

        try {
                String uri = getAbstractArchiveUri(descriptor);
                arch = new FileArchive();
                arch.open(uri);
                entries = arch.entries();
                arch.close();
        } catch(Exception e) {
            e.printStackTrace();
            result.failed(smh.getLocalString(getClass().getName() + ".exception",
                                             "Error: [ {0} ] exception while loading the archive [ {1} ].",
View Full Code Here

        if(!file.exists())
            return results;

        FileArchive arch= new FileArchive();
        arch.open(file.getAbsolutePath());
        Enumeration entries = arch.entries();
        while(entries.hasMoreElements()){
            String name=(String)entries.nextElement();
            if(name.startsWith("org/apache/jsp") && name.endsWith(".class"))
                results.add(name.substring(0, name.lastIndexOf(".")).replace('/','.'));
        }
View Full Code Here

//            if (f == null) {
              String uri = getAbstractArchiveUri(descriptor);
              try {
                 arch = new FileArchive();
                 arch.open(uri);
                 entries = arch.entries();
               }catch (Exception e) { throw e; }
//            }
//            else {
//              zip = new ZipFile(f);
//              entries = zip.entries();
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.