Package org.jboss.shrinkwrap.api.spec

Examples of org.jboss.shrinkwrap.api.spec.JavaArchive.addResource()


        JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "sar-example.sar");
        archive.addPackage(ConfigService.class.getPackage());
        archive.addClass(JBossASEmbeddedInContainerTestCase.class);
        String path = "META-INF/jboss-service.xml";
        URL resourceURL = JBossASEmbeddedInContainerTestCase.class.getResource("/sar-example.sar/" + path);
        archive.addResource(new File(resourceURL.getFile()), path);
        return archive;
    }

    @Test
    public void testDeployedService() throws Exception {
View Full Code Here


    public static JavaArchive createDeployment() throws Exception {
        JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "sar-example.sar");
        archive.addPackage(ConfigService.class.getPackage());
        String path = "META-INF/jboss-service.xml";
        URL resourceURL = JBossASEmbeddedAsClientTestCase.class.getResource("/sar-example.sar/" + path);
        archive.addResource(new File(resourceURL.getFile()), path);
        return archive;
    }

    @Override
    protected void waitForMbean(MBeanServer mbeanServer, ObjectName name) throws Exception {
View Full Code Here

        OtherIncrementListener.class,
        IncrementListener.class,
        Version.class
    );
    ArchivePath path = ArchivePaths.create( "META-INF/orm.xml" );
    archive.addResource( "defaultpar/META-INF/orm.xml", path );

    path = ArchivePaths.create( "META-INF/persistence.xml" );
    archive.addResource( "defaultpar/META-INF/persistence.xml", path );

    path = ArchivePaths.create( "org/hibernate/ejb/test/pack/defaultpar/Mouse.hbm.xml" );
View Full Code Here

    );
    ArchivePath path = ArchivePaths.create( "META-INF/orm.xml" );
    archive.addResource( "defaultpar/META-INF/orm.xml", path );

    path = ArchivePaths.create( "META-INF/persistence.xml" );
    archive.addResource( "defaultpar/META-INF/persistence.xml", path );

    path = ArchivePaths.create( "org/hibernate/ejb/test/pack/defaultpar/Mouse.hbm.xml" );
    archive.addResource( "defaultpar/org/hibernate/ejb/test/pack/defaultpar/Mouse.hbm.xml", path );

    path = ArchivePaths.create( "org/hibernate/ejb/test/pack/defaultpar/package-info.class" );
View Full Code Here

    path = ArchivePaths.create( "META-INF/persistence.xml" );
    archive.addResource( "defaultpar/META-INF/persistence.xml", path );

    path = ArchivePaths.create( "org/hibernate/ejb/test/pack/defaultpar/Mouse.hbm.xml" );
    archive.addResource( "defaultpar/org/hibernate/ejb/test/pack/defaultpar/Mouse.hbm.xml", path );

    path = ArchivePaths.create( "org/hibernate/ejb/test/pack/defaultpar/package-info.class" );
    archive.addResource( "org/hibernate/ejb/test/pack/defaultpar/package-info.class", path );

View Full Code Here

    path = ArchivePaths.create( "org/hibernate/ejb/test/pack/defaultpar/Mouse.hbm.xml" );
    archive.addResource( "defaultpar/org/hibernate/ejb/test/pack/defaultpar/Mouse.hbm.xml", path );

    path = ArchivePaths.create( "org/hibernate/ejb/test/pack/defaultpar/package-info.class" );
    archive.addResource( "org/hibernate/ejb/test/pack/defaultpar/package-info.class", path );


    File testPackage = new File( targetDir, fileName );
    archive.as( ZipExporter.class ).exportZip( testPackage, true );
    return testPackage;
View Full Code Here

        Mouse1.class,
        IncrementListener1.class,
        Version1.class
    );
    ArchivePath path = ArchivePaths.create( "META-INF/orm.xml" );
    archive.addResource( "defaultpar_1_0/META-INF/orm.xml", path );

    path = ArchivePaths.create( "META-INF/persistence.xml" );
    archive.addResource( "defaultpar_1_0/META-INF/persistence.xml", path );

    path = ArchivePaths.create( "org/hibernate/ejb/test/pack/defaultpar_1_0/Mouse.hbm.xml" );
View Full Code Here

    );
    ArchivePath path = ArchivePaths.create( "META-INF/orm.xml" );
    archive.addResource( "defaultpar_1_0/META-INF/orm.xml", path );

    path = ArchivePaths.create( "META-INF/persistence.xml" );
    archive.addResource( "defaultpar_1_0/META-INF/persistence.xml", path );

    path = ArchivePaths.create( "org/hibernate/ejb/test/pack/defaultpar_1_0/Mouse.hbm.xml" );
    archive.addResource( "defaultpar_1_0/org/hibernate/ejb/test/pack/defaultpar_1_0/Mouse1.hbm.xml", path );

    path = ArchivePaths.create( "org/hibernate/ejb/test/pack/defaultpar_1_0/package-info.class" );
View Full Code Here

    path = ArchivePaths.create( "META-INF/persistence.xml" );
    archive.addResource( "defaultpar_1_0/META-INF/persistence.xml", path );

    path = ArchivePaths.create( "org/hibernate/ejb/test/pack/defaultpar_1_0/Mouse.hbm.xml" );
    archive.addResource( "defaultpar_1_0/org/hibernate/ejb/test/pack/defaultpar_1_0/Mouse1.hbm.xml", path );

    path = ArchivePaths.create( "org/hibernate/ejb/test/pack/defaultpar_1_0/package-info.class" );
    archive.addResource( "org/hibernate/ejb/test/pack/defaultpar_1_0/package-info.class", path );

View Full Code Here

    path = ArchivePaths.create( "org/hibernate/ejb/test/pack/defaultpar_1_0/Mouse.hbm.xml" );
    archive.addResource( "defaultpar_1_0/org/hibernate/ejb/test/pack/defaultpar_1_0/Mouse1.hbm.xml", path );

    path = ArchivePaths.create( "org/hibernate/ejb/test/pack/defaultpar_1_0/package-info.class" );
    archive.addResource( "org/hibernate/ejb/test/pack/defaultpar_1_0/package-info.class", path );


    File testPackage = new File( targetDir, fileName );
    archive.as( ZipExporter.class ).exportZip( testPackage, true );
    return testPackage;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.