code: public <T extends Assignable> T createFromZipFile(final Class<T> type, final File archiveFile)
          throws IllegalArgumentException, ArchiveImportException {
          // Precondition checks
          if (type == null) {
              throw new IllegalArgumentException("Type must be specified");
          }
          if (archiveFile == null) {
              throw new IllegalArgumentException("File must be specified");
          }
          if (!archiveFile.exists()) {
              throw new IllegalArgumentException("File for import does not exist: " + archiveFile.getAbsolutePath());
          }
          if (archiveFile.isDirectory()) {
              throw new IllegalArgumentException("File for import must not be a directory: "
                  + archiveFile.getAbsolutePath());
          }
  
          try {
              // Import
              return ShrinkWrap.create(type, archiveFile.getName()).as(ZipImporter.class).importFrom(new ZipFile(archiveFile)).as(type);
          } catch (final ZipException ze) {
              throw new IllegalArgumentException("Does not appear to be a valid ZIP file: "
                  + archiveFile.getAbsolutePath());
          } catch (final IOException ioe) {
              throw new RuntimeException("I/O Error in importing new archive from ZIP: " + archiveFile.getAbsolutePath(),
                  ioe);
          }
      }
docs: Creates a new archive of the specified type as imported from the specified {@link File}. The file is expected to
  be encoded as ZIP (ie. JAR/WAR/EAR). The name of the archive will be set to {@link File#getName()}. The archive
  will be be backed by the {@link Configuration} specific to this {@link ArchiveFactory}.
  
  @param type
  The type of the archive e.g. {@link org.jboss.shrinkwrap.api.spec.WebArchive}
  @param archiveFile
  the archiveFile to use
  @return An {@link Assignable} view
  @throws IllegalArgumentException
  If either argument is not supplied, if the specified {@link File} does not exist, or is not a valid
  ZIP file
  @throws org.jboss.shrinkwrap.api.importer.ArchiveImportException
  If an error occurred during the import process