Search in sources :

Example 21 with ClassLoaderAsset

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, "report-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"
    ReportTest.class.getPackage()), "eu.ggnet.dwoss.report").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(// The local deployer configuration
    ArquillianProjectArchive.class).addClass(// Helper Bean
    ReportLineItHelper.class).addClass(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;
}
Also used : SampleDataSourceDefinition(eu.ggnet.dwoss.mandator.tryout.SampleDataSourceDefinition) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) ClassLoaderAsset(org.jboss.shrinkwrap.api.asset.ClassLoaderAsset) File(java.io.File) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 22 with ClassLoaderAsset

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 = UnitDestroyer.class.getPackage();
    Package itestPackage = ReceiptGeneratorOperationIT.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(// 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(itestPackage), projectPackage).addClass(// Need this cause of the maven resolver is part of the deployment
    Coordinate.class).addClass(// The local deployer configuration
    ArquillianProjectArchive.class).addClass(// Alle Datasources. More than we need.
    SampleDataSourceDefinition.class).addClass(SpecStore.class).addClass(DatabaseCleaner.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;
}
Also used : SampleDataSourceDefinition(eu.ggnet.dwoss.mandator.tryout.SampleDataSourceDefinition) Coordinate(org.jboss.shrinkwrap.resolver.api.Coordinate) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) ClassLoaderAsset(org.jboss.shrinkwrap.api.asset.ClassLoaderAsset) File(java.io.File) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 23 with ClassLoaderAsset

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 = StockTaking.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(// Using Receipt for unit generation
    MavenDependencies.createDependency("eu.ggnet.dwoss:dwoss-ee-extended-redtape", 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, 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).addClass(ResolveRepaymentBeanITHelper.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;
}
Also used : Coordinate(org.jboss.shrinkwrap.resolver.api.Coordinate) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) ClassLoaderAsset(org.jboss.shrinkwrap.api.asset.ClassLoaderAsset) File(java.io.File) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 24 with ClassLoaderAsset

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, "stock-persistence-test.war").addPackages(true, // Compile safe package "eu.ggnet.dwoss.customer.itest"
    Filters.exclude(// Compile safe package "eu.ggnet.dwoss.customer.itest"
    PersistenceIT.class.getPackage(), // Compile safe package "eu.ggnet.dwoss.customer.test"
    ValidationTest.class.getPackage()), "eu.ggnet.dwoss.stock").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).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;
}
Also used : ValidationTest(eu.ggnet.dwoss.stock.ee.test.ValidationTest) SampleDataSourceDefinition(eu.ggnet.dwoss.mandator.tryout.SampleDataSourceDefinition) PersistenceIT(eu.ggnet.dwoss.stock.ee.itest.PersistenceIT) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) ClassLoaderAsset(org.jboss.shrinkwrap.api.asset.ClassLoaderAsset) File(java.io.File) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 25 with ClassLoaderAsset

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 = RedTapeWorker.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 assertion
    MavenDependencies.createDependency("org.assertj:assertj-core", RUNTIME, false)).resolve().withTransitivity().asFile();
    WebArchive war = ShrinkWrap.create(WebArchive.class, "redtape-persistence-test.war").addPackages(true, projectPackage).addClass(// Need this cause of the maven resolver is part of the deployment
    Coordinate.class).addClass(// The local deployer configuration
    ArquillianProjectArchive.class).addClass(// Alle Datasources. More than we need.
    SampleDataSourceDefinition.class).addClass(SupportBean.class).addClass(NaivBuilderUtil.class).addClass(DatabaseCleaner.class).addClass(WarrantyServiceStup.class).addClass(RedTapeCloserOpertaionItBean.class).addAsResource(new ClassLoaderAsset("META-INF/persistence.xml"), "META-INF/persistence.xml").addAsResource(new ClassLoaderAsset("log4j.properties"), "log4j.properties").addAsResource("eu/ggnet/dwoss/redtapext/ee/Document_Template.jrxml").addAsResource("eu/ggnet/dwoss/redtapext/ee/Shipping_Template.jrxml").addAsWebInfResource(// Needed for jboss/wildfly h2 enablement
    "jboss-deployment-structure.xml").addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml").addAsLibraries(libs);
    return war;
}
Also used : WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) ClassLoaderAsset(org.jboss.shrinkwrap.api.asset.ClassLoaderAsset) File(java.io.File) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Aggregations

ClassLoaderAsset (org.jboss.shrinkwrap.api.asset.ClassLoaderAsset)26 Deployment (org.jboss.arquillian.container.test.api.Deployment)20 WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)20 File (java.io.File)15 SampleDataSourceDefinition (eu.ggnet.dwoss.mandator.tryout.SampleDataSourceDefinition)8 StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)8 Test (org.junit.Test)7 Runner (org.apache.openejb.arquillian.tests.Runner)6 WebAppDescriptor (org.jboss.shrinkwrap.descriptor.api.webapp30.WebAppDescriptor)6 Coordinate (org.jboss.shrinkwrap.resolver.api.Coordinate)4 Asset (org.jboss.shrinkwrap.api.asset.Asset)3 WARArchive (org.wildfly.swarm.undertow.WARArchive)3 PersistenceIT (eu.ggnet.dwoss.customer.itest.PersistenceIT)1 CustomerTest (eu.ggnet.dwoss.customer.test.CustomerTest)1 RedTapeHelper (eu.ggnet.dwoss.redtape.itest.eao.RedTapeHelper)1 PersistenceIT (eu.ggnet.dwoss.spec.itest.PersistenceIT)1 SpecTest (eu.ggnet.dwoss.spec.test.SpecTest)1 PersistenceIT (eu.ggnet.dwoss.stock.ee.itest.PersistenceIT)1 ValidationTest (eu.ggnet.dwoss.stock.ee.test.ValidationTest)1 BufferedReader (java.io.BufferedReader)1