Java Code Examples for org.jboss.shrinkwrap.api.spec.JavaArchive#addClasses()

The following examples show how to use org.jboss.shrinkwrap.api.spec.JavaArchive#addClasses() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XSLTIntegrationTest.java    From wildfly-camel with Apache License 2.0 5 votes vote down vote up
@Deployment
public static JavaArchive deployment() {
    final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "camel-xslt-tests");
    archive.addAsResource("xslt/customer-nons.xml", "customer-nons.xml");
    archive.addAsResource("xslt/customer.xml", "customer.xml");
    archive.addAsResource("xslt/transform.xsl", "transform.xsl");
    archive.addClasses(OrderBean.class, TestUtils.class);
    return archive;
}
 
Example 2
Source File: SESIntegrationTest.java    From wildfly-camel with Apache License 2.0 5 votes vote down vote up
@Deployment
public static JavaArchive deployment() {
    JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "aws-ses-tests.jar");
    archive.addClasses(SESClientProducer.class, SESUtils.class, BasicCredentialsProvider.class);
    archive.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
    return archive;
}
 
Example 3
Source File: SpringContextScanTest.java    From wildfly-camel with Apache License 2.0 5 votes vote down vote up
@Deployment
public static JavaArchive createdeployment() {
    final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "context-scan-tests");
    archive.addAsResource("spring/context-scanA-camel-context.xml");
    archive.addClasses(ScannedComponentRouteBuilder.class);
    return archive;
}
 
Example 4
Source File: CustomFailoverExceptionTest.java    From wildfly-camel with Apache License 2.0 5 votes vote down vote up
@Deployment
public static JavaArchive deployment() {
    final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "custom-failover.jar");
    archive.addAsManifestResource("classloading/custom-failover-context.xml", "jboss-camel-context.xml");
    archive.addClasses(CustomFailoverException.class);
    return archive;
}
 
Example 5
Source File: DozerSpringIntegrationTest.java    From wildfly-camel with Apache License 2.0 5 votes vote down vote up
@Deployment
public static JavaArchive createdeployment() {
    final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "camel-dozer-spring");
    archive.addClasses(CustomerA.class, CustomerB.class);
    archive.addAsResource("dozer/dozer-camel-context.xml", "dozer-camel-context.xml");
    archive.addAsResource("dozer/dozer-mappings.xml", "dozer-mappings.xml");
    return archive;
}
 
Example 6
Source File: CDIContextCreationTest.java    From wildfly-camel with Apache License 2.0 5 votes vote down vote up
@Deployment(name = CDI_CONTEXT_C, managed = false , testable = false)
public static JavaArchive createTestJarC() {
    JavaArchive archive = ShrinkWrap.create(JavaArchive.class, CDI_CONTEXT_C);
    archive.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
    archive.addClasses(RouteBuilderF.class);
    return archive;
}
 
Example 7
Source File: NoCDIContextCreationTest.java    From wildfly-camel with Apache License 2.0 5 votes vote down vote up
@Deployment
public static JavaArchive deployment() {
    final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "no-camel-cdi-test.jar");
    archive.addClasses(HelloBean.class);
    archive.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
    return archive;
}
 
Example 8
Source File: MllpTcpServerConsumerTest.java    From wildfly-camel with Apache License 2.0 5 votes vote down vote up
@Deployment
public static JavaArchive createdeployment() {
    final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "camel-mllp-tests");
    archive.addPackage(MllpClientResource.class.getPackage());
    archive.addClasses(AvailablePortFinder.class);
    return archive;
}
 
Example 9
Source File: CDIContextCreationTest.java    From wildfly-camel with Apache License 2.0 5 votes vote down vote up
@Deployment(name = CDI_CONTEXT_A, managed = false, testable = false)
public static JavaArchive createTestJarA() {
    JavaArchive archive = ShrinkWrap.create(JavaArchive.class, CDI_CONTEXT_A);
    archive.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
    archive.addClasses(RouteBuilderE.class);
    return archive;
}
 
Example 10
Source File: EC2IntegrationTest.java    From wildfly-camel with Apache License 2.0 5 votes vote down vote up
@Deployment
public static JavaArchive deployment() {
    JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "aws-ec2-tests.jar");
    archive.addClasses(EC2ClientProducer.class, EC2Utils.class, BasicCredentialsProvider.class);
    archive.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
    return archive;
}
 
