[jboss-svn-commits] JBoss Common SVN: r4063 - in arquillian/trunk: impl-base/src/main/resources/META-INF/services and 15 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Feb 24 07:27:13 EST 2010


Author: aslak
Date: 2010-02-24 07:27:08 -0500 (Wed, 24 Feb 2010)
New Revision: 4063

Added:
   arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/ClientDeploymentGenerator.java
   arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/DeploymentAnnotationArchiveGenerator.java
   arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/DeploymentGenerator.java
   arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/DynamicServiceLoader.java
   arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/NullDeploymentGenerator.java
   arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/SimpleEEDeploymentPackager.java
   arquillian/trunk/impl-base/src/main/resources/META-INF/services/org.jboss.arquillian.spi.ApplicationArchiveGenerator
   arquillian/trunk/impl-base/src/main/resources/META-INF/services/org.jboss.arquillian.spi.AuxiliaryArchiveAppender
   arquillian/trunk/impl-base/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentPackager
   arquillian/trunk/junit/src/main/resources/META-INF/services/org.jboss.arquillian.spi.AuxiliaryArchiveAppender
   arquillian/trunk/protocol-servlet/src/main/resources/META-INF/services/org.jboss.arquillian.spi.AuxiliaryArchiveAppender
   arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/ApplicationArchiveGenerator.java
   arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/ApplicationArchiveProcessor.java
   arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/AuxiliaryArchiveAppender.java
   arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/AuxiliaryArchiveProcessor.java
   arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/DeploymentPackager.java
   arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/ServiceLoader.java
   arquillian/trunk/testenricher-jboss/src/main/resources/META-INF/services/org.jboss.arquillian.spi.AuxiliaryArchiveAppender
   arquillian/trunk/testng/src/main/resources/META-INF/services/org.jboss.arquillian.spi.AuxiliaryArchiveAppender
Removed:
   arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/ArchiveGenerator.java
   arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/DeploymentAppenderArchiveGenerator.java
   arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/NullArtifactGenerator.java
   arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/UserCreatedArchiveGenerator.java
   arquillian/trunk/impl-base/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentAppender
   arquillian/trunk/junit/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentAppender
   arquillian/trunk/protocol-servlet/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentAppender
   arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/DeploymentAppender.java
   arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/util/DeployableContainers.java
   arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/util/DeploymentAppenders.java
   arquillian/trunk/testenricher-jboss/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentAppender
   arquillian/trunk/testng/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentAppender
Modified:
   arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/ArquillianDeploymentAppender.java
   arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/DeployableTest.java
   arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/DeployableTestBuilder.java
   arquillian/trunk/impl-base/src/test/java/org/jboss/arquillian/impl/ArquillianDeploymentAppenderTestCase.java
   arquillian/trunk/junit/src/main/java/org/jboss/arquillian/junit/JUnitDeploymentAppender.java
   arquillian/trunk/junit/src/test/java/org/jboss/arquillian/junit/JUnitDeploymentAppenderTestCase.java
   arquillian/trunk/protocol-servlet/src/main/java/org/jboss/arquillian/protocol/servlet/ProtocolDeploymentAppender.java
   arquillian/trunk/protocol-servlet/src/test/java/org/jboss/arquillian/protocol/servlet/ProtocolDeploymentAppenderTestCase.java
   arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/util/DefaultServiceLoader.java
   arquillian/trunk/testenricher-jboss/src/main/java/org/jboss/arquillian/testenricher/jboss/JbossDeploymentAppender.java
   arquillian/trunk/testenricher-jboss/src/test/java/org/jboss/arquillian/testenricher/jboss/JbossDeploymentAppenderTestCase.java
   arquillian/trunk/testng/src/main/java/org/jboss/arquillian/testng/TestNGDeploymentAppender.java
   arquillian/trunk/testng/src/test/java/org/jboss/arquillian/testng/TestNGDeploymentAppenderTestCase.java
Log:
ARQ-25 Redesigned Packager SPI

Deleted: arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/ArchiveGenerator.java
===================================================================
--- arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/ArchiveGenerator.java	2010-02-23 21:53:15 UTC (rev 4062)
+++ arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/ArchiveGenerator.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -1,32 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.arquillian.impl;
-
-import org.jboss.shrinkwrap.api.Archive;
-
-/**
- * ArchiveGenerator
- *
- * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
- * @version $Revision: $
- */
-public interface ArchiveGenerator 
-{
-   // Packaging SPI
-   Archive<?> generateArchive(Class<?> testCase);
-
-}

Modified: arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/ArquillianDeploymentAppender.java
===================================================================
--- arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/ArquillianDeploymentAppender.java	2010-02-23 21:53:15 UTC (rev 4062)
+++ arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/ArquillianDeploymentAppender.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -17,7 +17,7 @@
 package org.jboss.arquillian.impl;
 
 import org.jboss.arquillian.api.Deployment;
-import org.jboss.arquillian.spi.DeploymentAppender;
+import org.jboss.arquillian.spi.AuxiliaryArchiveAppender;
 import org.jboss.shrinkwrap.api.Archive;
 import org.jboss.shrinkwrap.api.Archives;
 import org.jboss.shrinkwrap.api.spec.JavaArchive;
@@ -28,14 +28,14 @@
  * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
  * @version $Revision: $
  */
