Tabnine Logo
ShrinkWrap.create
Code IndexAdd Tabnine 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>
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( BmtSfStatefulBean.class )
      .addClasses( DdlInWildFlyUsingBmtAndSfTest.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, "ftFallbackMethodPrivate.jar")
      .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
  
  WebArchive war = ShrinkWrap
      .create(WebArchive.class, "ftFallbackMethodPrivate.war")
      .addClass(FallbackMethodPrivateBean.class)
      .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( CmtSfStatefulBean.class )
      .addClasses( DdlInWildFlyUsingCmtAndSfTest.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

  • Making http requests using okhttp
  • setScale (BigDecimal)
  • onCreateOptionsMenu (Activity)
  • requestLocationUpdates (LocationManager)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now