本文整理汇总了Java中org.jboss.shrinkwrap.api.Filters类的典型用法代码示例。如果您正苦于以下问题:Java Filters类的具体用法?Java Filters怎么用?Java Filters使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Filters类属于org.jboss.shrinkwrap.api包,在下文中一共展示了Filters类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createTestArchive2
import org.jboss.shrinkwrap.api.Filters; //导入依赖的package包/类
@Deployment(name= APP_NAME, order = 2, testable = false)
public static Archive<?> createTestArchive2() throws IOException {
File[] files = Maven.resolver().loadPomFromFile("pom.xml")
.importRuntimeDependencies().resolve().withTransitivity().asFile();
return ShrinkWrap.create(WebArchive.class, "app-jsp.war")
.addPackages(true, Filters.exclude(".*Test.*"), Controller.class.getPackage())
.addAsLibraries(files)
.addAsWebResource(new File(WEBAPP_SRC, "index.jsp"))
.addAsWebResource(new File(WEBAPP_SRC, "protected.jsp"))
.addAsWebResource(new File(WEBAPP_SRC, "styles.css"))
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
.addAsWebInfResource(new StringAsset(createClient(ClientBuilder.create(APP_NAME)
.rootUrl(ROOT_URL)
.accessType(PUBLIC))), "keycloak.json")
.setWebXML(new File("src/main/webapp", "WEB-INF/web.xml"));
}
示例2: createDeployment
import org.jboss.shrinkwrap.api.Filters; //导入依赖的package包/类
public static WebArchive createDeployment() {
WebArchive webArchive = ShrinkWrap.create(WebArchive.class, "predcomposer-test.war")
.addPackages(true, CompetitionsService.class.getPackage(),
GamesService.class.getPackage(), Competition.class.getPackage(),
PredictionsService.class.getPackage(), Score.class.getPackage(),
UserContext.class.getPackage(), TestDataInserter.class.getPackage(),
UsersService.class.getPackage(), LoggedUserFilter.class.getPackage())
.addAsResource(new File("src/test/resources/META-INF/persistence-scenarios.xml"),
"META-INF/persistence.xml")
.merge(getWebPagesArchive(), "/", Filters.include(".*\\.xhtml$"))
.addAsWebResource(new File(WEBAPP_DIR, "login.xhtml"))
.addAsWebResource(new File(WEBAPP_DIR, "home.xhtml"))
.addAsWebInfResource(new File(WEB_INF_DIR, "faces-config.xml"))
.setWebXML(new File(WEB_INF_DIR, "web.xml"));
System.out.println(webArchive.toString());
return webArchive;
}
示例3: createDeployment
import org.jboss.shrinkwrap.api.Filters; //导入依赖的package包/类
@Deployment
public static Archive<?> createDeployment() {
GenericArchive qunitFiles = ShrinkWrap.create( GenericArchive.class )
.as( ExplodedImporter.class )
.importDirectory( "bower_components/js-cookie/" )
.as( GenericArchive.class );
WebArchive war = IntegrationUtils.createCommonDeployment()
.merge( qunitFiles, "/", Filters.includeAll() )
.addAsWebInfResource(
new File( "src/test/resources/web.xml" ),
"web.xml"
);
System.out.println( " ----- LOGGING THE FILES ADDED TO JBOSS" );
System.out.println( war.toString( true ) );
System.out.println( " ----- END OF LOGGING THE FILES ADDED TO JBOSS" );
return war;
}
示例4: createDeployment
import org.jboss.shrinkwrap.api.Filters; //导入依赖的package包/类
@Deployment
public static WebArchive createDeployment() {
File[] libs = Maven.resolver()
.loadPomFromFile("pom.xml")
.importRuntimeDependencies()
.addDependency(MavenDependencies.createDependency("eu.ggnet.dwoss:dwoss-mandator-sample", RUNTIME, false)) // The Sample Mandator is needed on many places.
.addDependency(MavenDependencies.createDependency("org.slf4j:slf4j-log4j12", RUNTIME, false)) // Log4J API
.addDependency(MavenDependencies.createDependency("org.assertj:assertj-core", RUNTIME, false)) // Fest assertion
.resolve().withTransitivity().asFile();
WebArchive war = ShrinkWrap.create(WebArchive.class, "stock-persistence-test.war")
.addPackages(true,
Filters.exclude(PersistenceIT.class.getPackage(), // Compile safe package "eu.ggnet.dwoss.customer.itest"
ValidationTest.class.getPackage()), // Compile safe package "eu.ggnet.dwoss.customer.test"
"eu.ggnet.dwoss.stock")
.addClass(MandatorSupportProducer.class) // The Datasource Configuration and the Static Producers
.addClass(SampleDataSourceDefinition.class) // Alle Datasources. More than we need.
.addClass(Coordinate.class) // Need this cause of the maven resolver is part of the deployment
.addClass(ArquillianProjectArchive.class) // The local deployer configuration
.addAsResource(new ClassLoaderAsset("META-INF/persistence.xml"), "META-INF/persistence.xml")
.addAsResource(new ClassLoaderAsset("log4j.properties"), "log4j.properties")
.addAsWebInfResource("jboss-deployment-structure.xml") // Needed for jboss/wildfly h2 enablement
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
.addAsLibraries(libs);
return war;
}
示例5: createDeployment
import org.jboss.shrinkwrap.api.Filters; //导入依赖的package包/类
@Deployment
public static WebArchive createDeployment() {
File[] libs = Maven.resolver()
.loadPomFromFile("pom.xml")
.importRuntimeDependencies()
.addDependency(MavenDependencies.createDependency("eu.ggnet.dwoss:dwoss-mandator-sample", RUNTIME, false)) // The Sample Mandator is needed on many places.
.addDependency(MavenDependencies.createDependency("org.slf4j:slf4j-log4j12", RUNTIME, false)) // Log4J API
.addDependency(MavenDependencies.createDependency("org.assertj:assertj-core", RUNTIME, false)) // AssertJ Fluent Assertions
.resolve().withTransitivity().asFile();
WebArchive war = ShrinkWrap.create(WebArchive.class, "customer-persistence-test.war")
.addPackages(true,
Filters.exclude(PersistenceIT.class.getPackage(), // Compile safe package "eu.ggnet.dwoss.customer.itest"
CustomerTest.class.getPackage()), // Compile safe package "eu.ggnet.dwoss.customer.test"
"eu.ggnet.dwoss.customer")
.addClass(MandatorSupportProducer.class) // The Datasource Configuration and the Static Producers
.addClass(SampleDataSourceDefinition.class) // Alle Datasources. More than we need.
.addClass(Coordinate.class) // Need this cause of the maven resolver is part of the deployment
.addClass(ArquillianProjectArchive.class) // The local deployer configuration
.addAsResource(new ClassLoaderAsset("META-INF/persistence.xml"), "META-INF/persistence.xml")
.addAsResource(new ClassLoaderAsset("log4j.properties"), "log4j.properties")
.addAsWebInfResource("jboss-deployment-structure.xml") // Needed for jboss/wildfly h2 enablement
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
.addAsLibraries(libs);
return war;
}
示例6: createDeployment
import org.jboss.shrinkwrap.api.Filters; //导入依赖的package包/类
@Deployment
public static WebArchive createDeployment() {
File[] libs = Maven.resolver()
.loadPomFromFile("pom.xml")
.importRuntimeDependencies()
.addDependency(MavenDependencies.createDependency("eu.ggnet.dwoss:dwoss-mandator-sample", RUNTIME, false)) // The Sample Mandator is needed on many places.
.addDependency(MavenDependencies.createDependency("org.slf4j:slf4j-log4j12", RUNTIME, false)) // Log4J API
.addDependency(MavenDependencies.createDependency("org.assertj:assertj-core", RUNTIME, false)) // AssertJ Fluent Assertions
.resolve().withTransitivity().asFile();
WebArchive war = ShrinkWrap.create(WebArchive.class, "uniqueunit-persistence-test.war")
.addPackages(true,
Filters.exclude(PersistenceIT.class.getPackage(), // Compile safe package "eu.ggnet.dwoss.uniqueunit.itest"
UniqueUnitTest.class.getPackage()), // Compile safe package "eu.ggnet.dwoss.uniqueunit.test"
"eu.ggnet.dwoss.uniqueunit")
.addClass(MandatorSupportProducer.class) // The Datasource Configuration and the Static Producers
.addClass(SampleDataSourceDefinition.class) // Alle Datasources. More than we need.
.addClass(Coordinate.class) // Need this cause of the maven resolver is part of the deployment
.addClass(ArquillianProjectArchive.class) // The local deployer configuration
.addClass(UniqurUnitItHelper.class)
.addAsResource(new ClassLoaderAsset("META-INF/persistence.xml"), "META-INF/persistence.xml")
.addAsResource(new ClassLoaderAsset("log4j.properties"), "log4j.properties")
.addAsWebInfResource("jboss-deployment-structure.xml") // Needed for jboss/wildfly h2 enablement
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
.addAsLibraries(libs);
return war;
}
示例7: createDeployment
import org.jboss.shrinkwrap.api.Filters; //导入依赖的package包/类
@Deployment
public static WebArchive createDeployment() {
File[] libs = Maven.resolver()
.loadPomFromFile("pom.xml")
.importRuntimeDependencies()
.addDependency(MavenDependencies.createDependency("eu.ggnet.dwoss:dwoss-mandator-sample", RUNTIME, false)) // The Sample Mandator is needed on many places.
.addDependency(MavenDependencies.createDependency("org.slf4j:slf4j-log4j12", RUNTIME, false)) // Log4J API
.resolve().withTransitivity().asFile();
return ShrinkWrap.create(WebArchive.class, "rights-persistence-test.war")
.addPackages(true, Filters.exclude(getPackage("eu.ggnet.dwoss.rights.itest")), "eu.ggnet.dwoss.rights")
.addPackages(true, "org.assertj") // Need this for AssertJ Assertations
.addClass(MandatorSupportProducer.class) // The Datasource Configuration and the Static Producers
.addClass(SampleDataSourceDefinition.class) // Alle Datasources. More than we need.
.addClass(Coordinate.class) // Need this cause of the maven resolver is part of the deployment
.addClass(ArquillianProjectArchive.class)
.addAsResource(new ClassLoaderAsset("META-INF/persistence.xml"), "META-INF/persistence.xml")
.addAsResource(new ClassLoaderAsset("log4j.properties"), "log4j.properties")
.addAsWebInfResource("jboss-deployment-structure.xml") // Needed for jboss/wildfly h2 enablement
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
.addAsLibraries(libs);
}
示例8: createDeployment
import org.jboss.shrinkwrap.api.Filters; //导入依赖的package包/类
@Deployment
public static WebArchive createDeployment() {
File[] libs = Maven.resolver()
.loadPomFromFile("pom.xml")
.importRuntimeDependencies()
.addDependency(MavenDependencies.createDependency("eu.ggnet.dwoss:dwoss-mandator-sample", RUNTIME, false)) // The Sample Mandator is needed on many places.
.addDependency(MavenDependencies.createDependency("org.slf4j:slf4j-log4j12", RUNTIME, false)) // Log4J API
.addDependency(MavenDependencies.createDependency("org.assertj:assertj-core", RUNTIME, false)) // Fest assertion
.resolve().withTransitivity().asFile();
WebArchive war = ShrinkWrap.create(WebArchive.class, "redtape-persistence-test.war")
.addPackages(true,
Filters.exclude(PersistenceIT.class.getPackage(), // Compile safe package "eu.ggnet.dwoss.redtape.itest"
PositionTest.class.getPackage()), // Compile safe package "eu.ggnet.dwoss.redtape.test"
"eu.ggnet.dwoss.redtape")
.addClass(MandatorSupportProducer.class) // The Datasource Configuration and the Static Producers
.addClass(Coordinate.class) // Need this cause of the maven resolver is part of the deployment
.addClass(SampleDataSourceDefinition.class) // Alle Datasources. More than we need.
.addClass(ArquillianProjectArchive.class) // The local deployer configuration
.addClass(RedTapeHelper.class)
.addAsResource(new ClassLoaderAsset("META-INF/persistence.xml"), "META-INF/persistence.xml")
.addAsResource(new ClassLoaderAsset("log4j.properties"), "log4j.properties")
.addAsWebInfResource("jboss-deployment-structure.xml") // Needed for jboss/wildfly h2 enablement
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
.addAsLibraries(libs);
return war;
}
示例9: createDeployment
import org.jboss.shrinkwrap.api.Filters; //导入依赖的package包/类
@Deployment
public static WebArchive createDeployment() {
File[] libs = Maven.resolver()
.loadPomFromFile("pom.xml")
.importRuntimeDependencies()
.addDependency(MavenDependencies.createDependency("eu.ggnet.dwoss:dwoss-mandator-sample", RUNTIME, false)) // The Sample Mandator is needed on many places.
.addDependency(MavenDependencies.createDependency("org.slf4j:slf4j-log4j12", RUNTIME, false)) // Log4J API
.addDependency(MavenDependencies.createDependency("org.assertj:assertj-core", RUNTIME, false)) // Fest assertion
.resolve().withTransitivity().asFile();
WebArchive war = ShrinkWrap.create(WebArchive.class, "report-persistence-test.war")
.addPackages(true,
Filters.exclude(PersistenceIT.class.getPackage(), // Compile safe package "eu.ggnet.dwoss.redtape.itest"
ReportTest.class.getPackage()), // Compile safe package "eu.ggnet.dwoss.redtape.test"
"eu.ggnet.dwoss.report")
.addClass(MandatorSupportProducer.class) // The Datasource Configuration and the Static Producers
.addClass(Coordinate.class) // Need this cause of the maven resolver is part of the deployment
.addClass(ArquillianProjectArchive.class) // The local deployer configuration
.addClass(ReportLineItHelper.class) // Helper Bean
.addClass(SampleDataSourceDefinition.class)
.addAsResource(new ClassLoaderAsset("META-INF/persistence.xml"), "META-INF/persistence.xml")
.addAsResource(new ClassLoaderAsset("log4j.properties"), "log4j.properties")
.addAsWebInfResource("jboss-deployment-structure.xml") // Needed for jboss/wildfly h2 enablement
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
.addAsLibraries(libs);
return war;
}
示例10: createSpecialtiesDeployment
import org.jboss.shrinkwrap.api.Filters; //导入依赖的package包/类
public static WebArchive createSpecialtiesDeployment() {
File[] deps = Maven.resolver().loadPomFromFile("pom.xml").importRuntimeDependencies().resolve().withTransitivity().asFile();
WebArchive war = null;
try {
war = ShrinkWrap.create(WebArchive.class, "specialties.war")
.addClasses(SpecialtyController.class, LanguageBean.class,
SpecialtyDao.class, SpecialtyDaoImpl.class,
Owner.class, Pet.class, PetType.class,
Specialty.class, Vet.class, Visit.class,
net.sourceforge.cobertura.coveragedata.LightClassmapListener.class)
.merge(ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class)
.importDirectory(WEBAPP_SRC).as(GenericArchive.class),
"/", Filters.include(".*\\.xhtml$|.*\\.html$"))
.addAsResource("META-INF/persistence.xml")
.addAsResource("messages_de.properties")
.addAsResource("messages_en.properties")
.addAsLibraries(deps)
.addAsWebInfResource(
new StringAsset("<faces-config version=\"2.2\"/>"),
"faces-config.xml");
} catch (Exception e) {
e.printStackTrace();
}
return war;
}
示例11: createPetTypeDeployment
import org.jboss.shrinkwrap.api.Filters; //导入依赖的package包/类
public static WebArchive createPetTypeDeployment() {
File[] deps = Maven.resolver().loadPomFromFile("pom.xml").importRuntimeDependencies().resolve().withTransitivity().asFile();
return ShrinkWrap.create(WebArchive.class, "pettypes.war")
.addClasses(PetTypeController.class, LanguageBean.class,
PetTypeDao.class, PetTypeDaoImpl.class,
Owner.class, Pet.class, PetType.class,
Specialty.class, Vet.class, Visit.class,
net.sourceforge.cobertura.coveragedata.LightClassmapListener.class)
.merge(ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class)
.importDirectory(WEBAPP_SRC).as(GenericArchive.class),
"/", Filters.include(".*\\.xhtml$|.*\\.html$"))
.addAsResource("META-INF/persistence.xml")
.addAsResource("messages_de.properties")
.addAsResource("messages_en.properties")
.addAsLibraries(deps)
.addAsWebInfResource(
new StringAsset("<faces-config version=\"2.2\"/>"),
"faces-config.xml");
}
示例12: createVetDeployment
import org.jboss.shrinkwrap.api.Filters; //导入依赖的package包/类
public static WebArchive createVetDeployment() {
File[] deps = Maven.resolver().loadPomFromFile("pom.xml").importRuntimeDependencies().resolve().withTransitivity().asFile();
return ShrinkWrap.create(WebArchive.class, "vet.war")
.addClasses(
SpecialtyController.class, VetController.class, LanguageBean.class,
SpecialtyConverter.class,
SpecialtyDao.class, SpecialtyDaoImpl.class,
VetDao.class, VetDaoImpl.class,
Owner.class, Pet.class, PetType.class,
Specialty.class, Vet.class, Visit.class,
VetSortingBean.class,
net.sourceforge.cobertura.coveragedata.LightClassmapListener.class)
.merge(ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class)
.importDirectory(WEBAPP_SRC).as(GenericArchive.class),
"/", Filters.include(".*\\.xhtml$|.*\\.html$"))
.addAsResource("META-INF/persistence.xml")
.addAsResource("messages_de.properties")
.addAsResource("messages_en.properties")
.addAsLibraries(deps)
.addAsWebInfResource(
new StringAsset("<faces-config version=\"2.2\"/>"),
"faces-config.xml");
}
示例13: createSpecialtiesDeployment
import org.jboss.shrinkwrap.api.Filters; //导入依赖的package包/类
public static WebArchive createSpecialtiesDeployment() {
File[] deps = Maven.resolver().loadPomFromFile("pom.xml").importRuntimeDependencies().resolve().withTransitivity().asFile();
WebArchive war = null;
try {
war = ShrinkWrap.create(WebArchive.class, "specialties.war")
.addClasses(SpecialtyController.class, LanguageBean.class,
SpecialtyDao.class, SpecialtyDaoImpl.class,
Owner.class, Pet.class, PetType.class,
Specialty.class, Vet.class, Visit.class)
.merge(ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class)
.importDirectory(WEBAPP_SRC).as(GenericArchive.class),
"/", Filters.include(".*\\.xhtml$|.*\\.html$"))
.addAsResource("META-INF/persistence.xml")
.addAsResource("messages_de.properties")
.addAsResource("messages_en.properties")
.addAsLibraries(deps)
.addAsWebInfResource(
new StringAsset("<faces-config version=\"2.0\"/>"),
"faces-config.xml");
} catch (Exception e) {
e.printStackTrace();
}
return war;
}
示例14: createPetTypeDeployment
import org.jboss.shrinkwrap.api.Filters; //导入依赖的package包/类
public static WebArchive createPetTypeDeployment() {
File[] deps = Maven.resolver().loadPomFromFile("pom.xml").importRuntimeDependencies().resolve().withTransitivity().asFile();
return ShrinkWrap.create(WebArchive.class, "pettypes.war")
.addClasses(PetTypeController.class, LanguageBean.class,
PetTypeDao.class, PetTypeDaoImpl.class,
Owner.class, Pet.class, PetType.class,
Specialty.class, Vet.class, Visit.class)
.merge(ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class)
.importDirectory(WEBAPP_SRC).as(GenericArchive.class),
"/", Filters.include(".*\\.xhtml$|.*\\.html$"))
.addAsResource("META-INF/persistence.xml")
.addAsResource("messages_de.properties")
.addAsResource("messages_en.properties")
.addAsLibraries(deps)
.addAsWebInfResource(
new StringAsset("<faces-config version=\"2.0\"/>"),
"faces-config.xml");
}
示例15: createVetDeployment
import org.jboss.shrinkwrap.api.Filters; //导入依赖的package包/类
public static WebArchive createVetDeployment() {
File[] deps = Maven.resolver().loadPomFromFile("pom.xml").importRuntimeDependencies().resolve().withTransitivity().asFile();
return ShrinkWrap.create(WebArchive.class, "vet.war")
.addClasses(
SpecialtyController.class, VetController.class, LanguageBean.class,
SpecialtyConverter.class, SpecialtyParser.class,
SpecialtyDao.class, SpecialtyDaoImpl.class,
VetDao.class, VetDaoImpl.class,
Owner.class, Pet.class, PetType.class,
Specialty.class, Vet.class, Visit.class)
.merge(ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class)
.importDirectory(WEBAPP_SRC).as(GenericArchive.class),
"/", Filters.include(".*\\.xhtml$|.*\\.html$"))
.addAsResource("META-INF/persistence.xml")
.addAsResource("messages_de.properties")
.addAsResource("messages_en.properties")
.addAsLibraries(deps)
.addAsWebInfResource(
new StringAsset("<faces-config version=\"2.0\"/>"),
"faces-config.xml");
}