-public class ArquillianDeploymentAppender implements DeploymentAppender
+public class ArquillianDeploymentAppender implements AuxiliaryArchiveAppender
 {
 
    /* (non-Javadoc)
     * @see org.jboss.arquillian.spi.DeploymentAppender#createArchive()
     */
    @Override
-   public Archive<?> createArchive()
+   public Archive<?> createAuxiliaryArchive()
    {
       
       JavaArchive archive = Archives.create("arquillian-core.jar", JavaArchive.class)

Copied: arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/ClientDeploymentGenerator.java (from rev 4033, arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/DeploymentAppenderArchiveGenerator.java)
===================================================================
--- arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/ClientDeploymentGenerator.java	                        (rev 0)
+++ arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/ClientDeploymentGenerator.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -0,0 +1,99 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.arquillian.impl;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.jboss.arquillian.spi.ApplicationArchiveGenerator;
+import org.jboss.arquillian.spi.AuxiliaryArchiveAppender;
+import org.jboss.arquillian.spi.DeploymentPackager;
+import org.jboss.arquillian.spi.ServiceLoader;
+import org.jboss.arquillian.spi.AuxiliaryArchiveProcessor;
+import org.jboss.arquillian.spi.ApplicationArchiveProcessor;
+import org.jboss.shrinkwrap.api.Archive;
+
+/**
+ * Responsible for 
+ *
+ * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
+ * @version $Revision: $
+ */
+public class ClientDeploymentGenerator implements DeploymentGenerator
+{
+   private ServiceLoader serviceLoader;
+   
+   public ClientDeploymentGenerator(ServiceLoader serviceLoader)
+   {
+      Validate.notNull(serviceLoader, "ServiceLoader must be specified");
+      
+      this.serviceLoader = serviceLoader;
+   }
+   
+   /* (non-Javadoc)
+    * @see org.jboss.arquillian.impl.DeploymentGenerator#generate(java.lang.Class)
+    */
+   @Override
+   public Archive<?> generate(Class<?> testCase)
+   {
+      Validate.notNull(testCase, "TestCase must be specified");
+
+      DeploymentPackager packager = serviceLoader.onlyOne(DeploymentPackager.class);
+
+      Archive<?> applicationArchive = serviceLoader.onlyOne(ApplicationArchiveGenerator.class).generateApplicationArchive(testCase);
+      applyApplicationProcessors(applicationArchive, testCase);
+      
+      List<Archive<?>> auxiliaryArchives = loadAuxiliaryArchives();
+      applyAuxiliaryProcessors(auxiliaryArchives);
+
+      return packager.generateDeployment(applicationArchive, auxiliaryArchives);
+   }
+   
+   private List<Archive<?>> loadAuxiliaryArchives() 
+   {
+      List<Archive<?>> archives = new ArrayList<Archive<?>>();
+      Collection<AuxiliaryArchiveAppender> archiveAppenders = serviceLoader.all(AuxiliaryArchiveAppender.class);
+   
+      for(AuxiliaryArchiveAppender archiveAppender : archiveAppenders)
+      {
+         archives.add(archiveAppender.createAuxiliaryArchive());
+      }
+      return archives;
+   }
+
+   private void applyApplicationProcessors(Archive<?> applicationArchive, Class<?> testClass)
+   {
+      Collection<ApplicationArchiveProcessor> processors = serviceLoader.all(ApplicationArchiveProcessor.class);
+      for(ApplicationArchiveProcessor processor : processors)
+      {
+         processor.process(applicationArchive, testClass);
+      }
+   }
+   
+   private void applyAuxiliaryProcessors(List<Archive<?>> auxiliaryArchives)
+   {
+      Collection<AuxiliaryArchiveProcessor> processors = serviceLoader.all(AuxiliaryArchiveProcessor.class);
+      for(AuxiliaryArchiveProcessor processor : processors)
+      {
+         for(Archive<?> auxiliaryArchive : auxiliaryArchives)
+         {
+            processor.process(auxiliaryArchive);
+         }
+      }
+   }
+}

Modified: arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/DeployableTest.java
===================================================================
--- arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/DeployableTest.java	2010-02-23 21:53:15 UTC (rev 4062)
+++ arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/DeployableTest.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -17,6 +17,7 @@
 package org.jboss.arquillian.impl;
 
 import org.jboss.arquillian.impl.container.Controlable;
+import org.jboss.arquillian.spi.ServiceLoader;
 import org.jboss.shrinkwrap.api.Archive;
 
 /**
@@ -27,6 +28,7 @@
  */
 public class DeployableTest
 {
+   // TODO: move to DeploybleTestBuilder
    private static boolean inContainer = false;
    
    public static boolean isInContainer()
@@ -41,11 +43,18 @@
 
    private Controlable containerController;
    private Deployer containerDeployer;
+   private ServiceLoader serviceLoader;
    
-   DeployableTest(Controlable containerController, Deployer containerDeployer)
+   
+   DeployableTest(Controlable containerController, Deployer containerDeployer, ServiceLoader serviceLoader)
    {
+      Validate.notNull(containerController, "ContainerController must bespecified");
+      Validate.notNull(containerDeployer, "ContainerDeployer must bespecified");
+      Validate.notNull(serviceLoader, "ServiceLoader must bespecified");
+      
       this.containerController = containerController;
       this.containerDeployer = containerDeployer;
+      this.serviceLoader = serviceLoader;
    }
    
    public Controlable getContainerController() 
@@ -58,18 +67,18 @@
       return containerDeployer;
    }
 
-   
-   public ArchiveGenerator getArchiveGenerator() 
+   public Archive<?> generateArchive(Class<?> testCase) 
    {
+      return getArchiveGenerator().generate(testCase);
+   }
+
+   // TODO: move DeploymentGenerator injection to DeployableTestBuilder
+   private DeploymentGenerator getArchiveGenerator() 
+   {
       if(DeployableTest.isInContainer()) 
       {
-         return new NullArtifactGenerator();
+         return new NullDeploymentGenerator();
       }
-      return new DeploymentAppenderArchiveGenerator(new UserCreatedArchiveGenerator());
+      return new ClientDeploymentGenerator(serviceLoader);
    }
-
-   public Archive<?> generateArchive(Class<?> testCase) 
-   {
-      return getArchiveGenerator().generateArchive(testCase);
-   }
 }

Modified: arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/DeployableTestBuilder.java
===================================================================
--- arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/DeployableTestBuilder.java	2010-02-23 21:53:15 UTC (rev 4062)
+++ arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/DeployableTestBuilder.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -23,10 +23,10 @@
 import org.jboss.arquillian.spi.DeployableContainer;
 import org.jboss.arquillian.spi.DeploymentException;
 import org.jboss.arquillian.spi.LifecycleException;
+import org.jboss.arquillian.spi.ServiceLoader;
 import org.jboss.arquillian.spi.TestMethodExecutor;
 import org.jboss.arquillian.spi.TestResult;
 import org.jboss.arquillian.spi.TestResult.Status;
-import org.jboss.arquillian.spi.util.DeployableContainers;
 import org.jboss.arquillian.spi.util.TestEnrichers;
 import org.jboss.shrinkwrap.api.Archive;
 
@@ -40,12 +40,14 @@
 {
    private DeployableTestBuilder() {}
    
-   // TODO: lookup/load container, setup DeployableTest
    public static DeployableTest build(Object config) 
    {
       Controlable controller = null;
       Deployer deployer = null;
       
+      // TODO: lookup service loader impl from configuration
+      ServiceLoader serviceLoader = new DynamicServiceLoader();
+      
       if(DeployableTest.isInContainer()) 
       {
          controller = new InContainerContainer();
@@ -53,15 +55,16 @@
       }
       else 
       {
-         DeployableContainer container = DeployableContainers.load();
+         DeployableContainer container = serviceLoader.onlyOne(DeployableContainer.class);
+         // TODO: lookup controller / deployer from configuration
          controller = new ContainerController(container);
          deployer = new ContainerDeployer(container);
       }
 
       return new DeployableTest(
             controller,
-            deployer
-            );
+            deployer,
+            serviceLoader);
    }
    
    private static class InContainerContainer implements Controlable, Deployer 

Copied: arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/DeploymentAnnotationArchiveGenerator.java (from rev 4033, arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/UserCreatedArchiveGenerator.java)
===================================================================
--- arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/DeploymentAnnotationArchiveGenerator.java	                        (rev 0)
+++ arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/DeploymentAnnotationArchiveGenerator.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.arquillian.impl;
+
+import java.lang.reflect.Method;
+
+import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.spi.ApplicationArchiveGenerator;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.container.ClassContainer;
+
+/**
+ * UserCreatedArchiveGenerator
+ *
+ * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
+ * @version $Revision: $
+ */
+public class DeploymentAnnotationArchiveGenerator implements ApplicationArchiveGenerator 
+{
+
+   public Archive<?> generateApplicationArchive(Class<?> testCase)
+   {
+      Validate.notNull(testCase, "TestCase must be specified");
+      
+      Method deploymentMethod = findDeploymentMethod(testCase);
+      if(deploymentMethod == null) 
+      {
+         throw new RuntimeException("No static method annotated with " + Deployment.class.getName() + " found");
+      }
+      try 
+      {
+         Archive<?> archive = (Archive<?>)deploymentMethod.invoke(null);
+         // TODO: handle deployment attributes like autoAddPakcage etc..
+         if(ClassContainer.class.isInstance(archive)) 
+         {
+            ClassContainer<?> classContainer = ClassContainer.class.cast(archive);
+            classContainer.addClass(testCase);
+         }
+         
+         return archive;
+      } 
+      catch (Exception e) 
+      {
+         throw new RuntimeException("Could not get Deployment", e);
+      }
+   }
+   
+   private static Method findDeploymentMethod(Class<?> testCase) 
+   {
+      Method[] methods = testCase.getMethods();
+      for(Method method: methods)
+      {
+         if(method.isAnnotationPresent(Deployment.class)) 
+         {
+            return method;
+         }
+      }
+      return null;
+   }
+}

Deleted: arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/DeploymentAppenderArchiveGenerator.java
===================================================================
--- arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/DeploymentAppenderArchiveGenerator.java	2010-02-23 21:53:15 UTC (rev 4062)
+++ arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/DeploymentAppenderArchiveGenerator.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -1,70 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.arquillian.impl;
-
-import java.util.List;
-
-import org.jboss.arquillian.spi.util.DeploymentAppenders;
-import org.jboss.shrinkwrap.api.Archive;
-import org.jboss.shrinkwrap.api.Archives;
-import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
-import org.jboss.shrinkwrap.api.spec.WebArchive;
-
-/**
- * DeploymentAppenderArchiveGenerator
- *
- * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
- * @version $Revision: $
- */
-public class DeploymentAppenderArchiveGenerator implements ArchiveGenerator
-{
-   private ArchiveGenerator generator;
-   
-   public DeploymentAppenderArchiveGenerator(ArchiveGenerator generator)
-   {
-      Validate.notNull(generator, "Generator must be specified");
-      this.generator = generator;
-   }
-
-   /* (non-Javadoc)
-    * @see org.jboss.arquillian.impl.ArchiveGenerator#generateArchive(java.lang.Class)
-    */
-   @Override
-   public Archive<?> generateArchive(Class<?> testCase)
-   {
-      Validate.notNull(testCase, "TestCase must be specified");
-      List<Archive<?>> moduleArchives = DeploymentAppenders.getArchives();
-      
-      Archive<?> userArchive = generator.generateArchive(testCase);
-      
-      EnterpriseArchive fullDeployment = Archives.create("test.ear", EnterpriseArchive.class)
-                  .addModule(userArchive);  
-      
-      for(Archive<?> moduleArchive : moduleArchives )
-      {
-         if(WebArchive.class.isInstance(moduleArchive))
-         {
-            fullDeployment.addModule(moduleArchive);
-         } 
-         else 
-         {
-            fullDeployment.addLibrary(moduleArchive);
-         }
-      }
-      return fullDeployment;
-   }
-}

Copied: arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/DeploymentGenerator.java (from rev 4033, arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/ArchiveGenerator.java)
===================================================================
--- arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/DeploymentGenerator.java	                        (rev 0)
+++ arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/DeploymentGenerator.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.arquillian.impl;
+
+import org.jboss.shrinkwrap.api.Archive;
+
+/**
+ * DeploymentGenerator
+ *
+ * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
+ * @version $Revision: $
+ */
+public interface DeploymentGenerator 
+{
+
+   /**
+    * @param testCase
+    * @return
+    */
+   Archive<?> generate(Class<?> testCase);
+
+}

Added: arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/DynamicServiceLoader.java
===================================================================
--- arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/DynamicServiceLoader.java	                        (rev 0)
+++ arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/DynamicServiceLoader.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.arquillian.impl;
+
+import java.util.Collection;
+
+import org.jboss.arquillian.spi.ServiceLoader;
+import org.jboss.arquillian.spi.util.DefaultServiceLoader;
+
+/**
+ * DynamicServiceLoader
+ *
+ * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
+ * @version $Revision: $
+ */
+public class DynamicServiceLoader implements ServiceLoader
+{
+
+   /* (non-Javadoc)
+    * @see org.jboss.arquillian.spi.ServiceLoader#load(java.lang.Class)
+    */
+   @Override
+   public <T> Collection<T> all(Class<T> serviceClass)
+   {
+      return DefaultServiceLoader.load(serviceClass).getProviders();
+   }
+
+   /* (non-Javadoc)
+    * @see org.jboss.arquillian.spi.ServiceLoader#loadSingle(java.lang.Class)
+    */
+   @Override
+   public <T> T onlyOne(Class<T> serviceClass)
+   {
+      Collection<T> providers = DefaultServiceLoader.load(serviceClass).getProviders();
+      if(providers == null || providers.size() == 0)
+      {
+         throw new RuntimeException("No implementation found for: " + serviceClass.getName() + ", check classpath");
+      }
+      if(providers.size() > 1)
+      {
+         throw new RuntimeException("Mutiple implementations found for: " + serviceClass.getName() + ", check classpath");
+      }
+      return providers.iterator().next();
+   }
+
+}

Deleted: arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/NullArtifactGenerator.java
===================================================================
--- arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/NullArtifactGenerator.java	2010-02-23 21:53:15 UTC (rev 4062)
+++ arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/NullArtifactGenerator.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.arquillian.impl;
-
-import org.jboss.shrinkwrap.api.Archive;
-
-/**
- * NullArtifactGenerator
- *
- * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
- * @version $Revision: $
- */
-public class NullArtifactGenerator implements ArchiveGenerator
-{
-
-   @Override
-   public Archive<?> generateArchive(Class<?> testCase)
-   {
-      return null;
-   }
-}

Copied: arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/NullDeploymentGenerator.java (from rev 4033, arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/NullArtifactGenerator.java)
===================================================================
--- arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/NullDeploymentGenerator.java	                        (rev 0)
+++ arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/NullDeploymentGenerator.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.arquillian.impl;
+
+import org.jboss.shrinkwrap.api.Archive;
+
+/**
+ * NullDeploymentGenerator
+ *
+ * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
+ * @version $Revision: $
+ */
+public class NullDeploymentGenerator implements DeploymentGenerator
+{
+
+   /* (non-Javadoc)
+    * @see org.jboss.arquillian.impl.DeploymentGenerator#generate(java.lang.Class)
+    */
+   @Override
+   public Archive<?> generate(Class<?> testCase)
+   {
+      return null;
+   }
+}

Added: arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/SimpleEEDeploymentPackager.java
===================================================================
--- arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/SimpleEEDeploymentPackager.java	                        (rev 0)
+++ arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/SimpleEEDeploymentPackager.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.arquillian.impl;
+
+import java.util.Collection;
+
+import org.jboss.arquillian.spi.DeploymentPackager;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.Archives;
+import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+
+/**
+ * DummyDeploymentPakcager
+ * 
+ * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
+ * @version $Revision: $
+ */
+public class SimpleEEDeploymentPackager implements DeploymentPackager
+{
+
+   @Override
+   public Archive<?> generateDeployment(Archive<?> userArchive, Collection<Archive<?>> systemArchives)
+   {
+      EnterpriseArchive fullDeployment = Archives.create("test.ear", EnterpriseArchive.class)
+            .addModule(userArchive);
+
+      for (Archive<?> moduleArchive : systemArchives)
+      {
+         if (WebArchive.class.isInstance(moduleArchive))
+         {
+            fullDeployment.addModule(moduleArchive);
+         } 
+         else
+         {
+            fullDeployment.addLibrary(moduleArchive);
+         }
+      }
+      return fullDeployment;
+   }
+
+}

Deleted: arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/UserCreatedArchiveGenerator.java
===================================================================
--- arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/UserCreatedArchiveGenerator.java	2010-02-23 21:53:15 UTC (rev 4062)
+++ arquillian/trunk/impl-base/src/main/java/org/jboss/arquillian/impl/UserCreatedArchiveGenerator.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -1,74 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.arquillian.impl;
-
-import java.lang.reflect.Method;
-
-import org.jboss.arquillian.api.Deployment;
-import org.jboss.shrinkwrap.api.Archive;
-import org.jboss.shrinkwrap.api.container.ClassContainer;
-
-/**
- * UserCreatedArchiveGenerator
- *
- * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
- * @version $Revision: $
- */
-public class UserCreatedArchiveGenerator implements ArchiveGenerator
-{
-
-   @Override
-   public Archive<?> generateArchive(Class<?> testCase)
-   {
-      Validate.notNull(testCase, "TestCase must be specified");
-      
-      Method deploymentMethod = findDeploymentMethod(testCase);
-      if(deploymentMethod == null) 
-      {
-         throw new RuntimeException("No static method annotated with " + Deployment.class.getName() + " found");
-      }
-      try 
-      {
-         Archive<?> archive = (Archive<?>)deploymentMethod.invoke(null);
-         // TODO: handle deployment attributes like autoAddPakcage etc..
-         if(ClassContainer.class.isInstance(archive)) 
-         {
-            ClassContainer<?> classContainer = ClassContainer.class.cast(archive);
-            classContainer.addClass(testCase);
-         }
-         
-         return archive;
-      } 
-      catch (Exception e) 
-      {
-         throw new RuntimeException("Could not get Deployment", e);
-      }
-   }
-   
-   private Method findDeploymentMethod(Class<?> testCase) 
-   {
-      Method[] methods = testCase.getMethods();
-      for(Method method: methods)
-      {
-         if(method.isAnnotationPresent(Deployment.class)) 
-         {
-            return method;
-         }
-      }
-      return null;
-   }
-}

Added: arquillian/trunk/impl-base/src/main/resources/META-INF/services/org.jboss.arquillian.spi.ApplicationArchiveGenerator
===================================================================
--- arquillian/trunk/impl-base/src/main/resources/META-INF/services/org.jboss.arquillian.spi.ApplicationArchiveGenerator	                        (rev 0)
+++ arquillian/trunk/impl-base/src/main/resources/META-INF/services/org.jboss.arquillian.spi.ApplicationArchiveGenerator	2010-02-24 12:27:08 UTC (rev 4063)
@@ -0,0 +1 @@
+org.jboss.arquillian.impl.DeploymentAnnotationArchiveGenerator
\ No newline at end of file

Copied: arquillian/trunk/impl-base/src/main/resources/META-INF/services/org.jboss.arquillian.spi.AuxiliaryArchiveAppender (from rev 4033, arquillian/trunk/impl-base/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentAppender)
===================================================================
--- arquillian/trunk/impl-base/src/main/resources/META-INF/services/org.jboss.arquillian.spi.AuxiliaryArchiveAppender	                        (rev 0)
+++ arquillian/trunk/impl-base/src/main/resources/META-INF/services/org.jboss.arquillian.spi.AuxiliaryArchiveAppender	2010-02-24 12:27:08 UTC (rev 4063)
@@ -0,0 +1 @@
+org.jboss.arquillian.impl.ArquillianDeploymentAppender
\ No newline at end of file

Deleted: arquillian/trunk/impl-base/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentAppender
===================================================================
--- arquillian/trunk/impl-base/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentAppender	2010-02-23 21:53:15 UTC (rev 4062)
+++ arquillian/trunk/impl-base/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentAppender	2010-02-24 12:27:08 UTC (rev 4063)
@@ -1 +0,0 @@
-org.jboss.arquillian.impl.ArquillianDeploymentAppender
\ No newline at end of file

Added: arquillian/trunk/impl-base/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentPackager
===================================================================
--- arquillian/trunk/impl-base/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentPackager	                        (rev 0)
+++ arquillian/trunk/impl-base/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentPackager	2010-02-24 12:27:08 UTC (rev 4063)
@@ -0,0 +1 @@
+org.jboss.arquillian.impl.SimpleEEDeploymentPackager
\ No newline at end of file

Modified: arquillian/trunk/impl-base/src/test/java/org/jboss/arquillian/impl/ArquillianDeploymentAppenderTestCase.java
===================================================================
--- arquillian/trunk/impl-base/src/test/java/org/jboss/arquillian/impl/ArquillianDeploymentAppenderTestCase.java	2010-02-23 21:53:15 UTC (rev 4062)
+++ arquillian/trunk/impl-base/src/test/java/org/jboss/arquillian/impl/ArquillianDeploymentAppenderTestCase.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -31,7 +31,7 @@
    @Test
    public void shouldGenerateDependencies() throws Exception {
       
-      Archive<?> archive = new ArquillianDeploymentAppender().createArchive();
+      Archive<?> archive = new ArquillianDeploymentAppender().createAuxiliaryArchive();
       
       System.out.println(archive.toString(true));
    }

Modified: arquillian/trunk/junit/src/main/java/org/jboss/arquillian/junit/JUnitDeploymentAppender.java
===================================================================
--- arquillian/trunk/junit/src/main/java/org/jboss/arquillian/junit/JUnitDeploymentAppender.java	2010-02-23 21:53:15 UTC (rev 4062)
+++ arquillian/trunk/junit/src/main/java/org/jboss/arquillian/junit/JUnitDeploymentAppender.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -16,7 +16,7 @@
  */
 package org.jboss.arquillian.junit;
 
-import org.jboss.arquillian.spi.DeploymentAppender;
+import org.jboss.arquillian.spi.AuxiliaryArchiveAppender;
 import org.jboss.arquillian.spi.TestRunner;
 import org.jboss.shrinkwrap.api.Archive;
 import org.jboss.shrinkwrap.api.Archives;
@@ -30,14 +30,14 @@
  * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
  * @version $Revision: $
  */
-public class JUnitDeploymentAppender implements DeploymentAppender
+public class JUnitDeploymentAppender implements AuxiliaryArchiveAppender
 {
 
    /* (non-Javadoc)
     * @see org.jboss.arquillian.spi.DeploymentAppender#createArchive()
     */
    @Override
-   public Archive<?> createArchive()
+   public Archive<?> createAuxiliaryArchive()
    {
       JavaArchive archive = Archives.create("arquillian-junit.jar", JavaArchive.class)
                         .addPackages(

Copied: arquillian/trunk/junit/src/main/resources/META-INF/services/org.jboss.arquillian.spi.AuxiliaryArchiveAppender (from rev 4033, arquillian/trunk/junit/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentAppender)
===================================================================
--- arquillian/trunk/junit/src/main/resources/META-INF/services/org.jboss.arquillian.spi.AuxiliaryArchiveAppender	                        (rev 0)
+++ arquillian/trunk/junit/src/main/resources/META-INF/services/org.jboss.arquillian.spi.AuxiliaryArchiveAppender	2010-02-24 12:27:08 UTC (rev 4063)
@@ -0,0 +1 @@
+org.jboss.arquillian.junit.JUnitDeploymentAppender
\ No newline at end of file

Deleted: arquillian/trunk/junit/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentAppender
===================================================================
--- arquillian/trunk/junit/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentAppender	2010-02-23 21:53:15 UTC (rev 4062)
+++ arquillian/trunk/junit/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentAppender	2010-02-24 12:27:08 UTC (rev 4063)
@@ -1 +0,0 @@
-org.jboss.arquillian.junit.JUnitDeploymentAppender
\ No newline at end of file

Modified: arquillian/trunk/junit/src/test/java/org/jboss/arquillian/junit/JUnitDeploymentAppenderTestCase.java
===================================================================
--- arquillian/trunk/junit/src/test/java/org/jboss/arquillian/junit/JUnitDeploymentAppenderTestCase.java	2010-02-23 21:53:15 UTC (rev 4062)
+++ arquillian/trunk/junit/src/test/java/org/jboss/arquillian/junit/JUnitDeploymentAppenderTestCase.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -34,7 +34,7 @@
    @Test
    public void shouldGenerateDependencies() throws Exception 
    {
-      Archive<?> archive = new JUnitDeploymentAppender().createArchive();
+      Archive<?> archive = new JUnitDeploymentAppender().createAuxiliaryArchive();
       
       Assert.assertTrue(
             "Should have added TestRunner SPI",

Modified: arquillian/trunk/protocol-servlet/src/main/java/org/jboss/arquillian/protocol/servlet/ProtocolDeploymentAppender.java
===================================================================
--- arquillian/trunk/protocol-servlet/src/main/java/org/jboss/arquillian/protocol/servlet/ProtocolDeploymentAppender.java	2010-02-23 21:53:15 UTC (rev 4062)
+++ arquillian/trunk/protocol-servlet/src/main/java/org/jboss/arquillian/protocol/servlet/ProtocolDeploymentAppender.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -16,7 +16,7 @@
  */
 package org.jboss.arquillian.protocol.servlet;
 
-import org.jboss.arquillian.spi.DeploymentAppender;
+import org.jboss.arquillian.spi.AuxiliaryArchiveAppender;
 import org.jboss.shrinkwrap.api.Archive;
 import org.jboss.shrinkwrap.api.Archives;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
@@ -30,14 +30,14 @@
  * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
  * @version $Revision: $
  */
-public class ProtocolDeploymentAppender implements DeploymentAppender
+public class ProtocolDeploymentAppender implements AuxiliaryArchiveAppender
 {
 
    /* (non-Javadoc)
     * @see org.jboss.arquillian.spi.DeploymentAppender#createArchive()
     */
    @Override
-   public Archive<?> createArchive()
+   public Archive<?> createAuxiliaryArchive()
    {
       WebArchive archive = Archives.create("arquillian-protocol.war", WebArchive.class)
                      .setWebXML("org/jboss/arquillian/protocol/servlet/web.xml")

Copied: arquillian/trunk/protocol-servlet/src/main/resources/META-INF/services/org.jboss.arquillian.spi.AuxiliaryArchiveAppender (from rev 4033, arquillian/trunk/protocol-servlet/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentAppender)
===================================================================
--- arquillian/trunk/protocol-servlet/src/main/resources/META-INF/services/org.jboss.arquillian.spi.AuxiliaryArchiveAppender	                        (rev 0)
+++ arquillian/trunk/protocol-servlet/src/main/resources/META-INF/services/org.jboss.arquillian.spi.AuxiliaryArchiveAppender	2010-02-24 12:27:08 UTC (rev 4063)
@@ -0,0 +1 @@
+org.jboss.arquillian.protocol.servlet.ProtocolDeploymentAppender
\ No newline at end of file

Deleted: arquillian/trunk/protocol-servlet/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentAppender
===================================================================
--- arquillian/trunk/protocol-servlet/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentAppender	2010-02-23 21:53:15 UTC (rev 4062)
+++ arquillian/trunk/protocol-servlet/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentAppender	2010-02-24 12:27:08 UTC (rev 4063)
@@ -1 +0,0 @@
-org.jboss.arquillian.protocol.servlet.ProtocolDeploymentAppender
\ No newline at end of file

Modified: arquillian/trunk/protocol-servlet/src/test/java/org/jboss/arquillian/protocol/servlet/ProtocolDeploymentAppenderTestCase.java
===================================================================
--- arquillian/trunk/protocol-servlet/src/test/java/org/jboss/arquillian/protocol/servlet/ProtocolDeploymentAppenderTestCase.java	2010-02-23 21:53:15 UTC (rev 4062)
+++ arquillian/trunk/protocol-servlet/src/test/java/org/jboss/arquillian/protocol/servlet/ProtocolDeploymentAppenderTestCase.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -34,7 +34,7 @@
    @Test
    public void shouldGenerateDependencies() throws Exception {
       
-      Archive<?> archive = new ProtocolDeploymentAppender().createArchive();
+      Archive<?> archive = new ProtocolDeploymentAppender().createAuxiliaryArchive();
       
       Assert.assertTrue(
             "Should have added web.xml",

Added: arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/ApplicationArchiveGenerator.java
===================================================================
--- arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/ApplicationArchiveGenerator.java	                        (rev 0)
+++ arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/ApplicationArchiveGenerator.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.arquillian.spi;
+
+import org.jboss.shrinkwrap.api.Archive;
+
+/**
+ * Class responsible for creating the ApplicationArchive.
+ * 
+ * Example:
+ *  - handle @Deployment
+ *  - @Artifact
+ *
+ * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
+ * @version $Revision: $
+ */
+public interface ApplicationArchiveGenerator
+{
+   /**
+    * Generate a new Archive based on the given test case.
+    * 
+    * @param testCase Current test case class
+    * @return The Generated Archive
+    */
+   Archive<?> generateApplicationArchive(Class<?> testCaseClass);
+}
\ No newline at end of file

Added: arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/ApplicationArchiveProcessor.java
===================================================================
--- arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/ApplicationArchiveProcessor.java	                        (rev 0)
+++ arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/ApplicationArchiveProcessor.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.arquillian.spi;
+
+import org.jboss.shrinkwrap.api.Archive;
+
+/**
+ * Extension point for client side deployment enhancements.
+ * 
+ * Example:
+ * - Annotations to help define meta data for the deployment 
+ *
+ * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
+ * @version $Revision: $
+ */
+public interface ApplicationArchiveProcessor
+{
+   /**
+    * 
+    * 
+    * @param applicationArchive The user defined deployment archive
+    * @param testClass The users test class
+    */
+   void process(Archive<?> applicationArchive, Class<?> testCaseClass);
+}

Copied: arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/AuxiliaryArchiveAppender.java (from rev 4033, arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/DeploymentAppender.java)
===================================================================
--- arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/AuxiliaryArchiveAppender.java	                        (rev 0)
+++ arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/AuxiliaryArchiveAppender.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.arquillian.spi;
+
+import org.jboss.shrinkwrap.api.Archive;
+
+/**
+ * SPI used for modules who need to add classes/resources to the deployed archive.
+ *
+ * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
+ * @version $Revision: $
+ */
+public interface AuxiliaryArchiveAppender
+{
+   /**
+    * Create a archive containing the needed resources for this extension 
+    * to run in-container.
+    * 
+    * @return A Archive of any type
+    */
+   Archive<?> createAuxiliaryArchive();
+}

Added: arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/AuxiliaryArchiveProcessor.java
===================================================================
--- arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/AuxiliaryArchiveProcessor.java	                        (rev 0)
+++ arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/AuxiliaryArchiveProcessor.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.arquillian.spi;
+
+import org.jboss.shrinkwrap.api.Archive;
+
+/**
+ * Extension point to alter system defined deployments.
+ * 
+ * Example:
+ * - Add beans.xml to EE modules
+ *
+ * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
+ * @version $Revision: $
+ */
+public interface AuxiliaryArchiveProcessor
+{
+   /**
+    * Called once for each found ArchiveAppender
+    * 
+    * @param auxiliaryArchive The system defined deployment archive
+    */
+   void process(Archive<?> auxiliaryArchive);
+}

Deleted: arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/DeploymentAppender.java
===================================================================
--- arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/DeploymentAppender.java	2010-02-23 21:53:15 UTC (rev 4062)
+++ arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/DeploymentAppender.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.arquillian.spi;
-
-import org.jboss.shrinkwrap.api.Archive;
-
-/**
- * DeploymentAppender
- * 
- * SPI used for modules who need to add classes/resources to the deployed archive.
- *
- * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
- * @version $Revision: $
- */
-public interface DeploymentAppender
-{
-
-   /**
-    * Create a archive containing the needed resources for this extension 
-    * to run in-container.
-    * 
-    * @return A Archive of any type
-    */
-   Archive<?> createArchive();
-   
-}

Added: arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/DeploymentPackager.java
===================================================================
--- arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/DeploymentPackager.java	                        (rev 0)
+++ arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/DeploymentPackager.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.arquillian.spi;
+
+import java.util.Collection;
+
+import org.jboss.shrinkwrap.api.Archive;
+
+/**
+ * Extension point for the DeployableContainer to prepare the Archives for deployment.
+ * 
+ * Example:
+ * - Create a EAR, WAR
+ *
+ * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
+ * @version $Revision: $
+ */
+public interface DeploymentPackager
+{
+   /**
+    * @param applicationArchive The user defined deployment archive
+    * @param auxiliaryArchives All found system defined deployment archives
+    * @return A archive to deploy
+    */
+   Archive<?> generateDeployment(Archive<?> applicationArchive, Collection<Archive<?>> auxiliaryArchives);
+}

Added: arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/ServiceLoader.java
===================================================================
--- arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/ServiceLoader.java	                        (rev 0)
+++ arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/ServiceLoader.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.arquillian.spi;
+
+import java.util.Collection;
+
+/**
+ * ServiceLoader
+ *
+ * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
+ * @version $Revision: $
+ */
+public interface ServiceLoader
+{
+   <T> Collection<T>  all(Class<T> serviceClass);
+   
+   <T> T  onlyOne(Class<T> serviceClass);
+}

Modified: arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/util/DefaultServiceLoader.java
===================================================================
--- arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/util/DefaultServiceLoader.java	2010-02-23 21:53:15 UTC (rev 4062)
+++ arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/util/DefaultServiceLoader.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -222,12 +222,14 @@
                   }
                   catch (Exception e)
                   {
+                     e.printStackTrace();
                      // TODO Don't use exceptions for flow control!
                      // try the next line
                   }
 
                   line = reader.readLine();
                }
+               reader.close();
             }
             catch (Exception e)
             {

Deleted: arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/util/DeployableContainers.java
===================================================================
--- arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/util/DeployableContainers.java	2010-02-23 21:53:15 UTC (rev 4062)
+++ arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/util/DeployableContainers.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.arquillian.spi.util;
-
-import org.jboss.arquillian.spi.DeployableContainer;
-
-/**
- * DeployableContainers
- *
- * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
- * @version $Revision: $
- */
-public class DeployableContainers
-{
-
-   private DeployableContainers() {}
-   
-   public static DeployableContainer load() 
-   {
-      DefaultServiceLoader<DeployableContainer> containerLoader = DefaultServiceLoader.load(DeployableContainer.class);
-      if(containerLoader.getProviders().size() == 0)
-      {
-         throw new RuntimeException("No containers found");
-      }
-      if(containerLoader.getProviders().size() > 1)
-      {
-         throw new RuntimeException("More the one container found, check classpath");
-      }
-      return containerLoader.iterator().next();
-   }
-}

Deleted: arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/util/DeploymentAppenders.java
===================================================================
--- arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/util/DeploymentAppenders.java	2010-02-23 21:53:15 UTC (rev 4062)
+++ arquillian/trunk/spi/src/main/java/org/jboss/arquillian/spi/util/DeploymentAppenders.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -1,55 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.arquillian.spi.util;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.arquillian.spi.DeploymentAppender;
-import org.jboss.shrinkwrap.api.Archive;
-
-/**
- * DeploymentAppenders
- * 
- * Helper class for getting all Archives that should be added to the deployment. 
- *
- * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
- * @version $Revision: $
- */
-public final class DeploymentAppenders
-{
-   private DeploymentAppenders() { }
-   
-   /**
-    * Load/Create all Archives provided by the different modules. 
-    * 
-    * @return A List of all archives
-    */
-   public static List<Archive<?>> getArchives() 
-   {
-      List<Archive<?>> archives = new ArrayList<Archive<?>>();
-      DefaultServiceLoader<DeploymentAppender> serviceLoader = DefaultServiceLoader.load(
-            DeploymentAppender.class);
-   
-      for(DeploymentAppender deploymentAppender : serviceLoader)
-      {
-         archives.add(deploymentAppender.createArchive());
-      }
-      return archives;
-   }
-   
-}

Modified: arquillian/trunk/testenricher-jboss/src/main/java/org/jboss/arquillian/testenricher/jboss/JbossDeploymentAppender.java
===================================================================
--- arquillian/trunk/testenricher-jboss/src/main/java/org/jboss/arquillian/testenricher/jboss/JbossDeploymentAppender.java	2010-02-23 21:53:15 UTC (rev 4062)
+++ arquillian/trunk/testenricher-jboss/src/main/java/org/jboss/arquillian/testenricher/jboss/JbossDeploymentAppender.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -16,7 +16,7 @@
  */
 package org.jboss.arquillian.testenricher.jboss;
 
-import org.jboss.arquillian.spi.DeploymentAppender;
+import org.jboss.arquillian.spi.AuxiliaryArchiveAppender;
 import org.jboss.arquillian.spi.TestEnricher;
 import org.jboss.shrinkwrap.api.Archive;
 import org.jboss.shrinkwrap.api.Archives;
@@ -31,14 +31,14 @@
  * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
  * @version $Revision: $
  */
-public class JbossDeploymentAppender implements DeploymentAppender
+public class JbossDeploymentAppender implements AuxiliaryArchiveAppender
 {
 
    /* (non-Javadoc)
     * @see org.jboss.arquillian.spi.DeploymentAppender#createArchive()
     */
    @Override
-   public Archive<?> createArchive()
+   public Archive<?> createAuxiliaryArchive()
    {
       JavaArchive archive = Archives.create("jboss-testenrichers.jar", JavaArchive.class)
                         .addPackages(

Copied: arquillian/trunk/testenricher-jboss/src/main/resources/META-INF/services/org.jboss.arquillian.spi.AuxiliaryArchiveAppender (from rev 4033, arquillian/trunk/testenricher-jboss/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentAppender)
===================================================================
--- arquillian/trunk/testenricher-jboss/src/main/resources/META-INF/services/org.jboss.arquillian.spi.AuxiliaryArchiveAppender	                        (rev 0)
+++ arquillian/trunk/testenricher-jboss/src/main/resources/META-INF/services/org.jboss.arquillian.spi.AuxiliaryArchiveAppender	2010-02-24 12:27:08 UTC (rev 4063)
@@ -0,0 +1 @@
+org.jboss.arquillian.testenricher.jboss.JbossDeploymentAppender
\ No newline at end of file

Deleted: arquillian/trunk/testenricher-jboss/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentAppender
===================================================================
--- arquillian/trunk/testenricher-jboss/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentAppender	2010-02-23 21:53:15 UTC (rev 4062)
+++ arquillian/trunk/testenricher-jboss/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentAppender	2010-02-24 12:27:08 UTC (rev 4063)
@@ -1 +0,0 @@
-org.jboss.arquillian.testenricher.jboss.JbossDeploymentAppender
\ No newline at end of file

Modified: arquillian/trunk/testenricher-jboss/src/test/java/org/jboss/arquillian/testenricher/jboss/JbossDeploymentAppenderTestCase.java
===================================================================
--- arquillian/trunk/testenricher-jboss/src/test/java/org/jboss/arquillian/testenricher/jboss/JbossDeploymentAppenderTestCase.java	2010-02-23 21:53:15 UTC (rev 4062)
+++ arquillian/trunk/testenricher-jboss/src/test/java/org/jboss/arquillian/testenricher/jboss/JbossDeploymentAppenderTestCase.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -34,7 +34,7 @@
    @Test
    public void shouldGenerateDependencies() throws Exception {
 
-      Archive<?> archive = new JbossDeploymentAppender().createArchive();
+      Archive<?> archive = new JbossDeploymentAppender().createAuxiliaryArchive();
       System.out.println(archive.toString(true));
       
       Assert.assertTrue(

Modified: arquillian/trunk/testng/src/main/java/org/jboss/arquillian/testng/TestNGDeploymentAppender.java
===================================================================
--- arquillian/trunk/testng/src/main/java/org/jboss/arquillian/testng/TestNGDeploymentAppender.java	2010-02-23 21:53:15 UTC (rev 4062)
+++ arquillian/trunk/testng/src/main/java/org/jboss/arquillian/testng/TestNGDeploymentAppender.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -16,7 +16,7 @@
  */
 package org.jboss.arquillian.testng;
 
-import org.jboss.arquillian.spi.DeploymentAppender;
+import org.jboss.arquillian.spi.AuxiliaryArchiveAppender;
 import org.jboss.arquillian.spi.TestRunner;
 import org.jboss.shrinkwrap.api.Archive;
 import org.jboss.shrinkwrap.api.Archives;
@@ -41,13 +41,13 @@
  * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
  * @version $Revision: $
  */
-public class TestNGDeploymentAppender implements DeploymentAppender
+public class TestNGDeploymentAppender implements AuxiliaryArchiveAppender
 {
    /* (non-Javadoc)
     * @see org.jboss.arquillian.spi.DeploymentAppender#createArchive()
     */
    @Override
-   public Archive<?> createArchive()
+   public Archive<?> createAuxiliaryArchive()
    {
       return Archives.create("arquillian-testng.jar", JavaArchive.class)
                .addPackages(

Copied: arquillian/trunk/testng/src/main/resources/META-INF/services/org.jboss.arquillian.spi.AuxiliaryArchiveAppender (from rev 4033, arquillian/trunk/testng/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentAppender)
===================================================================
--- arquillian/trunk/testng/src/main/resources/META-INF/services/org.jboss.arquillian.spi.AuxiliaryArchiveAppender	                        (rev 0)
+++ arquillian/trunk/testng/src/main/resources/META-INF/services/org.jboss.arquillian.spi.AuxiliaryArchiveAppender	2010-02-24 12:27:08 UTC (rev 4063)
@@ -0,0 +1 @@
+org.jboss.arquillian.testng.TestNGDeploymentAppender
\ No newline at end of file

Deleted: arquillian/trunk/testng/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentAppender
===================================================================
--- arquillian/trunk/testng/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentAppender	2010-02-23 21:53:15 UTC (rev 4062)
+++ arquillian/trunk/testng/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeploymentAppender	2010-02-24 12:27:08 UTC (rev 4063)
@@ -1 +0,0 @@
-org.jboss.arquillian.testng.TestNGDeploymentAppender
\ No newline at end of file

Modified: arquillian/trunk/testng/src/test/java/org/jboss/arquillian/testng/TestNGDeploymentAppenderTestCase.java
===================================================================
--- arquillian/trunk/testng/src/test/java/org/jboss/arquillian/testng/TestNGDeploymentAppenderTestCase.java	2010-02-23 21:53:15 UTC (rev 4062)
+++ arquillian/trunk/testng/src/test/java/org/jboss/arquillian/testng/TestNGDeploymentAppenderTestCase.java	2010-02-24 12:27:08 UTC (rev 4063)
@@ -34,7 +34,7 @@
    @Test
    public void shouldGenerateDependencies() throws Exception 
    {
-      Archive<?> archive = new TestNGDeploymentAppender().createArchive();
+      Archive<?> archive = new TestNGDeploymentAppender().createAuxiliaryArchive();
 
       Assert.assertTrue(
             "Should have added TestRunner SPI",



More information about the jboss-svn-commits mailing list