本文整理匯總了Java中org.jboss.shrinkwrap.api.ShrinkWrap.create方法的典型用法代碼示例。如果您正苦於以下問題:Java ShrinkWrap.create方法的具體用法?Java ShrinkWrap.create怎麽用?Java ShrinkWrap.create使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.jboss.shrinkwrap.api.ShrinkWrap
的用法示例。
在下文中一共展示了ShrinkWrap.create方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: main
import org.jboss.shrinkwrap.api.ShrinkWrap; //導入方法依賴的package包/類
public static void main(String[] args) throws Exception {
// Instantiate the container
Swarm swarm = new Swarm(args);
// Create one or more deployments
WARArchive deployment = ShrinkWrap.create(WARArchive.class);
// Add resource to deployment
deployment.addPackage(Main.class.getPackage());
deployment.addAllDependencies();
// Add Web resources
deployment.addAsWebResource(
new ClassLoaderAsset("src/main/webapp/index.html", Main.class.getClassLoader()), "src/main/webapp/index.html");
deployment.addAsWebInfResource(
new ClassLoaderAsset("src/main/webapp/WEB-INF/beans.xml", Main.class.getClassLoader()), "beans.xml");
swarm.start().deploy(deployment);
}
示例2: createDeployment
import org.jboss.shrinkwrap.api.ShrinkWrap; //導入方法依賴的package包/類
protected static JAXRSArchive createDeployment(Swarm container) throws Exception {
System.out.println("\tConfiguration folder is " + configFolder);
LoginModule<?> loginModule = new LoginModule<>("UsersRoles");
loginModule.flag(Flag.REQUIRED)
.code("UsersRoles")
.moduleOption("usersProperties", configFolder + "/security/application-users.properties")
.moduleOption("rolesProperties", configFolder + "/security/application-roles.properties");
SecurityDomain<?> security = new SecurityDomain<>("other")
.classicAuthentication(new ClassicAuthentication<>()
.loginModule(loginModule));
container.fraction(new SecurityFraction().securityDomain(security));
JAXRSArchive deployment = ShrinkWrap.create(JAXRSArchive.class, "kie-server.war");
deployment.staticContent();
deployment.addAllDependencies();
deployment.addAsWebInfResource(new File(configFolder + "/web/web.xml"), "web.xml");
deployment.addAsWebInfResource(new File(configFolder + "/web/jboss-web.xml"), "jboss-web.xml");
return deployment;
}
示例3: createDeployment
import org.jboss.shrinkwrap.api.ShrinkWrap; //導入方法依賴的package包/類
@Deployment(testable = false)
public static Archive<?> createDeployment() throws Exception {
WARArchive deployment = ShrinkWrap.create(WARArchive.class);
deployment.addPackage("pro.taskana");
deployment.addClass(TaskanaProducers.class);
deployment.addAllDependencies();
deployment.addDependency("org.mybatis:mybatis:3.4.2");
deployment.addDependency("org.mybatis:mybatis-cdi:1.0.0");
deployment.addDependency("pro.taskana:taskana-core:0.0.5-SNAPSHOT");
deployment.addAsResource("META-INF/beans.xml");
deployment.addAsResource("taskana.properties");
deployment.addAsResource("project-defaults.yml");
return deployment;
}
示例4: getDeployment
import org.jboss.shrinkwrap.api.ShrinkWrap; //導入方法依賴的package包/類
@Deployment
public static Archive<?> getDeployment() {
WebArchive war = ShrinkWrap.create(WebArchive.class);
war.addPackage(EntityToModelMapper.class.getPackage());
war.addClasses(GaeSearchRepository.class, SearchData.class, SearchConfiguration.class);
war.addAsWebInfResource("appengine-web.xml");
war.addAsResource("datastore-indexes.xml");
PomEquippedResolveStage pom = Maven.resolver().loadPomFromFile("pom.xml");
war.addAsLibraries(pom.resolve("com.google.appengine:appengine-api-1.0-sdk").withTransitivity().as(File.class));
war.addAsLibraries(pom.resolve("me.snowdrop.data:spring-data-snowdrop-core").withTransitivity().as(File.class));
return war;
}
示例5: main
import org.jboss.shrinkwrap.api.ShrinkWrap; //導入方法依賴的package包/類
public static void main(String[] args) throws Exception {
Swarm swarm = new Swarm();
WARArchive deployment = ShrinkWrap.create(WARArchive.class);
deployment.
addAllDependencies().
addClass(JaxRsActivator.class).
addAsServiceProvider(Extension.class, K8SExtension.class).
addPackages(true,"ch.trivadis.workshop");
deployment.staticContent();
swarm.start();
swarm.deploy(deployment);
}
示例6: createDeployment
import org.jboss.shrinkwrap.api.ShrinkWrap; //導入方法依賴的package包/類
@Deployment
public static WebArchive createDeployment() {
return ShrinkWrap.create(WebArchive.class);
}
示例7: WebArchiveBuilder
import org.jboss.shrinkwrap.api.ShrinkWrap; //導入方法依賴的package包/類
public WebArchiveBuilder() {
this(ShrinkWrap.create(WebArchive.class));
}
示例8: createDeployment
import org.jboss.shrinkwrap.api.ShrinkWrap; //導入方法依賴的package包/類
@Deployment
public static Archive<?> createDeployment() {
return ShrinkWrap.create(WebArchive.class, ProvidesRestClientBuilderTest.class.getSimpleName()+".war");
}
示例9: createDeployment
import org.jboss.shrinkwrap.api.ShrinkWrap; //導入方法依賴的package包/類
@Deployment
public static Archive<?> createDeployment() {
return ShrinkWrap.create(WebArchive.class, InvalidInterfaceTest.class.getSimpleName()+".war");
}
示例10: deploy
import org.jboss.shrinkwrap.api.ShrinkWrap; //導入方法依賴的package包/類
@Deployment
public static Archive deploy(){
return ShrinkWrap.create(WebArchive.class);
}