package org.jboss.webbeans.tck;

import java.lang.annotation.Annotation;
import java.util.Arrays;
import java.util.List;

import javax.inject.manager.Manager;

import org.jboss.jsr299.tck.api.DeploymentException;
import org.jboss.jsr299.tck.spi.StandaloneContainers;
import org.jboss.webbeans.ManagerImpl;
import org.jboss.webbeans.mock.MockBootstrap;
import org.jboss.webbeans.mock.MockWebBeanDiscovery;

public class StandaloneContainersImpl implements StandaloneContainers
{
   
   public Manager deploy(List<Class<? extends Annotation>> enabledDeploymentTypes, Class<?>... classes) throws DeploymentException
   {
      try
      {
         MockBootstrap bootstrap = new MockBootstrap();
         ManagerImpl manager = bootstrap.getManager();
         if (enabledDeploymentTypes != null)
         {
            manager.setEnabledDeploymentTypes(enabledDeploymentTypes);
         }
         MockWebBeanDiscovery discovery = new MockWebBeanDiscovery();
         discovery.setWebBeanClasses(Arrays.asList(classes));
         bootstrap.setWebBeanDiscovery(discovery);
         bootstrap.boot();
         return manager;
      }
      catch (Exception e) 
      {
         throw new DeploymentException("Error deploying beans", e);
      }
   }
   
   public Manager deploy(java.lang.Class<?>... classes) throws DeploymentException
   {
      return deploy(null, classes);
   }
   
}

@@ -82,19 +82,15 @@
 ava.
-util.Arrays
+net.URL
 ;%0Aim
@@ -115,46 +115,8 @@
 t;%0A%0A
-import javax.inject.manager.Manager;%0A%0A
 impo
@@ -435,39 +435,238 @@
 %7B%0A   %0A   public 
-Manager
+void deploy(List%3CClass%3C? extends Annotation%3E%3E enabledDeploymentTypes, Iterable%3CClass%3C?%3E%3E classes) throws DeploymentException%0A   %7B%0A      deploy(enabledDeploymentTypes, classes, null);%0A   %7D%0A   %0A   public void
  deploy(List%3CCla
@@ -715,24 +715,33 @@
 tTypes, 
+Iterable%3C
 Class%3C?%3E
 ... clas
@@ -728,35 +728,33 @@
 ble%3CClass%3C?%3E
-...
+%3E
  classes
 ) throws Dep
@@ -733,32 +733,56 @@
 lass%3C?%3E%3E classes
+, Iterable%3CURL%3E beansXml
 ) throws Deploym
@@ -1177,32 +1177,123 @@
 ses(
-Arrays.asList(classes));
+classes);%0A         if (beansXml != null)%0A         %7B%0A            discovery.setWebBeansXmlFiles(beansXml);%0A         %7D
 %0A   
@@ -1371,33 +1371,8 @@
 ();%0A
-         return manager;%0A
     
@@ -1509,41 +1509,163 @@
 lic 
-Manager deploy(java.lang.
+void deploy(Iterable%3CClass%3C?%3E%3E classes) throws DeploymentException%0A   %7B%0A      deploy(null, classes, null);%0A   %7D%0A   %0A   public void deploy(Iterable%3C
 Class%3C?%3E
 ... 
@@ -1664,19 +1664,17 @@
 s%3C?%3E
-...
+%3E
  classes
 ) th
@@ -1661,32 +1661,56 @@
 lass%3C?%3E%3E classes
+, Iterable%3CURL%3E beansXml
 ) throws Deploym
@@ -1737,15 +1737,8 @@
     
-return 
 depl
@@ -1749,24 +1749,34 @@
 ull, classes
+, beansXml
 );%0A   %7D%0A   %0A

Support for reading deployment types from beans.xml