本文整理汇总了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);
}