Examples of exportTo()


Examples of org.jboss.shrinkwrap.api.exporter.ZipExporter.exportTo()

    public ProtocolMetaData deploy(final Archive<?> archive) throws DeploymentException {
        try {
            // Export the bundle bytes
            ZipExporter exporter = archive.as(ZipExporter.class);
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            exporter.exportTo(baos);

            String location = archive.getName();
            ByteArrayInputStream inputStream = new ByteArrayInputStream(baos.toByteArray());
            log.info("Installing bundle: " + location);
            installBundle(location, inputStream);
View Full Code Here

Examples of org.jboss.shrinkwrap.api.exporter.ZipExporter.exportTo()

    public ProtocolMetaData deploy(final Archive<?> archive) throws DeploymentException {
        try {
            // Export the bundle bytes
            ZipExporter exporter = archive.as(ZipExporter.class);
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            exporter.exportTo(baos);

            ByteArrayInputStream inputStream = new ByteArrayInputStream(baos.toByteArray());
            Bundle bundle = syscontext.installBundle(archive.getName(), inputStream);

            FrameworkWiring frameworkWiring = syscontext.getBundle().adapt(FrameworkWiring.class);
View Full Code Here

Examples of org.jboss.shrinkwrap.api.exporter.ZipExporter.exportTo()

    public ProtocolMetaData deploy(final Archive<?> archive) throws DeploymentException {
        try {
            // Export the bundle bytes
            ZipExporter exporter = archive.as(ZipExporter.class);
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            exporter.exportTo(baos);

            String location = archive.getName();
            ByteArrayInputStream inputStream = new ByteArrayInputStream(baos.toByteArray());
            log.info("Installing bundle: " + location);
            installBundle(location, inputStream);
View Full Code Here

Examples of org.jboss.shrinkwrap.api.exporter.ZipExporter.exportTo()

      try
      {
         // Export the bundle bytes
         ZipExporter exporter = archive.as(ZipExporter.class);
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         exporter.exportTo(baos);
        
         ByteArrayInputStream inputStream = new ByteArrayInputStream(baos.toByteArray());
        
         BundleContext sysContext = frameworkInst.get().getBundleContext();
         Bundle bundle = sysContext.installBundle(archive.getName(), inputStream);
View Full Code Here

Examples of org.jboss.shrinkwrap.api.exporter.ZipExporter.exportTo()

    public ProtocolMetaData deploy(final Archive<?> archive) throws DeploymentException {
        try {
            // Export the bundle bytes
            ZipExporter exporter = archive.as(ZipExporter.class);
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            exporter.exportTo(baos);

            BundleContext context = bundleContextInst.get();
            ByteArrayInputStream inputStream = new ByteArrayInputStream(baos.toByteArray());
            Bundle bundle = context.installBundle(archive.getName(), inputStream);
View Full Code Here

Examples of org.jboss.shrinkwrap.api.exporter.ZipExporter.exportTo()

    public ProtocolMetaData deploy(final Archive<?> archive) throws DeploymentException {
        try {
            // Export the bundle bytes
            ZipExporter exporter = archive.as(ZipExporter.class);
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            exporter.exportTo(baos);

            String location = archive.getName();
            ByteArrayInputStream inputStream = new ByteArrayInputStream(baos.toByteArray());
            log.info("Installing bundle: " + location);
            installBundle(location, inputStream);
View Full Code Here

Examples of org.jboss.shrinkwrap.api.exporter.ZipExporter.exportTo()

    public ProtocolMetaData deploy(final Archive<?> archive) throws DeploymentException {
        try {
            // Export the bundle bytes
            ZipExporter exporter = archive.as(ZipExporter.class);
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            exporter.exportTo(baos);

            ByteArrayInputStream inputStream = new ByteArrayInputStream(baos.toByteArray());
            syscontext.installBundle(archive.getName(), inputStream);

        } catch (RuntimeException rte) {
View Full Code Here

Examples of org.jboss.shrinkwrap.api.exporter.ZipExporter.exportTo()

    public ProtocolMetaData deploy(final Archive<?> archive) throws DeploymentException {
        try {
            // Export the bundle bytes
            ZipExporter exporter = archive.as(ZipExporter.class);
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            exporter.exportTo(baos);

            String location = archive.getName();
            ByteArrayInputStream inputStream = new ByteArrayInputStream(baos.toByteArray());
            log.info("Installing bundle: " + location);
            installBundle(location, inputStream);
View Full Code Here

Examples of org.jboss.shrinkwrap.api.exporter.ZipExporter.exportTo()

    private JarFile toJarFile(JavaArchive archive) throws IOException {
        ZipExporter exporter = archive.as(ZipExporter.class);
        File targetFile = new File("target/shrinkwrap/" + archive.getName());
        targetFile.getParentFile().mkdirs();
        exporter.exportTo(targetFile, true);
        return new JarFile(targetFile);
    }

    private JavaArchive getModuleB() {
        JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "moduleB");
View Full Code Here

Examples of org.jboss.shrinkwrap.api.exporter.ZipExporter.exportTo()

        if (targetFile.exists()) {
            Assert.assertTrue(targetFile.delete());
        }

        ZipExporter exporter = module.as(ZipExporter.class);
        exporter.exportTo(targetFile, true);

        return targetDir;
    }

    protected void testArchive(Archive module, Archive... libs) throws Throwable {
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.