Codota Logo
ShrinkWrap
Code IndexAdd Codota to your IDE (free)

How to use
ShrinkWrap
in
org.jboss.shrinkwrap.api

Best Java code snippets using org.jboss.shrinkwrap.api.ShrinkWrap (Showing top 20 results out of 2,295)

Refine searchRefine arrow

  • Deployment
  • WebArchive
  • JavaArchive
  • StringAsset
  • ArchivePaths
  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: hibernate/hibernate-orm

@Deployment
public static WebArchive createDeployment() {
  return ShrinkWrap.create( WebArchive.class )
      .addClass( Kryptonite.class )
      .addAsWebInfResource( EmptyAsset.INSTANCE, "beans.xml" )
      .addAsResource( new StringAsset( persistenceXml().exportAsString() ), "META-INF/persistence.xml" );
}
origin: camunda/camunda-bpm-platform

@Deployment(managed=false, name="deployment")
public static WebArchive processArchive() {    
 
 return  ShrinkWrap.create(WebArchive.class)
     .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
     .addAsLibraries(DeploymentHelper.getEjbClient())
     .addAsResource("META-INF/processes.xml", "META-INF/processes.xml")
     .addAsLibraries(
      ShrinkWrap.create(JavaArchive.class, "engine1.jar")
         .addAsResource("singleEngine.xml", "META-INF/processes.xml"),
      ShrinkWrap.create(JavaArchive.class, "engine2.jar")
         // we add the same process engine configuration multiple times -> fails
         .addAsResource("singleEngine.xml", "META-INF/processes.xml")
    );
}

origin: arquillian/continuous-enterprise-development

@Deployment
public static WebArchive deploy() {
  return ShrinkWrap.create(WebArchive.class)
    .addAsLibraries(
      ConferenceDeployments.conference().addClasses(ConferenceTestCase.class, TestUtils.class)
        .addAsManifestResource(new StringAsset(
          PersistenceDeployments.descriptor().exportAsString()), "persistence.xml")
        .addAsManifestResource(new File("src/main/resources/META-INF/beans.xml")))
    .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
    .addClass(BaseTransactionalSpecification.class);
}
origin: org.eclipse.microprofile.fault-tolerance/microprofile-fault-tolerance-tck

@Deployment
public static WebArchive deploy() {
  JavaArchive testJar = ShrinkWrap
    .create(JavaArchive.class, "ftTimeout.jar")
    .addClasses(TimeoutClient.class)
    .addAsManifestResource(new StringAsset(
      "Timeout/value=200"), "microprofile-config.properties")
    .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml").as(JavaArchive.class);
  WebArchive war = ShrinkWrap.create(WebArchive.class, "ftTimeout.war").addAsLibrary(testJar);
  return war;
}
origin: org.jboss.seam.faces/seam-faces-testsuite-common

@Deployment
public static Archive<?> createTestArchive() {
  return ShrinkWrap.create(JavaArchive.class).addClass(FacesContextProducer.class)
      .addAsManifestResource(new ByteArrayAsset(new byte[0]), ArchivePaths.create("beans.xml"));
}
origin: apache/deltaspike

@Deployment
public static WebArchive deploy()
{
  JavaArchive testJar = ShrinkWrap.create(JavaArchive.class, "InterDynTest.jar")
      .addPackage(SomeTestService.class.getPackage().getName())
      .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
      .addAsManifestResource(new StringAsset(CONFIG), "apache-deltaspike.properties");
  return ShrinkWrap.create(WebArchive.class, "InterDynTest.war")
      .addAsLibraries(ArchiveUtils.getDeltaSpikeCoreArchive())
      .addAsLibraries(testJar)
      .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
}
origin: org.jboss.seam.faces/seam-faces-testsuite-common

@Deployment
public static JavaArchive createTestArchive() {
  return ShrinkWrap
      .create(JavaArchive.class)
      .addClasses(ConversationBoundaryInterceptor.class, ConversationalBean.class, MockLogger.class, MockLoggerProducer.class)
      .addAsManifestResource(
          ConversationBoundaryInterceptorTest.class.getPackage().getName().replaceAll("\\.", "/")
              + "/ConversationBoundaryInterceptorTest-beans.xml", ArchivePaths.create("beans.xml"));
}
origin: camunda/camunda-bpm-platform

