Package org.jboss.shrinkwrap.api.spec

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


    archive.addClasses(
        Bug.class
    );

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

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


    archive.addClasses(
        org.hibernate.ejb.test.pack.overridenpar.Bug.class
    );

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

    path = ArchivePaths.create( "overridenpar.properties" );
    archive.addResource( "overridenpar/overridenpar.properties", path );

    File testPackage = new File( targetDir, fileName );
View Full Code Here

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

    path = ArchivePaths.create( "overridenpar.properties" );
    archive.addResource( "overridenpar/overridenpar.properties", path );

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

    archive.addClasses(
        Scooter.class
    );

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

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

  }

  protected File buildNestedEar(File includeFile) {
    String fileName = "nestedjar.ear";
    JavaArchive archive = Archives.create( fileName, JavaArchive.class );
    archive.addResource( includeFile );

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

  }

  protected File buildNestedEarDir(File includeFile) {
    String fileName = "nesteddir.ear";
    JavaArchive archive = Archives.create( fileName, JavaArchive.class );
    archive.addResource( includeFile );

    File testPackage = new File( targetDir, fileName );
    archive.as( ExplodedExporter.class ).exportExploded( targetDir );
    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.