use of org.jboss.shrinkwrap.api.asset.ClassLoaderAsset in project dwoss by gg-net.
the class ArquillianProjectArchive method createDeployment.
@Deployment
public static WebArchive createDeployment() {
// Compile Safe Packages.
Package projectPackage = Exporter.class.getPackage();
Package testPackage = ImportPriceManagementLogicTest.class.getPackage();
File[] libs = Maven.resolver().loadPomFromFile("pom.xml").importRuntimeDependencies().addDependency(// The Sample Mandator
MavenDependencies.createDependency("eu.ggnet.dwoss:dwoss-mandator-sample", RUNTIME, false)).addDependency(// The Sample Mandator Services
MavenDependencies.createDependency("eu.ggnet.dwoss:dwoss-mandator-sample-service", RUNTIME, false)).addDependency(// Using Receipt for unit generation
MavenDependencies.createDependency("eu.ggnet.dwoss:dwoss-ee-extended-receipt", RUNTIME, false)).addDependency(// Log4J API
MavenDependencies.createDependency("org.slf4j:slf4j-log4j12", RUNTIME, false)).addDependency(// AssertJ Fluent Assertions
MavenDependencies.createDependency("org.assertj:assertj-core", RUNTIME, false)).resolve().withTransitivity().asFile();
WebArchive war = ShrinkWrap.create(WebArchive.class, "receipt-persistence-test.war").addPackages(true, exclude(testPackage), projectPackage).addClass(// Alle Datasources. More than we need.
SampleDataSourceDefinition.class).addClass(// Need this cause of the maven resolver is part of the deployment
Coordinate.class).addClass(// The local deployer configuration
ArquillianProjectArchive.class).addAsResource(new ClassLoaderAsset("META-INF/persistence.xml"), "META-INF/persistence.xml").addAsResource(new ClassLoaderAsset("log4j.properties"), "log4j.properties").addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml").addAsWebInfResource(// Needed for jboss/wildfly h2 enablement
"jboss-deployment-structure.xml").addAsLibraries(libs);
return war;
}
use of org.jboss.shrinkwrap.api.asset.ClassLoaderAsset in project dwoss by gg-net.
the class ArquillianProjectArchive method createDeployment.
@Deployment
public static WebArchive createDeployment() {
File[] libs = Maven.resolver().loadPomFromFile("pom.xml").importRuntimeDependencies().addDependency(// The Sample Mandator is needed on many places.
MavenDependencies.createDependency("eu.ggnet.dwoss:dwoss-mandator-sample", RUNTIME, false)).addDependency(// Log4J API
MavenDependencies.createDependency("org.slf4j:slf4j-log4j12", RUNTIME, false)).addDependency(// Fest assertion
MavenDependencies.createDependency("org.assertj:assertj-core", RUNTIME, false)).resolve().withTransitivity().asFile();
WebArchive war = ShrinkWrap.create(WebArchive.class, "redtape-persistence-test.war").addPackages(true, // Compile safe package "eu.ggnet.dwoss.redtape.itest"
Filters.exclude(// Compile safe package "eu.ggnet.dwoss.redtape.itest"
PersistenceIT.class.getPackage(), // Compile safe package "eu.ggnet.dwoss.redtape.test"
PositionTest.class.getPackage()), "eu.ggnet.dwoss.redtape").addClass(// The Datasource Configuration and the Static Producers
MandatorSupportProducer.class).addClass(// Need this cause of the maven resolver is part of the deployment
Coordinate.class).addClass(// Alle Datasources. More than we need.
SampleDataSourceDefinition.class).addClass(// The local deployer configuration
ArquillianProjectArchive.class).addClass(RedTapeHelper.class).addAsResource(new ClassLoaderAsset("META-INF/persistence.xml"), "META-INF/persistence.xml").addAsResource(new ClassLoaderAsset("log4j.properties"), "log4j.properties").addAsWebInfResource(// Needed for jboss/wildfly h2 enablement
"jboss-deployment-structure.xml").addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml").addAsLibraries(libs);
return war;
}
use of org.jboss.shrinkwrap.api.asset.ClassLoaderAsset in project dwoss by gg-net.
the class ArquillianProjectArchive method createDeployment.
@Deployment
public static WebArchive createDeployment() {
File[] libs = Maven.resolver().loadPomFromFile("pom.xml").importRuntimeDependencies().addDependency(// The Sample Mandator is needed on many places.
MavenDependencies.createDependency("eu.ggnet.dwoss:dwoss-mandator-sample", RUNTIME, false)).addDependency(// Log4J API
MavenDependencies.createDependency("org.slf4j:slf4j-log4j12", RUNTIME, false)).addDependency(// AssertJ Fluent Assertions
MavenDependencies.createDependency("org.assertj:assertj-core", RUNTIME, false)).resolve().withTransitivity().asFile();
WebArchive war = ShrinkWrap.create(WebArchive.class, "uniqueunit-persistence-test.war").addPackages(true, // Compile safe package "eu.ggnet.dwoss.uniqueunit.itest"
Filters.exclude(// Compile safe package "eu.ggnet.dwoss.uniqueunit.itest"
PersistenceIT.class.getPackage(), // Compile safe package "eu.ggnet.dwoss.uniqueunit.test"
UniqueUnitTest.class.getPackage()), "eu.ggnet.dwoss.uniqueunit").addClass(// The Datasource Configuration and the Static Producers
MandatorSupportProducer.class).addClass(// Alle Datasources. More than we need.
SampleDataSourceDefinition.class).addClass(// Need this cause of the maven resolver is part of the deployment
Coordinate.class).addClass(// The local deployer configuration
ArquillianProjectArchive.class).addClass(UniqurUnitItHelper.class).addAsResource(new ClassLoaderAsset("META-INF/persistence.xml"), "META-INF/persistence.xml").addAsResource(new ClassLoaderAsset("log4j.properties"), "log4j.properties").addAsWebInfResource(// Needed for jboss/wildfly h2 enablement
"jboss-deployment-structure.xml").addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml").addAsLibraries(libs);
return war;
}
use of org.jboss.shrinkwrap.api.asset.ClassLoaderAsset in project dwoss by gg-net.
the class SampleGeneratorIT method createDeployment.
@Deployment
public static WebArchive createDeployment() {
// Compile Safe Packages.
Package projectPackage = SampleGeneratorOperation.class.getPackage();
File[] libs = Maven.resolver().loadPomFromFile("pom.xml").importRuntimeDependencies().addDependency(// Log4J API
MavenDependencies.createDependency("org.slf4j:slf4j-log4j12", RUNTIME, false)).addDependency(// AssertJ Fluent Assertions
MavenDependencies.createDependency("org.assertj:assertj-core", RUNTIME, false)).resolve().withTransitivity().asFile();
WebArchive war = ShrinkWrap.create(WebArchive.class, "sample-persistence-test.war").addPackages(true, projectPackage.getName()).addClass(// Need this cause of the maven resolver is part of the deployment
Coordinate.class).addClass(// Alle Datasources. More than we need.
SampleDataSourceDefinition.class).addAsResource(new ClassLoaderAsset("META-INF/persistence.xml"), "META-INF/persistence.xml").addAsResource(new ClassLoaderAsset("log4j.properties"), "log4j.properties").addAsWebInfResource(// Needed for jboss/wildfly h2 enablement
"jboss-deployment-structure.xml").addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml").addAsLibraries(libs);
return war;
}
use of org.jboss.shrinkwrap.api.asset.ClassLoaderAsset in project tomee by apache.
the class MoviesSeleniumTest method createDeployment.
@Deployment(testable = false)
public static WebArchive createDeployment() {
WebArchive archive = ShrinkWrap.create(WebArchive.class, "moviefun.war").addClasses(ActionServlet.class, SetupServlet.class, Movie.class, MovieController.class, Movies.class, MoviesImpl.class, MoviesRemote.class, JsfUtil.class, PaginationHelper.class, ExampleDataProducer.class, Examples.class, Setup.class).addAsResource(new ClassLoaderAsset("META-INF/ejb-jar.xml"), "META-INF/ejb-jar.xml").addAsResource(new ClassLoaderAsset("META-INF/persistence.xml"), "META-INF/persistence.xml").addAsLibraries(new File("target/test-libs/commons-beanutils.jar"), new File("target/test-libs/commons-codec.jar"), new File("target/test-libs/commons-collections.jar"), new File("target/test-libs/commons-digester.jar"), new File("target/test-libs/commons-logging.jar"), new File("target/test-libs/jstl.jar"), new File("target/test-libs/log4j.jar"), new File("target/test-libs/standard.jar"));
addResources("src/main/webapp", "", archive);
System.out.println(archive.toString(true));
return archive;
}
Aggregations