@Deployment
@OverProtocol("jmx-as7")
public static JavaArchive processArchive() {
 return ShrinkWrap.create(JavaArchive.class)
  .addClass(AbstractFoxPlatformIntegrationTest.class)
  .addClass(DefaultEjbProcessApplication.class)
  .addAsResource("META-INF/processes.xml", "META-INF/processes.xml")
  .addAsResource("org/camunda/bpm/integrationtest/testDeployProcessArchive.bpmn20.xml");
}

origin: org.eclipse.microprofile.config/microprofile-config-tck

@ShouldThrowException(DeploymentException.class)
@Deployment
public static WebArchive deploy() {
  JavaArchive testJar = ShrinkWrap
      .create(JavaArchive.class, "missingConverterOnInstanceInjectionTest.jar")
      .addClass(CustomConverterBean.class)
      .addAsManifestResource(new StringAsset("my.customtype.value=xxxxx"), "microprofile-config.properties")
      .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
      .as(JavaArchive.class);
  WebArchive war = ShrinkWrap
      .create(WebArchive.class, "missingConverterOnInstanceInjectionTest.war")
      .addAsLibrary(testJar);
  return war;
}
origin: camunda/camunda-bpm-platform

@Deployment
public static EnterpriseArchive onePaAsLib() {    
 JavaArchive processArchiveJar = ShrinkWrap.create(JavaArchive.class, "processes.jar")
  .addAsResource("org/camunda/bpm/integrationtest/testDeployProcessArchive.bpmn20.xml")
  .addAsResource("META-INF/processes.xml", "META-INF/processes.xml");
 WebArchive testJar = ShrinkWrap.create(WebArchive.class, "test.war")
  .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
  .setManifest(new ByteArrayAsset(("Class-Path: " + foxPlatformClientJar.getName()+"\n").getBytes()))
  .addClass(AbstractFoxPlatformIntegrationTest.class)
  .addClass(TestFoxPlatformClientAsEjbModule_onePaAsLib.class);
 return ShrinkWrap.create(EnterpriseArchive.class, "onePaAsLib.ear")            
  .addAsLibrary(processArchiveJar)
  .addAsModule(foxPlatformClientJar)
origin: hibernate/hibernate-orm

@Deployment
public static WebArchive deploy() throws Exception {
  final WebArchive war = ShrinkWrap.create( WebArchive.class, ARCHIVE_NAME + ".war" )
      .setManifest( "org/hibernate/test/wf/ddl/manifest.mf" )
      .addClasses( WildFlyDdlEntity.class )
      .addAsResource( new StringAsset( hibernate_cfg ), "hibernate.cfg.xml" )
      .addClasses( CmtSfStatefulBean.class )
      .addClasses( DdlInWildFlyUsingCmtAndSfTest.class );
  return war;
}
origin: hibernate/hibernate-orm

  @Deployment
  public static WebArchive buildDeployment() {
    WebArchive war = ShrinkWrap.create( WebArchive.class )
        .setManifest( "org/hibernate/test/wf/ddl/manifest.mf" )
        .addClass( WildFlyDdlEntity.class )
//                .addAsManifestResource( EmptyAsset.INSTANCE, "beans.xml")
        .addAsResource( new StringAsset( persistenceXml().exportAsString() ), PERSISTENCE_XML_RESOURCE_NAME )
        .addAsResource( "org/hibernate/test/wf/ddl/log4j.properties", "log4j.properties" );
    System.out.println( war.toString(true) );
    return war;
  }

origin: camunda/camunda-bpm-platform

@Deployment
public static WebArchive createDeployment() {
 
 WebArchive archive = ShrinkWrap.create(WebArchive.class, "test.war")
   .addClass(PostDeployInjectApp.class);
 return archive;
 
}

origin: org.jboss.forge/forge-test-harness

@Deployment
public static JavaArchive getDeployment()
{
 JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "test.jar").addPackages(true, Root.class.getPackage())
      .addPackages(true, RenderRoot.class.getPackage()).addPackages(true, SolderRoot.class.getPackage())
      .addAsManifestResource("META-INF/beans.xml", ArchivePaths.create("beans.xml"));
 return archive;
}
origin: jbosstm/narayana

@Deployment
public static JavaArchive createTestArchive() {
  return ShrinkWrap
      .create(JavaArchive.class, "test.jar")
      .addClasses(DummyXAResource.class, Utils.class)
      .addPackage("io.narayana.connectableresource")
      .addAsManifestResource(new StringAsset(DEPENDENCIES),
          "MANIFEST.MF")
      .addAsManifestResource(EmptyAsset.INSTANCE,
          ArchivePaths.create("beans.xml"));
}
origin: org.jboss.cdi.tck/cdi-tck-impl

