Package org.jboss.shrinkwrap.api.spec

Examples of org.jboss.shrinkwrap.api.spec.WebArchive.addResource()


   }

   protected WebArchive createWebArchive(String name)
   {
      WebArchive webArchive = ShrinkWrap.create(WebArchive.class, "test-weld.war");
      webArchive
         .addResource("org/jboss/test/deployers/as/support/webapp/" + name + ".xhtml", "/" + name + ".xhtml")
         .addResource("org/jboss/test/deployers/as/support/webapp/WEB-INF/web.xml", WEB_XML)
         .addResource("org/jboss/test/deployers/as/support/webapp/WEB-INF/faces-config.xml", FACES_CONFIG);
     
     
View Full Code Here


        org.hibernate.ejb.test.pack.war.OtherIncrementListener.class,
        org.hibernate.ejb.test.pack.war.Version.class
    );

    ArchivePath path = ArchivePaths.create( "WEB-INF/classes/META-INF/orm.xml" );
    archive.addResource( "war/WEB-INF/classes/META-INF/orm.xml", path );

    path = ArchivePaths.create( "WEB-INF/classes/META-INF/persistence.xml" );
    archive.addResource( "war/WEB-INF/classes/META-INF/persistence.xml", path );

    path = ArchivePaths.create( "WEB-INF/classes/org/hibernate/ejb/test/pack/war/Mouse.hbm.xml" );
View Full Code Here

    ArchivePath path = ArchivePaths.create( "WEB-INF/classes/META-INF/orm.xml" );
    archive.addResource( "war/WEB-INF/classes/META-INF/orm.xml", path );

    path = ArchivePaths.create( "WEB-INF/classes/META-INF/persistence.xml" );
    archive.addResource( "war/WEB-INF/classes/META-INF/persistence.xml", path );

    path = ArchivePaths.create( "WEB-INF/classes/org/hibernate/ejb/test/pack/war/Mouse.hbm.xml" );
    archive.addResource( "war/WEB-INF/classes/org/hibernate/ejb/test/pack/war/Mouse.hbm.xml", path );

    File testPackage = new File( targetDir, fileName );
View Full Code Here

    path = ArchivePaths.create( "WEB-INF/classes/META-INF/persistence.xml" );
    archive.addResource( "war/WEB-INF/classes/META-INF/persistence.xml", path );

    path = ArchivePaths.create( "WEB-INF/classes/org/hibernate/ejb/test/pack/war/Mouse.hbm.xml" );
    archive.addResource( "war/WEB-INF/classes/org/hibernate/ejb/test/pack/war/Mouse.hbm.xml", path );

    File testPackage = new File( targetDir, fileName );
    archive.as( ZipExporter.class ).exportZip( testPackage, true );
    return testPackage;
  }
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.