Package org.jboss.shrinkwrap.api.asset

Examples of org.jboss.shrinkwrap.api.asset.ByteArrayAsset


        @Override
        public void file(File file, String name) throws IOException {
          path.append(name);
          String target = path.toString();
          path.setLength(path.length() - name.length());
          war.addAsWebInfResource(new ByteArrayAsset(new FileInputStream(file)), target);
        }
      });
    }
    catch (IOException e) {
      throw failure(e);
View Full Code Here


    Compiler compiler = new Compiler();
    List<JavaClassFileObject> files = compiler.compile("foo.A", "package foo;\n public class A {}");
    assertEquals(1, files.size());
    JavaClassFileObject aFile = files.get(0);
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "crash.jar");
    jar.add(new ByteArrayAsset(aFile.getBytes()), "foo/A.class");
    jar.setManifest(Thread.currentThread().getContextClassLoader().getResource("META-INF/MANIFEST.MF"));
    ClassLoader cl = factory.getClassLoader(jar);

    //
    compiler = new Compiler(cl);
View Full Code Here

TOP

Related Classes of org.jboss.shrinkwrap.api.asset.ByteArrayAsset

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.