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

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

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

Refine searchRefine arrow

  • Deployment.<init>
  • WebArchive.addAsWebInfResource
  • WebArchive.addAsLibraries
  • JavaArchive.addAsManifestResource
  • Test.<init>
  • 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: javaee-samples/javaee7-samples

public static WebArchive defaultWebArchive() {
  return 
    create(WebArchive.class, "test.war")
      .addPackages(true, "org.javaee7.jaspic")
      .deleteClass(ArquillianBase.class)
      .addAsWebInfResource(resource("web.xml"))
      .addAsWebInfResource(resource("jboss-web.xml"))
      .addAsWebInfResource(resource("glassfish-web.xml"));
}

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: kiegroup/optaplanner

@Deployment(testable = false)
public static WebArchive createDeployment() {
  File file = findPomFile();
  return ShrinkWrap.create(MavenImporter.class)
      .loadPomFromFile(file)
      .importBuildOutput()
      .as(WebArchive.class);
}
origin: org.jboss.arquillian.protocol/arquillian-protocol-servlet

@Test(expected = UnsupportedOperationException.class)
public void shouldThrowExceptionOnEnterpriseArchiveWithMultipleWebArchive() throws Exception {
  new ServletProtocolDeploymentPackager().generateDeployment(
    new TestDeployment(
      ShrinkWrap.create(EnterpriseArchive.class, "applicationArchive.ear")
        .addAsModule(ShrinkWrap.create(WebArchive.class))
        .addAsModule(ShrinkWrap.create(WebArchive.class)),
      createAuxiliaryArchives()),
    processors());
}
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: camunda/camunda-bpm-platform

/**
 *
 * test-application.ear
 *    |-- pa.jar
 *        |-- AbstractFoxPlatformIntegrationTest.class
 *        |-- TestPaAnnotatedEjb.class
 *
 *        |-- AnnotatedEjbPa.class
 *        |-- process.bpmn
 *        |-- deployment-descriptor-with-custom-filename.xml
 *        |-- META-INF/beans.xml
 *
 *    |-- camunda-engine-cdi.jar
 *        |-- META-INF/MANIFEST.MF
 *
 */
@Deployment
public static EnterpriseArchive paAsEjbModule() {
 JavaArchive processArchive1Jar = ShrinkWrap.create(JavaArchive.class, "pa.jar")
  .addClass(AbstractFoxPlatformIntegrationTest.class)
  .addClass(TestPaAnnotatedEjb.class)
  .addClass(AnnotatedEjbPa.class)
  .addAsResource("org/camunda/bpm/integrationtest/deployment/ear/process1.bpmn20.xml", "process.bpmn")
  .addAsResource("META-INF/processes.xml", "deployment-descriptor-with-custom-filename.xml")
  .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
 return ShrinkWrap.create(EnterpriseArchive.class, "paAsEjbModule.ear")
  .addAsModule(processArchive1Jar)
  .addAsLibrary(DeploymentHelper.getEngineCdi());
}
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

public static WebArchive initWebArchiveDeployment(String name, String processesXmlPath) {
 WebArchive archive = ShrinkWrap.create(WebArchive.class, name)
      .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
      .addAsLibraries(DeploymentHelper.getEngineCdi())
      .addAsResource(processesXmlPath, "META-INF/processes.xml")
      .addClass(AbstractFoxPlatformIntegrationTest.class)
      .addClass(TestConstants.class);
 TestContainer.addContainerSpecificResources(archive);
 return archive;
}
origin: org.jboss.arquillian.protocol/arquillian-protocol-servlet

@Test(expected = UnsupportedOperationException.class)
public void shouldThrowExceptionOnEnterpriseArchiveWithMultipleWebArchive() throws Exception {
  new ServletProtocolDeploymentPackager().generateDeployment(
    new TestDeployment(
      ShrinkWrap.create(EnterpriseArchive.class, "applicationArchive.ear")
        .addAsModule(ShrinkWrap.create(WebArchive.class))
        .addAsModule(ShrinkWrap.create(WebArchive.class)),
      createAuxiliaryArchives()),
    processors());
}
origin: camunda/camunda-bpm-platform

@Deployment
public static WebArchive processArchive() {    
 return ShrinkWrap.create(WebArchive.class, "test.war")
  .addClass(AbstractFoxPlatformIntegrationTest.class)
  .addAsWebInfResource("org/camunda/bpm/integrationtest/deployment/spring/SpringLookupManagedProcessEngineTest-context.xml", "applicationContext.xml")
  .addAsLibraries(DeploymentHelper.getEngineSpring())
  .addAsManifestResource("org/camunda/bpm/integrationtest/deployment/spring/jboss-deployment-structure.xml", "jboss-deployment-structure.xml")
  .addAsWebInfResource("org/camunda/bpm/integrationtest/deployment/spring/web.xml", "web.xml");
}

origin: camunda/camunda-bpm-platform