Example 11
Source File: CXFSpringContextTest.java    From wildfly-camel with Apache License 2.0 5 votes vote down vote up
@Deployment
public static JavaArchive deployment() {
    final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "cxf-spring-context-tests");
    archive.addClasses(Endpoint.class);
    archive.addAsResource("cxf/spring/cxfws-producer-camel-context.xml");
    return archive;
}
 
Example 12
Source File: ModuleResourceRootPathsTestCase.java    From wildfly-core with GNU Lesser General Public License v2.1 5 votes vote down vote up
private void createResources() {
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class);
    jar.addClasses(ModuleResource.class);
    moduleResource = new File(tmpDir.getRoot(), MODULE_RESOURCE_JAR_NAME);
    jar.as(ZipExporter.class).exportTo(moduleResource, true);

    jar = ShrinkWrap.create(JavaArchive.class);
    jar.addClasses(AbsoluteResource.class);
    absoluteResource = new File(tmpDir.getRoot(), ABSOLUTE_RESOURCE_JAR_NAME);
    jar.as(ZipExporter.class).exportTo(absoluteResource, true);
}
 
Example 13
Source File: CloudWatchIntegrationTest.java    From wildfly-camel with Apache License 2.0 5 votes vote down vote up
@Deployment
public static JavaArchive deployment() {
    JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "aws-cw-tests.jar");
    archive.addClasses(CloudWatchClientProducer.class, CloudWatchUtils.class, BasicCredentialsProvider.class,
            AWSUtils.class);
    archive.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
    return archive;
}
 
Example 14
Source File: JcrIntegrationTest.java    From wildfly-camel with Apache License 2.0 5 votes vote down vote up
@Deployment
public static JavaArchive createDeployment() {
    JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "camel-jcr-tests.jar");
    archive.addAsResource("jcr/repository-simple-security.xml");
    archive.addClasses(FileUtils.class, IOUtils.class);
    archive.setManifest(() -> {
        ManifestBuilder builder = new ManifestBuilder();
        builder.addManifestHeader("Dependencies", "org.apache.jackrabbit");
        return builder.openStream();
    });
    return archive;
}
 
Example 15
Source File: BeanTransformTest.java    From wildfly-camel with Apache License 2.0 4 votes vote down vote up
@Deployment
public static JavaArchive createdeployment() {
    final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "bean-transform-tests");
    archive.addClasses(HelloBean.class);
    return archive;
}
 
Example 16
Source File: XChangeMarketIntegrationTest.java    From wildfly-camel with Apache License 2.0 4 votes vote down vote up
@Deployment
public static JavaArchive createDeployment() {
    JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "camel-xchange-market-tests");
    archive.addClasses(AbstractXChangeIntegrationTest.class);
    return archive;
}
 
Example 17
Source File: XChangeMetadataIntegrationTest.java    From wildfly-camel with Apache License 2.0 4 votes vote down vote up
@Deployment
public static JavaArchive createDeployment() {
    JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "camel-xchange-metadata-tests");
    archive.addClasses(AbstractXChangeIntegrationTest.class);
    return archive;
}
 
Example 18
Source File: LdapIntegrationTest.java    From wildfly-camel with Apache License 2.0 4 votes vote down vote up
@Deployment
public static JavaArchive createDeployment() throws Exception {
    final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "camel-ldap-tests");
    archive.addClasses(SpringLdapContextSource.class, AvailablePortFinder.class);
    return archive;
}
 
Example 19
Source File: JsonpathIntegrationTest.java    From wildfly-camel with Apache License 2.0 4 votes vote down vote up
@Deployment
public static JavaArchive deployment() {
    final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "jsonpath-tests");
    archive.addClasses(Customer.class);
    return archive;
}
 
Example 20
Source File: JNDIIntegrationTest.java    From wildfly-camel with Apache License 2.0 4 votes vote down vote up
@Deployment
public static JavaArchive deployment() {
    final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "jndi-integration-tests");
    archive.addClasses(HelloBean.class);
    return archive;
}