@Deployment(name = "EJB", order = 1, testable = false)
public static JavaArchive createEjbtArchive() {
  return ShrinkWrap
      .create(JavaArchive.class, "test-ejb.jar")
      .addClasses(FooRemote.class, FooBean.class, Bar.class, ProcessBeanObserver.class)
      .addAsServiceProvider(Extension.class, ProcessBeanObserver.class)
      .addAsManifestResource(new StringAsset(Descriptors.create(BeansDescriptor.class).beanDiscoveryMode(BeanDiscoveryMode._ALL.toString()).version(
          Versions.v1_1).exportAsString()), "beans.xml");
}
origin: camunda/camunda-bpm-platform

@Deployment
public static WebArchive processArchive() {    
 
 return initWebArchiveDeployment()
     .addAsLibraries(
      ShrinkWrap.create(JavaArchive.class, "engine1.jar")
         .addAsResource("singleEngine.xml", "META-INF/processes.xml"),
      ShrinkWrap.create(JavaArchive.class, "engine2.jar")
         .addAsResource("twoEngines.xml", "META-INF/processes.xml")
    );
}

origin: camunda/camunda-bpm-platform

@Deployment(order=1)
public static WebArchive delegateDeployment() {
 WebArchive webArchive = ShrinkWrap.create(WebArchive.class, "service.war")
  .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
  .addClass(AbstractFoxPlatformIntegrationTest.class)
  .addClass(StartProcessSLSB.class)
  .addClass(StartProcessInterface.class)
  .addAsManifestResource(new StringAsset("Dependencies: org.camunda.bpm.camunda-engine"), "MANIFEST.MF"); // get access to engine classes
 TestContainer.addContainerSpecificResourcesForNonPa(webArchive);
 return webArchive;
}
origin: camunda/camunda-bpm-platform

@Deployment
public static EnterpriseArchive paAsEjbModule() throws Exception {    
 JavaArchive processArchive1Jar = ShrinkWrap.create(JavaArchive.class, "pa.jar")
  .addClass(EeComponent.class) // need to add at least one EE component, otherwise the jar is not detected as an EJB module by Jboss AS
  .addAsResource("org/camunda/bpm/integrationtest/deployment/ear/paAsEjbModule-process.bpmn20.xml")
  .addAsResource("org/camunda/bpm/integrationtest/deployment/ear/paAsEjbModule-pa.xml", "META-INF/processes.xml");
 WebArchive testJar = ShrinkWrap.create(WebArchive.class, "paAsEjbModule-test.war")
  .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
  .addClass(AbstractFoxPlatformIntegrationTest.class)
  .addClass(TestFoxPlatformClientAsEjbModule_pasAsEjbModule.class);
 return ShrinkWrap.create(EnterpriseArchive.class, "paAsEjbModule.ear")            
  .addAsModule(processArchive1Jar)
  .addAsModule(foxPlatformClientJar)
origin: org.rapidpm.modul/cdi-commons

  @Deployment
  public static JavaArchive createDeployment() {
    Asset beansXml = new StringAsset("<beans>" +
        "<interceptors><class>AsyncInterceptor</class></interceptors>" +
        "</beans>");

    return ShrinkWrap.create(JavaArchive.class)
        .addPackages(true, "org.rapidpm.commons.cdi")
        .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
//                .addAsManifestResource(beansXml, "beans.xml");
  }
 
org.jboss.shrinkwrap.apiShrinkWrap

Javadoc

Main entry point into the ShrinkWrap system. Each Archive has an associated Configuration provided at construction by the Domain under which the archive was created. ShrinkWrap provides static access to the default Domain (and by extension the default Configuration), as well as a shortcut mechanism to create Archives under these defaults by way of ShrinkWrap#create(Class,String). Additionally, this class is the hook to create new Domains via ShrinkWrap#createDomain(), ShrinkWrap#createDomain(ConfigurationBuilder) or ShrinkWrap#createDomain(Configuration).

Most used methods

  • create
  • createFromZipFile
    Creates a new archive of the specified type as imported from the specified File. The file is expecte
  • createDomain
    Creates a new Domain containing configuration properties from the supplied ConfigurationBuilder. Arc
  • getDefaultDomain
    Returns a single domain with default configuration for use in applications with no explicit configur

Popular in Java

  • Reading from database using SQL prepared statement
  • getExternalFilesDir (Context)
  • runOnUiThread (Activity)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • TreeMap (java.util)
    A Red-Black tree based NavigableMap implementation. The map is sorted according to the Comparable of
  • JComboBox (javax.swing)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now