On Jun 22, 2011, at 7:08 PM, Hao Lieu wrote:
> i'm going to take a look into
>
> [OPENEJB-1579] Setup CDI TCK for TomEE
Sweet. I checked in a little stub project for you. There's not much there but
it can help to have something to patch against.
Basically we need to:
1. download and unpack TomEE (can be done with maven)
2. boot TomEE when the harness tells us to via Containers.setup()
- see the RemoteServer.java
3. deploy/undeploy apps via the Containers.deploy/undeploy hooks
- see the Deploy.java which looks up and uses a Deployer EJB
These bits should be on that stub project I checked in, but just in case:
<dependency>
<groupId>org.apache.openejb</groupId>
<artifactId>apache-tomee</artifactId>
<type>zip</type>
<version>${project.version}</version>
</dependency>
<properties>
<!-- where we will unpack tomcat -->
<openejb.home>${project.build.directory}/apache-tomee-${project.version}</openejb.home>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<id>unpack</id>
<phase>pre-integration-test</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.apache.openejb</groupId>
<artifactId>apache-tomee</artifactId>
<type>zip</type>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
There's some code in the tck/cdi-embedded/ that we'll want to copy over such as
BeansImpl and ContextsImpl, but basically the real work is in creating a new
ContainersImpl that drives the start/stop and deploy/undeploy against TomEE.
-David