Package org.apache.xbean.finder.archive

Examples of org.apache.xbean.finder.archive.ClasspathArchive


        // war is different since it will contain a single descriptor for its lib too (not an ear)
        boolean war = "war".equals(packaging);
        final Archive archive;
        final URLClassLoader loader = createClassLoader(providedDependenciesClassLoader());
        if (war && useAggregatedArchiveIfWar) {
            archive = new ClasspathArchive(loader, loader.getURLs());
            getLog().info("using an aggregated archive");
        } else {
            archive = new FileArchive(loader, module);
            getLog().info("using a file archive");
        }
View Full Code Here


        }
       
        if (module instanceof ConnectorModule) {
          ConnectorModule connectorModule = (ConnectorModule) module;
          final ClassLoader connectorClassLoader = connectorModule.getClassLoader();
          return new AnnotationFinder(new ClasspathArchive(connectorClassLoader, connectorModule.getLibraries())).link();
        }

        if (module.getJarLocation() != null) {
            String location = module.getJarLocation();
            File file = new File(location);

            URL url;
            if (file.exists()) {
                url = file.toURI().toURL();
               
                File webInfClassesFolder = new File(file, "WEB-INF/classes");
        if (webInfClassesFolder.exists() && webInfClassesFolder.isDirectory()) {
                  url = webInfClassesFolder.toURI().toURL();
                }
            } else {
                url = new URL(location);
            }
            return new AnnotationFinder(new ClasspathArchive(module.getClassLoader(), url)).link();
        } else {
            return new AnnotationFinder(new ClassesArchive()).link();
        }
    }
View Full Code Here

        }
       
        if (module instanceof ConnectorModule) {
          ConnectorModule connectorModule = (ConnectorModule) module;
          final ClassLoader connectorClassLoader = connectorModule.getClassLoader();
          return new AnnotationFinder(new ClasspathArchive(connectorClassLoader, connectorModule.getLibraries())).link();
        }

        if (module.getJarLocation() != null) {
            String location = module.getJarLocation();
            File file = new File(location);

            URL url;
            if (file.exists()) {
                url = file.toURI().toURL();
               
                File webInfClassesFolder = new File(file, "WEB-INF/classes");
        if (webInfClassesFolder.exists() && webInfClassesFolder.isDirectory()) {
                  url = webInfClassesFolder.toURI().toURL();
                }
            } else {
                url = new URL(location);
            }
            return new AnnotationFinder(new ClasspathArchive(module.getClassLoader(), url)).link();
        } else {
            return new AnnotationFinder(new ClassesArchive()).link();
        }
    }
View Full Code Here

        // war is different since it will contain a single descriptor for its lib too (not an ear)
        boolean war = "war".equals(packaging);
        final Archive archive;
        final URLClassLoader loader = createClassLoader(providedDependenciesClassLoader());
        if (war && useAggregatedArchiveIfWar) {
            archive = new ClasspathArchive(loader, loader.getURLs());
            getLog().info("using an aggregated archive");
        } else {
            archive = new FileArchive(loader, module);
            getLog().info("using a file archive");
        }
View Full Code Here

TOP

Related Classes of org.apache.xbean.finder.archive.ClasspathArchive

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.