/**
 *
 * test-application.ear
 *    |-- pa.jar
 *        |-- DefaultEjbProcessApplication.class
 *        |-- NamedCdiBean.class
 *        |-- AbstractFoxPlatformIntegrationTest.class
 *        |-- TestPaAsEjbJar.class
 *        |-- org/camunda/bpm/integrationtest/deployment/ear/paAsEjbJar-process.bpmn20.xml
 *        |-- META-INF/processes.xml
 *        |-- META-INF/beans.xml
 *
 *    |-- camunda-engine-cdi.jar
 *        |-- META-INF/MANIFEST.MF
 *
 */
@Deployment
public static EnterpriseArchive paAsEjbModule() throws Exception {
 JavaArchive processArchive1Jar = ShrinkWrap.create(JavaArchive.class, "pa.jar")
  .addClass(DefaultEjbProcessApplication.class)
  .addClass(NamedCdiBean.class)
  .addClass(AbstractFoxPlatformIntegrationTest.class)
  .addClass(TestPaAsEjbJar.class)
  .addAsResource("org/camunda/bpm/integrationtest/deployment/ear/paAsEjbJar-process.bpmn20.xml")
  .addAsResource("META-INF/processes.xml", "META-INF/processes.xml")
  .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
 return ShrinkWrap.create(EnterpriseArchive.class, "paAsEjbModule.ear")
  .addAsModule(processArchive1Jar)
  .addAsLibrary(DeploymentHelper.getEngineCdi());
}
origin: hibernate/hibernate-orm

@Deployment
public static WebArchive createDeployment() {
  return ShrinkWrap.create( WebArchive.class )
      .addClass( AuditedEntity.class )
      .addAsWebInfResource( EmptyAsset.INSTANCE, "beans.xml" )
      .addAsResource( new StringAsset( persistenceXml().exportAsString() ), "META-INF/persistence.xml" );
}
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: 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")
      );
     
}

origin: org.jboss.arquillian.protocol/arquillian-protocol-servlet

@Test(expected = IllegalArgumentException.class)
public void shouldThrowExceptionOnUnknownArchiveType() throws Exception {
  new ServletProtocolDeploymentPackager().generateDeployment(
    new TestDeployment(ShrinkWrap.create(ResourceAdapterArchive.class), new ArrayList<Archive<?>>()),
    processors()
  );
}
origin: camunda/camunda-bpm-platform

@Deployment
public static WebArchive processArchive() {
 return ShrinkWrap.create(WebArchive.class, "test.war")
  .addClass(AbstractFoxPlatformIntegrationTest.class)
  .addClass(CustomSpringServletProcessApplication.class)
  .addAsWebInfResource("org/camunda/bpm/integrationtest/deployment/spring/SpringServletPALifecycleTest-context.xml", "applicationContext.xml")
  .addAsLibraries(DeploymentHelper.getEngineSpring())
  .addAsWebInfResource("org/camunda/bpm/integrationtest/deployment/spring/web.xml", "web.xml");
}
origin: org.eclipse.microprofile.fault-tolerance/microprofile-fault-tolerance-tck

@Deployment
public static WebArchive deploy() {
  JavaArchive testJar = ShrinkWrap.create(JavaArchive.class, "ftFallbackMethodGenericComplex.jar")
      .addClasses(FallbackMethodGenericComplexBeanA.class, FallbackMethodGenericComplexBeanB.class)
      .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
  
  WebArchive war = ShrinkWrap
      .create(WebArchive.class, "ftFallbackMethodGenericComplex.war")
      .addAsLibrary(testJar);
  return war;
}

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: 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( BmtSfStatefulBean.class )
      .addClasses( DdlInWildFlyUsingBmtAndSfTest.class );
  return war;
}
origin: org.jboss.arquillian.protocol/arquillian-protocol-servlet

@Test(expected = UnsupportedOperationException.class)
public void shouldThrowExceptionOnEnterpriseArchiveWithMultipleMarkedWebArchives() throws Exception {
  new ServletProtocolDeploymentPackager().generateDeployment(
    new TestDeployment(
      ShrinkWrap.create(EnterpriseArchive.class, "applicationArchive.ear")
        .addAsModule(Testable.archiveToTest(ShrinkWrap.create(WebArchive.class)))
        .addAsModule(Testable.archiveToTest(ShrinkWrap.create(WebArchive.class))),
      createAuxiliaryArchives()),
    processors());
}
org.jboss.shrinkwrap.apiShrinkWrapcreate

Javadoc

Creates a new archive of the specified type. The archive will be be backed by the default Configuration. specific to this ArchiveFactory. Generates a random name for the archive and adds proper extension based on the service descriptor properties file if extension property is present (e.g. shrinkwrap/impl-base/src/main/resources/META-INF/services/org.jboss.shrinkwrap.api.spec.JavaArchive) Invoking this method is functionally equivalent to calling ArchiveFactory#create(Class) upon Domain#getArchiveFactory() upon the domain returned by ShrinkWrap#getDefaultDomain().

Popular methods of ShrinkWrap

  • 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

  • Reactive rest calls using spring rest template
  • getContentResolver (Context)
  • runOnUiThread (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Collectors (java.util.stream)
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
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