[jboss-cvs] JBossAS SVN: r81552 - in projects/microcontainer/tags: 2.0.0.GA and 11 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Nov 25 08:56:07 EST 2008


Author: alesj
Date: 2008-11-25 08:56:03 -0500 (Tue, 25 Nov 2008)
New Revision: 81552

Added:
   projects/microcontainer/tags/2.0.0.GA/
   projects/microcontainer/tags/2.0.0.GA/aop-mc-int/pom.xml
   projects/microcontainer/tags/2.0.0.GA/build/pom.xml
   projects/microcontainer/tags/2.0.0.GA/dependency/pom.xml
   projects/microcontainer/tags/2.0.0.GA/guice-int/pom.xml
   projects/microcontainer/tags/2.0.0.GA/kernel/pom.xml
   projects/microcontainer/tags/2.0.0.GA/kernel/src/main/java/org/jboss/beans/metadata/plugins/AbstractBeanMetaData.java
   projects/microcontainer/tags/2.0.0.GA/kernel/src/main/java/org/jboss/kernel/plugins/config/Configurator.java
   projects/microcontainer/tags/2.0.0.GA/kernel/src/main/java/org/jboss/kernel/plugins/dependency/PropertyDispatchWrapper.java
   projects/microcontainer/tags/2.0.0.GA/kernel/src/main/java/org/jboss/kernel/plugins/deployment/AbstractKernelDeployment.java
   projects/microcontainer/tags/2.0.0.GA/kernel/src/test/java/org/jboss/test/kernel/config/test/BeanMetaDataBuilderTestCase.java
   projects/microcontainer/tags/2.0.0.GA/pom.xml
   projects/microcontainer/tags/2.0.0.GA/spring-int/pom.xml
Removed:
   projects/microcontainer/tags/2.0.0.GA/aop-mc-int/pom.xml
   projects/microcontainer/tags/2.0.0.GA/build/pom.xml
   projects/microcontainer/tags/2.0.0.GA/dependency/pom.xml
   projects/microcontainer/tags/2.0.0.GA/guice-int/pom.xml
   projects/microcontainer/tags/2.0.0.GA/kernel/pom.xml
   projects/microcontainer/tags/2.0.0.GA/kernel/src/main/java/org/jboss/beans/metadata/plugins/AbstractBeanMetaData.java
   projects/microcontainer/tags/2.0.0.GA/kernel/src/main/java/org/jboss/kernel/plugins/config/Configurator.java
   projects/microcontainer/tags/2.0.0.GA/kernel/src/main/java/org/jboss/kernel/plugins/dependency/PropertyDispatchWrapper.java
   projects/microcontainer/tags/2.0.0.GA/kernel/src/main/java/org/jboss/kernel/plugins/deployment/AbstractKernelDeployment.java
   projects/microcontainer/tags/2.0.0.GA/kernel/src/test/java/org/jboss/test/kernel/config/test/BeanMetaDataBuilderTestCase.java
   projects/microcontainer/tags/2.0.0.GA/pom.xml
   projects/microcontainer/tags/2.0.0.GA/spring-int/pom.xml
Log:
[maven-release-plugin]  copy for tag 2.0.0.GA

Copied: projects/microcontainer/tags/2.0.0.GA (from rev 81534, projects/microcontainer/branches/Branch_2_0)

Deleted: projects/microcontainer/tags/2.0.0.GA/aop-mc-int/pom.xml
===================================================================
--- projects/microcontainer/branches/Branch_2_0/aop-mc-int/pom.xml	2008-11-25 08:40:28 UTC (rev 81534)
+++ projects/microcontainer/tags/2.0.0.GA/aop-mc-int/pom.xml	2008-11-25 13:56:03 UTC (rev 81552)
@@ -1,640 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <!--
-    -  AOP Integration module.
-    -  This modules includes 4 different test configurations: weave, no-weave, weave-secure, and no-weave-secure
-    -  By default, none of the configurations will run.  A single test configuration can be called using the
-    -  appropriate profile:
-    -    mvn -Ptests-weave-secure install
-    -  
-    -  All four surefire test configurations can be run using the property aop.tests.all
-    -    mvn -Daop.tests.all install
-    -
-    -  Individual tests can be run by activating the appropriate profiles, then specifying the tests to run
-    -    mvn -Ptests-weave,tests-no-weave-secure -Dtest=TypeDefAopTestCase install
-    -->
-  <parent>
-    <groupId>org.jboss.microcontainer</groupId>
-    <artifactId>jboss-microcontainer</artifactId>
-    <version>2.0.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>jboss-aop-mc-int</artifactId>
-  <packaging>jar</packaging>
-  <name>JBoss Microcontainer AOP MC INT</name>
-  <url>http://www.jboss.com/products/jbossmc</url>
-  <description>JBoss Microcontainer</description>
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <configuration>
-          <descriptors>
-            <descriptor>src/assembly/impl.xml</descriptor>
-            <descriptor>src/assembly/aspects.xml</descriptor>
-          </descriptors>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>weave</id>
-            <phase>test</phase>
-            <goals>
-              <goal>test</goal>
-            </goals>
-            <configuration>
-              <skip>true</skip>
-              <includes>
-                <include>org/jboss/test/**/*TestCase.java</include>
-              </includes>
-             <useSystemClassLoader>true</useSystemClassLoader>
-              <argLine>-Djava.system.class.loader=org.jboss.aop.standalone.SystemClassLoader</argLine>
-              <reportsDirectory>${project.build.directory}/surefire-reports/weave</reportsDirectory>     
-              <systemProperties>
-                <property>
-                  <name>jboss.aop.exclude</name>
-                  <value>org.jboss.,org.apache.</value>
-                </property>
-                <property>
-                  <name>jboss.aop.include</name>
-                  <value>org.jboss.test.</value>
-                </property>
-                <property>
-                  <name>jboss-junit-configuration</name>
-                  <value>weave</value>
-                </property>
-                <property>
-                  <name>build.testlog</name>
-                  <value>target/log</value>
-                </property>
-                <property>
-                  <name>jboss.aop.verbose</name>
-                  <value>true</value>
-                </property>
-              </systemProperties>
-            </configuration>
-          </execution>
-          <execution>
-            <id>weave-secure</id>
-            <phase>test</phase>
-            <goals>
-              <goal>test</goal>
-            </goals>
-            <configuration>
-              <skip>true</skip>
-              <reportsDirectory>${project.build.directory}/surefire-reports/weave-secure</reportsDirectory>     
-              <includes>
-                <include>org/jboss/test/**/*TestCase.java</include>
-              </includes>
-              <useSystemClassLoader>true</useSystemClassLoader>
-              <argLine>-Djava.system.class.loader=org.jboss.aop.standalone.SystemClassLoader</argLine>
-              <systemProperties>
-                <property>
-                  <name>jboss.aop.exclude</name>
-                  <value>org.jboss.,org.apache.</value>
-                </property>
-                <property>
-                  <name>jboss.aop.include</name>
-                  <value>org.jboss.test.</value>
-                </property>
-                <property>
-                  <name>jboss-junit-configuration</name>
-                  <value>weave</value>
-                </property>
-                <property>
-                  <name>build.testlog</name>
-                  <value>target/log</value>
-                </property>
-                <property>
-                  <name>jboss.mc.secure</name>
-                  <value>true</value>
-                </property>
-              </systemProperties>
-            </configuration>
-          </execution>
-          <execution>
-            <id>no-weave</id>
-            <goals>
-              <goal>test</goal>
-            </goals>
-            <configuration>
-              <skip>true</skip>
-              <reportsDirectory>${project.build.directory}/surefire-reports/no-weave</reportsDirectory>     
-              <includes>
-                <include>org/jboss/test/microcontainer/test/**/*TestCase.java</include>
-                <include>org/jboss/test/microcontainer/beans/test/**/*TestCase.java</include>
-                <include>org/jboss/test/microcontainer/annotatedaop/test/**/*TestCase.java</include>
-              </includes>
-              <systemProperties>
-                <property>
-                  <name>jboss-junit-configuration</name>
-                  <value>no_weave</value>
-                </property>
-                <property>
-                  <name>build.testlog</name>
-                  <value>target/log</value>
-                </property>
-              </systemProperties>
-            </configuration>
-          </execution>
-          <execution>
-            <id>no-weave-secure</id>
-            <goals>
-              <goal>test</goal>
-            </goals>
-            <configuration>
-              <skip>true</skip>
-              <reportsDirectory>${project.build.directory}/surefire-reports/no-weave-secure</reportsDirectory>     
-              <includes>
-                <include>org/jboss/test/microcontainer/test/**/*TestCase.java</include>
-                <include>org/jboss/test/microcontainer/beans/test/**/*TestCase.java</include>
-                <include>org/jboss/test/microcontainer/annotatedaop/test/**/*TestCase.java</include>
-              </includes>
-              <systemProperties>
-                <property>
-                  <name>jboss-junit-configuration</name>
-                  <value>no_weave</value>
-                </property>
-                <property>
-                  <name>build.testlog</name>
-                  <value>target/log</value>
-                </property>
-                <property>
-                  <name>jboss.mc.secure</name>
-                  <value>true</value>
-                </property>
-              </systemProperties>
-            </configuration>
-          </execution>
-        </executions>
-        <configuration>
-          <testFailureIgnore>true</testFailureIgnore>
-          <forkMode>always</forkMode>
-          <redirectTestOutputToFile>true</redirectTestOutputToFile>          
-          <skip>true</skip>
-          <trimStackTrace>false</trimStackTrace>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-  <dependencyManagement>
-    <dependencies>
-      <dependency>
-        <groupId>org.jboss</groupId>
-        <artifactId>jboss-test</artifactId>
-        <version>${version.org.jboss.test}</version>
-        <scope>compile</scope>
-      </dependency>
-      <dependency>
-        <groupId>junit</groupId>
-        <artifactId>junit</artifactId>
-        <version>${version.junit}</version>
-        <scope>compile</scope>
-      </dependency>
-    </dependencies>
-  </dependencyManagement>
-  
-  <!-- Do not add version information here, use ../pom.xml instead -->
-  <dependencies>
-    <!-- Global dependencies -->
-    <dependency>
-      <groupId>org.jboss.aop</groupId>
-      <artifactId>jboss-aop</artifactId>
-      <exclusions>
-        <exclusion>
-          <groupId>ant</groupId>
-          <artifactId>ant</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>apache-xerces</groupId>
-          <artifactId>xml-apis</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>javassist</groupId>
-          <artifactId>javassist</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.jboss</groupId>
-          <artifactId>jboss-common-core</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.jboss.logging</groupId>
-          <artifactId>jboss-logging-spi</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.jboss.logging</groupId>
-          <artifactId>jboss-logging-log4j</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.jboss.microcontainer</groupId>
-          <artifactId>jboss-container</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.jboss.microcontainer</groupId>
-          <artifactId>jboss-dependency</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.microcontainer</groupId>
-      <artifactId>jboss-kernel</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.man</groupId>
-      <artifactId>jboss-managed</artifactId>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>javassist</groupId>
-      <artifactId>javassist</artifactId>
-    </dependency>
-    <!-- Test dependencies -->
-    <dependency>
-      <groupId>org.jboss.logging</groupId>
-      <artifactId>jboss-logging-log4j</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.test</groupId>
-      <artifactId>jboss-test</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.microcontainer</groupId>
-      <artifactId>jboss-kernel</artifactId>
-      <type>test-jar</type>
-      <scope>test</scope>
-      <exclusions>
-        <exclusion>
-          <groupId>org.jboss.microcontainer</groupId>
-          <artifactId>jboss-dependency</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.jboss</groupId>
-          <artifactId>jbossxb</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-  </dependencies>
-  
-  <profiles>
-    <profile>
-      <id>tests-weave</id>
-      <activation>
-        <property>
-          <name>aop.tests.all</name>
-        </property>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-surefire-plugin</artifactId>
-            <executions>
-              <execution>
-                <id>weave</id>
-                <configuration>
-                  <skip>false</skip>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
-          <plugin>
-            <artifactId>maven-surefire-report-plugin</artifactId>
-            <configuration>
-              <reportsDirectory>${project.build.directory}/surefire-reports/weave</reportsDirectory>
-              <outputName>surefire-report-weave</outputName>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-    <profile>
-      <id>tests-weave-secure</id>
-      <activation>
-        <property>
-          <name>aop.tests.all</name>
-        </property>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-surefire-plugin</artifactId>
-            <executions>
-              <execution>
-                <id>weave-secure</id>
-                <configuration>
-                  <skip>false</skip>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
-          <plugin>
-            <artifactId>maven-surefire-report-plugin</artifactId>
-            <configuration>
-              <reportsDirectory>${project.build.directory}/surefire-reports/weave-secure</reportsDirectory>
-              <outputName>surefire-report-weave-secure</outputName>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-    <profile>
-      <id>tests-no-weave</id>
-      <activation>
-        <property>
-          <name>aop.tests.all</name>
-        </property>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-surefire-plugin</artifactId>
-            <executions>
-              <execution>
-                <id>no-weave</id>
-                <configuration>
-                  <skip>false</skip>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
-          <plugin>
-            <artifactId>maven-surefire-report-plugin</artifactId>
-            <configuration>
-              <reportsDirectory>${project.build.directory}/surefire-reports/no-weave</reportsDirectory>
-              <outputName>surefire-report-no-weave</outputName>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-    <profile>
-      <id>tests-no-weave-secure</id>
-      <activation>
-        <property>
-          <name>aop.tests.all</name>
-        </property>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-surefire-plugin</artifactId>
-            <executions>
-              <execution>
-                <id>no-weave-secure</id>
-                <configuration>
-                  <skip>false</skip>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
-          <plugin>
-            <artifactId>maven-surefire-report-plugin</artifactId>
-            <configuration>
-              <reportsDirectory>${project.build.directory}/surefire-reports/no-weave-secure</reportsDirectory>
-              <outputName>surefire-report-no-weave-secure</outputName>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-    <profile>
-      <id>ant-tests-weave</id>
-      <activation>
-        <property>
-          <name>ant-tests-weave</name>
-        </property>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-			      <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-antrun-plugin</artifactId>
-			      <version>1.1</version>
-            <executions>
-              <execution>
-                <id>ant-tests-weave</id>
-                <phase>test</phase>
-                <configuration>
-                  <tasks>
-                    <property name="plugin_classpath" refid="maven.plugin.classpath" />
-					          <echo message="plugin classpath: ${plugin_classpath}" />
-                    <mkdir dir="${project.build.directory}/surefire-reports/ant-weave" />
-                    <property name="build.testlog" value="${project.build.directory}/log" />
-                    <mkdir dir="${build.testlog}" />
-                    <!-- Remove the test.log so each run has a fresh log -->
-                    <delete file="${build.testlog}/test.log" />
-                    <junit dir="${project.build.directory}" printsummary="yes" haltonerror="false" haltonfailure="false" fork="true">
-              
-                       <sysproperty key="jboss.aop.exclude" value="org.jboss.,org.apache." />
-                       <sysproperty key="jboss.aop.include" value="org.jboss.test." />
-                       <sysproperty key="jboss-junit-configuration" value="weave" />
-                       <sysproperty key="build.testlog" value="${build.testlog}" />
-                       <sysproperty key="java.system.class.loader" value="org.jboss.aop.standalone.SystemClassLoader" />
-              
-                       <classpath>
-                          <path refid="maven.test.classpath" />
-                       </classpath>
-              
-                       <formatter type="plain" usefile="true" extension=".txt" />
-                       <formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter" usefile="true" extension=".xml" />
-              
-                       <batchtest todir="${project.build.directory}/surefire-reports/ant-weave" haltonerror="false" haltonfailure="false" fork="true">
-              
-                          <fileset dir="${project.build.directory}/test-classes">
-                             <include name="org/jboss/test/**/*TestCase.class" />
-                          </fileset>
-                       </batchtest>
-                    </junit>
-                  </tasks>
-                </configuration>
-                <goals>
-                  <goal>run</goal>
-                </goals>
-              </execution>
-            </executions> 
-            <dependencies>
-              <dependency>
-                <groupId>ant</groupId>
-                <artifactId>ant-junit</artifactId>
-                <version>${version.ant.junit}</version>
-              </dependency>
-              <dependency>
-                <groupId>junit</groupId>
-                <artifactId>junit</artifactId>
-                <version>${version.junit}</version>
-              </dependency>
-            </dependencies>     
-          </plugin>
-          <plugin>
-            <artifactId>maven-surefire-report-plugin</artifactId>
-            <configuration>
-              <reportsDirectory>${project.build.directory}/surefire-reports/ant-weave</reportsDirectory>
-              <outputName>surefire-report-ant-weave</outputName>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-    <profile>
-      <id>ant-one-test-weave</id>
-      <activation>
-        <property>
-          <name>ant-one-test-weave</name>
-        </property>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-			      <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-antrun-plugin</artifactId>
-			      <version>1.1</version>
-            <executions>
-              <execution>
-                <id>ant-one-test-weave</id>
-                <phase>test</phase>
-                <configuration>
-                  <tasks>
-                    <property name="plugin_classpath" refid="maven.plugin.classpath" />
-					          <echo message="plugin classpath: ${plugin_classpath}" />
-                    <mkdir dir="${project.build.directory}/surefire-reports/ant-one-weave" />
-                    <property name="build.testlog" value="${project.build.directory}/log" />
-                    <mkdir dir="${build.testlog}" />
-                    <!-- Remove the test.log so each run has a fresh log -->
-                    <delete file="${build.testlog}/test.log" />
-                    <junit dir="${project.build.directory}" printsummary="yes" haltonerror="false" haltonfailure="false" fork="true">
-              
-                       <sysproperty key="jboss.aop.exclude" value="org.jboss.,org.apache." />
-                       <sysproperty key="jboss.aop.include" value="org.jboss.test." />
-                       <sysproperty key="jboss-junit-configuration" value="weave" />
-                       <sysproperty key="build.testlog" value="${build.testlog}" />
-                       <sysproperty key="java.system.class.loader" value="org.jboss.aop.standalone.SystemClassLoader" />
-              
-                       <classpath>
-                          <path refid="maven.test.classpath" />
-                       </classpath>
-              
-                       <formatter type="plain" usefile="true" extension=".txt" />
-                       <formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter" usefile="true" extension=".xml" />
-              
-                       <test todir="${project.build.directory}/surefire-reports/ant-one-weave" name="${test}" haltonerror="false" haltonfailure="false" fork="true" />
-                       
-                    </junit>
-                  </tasks>
-                </configuration>
-                <goals>
-                  <goal>run</goal>
-                </goals>
-              </execution>
-            </executions> 
-            <dependencies>
-              <dependency>
-                <groupId>ant</groupId>
-                <artifactId>ant-junit</artifactId>
-                <version>${version.ant.junit}</version>
-              </dependency>
-              <dependency>
-                <groupId>junit</groupId>
-                <artifactId>junit</artifactId>
-                <version>${version.junit}</version>
-              </dependency>
-            </dependencies>     
-          </plugin>
-          <plugin>
-            <artifactId>maven-surefire-report-plugin</artifactId>
-            <configuration>
-              <reportsDirectory>${project.build.directory}/surefire-reports/ant-weave</reportsDirectory>
-              <outputName>surefire-report-ant-weave</outputName>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-    <profile>
-      <id>ant-tests-weave-secure</id>
-      <activation>
-        <property>
-          <name>ant-tests-weave-secure</name>
-        </property>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-            <artifactId>maven-antrun-plugin</artifactId>
-            <executions>
-              <execution>
-                <id>ant-tests-weave-secure</id>
-                <phase>test</phase>
-                <configuration>
-                  <tasks>
-                    <mkdir dir="${project.build.directory}/surefire-reports/ant-weave-secure" />
-                    <property name="build.testlog" value="${project.build.directory}/log" />
-                    <mkdir dir="${build.testlog}" />
-                    <!-- Remove the test.log so each run has a fresh log -->
-                    <delete file="${build.testlog}/test.log" />
-                    <junit dir="${project.build.directory}" printsummary="yes" haltonerror="false" haltonfailure="false" fork="true">
-              
-                       <sysproperty key="jboss.aop.exclude" value="org.jboss.,org.apache." />
-                       <sysproperty key="jboss.aop.include" value="org.jboss.test." />
-                       <sysproperty key="jboss-junit-configuration" value="weave-secure" />
-                       <sysproperty key="build.testlog" value="${build.testlog}" />
-                       <sysproperty key="java.system.class.loader" value="org.jboss.aop.standalone.SystemClassLoader" />
-                       <sysproperty key="jboss.mc.secure" value="true" />
-              
-                       <classpath>
-                          <path refid="maven.test.classpath" />
-                       </classpath>
-              
-                       <formatter type="plain" usefile="true" extension=".txt" />
-                       <formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter" usefile="true" extension=".xml" />
-              
-                       <batchtest todir="${project.build.directory}/surefire-reports/ant-weave-secure" haltonerror="false" haltonfailure="false" fork="true">
-              
-                          <fileset dir="${project.build.directory}/test-classes">
-                             <include name="org/jboss/test/**/*TestCase.class" />
-                          </fileset>
-                       </batchtest>
-                    </junit>
-                  </tasks>
-                </configuration>
-                <goals>
-                  <goal>run</goal>
-                </goals>
-              </execution>
-            </executions> 
-            <dependencies>
-              <dependency>
-                <groupId>ant</groupId>
-                <artifactId>ant-junit</artifactId>
-                <version>${version.ant.junit}</version>
-              </dependency>
-              <dependency>
-                <groupId>junit</groupId>
-                <artifactId>junit</artifactId>
-                <version>${version.junit}</version>
-              </dependency>
-            </dependencies>     
-          </plugin>
-          <plugin>
-            <artifactId>maven-surefire-report-plugin</artifactId>
-            <configuration>
-              <reportsDirectory>${project.build.directory}/surefire-reports/ant-weave-secure</reportsDirectory>
-              <outputName>surefire-report-ant-weave-secure</outputName>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-  </profiles>
-</project>

Copied: projects/microcontainer/tags/2.0.0.GA/aop-mc-int/pom.xml (from rev 81551, projects/microcontainer/branches/Branch_2_0/aop-mc-int/pom.xml)
===================================================================
--- projects/microcontainer/tags/2.0.0.GA/aop-mc-int/pom.xml	                        (rev 0)
+++ projects/microcontainer/tags/2.0.0.GA/aop-mc-int/pom.xml	2008-11-25 13:56:03 UTC (rev 81552)
@@ -0,0 +1,640 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <!--
+    -  AOP Integration module.
+    -  This modules includes 4 different test configurations: weave, no-weave, weave-secure, and no-weave-secure
+    -  By default, none of the configurations will run.  A single test configuration can be called using the
+    -  appropriate profile:
+    -    mvn -Ptests-weave-secure install
+    -  
+    -  All four surefire test configurations can be run using the property aop.tests.all
+    -    mvn -Daop.tests.all install
+    -
+    -  Individual tests can be run by activating the appropriate profiles, then specifying the tests to run
+    -    mvn -Ptests-weave,tests-no-weave-secure -Dtest=TypeDefAopTestCase install
+    -->
+  <parent>
+    <groupId>org.jboss.microcontainer</groupId>
+    <artifactId>jboss-microcontainer</artifactId>
+    <version>2.0.0.GA</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>jboss-aop-mc-int</artifactId>
+  <packaging>jar</packaging>
+  <name>JBoss Microcontainer AOP MC INT</name>
+  <url>http://www.jboss.com/products/jbossmc</url>
+  <description>JBoss Microcontainer</description>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <configuration>
+          <descriptors>
+            <descriptor>src/assembly/impl.xml</descriptor>
+            <descriptor>src/assembly/aspects.xml</descriptor>
+          </descriptors>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>weave</id>
+            <phase>test</phase>
+            <goals>
+              <goal>test</goal>
+            </goals>
+            <configuration>
+              <skip>true</skip>
+              <includes>
+                <include>org/jboss/test/**/*TestCase.java</include>
+              </includes>
+             <useSystemClassLoader>true</useSystemClassLoader>
+              <argLine>-Djava.system.class.loader=org.jboss.aop.standalone.SystemClassLoader</argLine>
+              <reportsDirectory>${project.build.directory}/surefire-reports/weave</reportsDirectory>     
+              <systemProperties>
+                <property>
+                  <name>jboss.aop.exclude</name>
+                  <value>org.jboss.,org.apache.</value>
+                </property>
+                <property>
+                  <name>jboss.aop.include</name>
+                  <value>org.jboss.test.</value>
+                </property>
+                <property>
+                  <name>jboss-junit-configuration</name>
+                  <value>weave</value>
+                </property>
+                <property>
+                  <name>build.testlog</name>
+                  <value>target/log</value>
+                </property>
+                <property>
+                  <name>jboss.aop.verbose</name>
+                  <value>true</value>
+                </property>
+              </systemProperties>
+            </configuration>
+          </execution>
+          <execution>
+            <id>weave-secure</id>
+            <phase>test</phase>
+            <goals>
+              <goal>test</goal>
+            </goals>
+            <configuration>
+              <skip>true</skip>
+              <reportsDirectory>${project.build.directory}/surefire-reports/weave-secure</reportsDirectory>     
+              <includes>
+                <include>org/jboss/test/**/*TestCase.java</include>
+              </includes>
+              <useSystemClassLoader>true</useSystemClassLoader>
+              <argLine>-Djava.system.class.loader=org.jboss.aop.standalone.SystemClassLoader</argLine>
+              <systemProperties>
+                <property>
+                  <name>jboss.aop.exclude</name>
+                  <value>org.jboss.,org.apache.</value>
+                </property>
+                <property>
+                  <name>jboss.aop.include</name>
+                  <value>org.jboss.test.</value>
+                </property>
+                <property>
+                  <name>jboss-junit-configuration</name>
+                  <value>weave</value>
+                </property>
+                <property>
+                  <name>build.testlog</name>
+                  <value>target/log</value>
+                </property>
+                <property>
+                  <name>jboss.mc.secure</name>
+                  <value>true</value>
+                </property>
+              </systemProperties>
+            </configuration>
+          </execution>
+          <execution>
+            <id>no-weave</id>
+            <goals>
+              <goal>test</goal>
+            </goals>
+            <configuration>
+              <skip>true</skip>
+              <reportsDirectory>${project.build.directory}/surefire-reports/no-weave</reportsDirectory>     
+              <includes>
+                <include>org/jboss/test/microcontainer/test/**/*TestCase.java</include>
+                <include>org/jboss/test/microcontainer/beans/test/**/*TestCase.java</include>
+                <include>org/jboss/test/microcontainer/annotatedaop/test/**/*TestCase.java</include>
+              </includes>
+              <systemProperties>
+                <property>
+                  <name>jboss-junit-configuration</name>
+                  <value>no_weave</value>
+                </property>
+                <property>
+                  <name>build.testlog</name>
+                  <value>target/log</value>
+                </property>
+              </systemProperties>
+            </configuration>
+          </execution>
+          <execution>
+            <id>no-weave-secure</id>
+            <goals>
+              <goal>test</goal>
+            </goals>
+            <configuration>
+              <skip>true</skip>
+              <reportsDirectory>${project.build.directory}/surefire-reports/no-weave-secure</reportsDirectory>     
+              <includes>
+                <include>org/jboss/test/microcontainer/test/**/*TestCase.java</include>
+                <include>org/jboss/test/microcontainer/beans/test/**/*TestCase.java</include>
+                <include>org/jboss/test/microcontainer/annotatedaop/test/**/*TestCase.java</include>
+              </includes>
+              <systemProperties>
+                <property>
+                  <name>jboss-junit-configuration</name>
+                  <value>no_weave</value>
+                </property>
+                <property>
+                  <name>build.testlog</name>
+                  <value>target/log</value>
+                </property>
+                <property>
+                  <name>jboss.mc.secure</name>
+                  <value>true</value>
+                </property>
+              </systemProperties>
+            </configuration>
+          </execution>
+        </executions>
+        <configuration>
+          <testFailureIgnore>true</testFailureIgnore>
+          <forkMode>always</forkMode>
+          <redirectTestOutputToFile>true</redirectTestOutputToFile>          
+          <skip>true</skip>
+          <trimStackTrace>false</trimStackTrace>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>org.jboss</groupId>
+        <artifactId>jboss-test</artifactId>
+        <version>${version.org.jboss.test}</version>
+        <scope>compile</scope>
+      </dependency>
+      <dependency>
+        <groupId>junit</groupId>
+        <artifactId>junit</artifactId>
+        <version>${version.junit}</version>
+        <scope>compile</scope>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+  
+  <!-- Do not add version information here, use ../pom.xml instead -->
+  <dependencies>
+    <!-- Global dependencies -->
+    <dependency>
+      <groupId>org.jboss.aop</groupId>
+      <artifactId>jboss-aop</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>ant</groupId>
+          <artifactId>ant</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>apache-xerces</groupId>
+          <artifactId>xml-apis</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>javassist</groupId>
+          <artifactId>javassist</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jboss</groupId>
+          <artifactId>jboss-common-core</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jboss.logging</groupId>
+          <artifactId>jboss-logging-spi</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jboss.logging</groupId>
+          <artifactId>jboss-logging-log4j</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jboss.microcontainer</groupId>
+          <artifactId>jboss-container</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jboss.microcontainer</groupId>
+          <artifactId>jboss-dependency</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.microcontainer</groupId>
+      <artifactId>jboss-kernel</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.man</groupId>
+      <artifactId>jboss-managed</artifactId>
+      <optional>true</optional>
+    </dependency>
+    <dependency>
+      <groupId>javassist</groupId>
+      <artifactId>javassist</artifactId>
+    </dependency>
+    <!-- Test dependencies -->
+    <dependency>
+      <groupId>org.jboss.logging</groupId>
+      <artifactId>jboss-logging-log4j</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.test</groupId>
+      <artifactId>jboss-test</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.microcontainer</groupId>
+      <artifactId>jboss-kernel</artifactId>
+      <type>test-jar</type>
+      <scope>test</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>org.jboss.microcontainer</groupId>
+          <artifactId>jboss-dependency</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.jboss</groupId>
+          <artifactId>jbossxb</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+  </dependencies>
+  
+  <profiles>
+    <profile>
+      <id>tests-weave</id>
+      <activation>
+        <property>
+          <name>aop.tests.all</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>weave</id>
+                <configuration>
+                  <skip>false</skip>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <artifactId>maven-surefire-report-plugin</artifactId>
+            <configuration>
+              <reportsDirectory>${project.build.directory}/surefire-reports/weave</reportsDirectory>
+              <outputName>surefire-report-weave</outputName>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>tests-weave-secure</id>
+      <activation>
+        <property>
+          <name>aop.tests.all</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>weave-secure</id>
+                <configuration>
+                  <skip>false</skip>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <artifactId>maven-surefire-report-plugin</artifactId>
+            <configuration>
+              <reportsDirectory>${project.build.directory}/surefire-reports/weave-secure</reportsDirectory>
+              <outputName>surefire-report-weave-secure</outputName>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>tests-no-weave</id>
+      <activation>
+        <property>
+          <name>aop.tests.all</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>no-weave</id>
+                <configuration>
+                  <skip>false</skip>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <artifactId>maven-surefire-report-plugin</artifactId>
+            <configuration>
+              <reportsDirectory>${project.build.directory}/surefire-reports/no-weave</reportsDirectory>
+              <outputName>surefire-report-no-weave</outputName>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>tests-no-weave-secure</id>
+      <activation>
+        <property>
+          <name>aop.tests.all</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>no-weave-secure</id>
+                <configuration>
+                  <skip>false</skip>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <artifactId>maven-surefire-report-plugin</artifactId>
+            <configuration>
+              <reportsDirectory>${project.build.directory}/surefire-reports/no-weave-secure</reportsDirectory>
+              <outputName>surefire-report-no-weave-secure</outputName>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>ant-tests-weave</id>
+      <activation>
+        <property>
+          <name>ant-tests-weave</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+			      <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-antrun-plugin</artifactId>
+			      <version>1.1</version>
+            <executions>
+              <execution>
+                <id>ant-tests-weave</id>
+                <phase>test</phase>
+                <configuration>
+                  <tasks>
+                    <property name="plugin_classpath" refid="maven.plugin.classpath" />
+					          <echo message="plugin classpath: ${plugin_classpath}" />
+                    <mkdir dir="${project.build.directory}/surefire-reports/ant-weave" />
+                    <property name="build.testlog" value="${project.build.directory}/log" />
+                    <mkdir dir="${build.testlog}" />
+                    <!-- Remove the test.log so each run has a fresh log -->
+                    <delete file="${build.testlog}/test.log" />
+                    <junit dir="${project.build.directory}" printsummary="yes" haltonerror="false" haltonfailure="false" fork="true">
+              
+                       <sysproperty key="jboss.aop.exclude" value="org.jboss.,org.apache." />
+                       <sysproperty key="jboss.aop.include" value="org.jboss.test." />
+                       <sysproperty key="jboss-junit-configuration" value="weave" />
+                       <sysproperty key="build.testlog" value="${build.testlog}" />
+                       <sysproperty key="java.system.class.loader" value="org.jboss.aop.standalone.SystemClassLoader" />
+              
+                       <classpath>
+                          <path refid="maven.test.classpath" />
+                       </classpath>
+              
+                       <formatter type="plain" usefile="true" extension=".txt" />
+                       <formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter" usefile="true" extension=".xml" />
+              
+                       <batchtest todir="${project.build.directory}/surefire-reports/ant-weave" haltonerror="false" haltonfailure="false" fork="true">
+              
+                          <fileset dir="${project.build.directory}/test-classes">
+                             <include name="org/jboss/test/**/*TestCase.class" />
+                          </fileset>
+                       </batchtest>
+                    </junit>
+                  </tasks>
+                </configuration>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+            </executions> 
+            <dependencies>
+              <dependency>
+                <groupId>ant</groupId>
+                <artifactId>ant-junit</artifactId>
+                <version>${version.ant.junit}</version>
+              </dependency>
+              <dependency>
+                <groupId>junit</groupId>
+                <artifactId>junit</artifactId>
+                <version>${version.junit}</version>
+              </dependency>
+            </dependencies>     
+          </plugin>
+          <plugin>
+            <artifactId>maven-surefire-report-plugin</artifactId>
+            <configuration>
+              <reportsDirectory>${project.build.directory}/surefire-reports/ant-weave</reportsDirectory>
+              <outputName>surefire-report-ant-weave</outputName>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>ant-one-test-weave</id>
+      <activation>
+        <property>
+          <name>ant-one-test-weave</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+			      <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-antrun-plugin</artifactId>
+			      <version>1.1</version>
+            <executions>
+              <execution>
+                <id>ant-one-test-weave</id>
+                <phase>test</phase>
+                <configuration>
+                  <tasks>
+                    <property name="plugin_classpath" refid="maven.plugin.classpath" />
+					          <echo message="plugin classpath: ${plugin_classpath}" />
+                    <mkdir dir="${project.build.directory}/surefire-reports/ant-one-weave" />
+                    <property name="build.testlog" value="${project.build.directory}/log" />
+                    <mkdir dir="${build.testlog}" />
+                    <!-- Remove the test.log so each run has a fresh log -->
+                    <delete file="${build.testlog}/test.log" />
+                    <junit dir="${project.build.directory}" printsummary="yes" haltonerror="false" haltonfailure="false" fork="true">
+              
+                       <sysproperty key="jboss.aop.exclude" value="org.jboss.,org.apache." />
+                       <sysproperty key="jboss.aop.include" value="org.jboss.test." />
+                       <sysproperty key="jboss-junit-configuration" value="weave" />
+                       <sysproperty key="build.testlog" value="${build.testlog}" />
+                       <sysproperty key="java.system.class.loader" value="org.jboss.aop.standalone.SystemClassLoader" />
+              
+                       <classpath>
+                          <path refid="maven.test.classpath" />
+                       </classpath>
+              
+                       <formatter type="plain" usefile="true" extension=".txt" />
+                       <formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter" usefile="true" extension=".xml" />
+              
+                       <test todir="${project.build.directory}/surefire-reports/ant-one-weave" name="${test}" haltonerror="false" haltonfailure="false" fork="true" />
+                       
+                    </junit>
+                  </tasks>
+                </configuration>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+            </executions> 
+            <dependencies>
+              <dependency>
+                <groupId>ant</groupId>
+                <artifactId>ant-junit</artifactId>
+                <version>${version.ant.junit}</version>
+              </dependency>
+              <dependency>
+                <groupId>junit</groupId>
+                <artifactId>junit</artifactId>
+                <version>${version.junit}</version>
+              </dependency>
+            </dependencies>     
+          </plugin>
+          <plugin>
+            <artifactId>maven-surefire-report-plugin</artifactId>
+            <configuration>
+              <reportsDirectory>${project.build.directory}/surefire-reports/ant-weave</reportsDirectory>
+              <outputName>surefire-report-ant-weave</outputName>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>ant-tests-weave-secure</id>
+      <activation>
+        <property>
+          <name>ant-tests-weave-secure</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>ant-tests-weave-secure</id>
+                <phase>test</phase>
+                <configuration>
+                  <tasks>
+                    <mkdir dir="${project.build.directory}/surefire-reports/ant-weave-secure" />
+                    <property name="build.testlog" value="${project.build.directory}/log" />
+                    <mkdir dir="${build.testlog}" />
+                    <!-- Remove the test.log so each run has a fresh log -->
+                    <delete file="${build.testlog}/test.log" />
+                    <junit dir="${project.build.directory}" printsummary="yes" haltonerror="false" haltonfailure="false" fork="true">
+              
+                       <sysproperty key="jboss.aop.exclude" value="org.jboss.,org.apache." />
+                       <sysproperty key="jboss.aop.include" value="org.jboss.test." />
+                       <sysproperty key="jboss-junit-configuration" value="weave-secure" />
+                       <sysproperty key="build.testlog" value="${build.testlog}" />
+                       <sysproperty key="java.system.class.loader" value="org.jboss.aop.standalone.SystemClassLoader" />
+                       <sysproperty key="jboss.mc.secure" value="true" />
+              
+                       <classpath>
+                          <path refid="maven.test.classpath" />
+                       </classpath>
+              
+                       <formatter type="plain" usefile="true" extension=".txt" />
+                       <formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter" usefile="true" extension=".xml" />
+              
+                       <batchtest todir="${project.build.directory}/surefire-reports/ant-weave-secure" haltonerror="false" haltonfailure="false" fork="true">
+              
+                          <fileset dir="${project.build.directory}/test-classes">
+                             <include name="org/jboss/test/**/*TestCase.class" />
+                          </fileset>
+                       </batchtest>
+                    </junit>
+                  </tasks>
+                </configuration>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+            </executions> 
+            <dependencies>
+              <dependency>
+                <groupId>ant</groupId>
+                <artifactId>ant-junit</artifactId>
+                <version>${version.ant.junit}</version>
+              </dependency>
+              <dependency>
+                <groupId>junit</groupId>
+                <artifactId>junit</artifactId>
+                <version>${version.junit}</version>
+              </dependency>
+            </dependencies>     
+          </plugin>
+          <plugin>
+            <artifactId>maven-surefire-report-plugin</artifactId>
+            <configuration>
+              <reportsDirectory>${project.build.directory}/surefire-reports/ant-weave-secure</reportsDirectory>
+              <outputName>surefire-report-ant-weave-secure</outputName>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+</project>

Deleted: projects/microcontainer/tags/2.0.0.GA/build/pom.xml
===================================================================
--- projects/microcontainer/branches/Branch_2_0/build/pom.xml	2008-11-25 08:40:28 UTC (rev 81534)
+++ projects/microcontainer/tags/2.0.0.GA/build/pom.xml	2008-11-25 13:56:03 UTC (rev 81552)
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  This pom functions as a default configuration.  The subproject
-  poms each inherit configuration from this one.
-
-  When adding version information for an artifact please do the following
-  - add a version property for the specific version
-  - add a dependency in the dependencyManagement section which refers to
-    the property
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <parent>
-    <groupId>org.jboss.microcontainer</groupId>
-    <artifactId>jboss-microcontainer</artifactId>
-    <version>2.0.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>org.jboss.microcontainer</groupId>
-  <artifactId>jboss-microcontainer-combined</artifactId>
-  <version>2.0.0-SNAPSHOT</version>
-  <packaging>pom</packaging>
-  <name>JBoss Microcontainer Combined Assembly</name>
-  <description>
-    The JBoss Microcontainer provides a lightweight container for managing POJOs, their deployment
-    and configuration.
-  </description>
-
-  <profiles>
-    <profile>
-      <id>assembly</id>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-assembly-plugin</artifactId>
-            <version>2.2-beta-2</version>
-            <executions>
-              <execution>
-                <id>make-assembly</id>
-                <phase>package</phase>
-                <goals>
-                  <goal>attached</goal>
-                </goals>
-                <configuration>
-                  <finalName>jboss-microcontainer-${project.version}</finalName>
-                  <descriptors>
-                    <descriptor>src/assembly/dist.xml</descriptor>
-                    <descriptor>src/assembly/src.xml</descriptor>
-                  </descriptors>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-  </profiles>
-
-</project>

Copied: projects/microcontainer/tags/2.0.0.GA/build/pom.xml (from rev 81551, projects/microcontainer/branches/Branch_2_0/build/pom.xml)
===================================================================
--- projects/microcontainer/tags/2.0.0.GA/build/pom.xml	                        (rev 0)
+++ projects/microcontainer/tags/2.0.0.GA/build/pom.xml	2008-11-25 13:56:03 UTC (rev 81552)
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  This pom functions as a default configuration.  The subproject
+  poms each inherit configuration from this one.
+
+  When adding version information for an artifact please do the following
+  - add a version property for the specific version
+  - add a dependency in the dependencyManagement section which refers to
+    the property
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <groupId>org.jboss.microcontainer</groupId>
+    <artifactId>jboss-microcontainer</artifactId>
+    <version>2.0.0.GA</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.jboss.microcontainer</groupId>
+  <artifactId>jboss-microcontainer-combined</artifactId>
+  <version>2.0.0.GA</version>
+  <packaging>pom</packaging>
+  <name>JBoss Microcontainer Combined Assembly</name>
+  <description>
+    The JBoss Microcontainer provides a lightweight container for managing POJOs, their deployment
+    and configuration.
+  </description>
+
+  <profiles>
+    <profile>
+      <id>assembly</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-assembly-plugin</artifactId>
+            <version>2.2-beta-2</version>
+            <executions>
+              <execution>
+                <id>make-assembly</id>
+                <phase>package</phase>
+                <goals>
+                  <goal>attached</goal>
+                </goals>
+                <configuration>
+                  <finalName>jboss-microcontainer-${project.version}</finalName>
+                  <descriptors>
+                    <descriptor>src/assembly/dist.xml</descriptor>
+                    <descriptor>src/assembly/src.xml</descriptor>
+                  </descriptors>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+
+</project>

Deleted: projects/microcontainer/tags/2.0.0.GA/dependency/pom.xml
===================================================================
--- projects/microcontainer/branches/Branch_2_0/dependency/pom.xml	2008-11-25 08:40:28 UTC (rev 81534)
+++ projects/microcontainer/tags/2.0.0.GA/dependency/pom.xml	2008-11-25 13:56:03 UTC (rev 81552)
@@ -1,84 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <parent>
-    <groupId>org.jboss.microcontainer</groupId>
-    <artifactId>jboss-microcontainer</artifactId>
-    <version>2.0.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>jboss-dependency</artifactId>
-  <packaging>jar</packaging>
-  <name>JBoss Microcontainer Dependency</name>
-  <url>http://www.jboss.com/products/jbossmc</url>
-  <description>JBoss Microcontainer Dependency</description>
-  <scm>
-    <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/microcontainer/branches/Branch_2_0/dependency</connection>
-    <developerConnection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/microcontainer/branches/Branch_2_0/dependency</developerConnection>
-    <url>http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/microcontainer/branches/Branch_2_0/dependency</url>
-  </scm>
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <configuration>
-          <descriptors>
-            <descriptor>src/assembly/spi.xml</descriptor>
-            <descriptor>src/assembly/plugins.xml</descriptor>
-          </descriptors>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <excludes>
-            <exclude>**/AbstractDependencyTest*</exclude>
-            <exclude>**/TestControllerContext*</exclude>
-            <exclude>**/TestDelegate*</exclude>
-          </excludes>
-          <redirectTestOutputToFile>true</redirectTestOutputToFile>
-       </configuration>
-      </plugin>
-    </plugins>
-  </build>
-  
-  <!-- Do not add version information here, use ../pom.xml instead -->
-  <dependencies>
-    <!-- Global dependencies -->
-    <dependency>
-      <groupId>org.jboss</groupId>
-      <artifactId>jbossxb</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss</groupId>
-      <artifactId>jboss-reflect</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss</groupId>
-      <artifactId>jboss-mdr</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.logging</groupId>
-      <artifactId>jboss-logging-spi</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss</groupId>
-      <artifactId>jboss-common-core</artifactId>
-    </dependency>
-    <!-- Test dependencies -->
-    <dependency>
-      <groupId>org.jboss.logging</groupId>
-      <artifactId>jboss-logging-log4j</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.test</groupId>
-      <artifactId>jboss-test</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-</project>

Copied: projects/microcontainer/tags/2.0.0.GA/dependency/pom.xml (from rev 81551, projects/microcontainer/branches/Branch_2_0/dependency/pom.xml)
===================================================================
--- projects/microcontainer/tags/2.0.0.GA/dependency/pom.xml	                        (rev 0)
+++ projects/microcontainer/tags/2.0.0.GA/dependency/pom.xml	2008-11-25 13:56:03 UTC (rev 81552)
@@ -0,0 +1,84 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <groupId>org.jboss.microcontainer</groupId>
+    <artifactId>jboss-microcontainer</artifactId>
+    <version>2.0.0.GA</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>jboss-dependency</artifactId>
+  <packaging>jar</packaging>
+  <name>JBoss Microcontainer Dependency</name>
+  <url>http://www.jboss.com/products/jbossmc</url>
+  <description>JBoss Microcontainer Dependency</description>
+  <scm>
+    <connection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/microcontainer/tags/2.0.0.GAdependency</connection>
+    <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/microcontainer/tags/2.0.0.GAdependency</developerConnection>
+    <url>scm:svn:https://svn.jboss.org/repos/jbossas/projects/microcontainer/tags/2.0.0.GAdependency</url>
+  </scm>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <configuration>
+          <descriptors>
+            <descriptor>src/assembly/spi.xml</descriptor>
+            <descriptor>src/assembly/plugins.xml</descriptor>
+          </descriptors>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <excludes>
+            <exclude>**/AbstractDependencyTest*</exclude>
+            <exclude>**/TestControllerContext*</exclude>
+            <exclude>**/TestDelegate*</exclude>
+          </excludes>
+          <redirectTestOutputToFile>true</redirectTestOutputToFile>
+       </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  
+  <!-- Do not add version information here, use ../pom.xml instead -->
+  <dependencies>
+    <!-- Global dependencies -->
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jbossxb</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-reflect</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-mdr</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.logging</groupId>
+      <artifactId>jboss-logging-spi</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-common-core</artifactId>
+    </dependency>
+    <!-- Test dependencies -->
+    <dependency>
+      <groupId>org.jboss.logging</groupId>
+      <artifactId>jboss-logging-log4j</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.test</groupId>
+      <artifactId>jboss-test</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>

Deleted: projects/microcontainer/tags/2.0.0.GA/guice-int/pom.xml
===================================================================
--- projects/microcontainer/branches/Branch_2_0/guice-int/pom.xml	2008-11-25 08:40:28 UTC (rev 81534)
+++ projects/microcontainer/tags/2.0.0.GA/guice-int/pom.xml	2008-11-25 13:56:03 UTC (rev 81552)
@@ -1,47 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <parent>
-    <groupId>org.jboss.microcontainer</groupId>
-    <artifactId>jboss-microcontainer</artifactId>
-    <version>2.0.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>jboss-guice-int</artifactId>
-  <packaging>jar</packaging>
-  <name>JBoss Microcontainer Guice Int</name>
-  <url>http://www.jboss.com/products/jbossmc</url>
-  <description>JBoss Microcontainer Guice Int</description>
-
-  <!-- Do not add version information here, use ../pom.xml instead -->
-  <dependencies>
-    <!-- Global dependencies -->
-    <dependency>
-      <groupId>com.google.code.guice</groupId>
-      <artifactId>guice</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.microcontainer</groupId>
-      <artifactId>jboss-kernel</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.man</groupId>
-      <artifactId>jboss-managed</artifactId>
-      <optional>true</optional>
-    </dependency>
-    <!-- Test dependencies -->
-    <dependency>
-      <groupId>org.jboss.logging</groupId>
-      <artifactId>jboss-logging-log4j</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.test</groupId>
-      <artifactId>jboss-test</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-</project>

Copied: projects/microcontainer/tags/2.0.0.GA/guice-int/pom.xml (from rev 81551, projects/microcontainer/branches/Branch_2_0/guice-int/pom.xml)
===================================================================
--- projects/microcontainer/tags/2.0.0.GA/guice-int/pom.xml	                        (rev 0)
+++ projects/microcontainer/tags/2.0.0.GA/guice-int/pom.xml	2008-11-25 13:56:03 UTC (rev 81552)
@@ -0,0 +1,47 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <groupId>org.jboss.microcontainer</groupId>
+    <artifactId>jboss-microcontainer</artifactId>
+    <version>2.0.0.GA</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>jboss-guice-int</artifactId>
+  <packaging>jar</packaging>
+  <name>JBoss Microcontainer Guice Int</name>
+  <url>http://www.jboss.com/products/jbossmc</url>
+  <description>JBoss Microcontainer Guice Int</description>
+
+  <!-- Do not add version information here, use ../pom.xml instead -->
+  <dependencies>
+    <!-- Global dependencies -->
+    <dependency>
+      <groupId>com.google.code.guice</groupId>
+      <artifactId>guice</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.microcontainer</groupId>
+      <artifactId>jboss-kernel</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.man</groupId>
+      <artifactId>jboss-managed</artifactId>
+      <optional>true</optional>
+    </dependency>
+    <!-- Test dependencies -->
+    <dependency>
+      <groupId>org.jboss.logging</groupId>
+      <artifactId>jboss-logging-log4j</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.test</groupId>
+      <artifactId>jboss-test</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>

Deleted: projects/microcontainer/tags/2.0.0.GA/kernel/pom.xml
===================================================================
--- projects/microcontainer/branches/Branch_2_0/kernel/pom.xml	2008-11-25 08:40:28 UTC (rev 81534)
+++ projects/microcontainer/tags/2.0.0.GA/kernel/pom.xml	2008-11-25 13:56:03 UTC (rev 81552)
@@ -1,102 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <parent>
-    <groupId>org.jboss.microcontainer</groupId>
-    <artifactId>jboss-microcontainer</artifactId>
-    <version>2.0.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>jboss-kernel</artifactId>
-  <packaging>jar</packaging>
-  <name>JBoss Microcontainer Kernel</name>
-  <url>http://www.jboss.com/products/jbossmc</url>
-  <description>JBoss Microcontainer Kernel</description>  
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <executions>
-          <execution>
-            <goals>
-              <goal>test-jar</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <!--configuration>
-          <testFailureIgnore>true</testFailureIgnore>
-        </configuration-->
-      </plugin>   	   
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <configuration>
-          <descriptors>
-            <descriptor>src/assembly/spi.xml</descriptor>
-            <descriptor>src/assembly/plugins.xml</descriptor>
-            <descriptor>src/assembly/annotations.xml</descriptor>
-          </descriptors>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-  
-  <dependencyManagement>
-    <dependencies>
-      <dependency>
-        <groupId>org.jboss.test</groupId>
-        <artifactId>jboss-test</artifactId>
-        <version>${version.org.jboss.test}</version>
-        <scope>compile</scope>
-      </dependency>
-      <dependency>
-        <groupId>junit</groupId>
-        <artifactId>junit</artifactId>
-        <version>${version.junit}</version>
-        <scope>compile</scope>
-      </dependency>
-    </dependencies>
-  </dependencyManagement>
-  
-  <!-- Do not add version information here, use ../pom.xml instead -->
-  <dependencies>
-    <!-- Global dependencies -->
-    <dependency>
-      <groupId>org.jboss.microcontainer</groupId>
-      <artifactId>jboss-dependency</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.man</groupId>
-      <artifactId>jboss-managed</artifactId>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>javassist</groupId>
-      <artifactId>javassist</artifactId>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss</groupId>
-      <artifactId>jbossxb</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.test</groupId>
-      <artifactId>jboss-test</artifactId>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <optional>true</optional>
-    </dependency>
-    <!-- Test dependencies -->
-    <dependency>
-      <groupId>org.jboss.logging</groupId>
-      <artifactId>jboss-logging-log4j</artifactId>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-</project>

Copied: projects/microcontainer/tags/2.0.0.GA/kernel/pom.xml (from rev 81551, projects/microcontainer/branches/Branch_2_0/kernel/pom.xml)
===================================================================
--- projects/microcontainer/tags/2.0.0.GA/kernel/pom.xml	                        (rev 0)
+++ projects/microcontainer/tags/2.0.0.GA/kernel/pom.xml	2008-11-25 13:56:03 UTC (rev 81552)
@@ -0,0 +1,102 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <groupId>org.jboss.microcontainer</groupId>
+    <artifactId>jboss-microcontainer</artifactId>
+    <version>2.0.0.GA</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>jboss-kernel</artifactId>
+  <packaging>jar</packaging>
+  <name>JBoss Microcontainer Kernel</name>
+  <url>http://www.jboss.com/products/jbossmc</url>
+  <description>JBoss Microcontainer Kernel</description>  
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>test-jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <!--configuration>
+          <testFailureIgnore>true</testFailureIgnore>
+        </configuration-->
+      </plugin>   	   
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <configuration>
+          <descriptors>
+            <descriptor>src/assembly/spi.xml</descriptor>
+            <descriptor>src/assembly/plugins.xml</descriptor>
+            <descriptor>src/assembly/annotations.xml</descriptor>
+          </descriptors>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>org.jboss.test</groupId>
+        <artifactId>jboss-test</artifactId>
+        <version>${version.org.jboss.test}</version>
+        <scope>compile</scope>
+      </dependency>
+      <dependency>
+        <groupId>junit</groupId>
+        <artifactId>junit</artifactId>
+        <version>${version.junit}</version>
+        <scope>compile</scope>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+  
+  <!-- Do not add version information here, use ../pom.xml instead -->
+  <dependencies>
+    <!-- Global dependencies -->
+    <dependency>
+      <groupId>org.jboss.microcontainer</groupId>
+      <artifactId>jboss-dependency</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.man</groupId>
+      <artifactId>jboss-managed</artifactId>
+      <optional>true</optional>
+    </dependency>
+    <dependency>
+      <groupId>javassist</groupId>
+      <artifactId>javassist</artifactId>
+      <optional>true</optional>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jbossxb</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.test</groupId>
+      <artifactId>jboss-test</artifactId>
+      <optional>true</optional>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <optional>true</optional>
+    </dependency>
+    <!-- Test dependencies -->
+    <dependency>
+      <groupId>org.jboss.logging</groupId>
+      <artifactId>jboss-logging-log4j</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>

Deleted: projects/microcontainer/tags/2.0.0.GA/kernel/src/main/java/org/jboss/beans/metadata/plugins/AbstractBeanMetaData.java
===================================================================
--- projects/microcontainer/branches/Branch_2_0/kernel/src/main/java/org/jboss/beans/metadata/plugins/AbstractBeanMetaData.java	2008-11-25 08:40:28 UTC (rev 81534)
+++ projects/microcontainer/tags/2.0.0.GA/kernel/src/main/java/org/jboss/beans/metadata/plugins/AbstractBeanMetaData.java	2008-11-25 13:56:03 UTC (rev 81552)
@@ -1,853 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.beans.metadata.plugins;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlTransient;
-import javax.xml.bind.annotation.XmlType;
-
-import org.jboss.beans.info.spi.BeanAccessMode;
-import org.jboss.beans.metadata.api.model.AutowireType;
-import static org.jboss.beans.metadata.plugins.CloneUtil.cloneCollection;
-import static org.jboss.beans.metadata.plugins.CloneUtil.cloneObject;
-import org.jboss.beans.metadata.spi.AliasMetaData;
-import org.jboss.beans.metadata.spi.BeanMetaData;
-import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
-import org.jboss.beans.metadata.spi.CallbackMetaData;
-import org.jboss.beans.metadata.spi.ClassLoaderMetaData;
-import org.jboss.beans.metadata.spi.ConstructorMetaData;
-import org.jboss.beans.metadata.spi.DemandMetaData;
-import org.jboss.beans.metadata.spi.DependencyMetaData;
-import org.jboss.beans.metadata.spi.InstallMetaData;
-import org.jboss.beans.metadata.spi.LifecycleMetaData;
-import org.jboss.beans.metadata.spi.MetaDataVisitor;
-import org.jboss.beans.metadata.spi.MetaDataVisitorNode;
-import org.jboss.beans.metadata.spi.PropertyMetaData;
-import org.jboss.beans.metadata.spi.SupplyMetaData;
-import org.jboss.beans.metadata.spi.RelatedClassMetaData;
-import org.jboss.dependency.plugins.AbstractDependencyItem;
-import org.jboss.dependency.spi.Controller;
-import org.jboss.dependency.spi.ControllerContext;
-import org.jboss.dependency.spi.ControllerMode;
-import org.jboss.dependency.spi.ControllerState;
-import org.jboss.dependency.spi.DependencyItem;
-import org.jboss.dependency.spi.ErrorHandlingMode;
-import org.jboss.kernel.spi.dependency.KernelControllerContext;
-import org.jboss.managed.api.annotation.ManagementObject;
-import org.jboss.managed.api.annotation.ManagementProperties;
-import org.jboss.managed.api.annotation.ManagementProperty;
-import org.jboss.reflect.spi.TypeInfo;
-import org.jboss.util.JBossObject;
-import org.jboss.util.JBossStringBuilder;
-
-/**
- * Metadata for a bean.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- * @version $Revision$
- */
- at ManagementObject(properties = ManagementProperties.EXPLICIT) // TODO - explicitly add props we want to manage
- at XmlRootElement(name="bean")
- at XmlType(name="beanType", propOrder={"aliasMetaData", "related", "annotations", "classLoader", "constructor", "properties", "create", "start", "stop", "destroy", "depends", "demands", "supplies", "installs", "uninstalls", "installCallbacks", "uninstallCallbacks"})
-public class AbstractBeanMetaData extends AbstractFeatureMetaData
-   implements BeanMetaData, BeanMetaDataFactory, MutableLifecycleHolder, Serializable
-{
-   private static final long serialVersionUID = 4L;
-
-   /** The bean fully qualified class name */
-   protected String bean;
-
-   /** The name of this instance */
-   protected String name;
-
-   /** The related */
-   protected Set<RelatedClassMetaData> related;
-
-   /** The aliases */
-   protected Set<Object> aliases;
-
-   /** The alias metadata */
-   protected Set<AliasMetaData> aliasMetaData;
-
-   /** The parent */
-   protected String parent;
-
-   /** Is abstract */
-   protected boolean isAbstract; 
-
-   /** Autowire type */
-   protected AutowireType autowireType;
-
-   /** The mode */
-   protected ControllerMode mode;
-
-   /** The error handling mode */
-   protected ErrorHandlingMode errorHandlingMode;
-
-   /** The access mode */
-   protected BeanAccessMode accessMode;
-
-   /** Is contextual injection candidate */
-   protected boolean autowireCandidate = true;
-
-   /** The properties configuration Set<PropertyMetaData> */
-   private Set<PropertyMetaData> properties;
-
-   /** The bean ClassLoader */
-   protected ClassLoaderMetaData classLoader;
-
-   /** The constructor */
-   protected ConstructorMetaData constructor;
-
-   /** The create lifecycle */
-   protected LifecycleMetaData create;
-
-   /** The start lifecycle */
-   protected LifecycleMetaData start;
-
-   /** The stop lifecycle */
-   protected LifecycleMetaData stop;
-
-   /** The destroy lifecycle */
-   protected LifecycleMetaData destroy;
-
-   /** What the bean demands Set<DemandMetaData> */
-   protected Set<DemandMetaData> demands;
-
-   /** What the bean supplies Set<SupplyMetaData> */
-   protected Set<SupplyMetaData> supplies;
-
-   /** What the bean dependencies Set<DependencyMetaData> */
-   protected Set<DependencyMetaData> depends;
-
-   /** The install operations List<InstallMetaData> */
-   protected List<InstallMetaData> installs;
-
-   /** The uninstall operations List<InstallMetaData> */
-   protected List<InstallMetaData> uninstalls;
-
-   /** The install callback List<InstallMetaData> */
-   protected List<CallbackMetaData> installCallbacks;
-
-   /** The uninstall callback List<InstallMetaData> */
-   protected List<CallbackMetaData> uninstallCallbacks;
-
-   /** The context */
-   protected transient ControllerContext context;
-
-   /**
-    * Create a new bean meta data
-    */
-   public AbstractBeanMetaData()
-   {
-      super();
-   }
-
-   /**
-    * Create a new bean meta data
-    *
-    * @param bean the bean class name
-    */
-   public AbstractBeanMetaData(String bean)
-   {
-      this.bean = bean;
-   }
-   /**
-    * Create a new bean meta data
-    *
-    * @param name the name
-    * @param bean the bean class name
-    */
-   public AbstractBeanMetaData(String name, String bean)
-   {
-      this.name = name;
-      this.bean = bean;
-   }
-
-   public List<BeanMetaData> getBeans()
-   {
-      NestedBeanHandler handler = createNestedBeanHandler();
-      return handler.checkForNestedBeans();
-   }
-
-   /**
-    * Create nested bean handler.
-    * Can be overridden to change generateName policy.
-    *
-    * @return nested bean handler
-    */
-   protected NestedBeanHandler createNestedBeanHandler()
-   {
-      return new NestedBeanHandler(this);
-   }
-
-   /**
-    * Get the bean class name.
-    * @return the fully qualified bean class name.
-    */
-   public String getBean()
-   {
-      return bean;
-   }
-
-   /**
-    * Set the bean class name and flush the object cache.
-    *
-    * @param bean The bean class name to set.
-    */
-   @XmlAttribute(name="class")
-   public void setBean(String bean)
-   {
-      this.bean = bean;
-      flushJBossObjectCache();
-   }
-
-   /**
-    * Get a property
-    *
-    * @param name the name
-    * @return the property name
-    */
-   public PropertyMetaData getProperty(String name)
-   {
-      if (name == null)
-         throw new IllegalArgumentException("Null name");
-      if (properties != null && properties.size() > 0)
-      {
-         for (PropertyMetaData prop : properties)
-         {
-            if (name.equals(prop.getName()))
-               return prop;
-         }
-      }
-      return null;
-   }
-
-   /**
-    * Add a property
-    *
-    * @param property the property
-    */
-   public void addProperty(PropertyMetaData property)
-   {
-      if (property == null)
-         throw new IllegalArgumentException("Null property");
-      if (properties == null)
-         properties = new HashSet<PropertyMetaData>();
-      properties.add(property);
-      flushJBossObjectCache();
-   }
-
-   /**
-    * Set the propertiess.
-    *
-    * @param properties Set<PropertyMetaData>
-    */
-   @ManagementProperty(managed=true) // TODO - this ok? 
-   @XmlElement(name="property", type=AbstractPropertyMetaData.class)
-   public void setProperties(Set<PropertyMetaData> properties)
-   {
-      this.properties = properties;
-      flushJBossObjectCache();
-   }
-
-   public ClassLoaderMetaData getClassLoader()
-   {
-      return classLoader;
-   }
-
-   @XmlElement(name="classloader", type=AbstractClassLoaderMetaData.class)
-   public void setClassLoader(ClassLoaderMetaData classLoader)
-   {
-      this.classLoader = classLoader;
-   }
-
-   /**
-    * Set the constructor
-    *
-    * @param constructor the constructor metadata
-    */
-   @XmlElement(name="constructor", type=AbstractConstructorMetaData.class)
-   public void setConstructor(ConstructorMetaData constructor)
-   {
-      this.constructor = constructor;
-   }
-
-   /**
-    * Set what the bean demands.
-    *
-    * @param demands Set<DemandMetaData>
-    */
-   @XmlElement(name="demand", type=AbstractDemandMetaData.class)
-   public void setDemands(Set<DemandMetaData> demands)
-   {
-      this.demands = demands;
-      flushJBossObjectCache();
-   }
-
-   /**
-    * Set what the bean supplies.
-    *
-    * @param supplies Set<SupplyMetaData>
-    */
-   @XmlElement(name="supply", type=AbstractSupplyMetaData.class)
-   public void setSupplies(Set<SupplyMetaData> supplies)
-   {
-      this.supplies = supplies;
-      flushJBossObjectCache();
-   }
-
-   /**
-    * Set what the bean depends.
-    *
-    * @param depends Set<DependencyMetaData>
-    */
-   @XmlElement(name="depends", type=AbstractDependencyMetaData.class)
-   public void setDepends(Set<DependencyMetaData> depends)
-   {
-      this.depends = depends;
-      flushJBossObjectCache();
-   }
-
-   public String getName()
-   {
-      return name;
-   }
-
-   /**
-    * Set the name.
-    *
-    * @param name The name to set.
-    */
-   @XmlAttribute
-   public void setName(String name)
-   {
-      this.name = name;
-      flushJBossObjectCache();
-   }
-
-   public Set<RelatedClassMetaData> getRelated()
-   {
-      return related;
-   }
-
-   @XmlElement(name="related-class", type=AbstractRelatedClassMetaData.class)
-   public void setRelated(Set<RelatedClassMetaData> related)
-   {
-      this.related = related;
-   }
-
-   public Set<Object> getAliases()
-   {
-      return aliases;
-   }
-
-   @XmlTransient
-   public void setAliases(Set<Object> aliases)
-   {
-      this.aliases = aliases;
-   }
-
-   public Set<AliasMetaData> getAliasMetaData()
-   {
-      return aliasMetaData;
-   }
-   
-   @XmlElement(name="alias", type=AbstractAliasMetaData.class)
-   public void setAliasMetaData(Set<AliasMetaData> aliases)
-   {
-      this.aliasMetaData = aliases;
-   }
-   
-   public String getParent()
-   {
-      return parent;
-   }
-
-   /**
-    * Set the parent.
-    *
-    * @param parent the parent name
-    */
-   @XmlAttribute
-   public void setParent(String parent)
-   {
-      this.parent = parent;
-   }
-
-   public boolean isAbstract()
-   {
-      return isAbstract;
-   }
-
-   /**
-    * Set abstract.
-    *
-    * @param anAbstract is abstract
-    */
-   @XmlAttribute
-   public void setAbstract(boolean anAbstract)
-   {
-      isAbstract = anAbstract;
-   }
-
-   public AutowireType getAutowireType()
-   {
-      return autowireType;
-   }
-
-   /**
-    * Set autowire type.
-    *
-    * @param autowireType the type
-    */
-   @XmlAttribute(name="autowire-type")
-   public void setAutowireType(AutowireType autowireType)
-   {
-      this.autowireType = autowireType;
-   }
-
-   public ControllerMode getMode()
-   {
-      return mode;
-   }
-
-   @XmlAttribute
-   public void setMode(ControllerMode mode)
-   {
-      this.mode = mode;
-      flushJBossObjectCache();
-   }
-
-   public ErrorHandlingMode getErrorHandlingMode()
-   {
-      return errorHandlingMode;
-   }
-
-   @XmlAttribute(name="error-handling")
-   public void setErrorHandlingMode(ErrorHandlingMode errorHandlingMode)
-   {
-      this.errorHandlingMode = errorHandlingMode;
-   }
-
-   public BeanAccessMode getAccessMode()
-   {
-      return accessMode;
-   }
-
-   @XmlAttribute(name="access-mode")
-   public void setAccessMode(BeanAccessMode accessMode)
-   {
-      this.accessMode = accessMode;
-   }
-
-   public boolean isAutowireCandidate()
-   {
-      return autowireCandidate;
-   }
-
-   @XmlAttribute(name="autowire-candidate")
-   public void setAutowireCandidate(boolean autowireCandidate)
-   {
-      this.autowireCandidate = autowireCandidate;
-   }
-
-   public Set<PropertyMetaData> getProperties()
-   {
-      return properties;
-   }
-
-   public ConstructorMetaData getConstructor()
-   {
-      return constructor;
-   }
-
-   public LifecycleMetaData getCreate()
-   {
-      return create;
-   }
-
-   /**
-    * Set the lifecycle metadata
-    *
-    * @param lifecycle the lifecycle metadata
-    */
-   @XmlElement(name="create", type=AbstractLifecycleMetaData.class)
-   public void setCreate(LifecycleMetaData lifecycle)
-   {
-      if (lifecycle != null)
-         lifecycle.setState(ControllerState.CREATE);
-      this.create = lifecycle;
-   }
-
-   public LifecycleMetaData getStart()
-   {
-      return start;
-   }
-
-   /**
-    * Set the start metadata
-    *
-    * @param lifecycle the lifecycle metadata
-    */
-   @XmlElement(name="start", type=AbstractLifecycleMetaData.class)
-   public void setStart(LifecycleMetaData lifecycle)
-   {
-      if (lifecycle != null)
-         lifecycle.setState(ControllerState.START);
-      this.start = lifecycle;
-   }
-
-   public LifecycleMetaData getStop()
-   {
-      return stop;
-   }
-
-   /**
-    * Set the stop metadata
-    *
-    * @param lifecycle the lifecycle metadata
-    */
-   @XmlElement(name="stop", type=AbstractLifecycleMetaData.class)
-   public void setStop(LifecycleMetaData lifecycle)
-   {
-      if (lifecycle != null)
-         lifecycle.setState(ControllerState.START);
-      this.stop = lifecycle;
-   }
-
-   public LifecycleMetaData getDestroy()
-   {
-      return destroy;
-   }
-
-   /**
-    * Set the destroy metadata
-    *
-    * @param lifecycle the lifecycle metadata
-    */
-   @XmlElement(name="destroy", type=AbstractLifecycleMetaData.class)
-   public void setDestroy(LifecycleMetaData lifecycle)
-   {
-      if (lifecycle != null)
-         lifecycle.setState(ControllerState.CREATE);
-      this.destroy = lifecycle;
-   }
-
-   public Set<DemandMetaData> getDemands()
-   {
-      return demands;
-   }
-
-   public Set<SupplyMetaData> getSupplies()
-   {
-      return supplies;
-   }
-
-   public Set<DependencyMetaData> getDepends()
-   {
-      return depends;
-   }
-
-   public List<InstallMetaData> getInstalls()
-   {
-      return installs;
-   }
-
-   /**
-    * Set the installs
-    *
-    * @param installs List<InstallMetaData>
-    */
-   @XmlElement(name="install", type=AbstractInstallMetaData.class)
-   public void setInstalls(List<InstallMetaData> installs)
-   {
-      this.installs = installs;
-      flushJBossObjectCache();
-   }
-
-   public List<InstallMetaData> getUninstalls()
-   {
-      return uninstalls;
-   }
-
-   /**
-    * Set the uninstalls
-    *
-    * @param uninstalls List<InstallMetaData>
-    */
-   @XmlElement(name="uninstall", type=AbstractInstallMetaData.class)
-   public void setUninstalls(List<InstallMetaData> uninstalls)
-   {
-      this.uninstalls = uninstalls;
-      flushJBossObjectCache();
-   }
-
-   public List<CallbackMetaData> getInstallCallbacks()
-   {
-      return installCallbacks;
-   }
-
-   @XmlElement(name="incallback", type=InstallCallbackMetaData.class)
-   public void setInstallCallbacks(List<CallbackMetaData> installCallbacks)
-   {
-      this.installCallbacks = installCallbacks;
-      flushJBossObjectCache();
-   }
-
-   public List<CallbackMetaData> getUninstallCallbacks()
-   {
-      return uninstallCallbacks;
-   }
-
-   @XmlElement(name="uncallback", type=UninstallCallbackMetaData.class)
-   public void setUninstallCallbacks(List<CallbackMetaData> uninstallCallbacks)
-   {
-      this.uninstallCallbacks = uninstallCallbacks;
-      flushJBossObjectCache();
-   }
-
-   public void initialVisit(MetaDataVisitor visitor)
-   {
-      if (getBean() == null && isAbstract() == false && getParent() == null)
-      {
-         ConstructorMetaData constructor = getConstructor();
-         if (constructor == null)
-            throw new IllegalArgumentException("Bean should have a class attribute or a constructor element.");
-         if (constructor.getFactoryMethod() == null)
-         {
-            if (constructor.getValue() == null)
-               throw new IllegalArgumentException("Bean should have a class attribute or the constructor element should have either a factoryMethod attribute or embedded value.");
-         }
-         else if (constructor.getFactory() == null && constructor.getFactoryClass() == null)
-            throw new IllegalArgumentException("Bean should have a class attribute or the constructor element should have one of a factoryClass attribute or a factory element, or embedded value.");
-      }
-
-      KernelControllerContext ctx = visitor.getControllerContext();
-      if (ctx.getBeanMetaData() == this)
-         context = ctx;
-      boolean isInnerBean = visitor.visitorNodeStack().isEmpty() == false;
-      if (isInnerBean)
-      {
-         Object name = ctx.getName();
-         Object iDependOn = getUnderlyingValue();
-         ControllerState whenRequired = visitor.getContextState();
-         DependencyItem di = new AbstractDependencyItem(name, iDependOn, whenRequired, ControllerState.INSTALLED);
-         visitor.addDependency(di);
-      }
-      if (create != null && create.getMethodName() == null)
-         create.setMethodName("create");
-      if (start != null && start.getMethodName() == null)
-         start.setMethodName("start");
-      if (stop != null && stop.getMethodName() == null)
-         stop.setMethodName("stop");
-      if (destroy != null && destroy.getMethodName() == null)
-         destroy.setMethodName("destroy");
-      super.initialVisit(visitor);
-   }
-
-   protected void addChildren(Set<MetaDataVisitorNode> children)
-   {
-      super.addChildren(children);
-      if (classLoader != null && classLoader.getClassLoader() != this)
-         children.add(classLoader);
-      if (constructor != null)
-         children.add(constructor);
-      if (properties != null)
-         children.addAll(properties);
-      if (create != null)
-         children.add(create);
-      if (start != null)
-         children.add(start);
-      if (stop != null)
-         children.add(stop);
-      if (destroy != null)
-         children.add(destroy);
-      if (demands != null)
-         children.addAll(demands);
-      if (supplies != null)
-         children.addAll(supplies);
-      if (depends != null)
-         children.addAll(depends);
-      if (installs != null)
-         children.addAll(installs);
-      if (uninstalls != null)
-         children.addAll(uninstalls);
-      if (installCallbacks != null)
-         children.addAll(installCallbacks);
-      if (uninstallCallbacks != null)
-         children.addAll(uninstallCallbacks);
-      if (aliasMetaData != null)
-         children.addAll(aliasMetaData);
-      if (related != null)
-         children.addAll(related);
-   }
-
-   public TypeInfo getType(MetaDataVisitor visitor, MetaDataVisitorNode previous) throws Throwable
-   {
-      throw new IllegalArgumentException("Cannot determine inject class type: " + this);
-   }
-
-   public Object getUnderlyingValue()
-   {
-      return name;
-   }
-
-   @SuppressWarnings({"unchecked", "deprecation"})
-   public Object getValue(TypeInfo info, ClassLoader cl) throws Throwable
-   {
-      if (context == null)
-         throw new IllegalStateException("Context has not been set: " + this);
-      Controller controller = context.getController();
-      ControllerContext lookup = controller.getInstalledContext(name);
-      if (lookup == null || lookup.getTarget() == null)
-      {
-         // possible call for classloader
-         if (info == null && classLoader != null && classLoader.getClassLoader() == this)
-         {
-            return cl;
-         }
-         throw new IllegalArgumentException("Bean not yet installed: " + name);
-      }
-      Object target = lookup.getTarget();
-      // TODO - add progression here as well?
-      if (info != null && info.getType().isAssignableFrom(target.getClass()) == false)
-      {
-         throw new ClassCastException(target + " is not a " + info);
-      }
-      return target;
-   }
-
-   public void toString(JBossStringBuilder buffer)
-   {
-      buffer.append("name=").append(name);
-      if (aliases != null)
-         buffer.append(" aliases=").append(aliases);
-      buffer.append(" bean=").append(bean);
-      buffer.append(" properties=");
-      JBossObject.list(buffer, properties);
-      if (classLoader != null && classLoader.getClassLoader() != this)
-         buffer.append(" classLoader=").append(classLoader);
-      buffer.append(" constructor=").append(constructor);
-      buffer.append(" autowireCandidate=").append(autowireCandidate);
-      if (create != null)
-         buffer.append(" create=").append(create);
-      if (start != null)
-         buffer.append(" start=").append(start);
-      if (stop != null)
-         buffer.append(" stop=").append(stop);
-      if (destroy != null)
-         buffer.append(" destroy=").append(destroy);
-      if (demands != null)
-      {
-         buffer.append(" demands=");
-         JBossObject.list(buffer, demands);
-      }
-      super.toString(buffer);
-      if (supplies != null)
-      {
-         buffer.append(" supplies=");
-         JBossObject.list(buffer, supplies);
-      }
-      if (depends != null)
-      {
-         buffer.append(" depends=");
-         JBossObject.list(buffer, depends);
-      }
-      if (installs != null)
-      {
-         buffer.append(" installs=");
-         JBossObject.list(buffer, installs);
-      }
-      if (uninstalls != null)
-      {
-         buffer.append(" uninstalls=");
-         JBossObject.list(buffer, uninstalls);
-      }
-      if (installCallbacks != null)
-      {
-         buffer.append(" installCallbacks=");
-         JBossObject.list(buffer, installCallbacks);
-      }
-      if (uninstallCallbacks != null)
-      {
-         buffer.append(" uninstallCallbacks=");
-         JBossObject.list(buffer, uninstallCallbacks);
-      }
-      if (aliasMetaData != null)
-      {
-         buffer.append(" aliasMetaData=");
-         JBossObject.list(buffer, aliasMetaData);
-      }
-      if (related != null)
-      {
-         buffer.append(" related=");
-         JBossObject.list(buffer, related);
-      }
-   }
-
-   public void toShortString(JBossStringBuilder buffer)
-   {
-      buffer.append(bean);
-      buffer.append('/');
-      buffer.append(name);
-   }
-
-   public AbstractBeanMetaData clone()
-   {
-      AbstractBeanMetaData clone = (AbstractBeanMetaData)super.clone();
-      doClone(clone);
-      return clone;
-   }
-
-   @SuppressWarnings("unchecked")
-   protected void doClone(AbstractBeanMetaData clone)
-   {
-      super.doClone(clone);
-      if (aliases != null)
-         clone.setAliases(new HashSet<Object>(aliases));
-      clone.setAliasMetaData(cloneCollection(aliasMetaData, HashSet.class, AliasMetaData.class));
-      clone.setRelated(cloneCollection(related, HashSet.class, RelatedClassMetaData.class));
-      clone.setClassLoader(cloneObject(classLoader, ClassLoaderMetaData.class));
-      clone.setConstructor(cloneObject(constructor, ConstructorMetaData.class));
-      clone.setCreate(cloneObject(create, LifecycleMetaData.class));
-      clone.setDemands(cloneCollection(demands, HashSet.class, DemandMetaData.class));
-      clone.setDepends(cloneCollection(depends, HashSet.class, DependencyMetaData.class));
-      clone.setDestroy(cloneObject(destroy, LifecycleMetaData.class));
-      clone.setInstallCallbacks(cloneCollection(installCallbacks, ArrayList.class, CallbackMetaData.class));
-      clone.setInstalls(cloneCollection(installs, ArrayList.class, InstallMetaData.class));
-      clone.setProperties(cloneCollection(properties, HashSet.class, PropertyMetaData.class));
-      clone.setStart(cloneObject(start, LifecycleMetaData.class));
-      clone.setStop(cloneObject(stop, LifecycleMetaData.class));
-      clone.setSupplies(cloneCollection(supplies, HashSet.class, SupplyMetaData.class));
-      clone.setUninstallCallbacks(cloneCollection(uninstallCallbacks, ArrayList.class, CallbackMetaData.class));
-      clone.setUninstalls(cloneCollection(uninstalls, ArrayList.class, InstallMetaData.class));
-   }
-}

Copied: projects/microcontainer/tags/2.0.0.GA/kernel/src/main/java/org/jboss/beans/metadata/plugins/AbstractBeanMetaData.java (from rev 81535, projects/microcontainer/branches/Branch_2_0/kernel/src/main/java/org/jboss/beans/metadata/plugins/AbstractBeanMetaData.java)
===================================================================
--- projects/microcontainer/tags/2.0.0.GA/kernel/src/main/java/org/jboss/beans/metadata/plugins/AbstractBeanMetaData.java	                        (rev 0)
+++ projects/microcontainer/tags/2.0.0.GA/kernel/src/main/java/org/jboss/beans/metadata/plugins/AbstractBeanMetaData.java	2008-11-25 13:56:03 UTC (rev 81552)
@@ -0,0 +1,884 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.beans.metadata.plugins;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.beans.info.spi.BeanAccessMode;
+import org.jboss.beans.metadata.api.model.AutowireType;
+import static org.jboss.beans.metadata.plugins.CloneUtil.cloneCollection;
+import static org.jboss.beans.metadata.plugins.CloneUtil.cloneObject;
+import org.jboss.beans.metadata.spi.AliasMetaData;
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
+import org.jboss.beans.metadata.spi.CallbackMetaData;
+import org.jboss.beans.metadata.spi.ClassLoaderMetaData;
+import org.jboss.beans.metadata.spi.ConstructorMetaData;
+import org.jboss.beans.metadata.spi.DemandMetaData;
+import org.jboss.beans.metadata.spi.DependencyMetaData;
+import org.jboss.beans.metadata.spi.InstallMetaData;
+import org.jboss.beans.metadata.spi.LifecycleMetaData;
+import org.jboss.beans.metadata.spi.MetaDataVisitor;
+import org.jboss.beans.metadata.spi.MetaDataVisitorNode;
+import org.jboss.beans.metadata.spi.PropertyMetaData;
+import org.jboss.beans.metadata.spi.SupplyMetaData;
+import org.jboss.beans.metadata.spi.RelatedClassMetaData;
+import org.jboss.dependency.plugins.AbstractDependencyItem;
+import org.jboss.dependency.spi.Controller;
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.dependency.spi.ControllerMode;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.dependency.spi.DependencyItem;
+import org.jboss.dependency.spi.ErrorHandlingMode;
+import org.jboss.kernel.spi.dependency.KernelControllerContext;
+import org.jboss.managed.api.annotation.ManagementObject;
+import org.jboss.managed.api.annotation.ManagementProperties;
+import org.jboss.managed.api.annotation.ManagementProperty;
+import org.jboss.reflect.spi.TypeInfo;
+import org.jboss.util.JBossObject;
+import org.jboss.util.JBossStringBuilder;
+
+/**
+ * Metadata for a bean.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ * @version $Revision$
+ */
+ at ManagementObject(properties = ManagementProperties.EXPLICIT) // TODO - explicitly add props we want to manage
+ at XmlRootElement(name="bean")
+ at XmlType(name="beanType", propOrder={"aliasMetaData", "related", "annotations", "classLoader", "constructor", "properties", "create", "start", "stop", "destroy", "depends", "demands", "supplies", "installs", "uninstalls", "installCallbacks", "uninstallCallbacks"})
+public class AbstractBeanMetaData extends AbstractFeatureMetaData
+   implements BeanMetaData, BeanMetaDataFactory, MutableLifecycleHolder, Serializable
+{
+   private static final long serialVersionUID = 4L;
+
+   /** The bean fully qualified class name */
+   protected String bean;
+
+   /** The name of this instance */
+   protected String name;
+
+   /** The related */
+   protected Set<RelatedClassMetaData> related;
+
+   /** The aliases */
+   protected Set<Object> aliases;
+
+   /** The alias metadata */
+   protected Set<AliasMetaData> aliasMetaData;
+
+   /** The parent */
+   protected String parent;
+
+   /** Is abstract */
+   protected boolean isAbstract; 
+
+   /** Autowire type */
+   protected AutowireType autowireType;
+
+   /** The mode */
+   protected ControllerMode mode;
+
+   /** The error handling mode */
+   protected ErrorHandlingMode errorHandlingMode;
+
+   /** The access mode */
+   protected BeanAccessMode accessMode;
+
+   /** Is contextual injection candidate */
+   protected boolean autowireCandidate = true;
+
+   /** The properties configuration Set<PropertyMetaData> */
+   private Set<PropertyMetaData> properties;
+
+   /** The bean ClassLoader */
+   protected ClassLoaderMetaData classLoader;
+
+   /** The constructor */
+   protected ConstructorMetaData constructor;
+
+   /** The create lifecycle */
+   protected LifecycleMetaData create;
+
+   /** The start lifecycle */
+   protected LifecycleMetaData start;
+
+   /** The stop lifecycle */
+   protected LifecycleMetaData stop;
+
+   /** The destroy lifecycle */
+   protected LifecycleMetaData destroy;
+
+   /** What the bean demands Set<DemandMetaData> */
+   protected Set<DemandMetaData> demands;
+
+   /** What the bean supplies Set<SupplyMetaData> */
+   protected Set<SupplyMetaData> supplies;
+
+   /** What the bean dependencies Set<DependencyMetaData> */
+   protected Set<DependencyMetaData> depends;
+
+   /** The install operations List<InstallMetaData> */
+   protected List<InstallMetaData> installs;
+
+   /** The uninstall operations List<InstallMetaData> */
+   protected List<InstallMetaData> uninstalls;
+
+   /** The install callback List<InstallMetaData> */
+   protected List<CallbackMetaData> installCallbacks;
+
+   /** The uninstall callback List<InstallMetaData> */
+   protected List<CallbackMetaData> uninstallCallbacks;
+
+   /** The context */
+   protected transient ControllerContext context;
+
+   /**
+    * Create a new bean meta data
+    */
+   public AbstractBeanMetaData()
+   {
+      super();
+   }
+
+   /**
+    * Create a new bean meta data
+    *
+    * @param bean the bean class name
+    */
+   public AbstractBeanMetaData(String bean)
+   {
+      this.bean = bean;
+   }
+   /**
+    * Create a new bean meta data
+    *
+    * @param name the name
+    * @param bean the bean class name
+    */
+   public AbstractBeanMetaData(String name, String bean)
+   {
+      this.name = name;
+      this.bean = bean;
+   }
+
+   public List<BeanMetaData> getBeans()
+   {
+      NestedBeanHandler handler = createNestedBeanHandler();
+      return handler.checkForNestedBeans();
+   }
+
+   /**
+    * Create nested bean handler.
+    * Can be overridden to change generateName policy.
+    *
+    * @return nested bean handler
+    */
+   protected NestedBeanHandler createNestedBeanHandler()
+   {
+      return new NestedBeanHandler(this);
+   }
+
+   /**
+    * Get the bean class name.
+    * @return the fully qualified bean class name.
+    */
+   public String getBean()
+   {
+      return bean;
+   }
+
+   /**
+    * Set the bean class name and flush the object cache.
+    *
+    * @param bean The bean class name to set.
+    */
+   @XmlAttribute(name="class")
+   public void setBean(String bean)
+   {
+      this.bean = bean;
+      flushJBossObjectCache();
+   }
+
+   /**
+    * Get a property
+    *
+    * @param name the name
+    * @return the property name
+    */
+   public PropertyMetaData getProperty(String name)
+   {
+      if (name == null)
+         throw new IllegalArgumentException("Null name");
+      if (properties != null && properties.size() > 0)
+      {
+         for (PropertyMetaData prop : properties)
+         {
+            if (name.equals(prop.getName()))
+               return prop;
+         }
+      }
+      return null;
+   }
+
+   /**
+    * Add a property
+    *
+    * @param property the property
+    */
+   public void addProperty(PropertyMetaData property)
+   {
+      if (property == null)
+         throw new IllegalArgumentException("Null property");
+      if (properties == null)
+         properties = new HashSet<PropertyMetaData>();
+      properties.add(property);
+      flushJBossObjectCache();
+   }
+
+   /**
+    * Set the propertiess.
+    *
+    * @param properties Set<PropertyMetaData>
+    */
+   @ManagementProperty(managed=true) // TODO - this ok? 
+   @XmlElement(name="property", type=AbstractPropertyMetaData.class)
+   public void setProperties(Set<PropertyMetaData> properties)
+   {
+      this.properties = properties;
+      flushJBossObjectCache();
+   }
+
+   public ClassLoaderMetaData getClassLoader()
+   {
+      return classLoader;
+   }
+
+   @XmlElement(name="classloader", type=AbstractClassLoaderMetaData.class)
+   public void setClassLoader(ClassLoaderMetaData classLoader)
+   {
+      this.classLoader = classLoader;
+   }
+
+   /**
+    * Set the constructor
+    *
+    * @param constructor the constructor metadata
+    */
+   @XmlElement(name="constructor", type=AbstractConstructorMetaData.class)
+   public void setConstructor(ConstructorMetaData constructor)
+   {
+      this.constructor = constructor;
+   }
+
+   /**
+    * Set what the bean demands.
+    *
+    * @param demands Set<DemandMetaData>
+    */
+   @XmlElement(name="demand", type=AbstractDemandMetaData.class)
+   public void setDemands(Set<DemandMetaData> demands)
+   {
+      this.demands = demands;
+      flushJBossObjectCache();
+   }
+
+   /**
+    * Set what the bean supplies.
+    *
+    * @param supplies Set<SupplyMetaData>
+    */
+   @XmlElement(name="supply", type=AbstractSupplyMetaData.class)
+   public void setSupplies(Set<SupplyMetaData> supplies)
+   {
+      this.supplies = supplies;
+      flushJBossObjectCache();
+   }
+
+   /**
+    * Set what the bean depends.
+    *
+    * @param depends Set<DependencyMetaData>
+    */
+   @XmlElement(name="depends", type=AbstractDependencyMetaData.class)
+   public void setDepends(Set<DependencyMetaData> depends)
+   {
+      this.depends = depends;
+      flushJBossObjectCache();
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+
+   /**
+    * Set the name.
+    *
+    * @param name The name to set.
+    */
+   @XmlAttribute
+   public void setName(String name)
+   {
+      this.name = name;
+      flushJBossObjectCache();
+   }
+
+   public Set<RelatedClassMetaData> getRelated()
+   {
+      return related;
+   }
+
+   @XmlElement(name="related-class", type=AbstractRelatedClassMetaData.class)
+   public void setRelated(Set<RelatedClassMetaData> related)
+   {
+      this.related = related;
+   }
+
+   public Set<Object> getAliases()
+   {
+      return aliases;
+   }
+
+   @XmlTransient
+   public void setAliases(Set<Object> aliases)
+   {
+      this.aliases = aliases;
+   }
+
+   public Set<AliasMetaData> getAliasMetaData()
+   {
+      return aliasMetaData;
+   }
+   
+   @XmlElement(name="alias", type=AbstractAliasMetaData.class)
+   public void setAliasMetaData(Set<AliasMetaData> aliases)
+   {
+      this.aliasMetaData = aliases;
+   }
+   
+   public String getParent()
+   {
+      return parent;
+   }
+
+   /**
+    * Set the parent.
+    *
+    * @param parent the parent name
+    */
+   @XmlAttribute
+   public void setParent(String parent)
+   {
+      this.parent = parent;
+   }
+
+   public boolean isAbstract()
+   {
+      return isAbstract;
+   }
+
+   /**
+    * Set abstract.
+    *
+    * @param anAbstract is abstract
+    */
+   @XmlAttribute
+   public void setAbstract(boolean anAbstract)
+   {
+      isAbstract = anAbstract;
+   }
+
+   public AutowireType getAutowireType()
+   {
+      return autowireType;
+   }
+
+   /**
+    * Set autowire type.
+    *
+    * @param autowireType the type
+    */
+   @XmlAttribute(name="autowire-type")
+   public void setAutowireType(AutowireType autowireType)
+   {
+      this.autowireType = autowireType;
+   }
+
+   public ControllerMode getMode()
+   {
+      return mode;
+   }
+
+   @XmlAttribute
+   public void setMode(ControllerMode mode)
+   {
+      this.mode = mode;
+      flushJBossObjectCache();
+   }
+
+   public ErrorHandlingMode getErrorHandlingMode()
+   {
+      return errorHandlingMode;
+   }
+
+   @XmlAttribute(name="error-handling")
+   public void setErrorHandlingMode(ErrorHandlingMode errorHandlingMode)
+   {
+      this.errorHandlingMode = errorHandlingMode;
+   }
+
+   public BeanAccessMode getAccessMode()
+   {
+      return accessMode;
+   }
+
+   @XmlAttribute(name="access-mode")
+   public void setAccessMode(BeanAccessMode accessMode)
+   {
+      this.accessMode = accessMode;
+   }
+
+   public boolean isAutowireCandidate()
+   {
+      return autowireCandidate;
+   }
+
+   @XmlAttribute(name="autowire-candidate")
+   public void setAutowireCandidate(boolean autowireCandidate)
+   {
+      this.autowireCandidate = autowireCandidate;
+   }
+
+   public Set<PropertyMetaData> getProperties()
+   {
+      return properties;
+   }
+
+   public ConstructorMetaData getConstructor()
+   {
+      return constructor;
+   }
+
+   public LifecycleMetaData getCreate()
+   {
+      return create;
+   }
+
+   /**
+    * Set the lifecycle metadata
+    *
+    * @param lifecycle the lifecycle metadata
+    */
+   @XmlElement(name="create", type=AbstractLifecycleMetaData.class)
+   public void setCreate(LifecycleMetaData lifecycle)
+   {
+      if (lifecycle != null)
+         lifecycle.setState(ControllerState.CREATE);
+      this.create = lifecycle;
+   }
+
+   public LifecycleMetaData getStart()
+   {
+      return start;
+   }
+
+   /**
+    * Set the start metadata
+    *
+    * @param lifecycle the lifecycle metadata
+    */
+   @XmlElement(name="start", type=AbstractLifecycleMetaData.class)
+   public void setStart(LifecycleMetaData lifecycle)
+   {
+      if (lifecycle != null)
+         lifecycle.setState(ControllerState.START);
+      this.start = lifecycle;
+   }
+
+   public LifecycleMetaData getStop()
+   {
+      return stop;
+   }
+
+   /**
+    * Set the stop metadata
+    *
+    * @param lifecycle the lifecycle metadata
+    */
+   @XmlElement(name="stop", type=AbstractLifecycleMetaData.class)
+   public void setStop(LifecycleMetaData lifecycle)
+   {
+      if (lifecycle != null)
+         lifecycle.setState(ControllerState.START);
+      this.stop = lifecycle;
+   }
+
+   public LifecycleMetaData getDestroy()
+   {
+      return destroy;
+   }
+
+   /**
+    * Set the destroy metadata
+    *
+    * @param lifecycle the lifecycle metadata
+    */
+   @XmlElement(name="destroy", type=AbstractLifecycleMetaData.class)
+   public void setDestroy(LifecycleMetaData lifecycle)
+   {
+      if (lifecycle != null)
+         lifecycle.setState(ControllerState.CREATE);
+      this.destroy = lifecycle;
+   }
+
+   public Set<DemandMetaData> getDemands()
+   {
+      return demands;
+   }
+
+   public Set<SupplyMetaData> getSupplies()
+   {
+      return supplies;
+   }
+
+   public Set<DependencyMetaData> getDepends()
+   {
+      return depends;
+   }
+
+   public List<InstallMetaData> getInstalls()
+   {
+      return installs;
+   }
+
+   /**
+    * Set the installs
+    *
+    * @param installs List<InstallMetaData>
+    */
+   @XmlElement(name="install", type=AbstractInstallMetaData.class)
+   public void setInstalls(List<InstallMetaData> installs)
+   {
+      this.installs = installs;
+      flushJBossObjectCache();
+   }
+
+   public List<InstallMetaData> getUninstalls()
+   {
+      return uninstalls;
+   }
+
+   /**
+    * Set the uninstalls
+    *
+    * @param uninstalls List<InstallMetaData>
+    */
+   @XmlElement(name="uninstall", type=AbstractInstallMetaData.class)
+   public void setUninstalls(List<InstallMetaData> uninstalls)
+   {
+      this.uninstalls = uninstalls;
+      flushJBossObjectCache();
+   }
+
+   public List<CallbackMetaData> getInstallCallbacks()
+   {
+      return installCallbacks;
+   }
+
+   @XmlElement(name="incallback", type=InstallCallbackMetaData.class)
+   public void setInstallCallbacks(List<CallbackMetaData> installCallbacks)
+   {
+      this.installCallbacks = installCallbacks;
+      flushJBossObjectCache();
+   }
+
+   public List<CallbackMetaData> getUninstallCallbacks()
+   {
+      return uninstallCallbacks;
+   }
+
+   @XmlElement(name="uncallback", type=UninstallCallbackMetaData.class)
+   public void setUninstallCallbacks(List<CallbackMetaData> uninstallCallbacks)
+   {
+      this.uninstallCallbacks = uninstallCallbacks;
+      flushJBossObjectCache();
+   }
+
+   public void initialVisit(MetaDataVisitor visitor)
+   {
+      ConstructorMetaData constructor = getConstructor();
+      if (getBean() == null)
+      {
+         if (isAbstract() == false && getParent() == null)
+         {
+            if (constructor == null)
+               throw new IllegalArgumentException("Bean should have a class attribute or a constructor element.");
+            if (constructor.getFactoryMethod() == null)
+            {
+               if (constructor.getValue() == null)
+                  throw new IllegalArgumentException("Bean should have a class attribute or the constructor element should have either a factoryMethod attribute or embedded value.");
+            }
+            else if (constructor.getFactory() == null && constructor.getFactoryClass() == null)
+               throw new IllegalArgumentException("Bean should have a class attribute or the constructor element should have one of a factoryClass attribute or a factory element, or embedded value.");
+         }
+      }
+      else
+      {
+         checkConstructorFactoryClass(constructor);
+      }
+
+      KernelControllerContext ctx = visitor.getControllerContext();
+      if (ctx.getBeanMetaData() == this)
+         context = ctx;
+      boolean isInnerBean = visitor.visitorNodeStack().isEmpty() == false;
+      if (isInnerBean)
+      {
+         Object name = ctx.getName();
+         Object iDependOn = getUnderlyingValue();
+         ControllerState whenRequired = visitor.getContextState();
+         DependencyItem di = new AbstractDependencyItem(name, iDependOn, whenRequired, ControllerState.INSTALLED);
+         visitor.addDependency(di);
+      }
+      if (create != null && create.getMethodName() == null)
+         create.setMethodName("create");
+      if (start != null && start.getMethodName() == null)
+         start.setMethodName("start");
+      if (stop != null && stop.getMethodName() == null)
+         stop.setMethodName("stop");
+      if (destroy != null && destroy.getMethodName() == null)
+         destroy.setMethodName("destroy");
+      super.initialVisit(visitor);
+   }
+
+   /**
+    * Check constructor factory class.
+    *
+    * @param constructor the constructor meta data
+    */
+   protected void checkConstructorFactoryClass(ConstructorMetaData constructor)
+   {
+      if (constructor == null)
+         return;
+      if (constructor.getFactoryMethod() == null)
+         return;
+      if (constructor.getFactoryClass() != null)
+         return;
+      if (constructor.getValue() != null)
+         return;
+      if (constructor.getFactory() != null)
+         return;
+      if (constructor instanceof AbstractConstructorMetaData == false)
+         return;
+
+      AbstractConstructorMetaData acmd = AbstractConstructorMetaData.class.cast(constructor);
+      acmd.setFactoryClass(getBean());
+   }
+
+   protected void addChildren(Set<MetaDataVisitorNode> children)
+   {
+      super.addChildren(children);
+      if (classLoader != null && classLoader.getClassLoader() != this)
+         children.add(classLoader);
+      if (constructor != null)
+         children.add(constructor);
+      if (properties != null)
+         children.addAll(properties);
+      if (create != null)
+         children.add(create);
+      if (start != null)
+         children.add(start);
+      if (stop != null)
+         children.add(stop);
+      if (destroy != null)
+         children.add(destroy);
+      if (demands != null)
+         children.addAll(demands);
+      if (supplies != null)
+         children.addAll(supplies);
+      if (depends != null)
+         children.addAll(depends);
+      if (installs != null)
+         children.addAll(installs);
+      if (uninstalls != null)
+         children.addAll(uninstalls);
+      if (installCallbacks != null)
+         children.addAll(installCallbacks);
+      if (uninstallCallbacks != null)
+         children.addAll(uninstallCallbacks);
+      if (aliasMetaData != null)
+         children.addAll(aliasMetaData);
+      if (related != null)
+         children.addAll(related);
+   }
+
+   public TypeInfo getType(MetaDataVisitor visitor, MetaDataVisitorNode previous) throws Throwable
+   {
+      throw new IllegalArgumentException("Cannot determine inject class type: " + this);
+   }
+
+   public Object getUnderlyingValue()
+   {
+      return name;
+   }
+
+   @SuppressWarnings({"unchecked", "deprecation"})
+   public Object getValue(TypeInfo info, ClassLoader cl) throws Throwable
+   {
+      if (context == null)
+         throw new IllegalStateException("Context has not been set: " + this);
+      Controller controller = context.getController();
+      ControllerContext lookup = controller.getInstalledContext(name);
+      if (lookup == null || lookup.getTarget() == null)
+      {
+         // possible call for classloader
+         if (info == null && classLoader != null && classLoader.getClassLoader() == this)
+         {
+            return cl;
+         }
+         throw new IllegalArgumentException("Bean not yet installed: " + name);
+      }
+      Object target = lookup.getTarget();
+      // TODO - add progression here as well?
+      if (info != null && info.getType().isAssignableFrom(target.getClass()) == false)
+      {
+         throw new ClassCastException(target + " is not a " + info);
+      }
+      return target;
+   }
+
+   public void toString(JBossStringBuilder buffer)
+   {
+      buffer.append("name=").append(name);
+      if (aliases != null)
+         buffer.append(" aliases=").append(aliases);
+      buffer.append(" bean=").append(bean);
+      buffer.append(" properties=");
+      JBossObject.list(buffer, properties);
+      if (classLoader != null && classLoader.getClassLoader() != this)
+         buffer.append(" classLoader=").append(classLoader);
+      buffer.append(" constructor=").append(constructor);
+      buffer.append(" autowireCandidate=").append(autowireCandidate);
+      if (create != null)
+         buffer.append(" create=").append(create);
+      if (start != null)
+         buffer.append(" start=").append(start);
+      if (stop != null)
+         buffer.append(" stop=").append(stop);
+      if (destroy != null)
+         buffer.append(" destroy=").append(destroy);
+      if (demands != null)
+      {
+         buffer.append(" demands=");
+         JBossObject.list(buffer, demands);
+      }
+      super.toString(buffer);
+      if (supplies != null)
+      {
+         buffer.append(" supplies=");
+         JBossObject.list(buffer, supplies);
+      }
+      if (depends != null)
+      {
+         buffer.append(" depends=");
+         JBossObject.list(buffer, depends);
+      }
+      if (installs != null)
+      {
+         buffer.append(" installs=");
+         JBossObject.list(buffer, installs);
+      }
+      if (uninstalls != null)
+      {
+         buffer.append(" uninstalls=");
+         JBossObject.list(buffer, uninstalls);
+      }
+      if (installCallbacks != null)
+      {
+         buffer.append(" installCallbacks=");
+         JBossObject.list(buffer, installCallbacks);
+      }
+      if (uninstallCallbacks != null)
+      {
+         buffer.append(" uninstallCallbacks=");
+         JBossObject.list(buffer, uninstallCallbacks);
+      }
+      if (aliasMetaData != null)
+      {
+         buffer.append(" aliasMetaData=");
+         JBossObject.list(buffer, aliasMetaData);
+      }
+      if (related != null)
+      {
+         buffer.append(" related=");
+         JBossObject.list(buffer, related);
+      }
+   }
+
+   public void toShortString(JBossStringBuilder buffer)
+   {
+      buffer.append(bean);
+      buffer.append('/');
+      buffer.append(name);
+   }
+
+   public AbstractBeanMetaData clone()
+   {
+      AbstractBeanMetaData clone = (AbstractBeanMetaData)super.clone();
+      doClone(clone);
+      return clone;
+   }
+
+   @SuppressWarnings("unchecked")
+   protected void doClone(AbstractBeanMetaData clone)
+   {
+      super.doClone(clone);
+      if (aliases != null)
+         clone.setAliases(new HashSet<Object>(aliases));
+      clone.setAliasMetaData(cloneCollection(aliasMetaData, HashSet.class, AliasMetaData.class));
+      clone.setRelated(cloneCollection(related, HashSet.class, RelatedClassMetaData.class));
+      clone.setClassLoader(cloneObject(classLoader, ClassLoaderMetaData.class));
+      clone.setConstructor(cloneObject(constructor, ConstructorMetaData.class));
+      clone.setCreate(cloneObject(create, LifecycleMetaData.class));
+      clone.setDemands(cloneCollection(demands, HashSet.class, DemandMetaData.class));
+      clone.setDepends(cloneCollection(depends, HashSet.class, DependencyMetaData.class));
+      clone.setDestroy(cloneObject(destroy, LifecycleMetaData.class));
+      clone.setInstallCallbacks(cloneCollection(installCallbacks, ArrayList.class, CallbackMetaData.class));
+      clone.setInstalls(cloneCollection(installs, ArrayList.class, InstallMetaData.class));
+      clone.setProperties(cloneCollection(properties, HashSet.class, PropertyMetaData.class));
+      clone.setStart(cloneObject(start, LifecycleMetaData.class));
+      clone.setStop(cloneObject(stop, LifecycleMetaData.class));
+      clone.setSupplies(cloneCollection(supplies, HashSet.class, SupplyMetaData.class));
+      clone.setUninstallCallbacks(cloneCollection(uninstallCallbacks, ArrayList.class, CallbackMetaData.class));
+      clone.setUninstalls(cloneCollection(uninstalls, ArrayList.class, InstallMetaData.class));
+   }
+}

Deleted: projects/microcontainer/tags/2.0.0.GA/kernel/src/main/java/org/jboss/kernel/plugins/config/Configurator.java
===================================================================
--- projects/microcontainer/branches/Branch_2_0/kernel/src/main/java/org/jboss/kernel/plugins/config/Configurator.java	2008-11-25 08:40:28 UTC (rev 81534)
+++ projects/microcontainer/tags/2.0.0.GA/kernel/src/main/java/org/jboss/kernel/plugins/config/Configurator.java	2008-11-25 13:56:03 UTC (rev 81552)
@@ -1,759 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.kernel.plugins.config;
-
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.jboss.beans.info.spi.BeanInfo;
-import org.jboss.beans.info.spi.PropertyInfo;
-import org.jboss.beans.metadata.spi.BeanMetaData;
-import org.jboss.beans.metadata.spi.ClassLoaderMetaData;
-import org.jboss.beans.metadata.spi.ConstructorMetaData;
-import org.jboss.beans.metadata.spi.ParameterMetaData;
-import org.jboss.beans.metadata.spi.PropertyMetaData;
-import org.jboss.beans.metadata.spi.ValueMetaData;
-import org.jboss.joinpoint.plugins.Config;
-import org.jboss.joinpoint.spi.ConstructorJoinpoint;
-import org.jboss.joinpoint.spi.Joinpoint;
-import org.jboss.joinpoint.spi.JoinpointException;
-import org.jboss.joinpoint.spi.JoinpointFactory;
-import org.jboss.joinpoint.spi.MethodJoinpoint;
-import org.jboss.kernel.spi.config.KernelConfig;
-import org.jboss.reflect.spi.ClassInfo;
-import org.jboss.reflect.spi.ConstructorInfo;
-import org.jboss.reflect.spi.MethodInfo;
-import org.jboss.reflect.spi.TypeInfo;
-import org.jboss.reflect.spi.TypeInfoFactory;
-
-/**
- * Configuration utilities.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
-public class Configurator extends Config
-{
-   /**
-    * Instantiate and configure a bean
-    *
-    * @param config the confg
-    * @param info the bean info
-    * @param metaData the bean metadata
-    * @return the instantiated and configured object
-    * @throws Throwable for any error
-    */
-   public static Object instantiateAndConfigure(KernelConfig config, BeanInfo info, BeanMetaData metaData) throws Throwable
-   {
-      Object result = instantiate(config, info, metaData);
-      if (metaData != null)
-         configure(result, info, metaData);
-      return result;
-   }
-
-   /**
-    * Instantiate a bean
-    *
-    * @param config the kernel config
-    * @param info the bean info
-    * @param metaData the bean metadata
-    * @return the instantiated object
-    * @throws Throwable for any error
-    */
-   public static Object instantiate(KernelConfig config, BeanInfo info, BeanMetaData metaData) throws Throwable
-   {
-      boolean trace = log.isTraceEnabled();
-      if (trace)
-         log.trace("Instantiating info=" + info + " metaData=" + metaData);
-
-      ConstructorMetaData constructor = null;
-      if (metaData != null)
-         constructor = metaData.getConstructor();
-      Joinpoint joinPoint = getConstructorJoinPoint(config, info, constructor, metaData);
-      return joinPoint.dispatch();
-   }
-
-   /**
-    * Get a constructor joinpoint
-    *
-    * @param config the kernel config
-    * @param info the bean info
-    * @param metaData the constructor metadata
-    * @param beanMetaData the bean metadata
-    * @return the joinpoint
-    * @throws Throwable for any error
-    */
-   public static Joinpoint getConstructorJoinPoint(KernelConfig config, BeanInfo info, ConstructorMetaData metaData, BeanMetaData beanMetaData)
-      throws Throwable
-   {
-      return getConstructorJoinPoint(config, info, metaData, beanMetaData, null);
-   }
-
-   /**
-    * Get a constructor joinpoint
-    *
-    * @param config the kernel config
-    * @param info the bean info
-    * @param metaData the constructor metadata
-    * @param beanMetaData the bean metadata
-    * @param object an opaque object
-    * @return the joinpoint
-    * @throws Throwable for any error
-    */
-   public static Joinpoint getConstructorJoinPoint(KernelConfig config, BeanInfo info, ConstructorMetaData metaData, BeanMetaData beanMetaData, Object object)
-      throws Throwable
-   {
-      boolean trace = log.isTraceEnabled();
-
-      if (trace)
-         log.trace("Get constructor joinpoint info=" + info + " constructor=" + metaData);
-
-      if (config == null)
-         throw new IllegalArgumentException("Null config");
-
-      if (metaData != null)
-      {
-         ClassLoader cl = getClassLoader(beanMetaData);
-
-         ValueMetaData vmd = metaData.getValue();
-         if (vmd != null)
-         {
-            TypeInfo typeInfo = null;
-            if (info != null)
-               typeInfo = info.getClassInfo();
-            return new ValueJoinpoint(vmd, typeInfo, cl);
-         }
-
-         vmd = metaData.getFactory();
-         if (vmd != null)
-         {
-            // Get the factory
-            Object factory = vmd.getValue(null, cl);
-
-            // Get the parameters
-            List<ParameterMetaData> parameters = metaData.getParameters();
-
-            // Describe the factory
-            BeanInfo factoryInfo = config.getBeanInfo(factory.getClass());
-
-            // Find the method
-            MethodJoinpoint joinPoint = findMethod(trace, factoryInfo, cl, metaData.getFactoryMethod(), parameters, false, true);
-            joinPoint.setTarget(factory);
-            MethodInfo minfo = joinPoint.getMethodInfo();
-
-            // Set the parameters
-            if (minfo != null)
-            {
-               TypeInfo[] pinfos = minfo.getParameterTypes();
-               Object[] params = getParameters(trace, cl, pinfos, parameters);
-               joinPoint.setArguments(params);
-            }
-            return joinPoint;
-         }
-
-         String factoryClassName = metaData.getFactoryClass();
-         if (factoryClassName != null)
-         {
-            // Get the parameters
-            List<ParameterMetaData> parameters = metaData.getParameters();
-
-            BeanInfo factoryInfo = config.getBeanInfo(factoryClassName, cl);
-
-            // Find the method
-            MethodJoinpoint joinPoint = findMethod(trace, factoryInfo, cl, metaData.getFactoryMethod(), parameters, true, true);
-            MethodInfo minfo = joinPoint.getMethodInfo();
-
-            // Set the parameters
-            if (minfo != null)
-            {
-               TypeInfo[] pinfos = minfo.getParameterTypes();
-               Object[] params = getParameters(trace, cl, pinfos, parameters);
-               joinPoint.setArguments(params);
-            }
-            return joinPoint;
-         }
-
-         // Find the constructor
-         ConstructorJoinpoint joinPoint = findConstructor(trace, info, metaData, object);
-         ConstructorInfo cinfo = joinPoint.getConstructorInfo();
-
-         // Set the parameters
-         if (cinfo != null)
-         {
-            TypeInfo[] pinfos = cinfo.getParameterTypes();
-            Object[] params = getParameters(trace, cl, pinfos, metaData.getParameters());
-            joinPoint.setArguments(params);
-         }
-         return joinPoint;
-      }
-
-      // Default constructor
-      return findConstructor(trace, info, metaData, object);
-   }
-
-   /**
-    * Find a constructor
-    *
-    * @param trace whether trace is enabled
-    * @param info the bean info
-    * @param metaData the bean metadata
-    * @return the constructor join point
-    * @throws Exception for any error
-    */
-   public static ConstructorJoinpoint findConstructor(boolean trace, BeanInfo info, BeanMetaData metaData) throws Exception
-   {
-      return findConstructor(trace, info, metaData.getConstructor());
-   }
-
-   /**
-    * Find a constructor
-    *
-    * @param trace whether trace is enabled
-    * @param info the bean info
-    * @param metaData the constructor metadata
-    * @return the constructor join point
-    * @throws Exception for any error
-    */
-   public static ConstructorJoinpoint findConstructor(boolean trace, BeanInfo info, ConstructorMetaData metaData) throws Exception
-   {
-      return findConstructor(trace, info, metaData, null);
-   }
-
-   /**
-    * Find a constructor
-    *
-    * @param trace whether trace is enabled
-    * @param info the bean info
-    * @param metaData the constructor metadata
-    * @param object an opaque object
-    * @return the constructor join point
-    * @throws Exception for any error
-    */
-   public static ConstructorJoinpoint findConstructor(boolean trace, BeanInfo info, ConstructorMetaData metaData, Object object) throws Exception
-   {
-      ConstructorInfo cinfo = resolveConstructor(trace, info, metaData);
-      JoinpointFactory jpf = info.getJoinpointFactory();
-      if (object == null)
-         return jpf.getConstructorJoinpoint(cinfo);
-      else
-         return jpf.getConstructorJoinpoint(cinfo, object);
-   }
-
-   /**
-    * Resolve a constructor
-    *
-    * @param trace whether trace is enabled
-    * @param info the bean info
-    * @param metaData the constructor metadata
-    * @return the constructor info
-    */
-   public static ConstructorInfo resolveConstructor(boolean trace, BeanInfo info, ConstructorMetaData metaData)
-   {
-      if (info == null)
-         throw new IllegalArgumentException("Null bean info");
-
-      List<ParameterMetaData> params = Collections.emptyList();
-      if (metaData != null && metaData.getParameters() != null)
-         params = metaData.getParameters();
-      String[] paramTypes = new String[params.size()];
-      if (params.isEmpty() == false)
-      {
-         int x = 0;
-         for (Iterator<ParameterMetaData> i = params.iterator(); i.hasNext();)
-         {
-            ParameterMetaData pdata = i.next();
-            paramTypes[x++] = pdata.getType();
-         }
-      }
-      return findConstructorInfo(info.getClassInfo(), paramTypes);
-   }
-
-   /**
-    * Configure a bean
-    *
-    * @param object the object to configure
-    * @param info the bean info
-    * @param metaData the bean metadata
-    * @throws Throwable for any error
-    */
-   public static void configure(Object object, BeanInfo info, BeanMetaData metaData) throws Throwable
-   {
-      boolean trace = log.isTraceEnabled();
-
-      if (object == null)
-         throw new IllegalArgumentException("Null object");
-      if (info == null)
-         throw new IllegalArgumentException("Null bean info");
-      if (metaData == null)
-         throw new IllegalArgumentException("Null bean metadata");
-
-      Set<PropertyMetaData> properties = metaData.getProperties();
-      if (properties != null && properties.isEmpty() == false)
-      {
-         ClassLoader cl = getClassLoader(metaData);
-
-         for (Iterator<PropertyMetaData> i = metaData.getProperties().iterator(); i.hasNext();)
-         {
-            PropertyMetaData property = i.next();
-            configure(trace, object, info, cl, property);
-         }
-      }
-   }
-
-   /**
-    * Configure a bean property
-    *
-    * @param object the object to configure
-    * @param info the bean info
-    * @param cl the classloader
-    * @param metaData the property metadata
-    * @throws Throwable for any error
-    */
-   public static void configure(Object object, BeanInfo info, ClassLoader cl, PropertyMetaData metaData) throws Throwable
-   {
-      boolean trace = log.isTraceEnabled();
-      configure(trace, object, info, cl, metaData);
-   }
-
-   /**
-    * Configure a bean property
-    *
-    * @param trace whether trace is enabled
-    * @param object the object to configure
-    * @param info the bean info
-    * @param cl the classloader
-    * @param metaData the property metadata
-    * @throws Throwable for any error
-    */
-   public static void configure(boolean trace, Object object, BeanInfo info, ClassLoader cl, PropertyMetaData metaData) throws Throwable
-   {
-      PropertyInfo ainfo = resolveProperty(trace, info, cl, metaData.getName(), metaData.getType());
-      configure(trace, object, ainfo, cl, metaData);
-   }
-
-   /**
-    * Configure a bean property
-    *
-    * @param object the object to configure
-    * @param info the property info
-    * @param cl the classloader
-    * @param metaData the property metadata
-    * @throws Throwable for any error
-    */
-   public static void configure(Object object, PropertyInfo info, ClassLoader cl, PropertyMetaData metaData) throws Throwable
-   {
-      boolean trace = log.isTraceEnabled();
-      configure(trace, object, info, cl, metaData);
-   }
-
-   /**
-    * Configure a bean property
-    *
-    * @param trace whether trace is enabled
-    * @param object the object to configure
-    * @param info the property info
-    * @param cl the classloader
-    * @param metaData the property metadata
-    * @throws Throwable for any error
-    */
-   public static void configure(boolean trace, Object object, PropertyInfo info, ClassLoader cl, PropertyMetaData metaData) throws Throwable
-   {
-      if (trace)
-         log.trace("Configuring info=" + info + " metaData=" + metaData);
-
-      if (trace)
-         log.trace("Setting property " + info);
-      info.set(object, metaData.getValue().getValue(info.getType(), cl));
-   }
-
-   /**
-    * Unconfigure a bean
-    *
-    * @param object the object to unconfigure
-    * @param info the bean info
-    * @param metaData the bean metadata
-    * @throws Throwable for any error
-    */
-   public static void unconfigure(Object object, BeanInfo info, BeanMetaData metaData) throws Throwable
-   {
-      if (object == null)
-         throw new IllegalArgumentException("Null object");
-      if (info == null)
-         throw new IllegalArgumentException("Null bean info");
-      if (metaData == null)
-         throw new IllegalArgumentException("Null bean metadata");
-
-      ClassLoader cl = getClassLoader(metaData);
-      Set<PropertyMetaData> propertys = metaData.getProperties();
-      if (propertys != null && propertys.isEmpty() == false)
-      {
-         for (Iterator<PropertyMetaData> i = metaData.getProperties().iterator(); i.hasNext();)
-         {
-            PropertyMetaData property = i.next();
-            unconfigure(object, cl, info, property);
-         }
-      }
-   }
-
-   /**
-    * Unconfigure a bean property
-    *
-    * @param object the object to unconfigure
-    * @param cl the classloader
-    * @param info the bean info
-    * @param metaData the property metadata
-    * @throws Throwable for any error
-    */
-   public static void unconfigure(Object object, ClassLoader cl, BeanInfo info, PropertyMetaData metaData) throws Throwable
-   {
-      boolean trace = log.isTraceEnabled();
-      PropertyInfo ainfo = resolveProperty(trace, info, cl, metaData.getName(), metaData.getType());
-      unconfigure(trace, object, ainfo, metaData);
-   }
-
-   /**
-    * UnConfigure a bean property
-    *
-    * @param trace whether trace is enabled
-    * @param object the object to configure
-    * @param info the property info
-    * @param metaData the property metadata
-    * @throws Throwable for any error
-    */
-   public static void unconfigure(boolean trace, Object object, PropertyInfo info, PropertyMetaData metaData) throws Throwable
-   {
-      if (trace)
-         log.trace("Unconfiguring info=" + info + " metaData=" + metaData);
-
-      if (trace)
-         log.trace("Unsetting property " + info);
-      info.set(object, null);
-   }
-
-   /**
-    * Get the property info
-    *
-    * @param trace whether trace is enabled
-    * @param info the bean info
-    * @param name the property name
-    * @return the property info
-    * @throws Throwable for any error
-    */
-   public static PropertyInfo resolveProperty(boolean trace, BeanInfo info, String name) throws Throwable
-   {
-      return resolveProperty(trace, info, null, name, null);
-   }
-
-   /**
-    * Get the property info
-    *
-    * @param trace whether trace is enabled
-    * @param info the bean info
-    * @param cl the classloader
-    * @param name the property name
-    * @param type the property type
-    * @return the property info
-    * @throws Throwable for any error
-    */
-   @SuppressWarnings("deprecation")
-   public static PropertyInfo resolveProperty(boolean trace, BeanInfo info, ClassLoader cl, String name, String type) throws Throwable
-   {
-      if (info == null)
-         throw new IllegalArgumentException("Null bean info");
-      if (name == null)
-         throw new IllegalArgumentException("Null name");
-
-      if (trace)
-         log.trace("Resolving property on bean info=" + info + " name=" + name);
-
-      if (cl == null)
-         cl = info.getClassInfo().getType().getClassLoader();
-
-      PropertyInfo ainfo = info.getProperty(name);
-      ClassInfo classInfo = info.getClassInfo();
-      TypeInfoFactory tif = classInfo.getTypeInfoFactory();
-      if (tif == null)
-         throw new IllegalArgumentException("TypeInfoFactory is null: " + classInfo);
-
-      // check for possible progression
-      String[] typeNames = {type};
-      TypeInfo[] typeInfos = {ainfo.getType()};
-      if (equals(typeNames, typeInfos) || isAssignable(tif, cl, typeNames, typeInfos))
-      {
-         return ainfo;
-      }
-
-      throw new JoinpointException("Property " + name + " not found for " + info);
-   }
-
-   /**
-    * Find a method
-    *
-    * @param info the bean info
-    * @param cl the classloader
-    * @param name the method name
-    * @param parameters the parameter metadata
-    * @param isStatic whether the method is static
-    * @param isPublic whether the method is public
-    * @return the method join point
-    * @throws Throwable for any error
-    */
-   public static MethodJoinpoint findMethod(BeanInfo info, ClassLoader cl, String name, List<ParameterMetaData> parameters, boolean isStatic, boolean isPublic) throws Throwable
-   {
-      boolean trace = log.isTraceEnabled();
-      return findMethod(trace, info, cl, name, parameters, isStatic, isPublic);
-   }
-
-   /**
-    * Find a method
-    *
-    * @param trace whether trace is enabled
-    * @param info the bean info
-    * @param cl the classloader
-    * @param name the method name
-    * @param parameters the parameter metadata
-    * @param isStatic whether the method is static
-    * @param isPublic whether the method is public
-    * @return the method join point
-    * @throws Throwable for any error
-    */
-   public static MethodJoinpoint findMethod(boolean trace, BeanInfo info, ClassLoader cl, String name, List<ParameterMetaData> parameters, boolean isStatic, boolean isPublic) throws Throwable
-   {
-      if (info == null)
-         throw new IllegalArgumentException("Null bean info");
-      if (name == null)
-         throw new IllegalArgumentException("Null name");
-
-      String[] paramTypes = getParameterTypes(trace, parameters);
-      MethodInfo minfo = findMethodInfo(info.getClassInfo(), name, paramTypes, isStatic, isPublic);
-      JoinpointFactory jpf = info.getJoinpointFactory();
-      MethodJoinpoint joinPoint = jpf.getMethodJoinpoint(minfo);
-
-      // Set the parameters
-      if (minfo != null)
-      {
-         TypeInfo[] pinfos = minfo.getParameterTypes();
-         Object[] params = getParameters(trace, cl, pinfos, parameters);
-         joinPoint.setArguments(params);
-      }
-
-      return joinPoint;
-   }
-
-   /**
-    * Get the parameters types
-    *
-    * @param trace whether trace is enabled
-    * @param parameters the parameter metadata
-    * @return an array of parameter types
-    * @throws Throwable for any error
-    */
-   public static String[] getParameterTypes(boolean trace, List<ParameterMetaData> parameters) throws Throwable
-   {
-      if (parameters == null)
-         return null;
-
-      String[] paramTypes = new String[parameters.size()];
-      int x = 0;
-      for (Iterator<ParameterMetaData> i = parameters.iterator(); i.hasNext();)
-      {
-         ParameterMetaData pmd = i.next();
-         paramTypes[x++] = pmd.getType();
-      }
-      return paramTypes;
-   }
-
-   /**
-    * Get the parameters types
-    *
-    * @param trace whether trace is enabled
-    * @param parameters the parameter types
-    * @return an array of parameter types
-    * @throws Throwable for any error
-    */
-   public static String[] getParameterTypes(boolean trace, TypeInfo[] parameters) throws Throwable
-   {
-      if (parameters == null)
-         return null;
-
-      String[] paramTypes = new String[parameters.length];
-      int x = 0;
-      for (int i = 0; i < parameters.length; ++i)
-         paramTypes[x++] = parameters[i].getName();
-      return paramTypes;
-   }
-
-   /**
-    * Get the parameters
-    *
-    * @param trace whether trace is enabled
-    * @param cl the classloader
-    * @param pinfos the parameter infos
-    * @param parameters the parameter metadata
-    * @return an array of parameters
-    * @throws Throwable for any error
-    */
-   public static Object[] getParameters(boolean trace, ClassLoader cl, TypeInfo[] pinfos, List<ParameterMetaData> parameters) throws Throwable
-   {
-      if (parameters == null)
-         return null;
-
-      Object[] params = new Object[parameters.size()];
-      int x = 0;
-      for (Iterator<ParameterMetaData> i = parameters.iterator(); i.hasNext();)
-      {
-         ParameterMetaData pdata = i.next();
-         ValueMetaData vmd = pdata.getValue();
-         params[x] = vmd.getValue(pinfos[x], cl);
-         x++;
-      }
-      return params;
-   }
-
-   /**
-    * Get the classloader for some BeanMetaData
-    *
-    * @param metaData the metaData
-    * @return the classloader
-    * @throws Throwable for any error
-    */
-   public static ClassLoader getClassLoader(BeanMetaData metaData) throws Throwable
-   {
-      ClassLoaderMetaData clmd = null;
-      if (metaData != null)
-         clmd = metaData.getClassLoader();
-      return getClassLoader(clmd);
-   }
-
-   /**
-    * Get the classloader for some ClassLoaderMetaData
-    *
-    * @param metaData the metaData
-    * @return the classloader
-    * @throws Throwable for any error
-    */
-   public static ClassLoader getClassLoader(ClassLoaderMetaData metaData) throws Throwable
-   {
-      ClassLoader tcl = Thread.currentThread().getContextClassLoader();
-      ClassLoader cl = null;
-      if (metaData != null)
-      {
-            ValueMetaData clVMD = metaData.getClassLoader();
-            if (clVMD != null)
-            {
-               Object object = clVMD.getValue(null, tcl);
-               if (object != null && object instanceof ClassLoader == false)
-                  throw new IllegalArgumentException("Configured object is not a classloader " + metaData);
-               cl = (ClassLoader) object;
-            }
-      }
-      if (cl == null)
-         cl = tcl;
-      return cl;
-   }
-
-   /**
-    * Test whether type names can be assigned to type infos
-    *
-    * @param tif the type info factory
-    * @param cl bean classloader
-    * @param typeNames the type names
-    * @param typeInfos the type infos
-    * @return true when they can be assigned
-    * @throws Throwable for any error
-    */
-   @SuppressWarnings("unchecked")
-   public static boolean isAssignable(TypeInfoFactory tif, ClassLoader cl, String[] typeNames, TypeInfo[] typeInfos) throws Throwable
-   {
-      if (cl == null)
-         return false;
-
-      if (simpleCheck(typeNames, typeInfos) == false)
-         return false;
-
-      for (int i = 0; i < typeNames.length; ++i)
-      {
-         if (typeNames[i] != null)
-         {
-            if (typeInfos[i].isAssignableFrom(tif.getTypeInfo(typeNames[i], cl)) == false)
-            {
-               return false;
-            }
-         }
-      }
-      return true;
-   }
-
-   /**
-    * ValueJoinpoint.
-    */
-   private static class ValueJoinpoint implements Joinpoint
-   {
-      /** The value metadata */
-      private ValueMetaData vmd;
-
-      /** The type info */
-      private TypeInfo info;
-
-      /** The classloader */
-      private ClassLoader cl;
-
-      /**
-       * Create a new ValueJoinpoint.
-       * 
-       * @param vmd the value metadata
-       * @param info the type info
-       * @param cl the classloader
-       */
-      public ValueJoinpoint(ValueMetaData vmd, TypeInfo info, ClassLoader cl)
-      {
-         this.vmd = vmd;
-         this.info = info;
-         this.cl = cl;
-      }
-
-      public Object dispatch() throws Throwable
-      {
-         return vmd.getValue(info, cl);
-      }
-
-      public String toHumanReadableString()
-      {
-         return vmd.toShortString();
-      }
-
-      public Object clone()
-      {
-         try
-         {
-            return super.clone();
-         }
-         catch (CloneNotSupportedException e)
-         {
-            throw new Error(e);
-         }
-      }
-
-   }
-}

Copied: projects/microcontainer/tags/2.0.0.GA/kernel/src/main/java/org/jboss/kernel/plugins/config/Configurator.java (from rev 81535, projects/microcontainer/branches/Branch_2_0/kernel/src/main/java/org/jboss/kernel/plugins/config/Configurator.java)
===================================================================
--- projects/microcontainer/tags/2.0.0.GA/kernel/src/main/java/org/jboss/kernel/plugins/config/Configurator.java	                        (rev 0)
+++ projects/microcontainer/tags/2.0.0.GA/kernel/src/main/java/org/jboss/kernel/plugins/config/Configurator.java	2008-11-25 13:56:03 UTC (rev 81552)
@@ -0,0 +1,768 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.kernel.plugins.config;
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.jboss.beans.info.spi.BeanInfo;
+import org.jboss.beans.info.spi.PropertyInfo;
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.beans.metadata.spi.ClassLoaderMetaData;
+import org.jboss.beans.metadata.spi.ConstructorMetaData;
+import org.jboss.beans.metadata.spi.ParameterMetaData;
+import org.jboss.beans.metadata.spi.PropertyMetaData;
+import org.jboss.beans.metadata.spi.ValueMetaData;
+import org.jboss.joinpoint.plugins.Config;
+import org.jboss.joinpoint.spi.ConstructorJoinpoint;
+import org.jboss.joinpoint.spi.Joinpoint;
+import org.jboss.joinpoint.spi.JoinpointException;
+import org.jboss.joinpoint.spi.JoinpointFactory;
+import org.jboss.joinpoint.spi.MethodJoinpoint;
+import org.jboss.kernel.spi.config.KernelConfig;
+import org.jboss.reflect.spi.ClassInfo;
+import org.jboss.reflect.spi.ConstructorInfo;
+import org.jboss.reflect.spi.MethodInfo;
+import org.jboss.reflect.spi.TypeInfo;
+import org.jboss.reflect.spi.TypeInfoFactory;
+
+/**
+ * Configuration utilities.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ * @version $Revision$
+ */
+public class Configurator extends Config
+{
+   /**
+    * Instantiate and configure a bean
+    *
+    * @param config the confg
+    * @param info the bean info
+    * @param metaData the bean metadata
+    * @return the instantiated and configured object
+    * @throws Throwable for any error
+    */
+   public static Object instantiateAndConfigure(KernelConfig config, BeanInfo info, BeanMetaData metaData) throws Throwable
+   {
+      Object result = instantiate(config, info, metaData);
+      if (metaData != null)
+         configure(result, info, metaData);
+      return result;
+   }
+
+   /**
+    * Instantiate a bean
+    *
+    * @param config the kernel config
+    * @param info the bean info
+    * @param metaData the bean metadata
+    * @return the instantiated object
+    * @throws Throwable for any error
+    */
+   public static Object instantiate(KernelConfig config, BeanInfo info, BeanMetaData metaData) throws Throwable
+   {
+      boolean trace = log.isTraceEnabled();
+      if (trace)
+         log.trace("Instantiating info=" + info + " metaData=" + metaData);
+
+      ConstructorMetaData constructor = null;
+      if (metaData != null)
+         constructor = metaData.getConstructor();
+      Joinpoint joinPoint = getConstructorJoinPoint(config, info, constructor, metaData);
+      return joinPoint.dispatch();
+   }
+
+   /**
+    * Get a constructor joinpoint
+    *
+    * @param config the kernel config
+    * @param info the bean info
+    * @param metaData the constructor metadata
+    * @param beanMetaData the bean metadata
+    * @return the joinpoint
+    * @throws Throwable for any error
+    */
+   public static Joinpoint getConstructorJoinPoint(KernelConfig config, BeanInfo info, ConstructorMetaData metaData, BeanMetaData beanMetaData)
+      throws Throwable
+   {
+      return getConstructorJoinPoint(config, info, metaData, beanMetaData, null);
+   }
+
+   /**
+    * Get a constructor joinpoint
+    *
+    * @param config the kernel config
+    * @param info the bean info
+    * @param metaData the constructor metadata
+    * @param beanMetaData the bean metadata
+    * @param object an opaque object
+    * @return the joinpoint
+    * @throws Throwable for any error
+    */
+   public static Joinpoint getConstructorJoinPoint(KernelConfig config, BeanInfo info, ConstructorMetaData metaData, BeanMetaData beanMetaData, Object object)
+      throws Throwable
+   {
+      boolean trace = log.isTraceEnabled();
+
+      if (trace)
+         log.trace("Get constructor joinpoint info=" + info + " constructor=" + metaData);
+
+      if (config == null)
+         throw new IllegalArgumentException("Null config");
+
+      if (metaData != null)
+      {
+         ClassLoader cl = getClassLoader(beanMetaData);
+
+         ValueMetaData vmd = metaData.getValue();
+         if (vmd != null)
+         {
+            TypeInfo typeInfo = null;
+            if (info != null)
+               typeInfo = info.getClassInfo();
+            return new ValueJoinpoint(vmd, typeInfo, cl);
+         }
+
+         vmd = metaData.getFactory();
+         if (vmd != null)
+         {
+            // Get the factory
+            Object factory = vmd.getValue(null, cl);
+
+            // Get the parameters
+            List<ParameterMetaData> parameters = metaData.getParameters();
+
+            // Describe the factory
+            BeanInfo factoryInfo = config.getBeanInfo(factory.getClass());
+
+            // Find the method
+            MethodJoinpoint joinPoint = findMethod(trace, factoryInfo, cl, metaData.getFactoryMethod(), parameters, false, true);
+            joinPoint.setTarget(factory);
+            MethodInfo minfo = joinPoint.getMethodInfo();
+
+            // Set the parameters
+            if (minfo != null)
+            {
+               TypeInfo[] pinfos = minfo.getParameterTypes();
+               Object[] params = getParameters(trace, cl, pinfos, parameters);
+               joinPoint.setArguments(params);
+            }
+            return joinPoint;
+         }
+
+         String factoryClassName = metaData.getFactoryClass();
+         if (factoryClassName != null)
+         {
+            // Get the parameters
+            List<ParameterMetaData> parameters = metaData.getParameters();
+
+            BeanInfo factoryInfo = config.getBeanInfo(factoryClassName, cl);
+
+            // Find the method
+            MethodJoinpoint joinPoint = findMethod(trace, factoryInfo, cl, metaData.getFactoryMethod(), parameters, true, true);
+            MethodInfo minfo = joinPoint.getMethodInfo();
+
+            // Set the parameters
+            if (minfo != null)
+            {
+               TypeInfo[] pinfos = minfo.getParameterTypes();
+               Object[] params = getParameters(trace, cl, pinfos, parameters);
+               joinPoint.setArguments(params);
+            }
+            return joinPoint;
+         }
+
+         // Find the constructor
+         ConstructorJoinpoint joinPoint = findConstructor(trace, info, metaData, object);
+         ConstructorInfo cinfo = joinPoint.getConstructorInfo();
+
+         // Set the parameters
+         if (cinfo != null)
+         {
+            TypeInfo[] pinfos = cinfo.getParameterTypes();
+            Object[] params = getParameters(trace, cl, pinfos, metaData.getParameters());
+            joinPoint.setArguments(params);
+         }
+         return joinPoint;
+      }
+
+      // Default constructor
+      return findConstructor(trace, info, metaData, object);
+   }
+
+   /**
+    * Find a constructor
+    *
+    * @param trace whether trace is enabled
+    * @param info the bean info
+    * @param metaData the bean metadata
+    * @return the constructor join point
+    * @throws Exception for any error
+    */
+   public static ConstructorJoinpoint findConstructor(boolean trace, BeanInfo info, BeanMetaData metaData) throws Exception
+   {
+      return findConstructor(trace, info, metaData.getConstructor());
+   }
+
+   /**
+    * Find a constructor
+    *
+    * @param trace whether trace is enabled
+    * @param info the bean info
+    * @param metaData the constructor metadata
+    * @return the constructor join point
+    * @throws Exception for any error
+    */
+   public static ConstructorJoinpoint findConstructor(boolean trace, BeanInfo info, ConstructorMetaData metaData) throws Exception
+   {
+      return findConstructor(trace, info, metaData, null);
+   }
+
+   /**
+    * Find a constructor
+    *
+    * @param trace whether trace is enabled
+    * @param info the bean info
+    * @param metaData the constructor metadata
+    * @param object an opaque object
+    * @return the constructor join point
+    * @throws Exception for any error
+    */
+   public static ConstructorJoinpoint findConstructor(boolean trace, BeanInfo info, ConstructorMetaData metaData, Object object) throws Exception
+   {
+      ConstructorInfo cinfo = resolveConstructor(trace, info, metaData);
+      JoinpointFactory jpf = info.getJoinpointFactory();
+      if (object == null)
+         return jpf.getConstructorJoinpoint(cinfo);
+      else
+         return jpf.getConstructorJoinpoint(cinfo, object);
+   }
+
+   /**
+    * Resolve a constructor
+    *
+    * @param trace whether trace is enabled
+    * @param info the bean info
+    * @param metaData the constructor metadata
+    * @return the constructor info
+    */
+   public static ConstructorInfo resolveConstructor(boolean trace, BeanInfo info, ConstructorMetaData metaData)
+   {
+      if (info == null)
+         throw new IllegalArgumentException("Null bean info");
+
+      List<ParameterMetaData> params = Collections.emptyList();
+      if (metaData != null && metaData.getParameters() != null)
+         params = metaData.getParameters();
+      String[] paramTypes = new String[params.size()];
+      if (params.isEmpty() == false)
+      {
+         int x = 0;
+         for (Iterator<ParameterMetaData> i = params.iterator(); i.hasNext();)
+         {
+            ParameterMetaData pdata = i.next();
+            paramTypes[x++] = pdata.getType();
+         }
+      }
+      return findConstructorInfo(info.getClassInfo(), paramTypes);
+   }
+
+   /**
+    * Configure a bean
+    *
+    * @param object the object to configure
+    * @param info the bean info
+    * @param metaData the bean metadata
+    * @throws Throwable for any error
+    */
+   public static void configure(Object object, BeanInfo info, BeanMetaData metaData) throws Throwable
+   {
+      boolean trace = log.isTraceEnabled();
+
+      if (object == null)
+         throw new IllegalArgumentException("Null object");
+      if (info == null)
+         throw new IllegalArgumentException("Null bean info");
+      if (metaData == null)
+         throw new IllegalArgumentException("Null bean metadata");
+
+      Set<PropertyMetaData> properties = metaData.getProperties();
+      if (properties != null && properties.isEmpty() == false)
+      {
+         ClassLoader cl = getClassLoader(metaData);
+
+         for (Iterator<PropertyMetaData> i = metaData.getProperties().iterator(); i.hasNext();)
+         {
+            PropertyMetaData property = i.next();
+            configure(trace, object, info, cl, property);
+         }
+      }
+   }
+
+   /**
+    * Configure a bean property
+    *
+    * @param object the object to configure
+    * @param info the bean info
+    * @param cl the classloader
+    * @param metaData the property metadata
+    * @throws Throwable for any error
+    */
+   public static void configure(Object object, BeanInfo info, ClassLoader cl, PropertyMetaData metaData) throws Throwable
+   {
+      boolean trace = log.isTraceEnabled();
+      configure(trace, object, info, cl, metaData);
+   }
+
+   /**
+    * Configure a bean property
+    *
+    * @param trace whether trace is enabled
+    * @param object the object to configure
+    * @param info the bean info
+    * @param cl the classloader
+    * @param metaData the property metadata
+    * @throws Throwable for any error
+    */
+   public static void configure(boolean trace, Object object, BeanInfo info, ClassLoader cl, PropertyMetaData metaData) throws Throwable
+   {
+      PropertyInfo ainfo = resolveProperty(trace, info, cl, metaData.getName(), metaData.getType());
+      configure(trace, object, ainfo, cl, metaData);
+   }
+
+   /**
+    * Configure a bean property
+    *
+    * @param object the object to configure
+    * @param info the property info
+    * @param cl the classloader
+    * @param metaData the property metadata
+    * @throws Throwable for any error
+    */
+   public static void configure(Object object, PropertyInfo info, ClassLoader cl, PropertyMetaData metaData) throws Throwable
+   {
+      boolean trace = log.isTraceEnabled();
+      configure(trace, object, info, cl, metaData);
+   }
+
+   /**
+    * Configure a bean property
+    *
+    * @param trace whether trace is enabled
+    * @param object the object to configure
+    * @param info the property info
+    * @param cl the classloader
+    * @param metaData the property metadata
+    * @throws Throwable for any error
+    */
+   public static void configure(boolean trace, Object object, PropertyInfo info, ClassLoader cl, PropertyMetaData metaData) throws Throwable
+   {
+      if (trace)
+         log.trace("Configuring info=" + info + " metaData=" + metaData);
+
+      if (trace)
+         log.trace("Setting property " + info);
+      info.set(object, metaData.getValue().getValue(info.getType(), cl));
+   }
+
+   /**
+    * Unconfigure a bean
+    *
+    * @param object the object to unconfigure
+    * @param info the bean info
+    * @param metaData the bean metadata
+    * @throws Throwable for any error
+    */
+   public static void unconfigure(Object object, BeanInfo info, BeanMetaData metaData) throws Throwable
+   {
+      if (object == null)
+         throw new IllegalArgumentException("Null object");
+      if (info == null)
+         throw new IllegalArgumentException("Null bean info");
+      if (metaData == null)
+         throw new IllegalArgumentException("Null bean metadata");
+
+      ClassLoader cl = getClassLoader(metaData);
+      Set<PropertyMetaData> propertys = metaData.getProperties();
+      if (propertys != null && propertys.isEmpty() == false)
+      {
+         for (Iterator<PropertyMetaData> i = metaData.getProperties().iterator(); i.hasNext();)
+         {
+            PropertyMetaData property = i.next();
+            unconfigure(object, cl, info, property);
+         }
+      }
+   }
+
+   /**
+    * Unconfigure a bean property
+    *
+    * @param object the object to unconfigure
+    * @param cl the classloader
+    * @param info the bean info
+    * @param metaData the property metadata
+    * @throws Throwable for any error
+    */
+   public static void unconfigure(Object object, ClassLoader cl, BeanInfo info, PropertyMetaData metaData) throws Throwable
+   {
+      boolean trace = log.isTraceEnabled();
+      PropertyInfo ainfo = resolveProperty(trace, info, cl, metaData.getName(), metaData.getType());
+      unconfigure(trace, object, ainfo, metaData);
+   }
+
+   /**
+    * UnConfigure a bean property
+    *
+    * @param trace whether trace is enabled
+    * @param object the object to configure
+    * @param info the property info
+    * @param metaData the property metadata
+    * @throws Throwable for any error
+    */
+   public static void unconfigure(boolean trace, Object object, PropertyInfo info, PropertyMetaData metaData) throws Throwable
+   {
+      if (trace)
+         log.trace("Unconfiguring info=" + info + " metaData=" + metaData);
+
+      if (trace)
+         log.trace("Unsetting property " + info);
+      info.set(object, null);
+   }
+
+   /**
+    * Get the property info
+    *
+    * @param trace whether trace is enabled
+    * @param info the bean info
+    * @param name the property name
+    * @return the property info
+    * @throws Throwable for any error
+    */
+   public static PropertyInfo resolveProperty(boolean trace, BeanInfo info, String name) throws Throwable
+   {
+      return resolveProperty(trace, info, null, name, null);
+   }
+
+   /**
+    * Get the property info
+    *
+    * @param trace whether trace is enabled
+    * @param info the bean info
+    * @param cl the classloader
+    * @param name the property name
+    * @param type the property type
+    * @return the property info
+    * @throws Throwable for any error
+    */
+   @SuppressWarnings("deprecation")
+   public static PropertyInfo resolveProperty(boolean trace, BeanInfo info, ClassLoader cl, String name, String type) throws Throwable
+   {
+      if (info == null)
+         throw new IllegalArgumentException("Null bean info");
+      if (name == null)
+         throw new IllegalArgumentException("Null name");
+
+      if (trace)
+         log.trace("Resolving property on bean info=" + info + " name=" + name);
+
+      if (cl == null)
+         cl = info.getClassInfo().getType().getClassLoader();
+
+      PropertyInfo ainfo = info.getProperty(name);
+      ClassInfo classInfo = info.getClassInfo();
+      TypeInfoFactory tif = classInfo.getTypeInfoFactory();
+      if (tif == null)
+         throw new IllegalArgumentException("TypeInfoFactory is null: " + classInfo);
+
+      // check for possible progression
+      String[] typeNames = {type};
+      TypeInfo[] typeInfos = {ainfo.getType()};
+      if (equals(typeNames, typeInfos) || isAssignable(tif, cl, typeNames, typeInfos))
+      {
+         return ainfo;
+      }
+
+      throw new JoinpointException("Property " + name + " not found for " + info);
+   }
+
+   /**
+    * Find a method
+    *
+    * @param info the bean info
+    * @param cl the classloader
+    * @param name the method name
+    * @param parameters the parameter metadata
+    * @param isStatic whether the method is static
+    * @param isPublic whether the method is public
+    * @return the method join point
+    * @throws Throwable for any error
+    */
+   public static MethodJoinpoint findMethod(BeanInfo info, ClassLoader cl, String name, List<ParameterMetaData> parameters, boolean isStatic, boolean isPublic) throws Throwable
+   {
+      boolean trace = log.isTraceEnabled();
+      return findMethod(trace, info, cl, name, parameters, isStatic, isPublic);
+   }
+
+   /**
+    * Find a method
+    *
+    * @param trace whether trace is enabled
+    * @param info the bean info
+    * @param cl the classloader
+    * @param name the method name
+    * @param parameters the parameter metadata
+    * @param isStatic whether the method is static
+    * @param isPublic whether the method is public
+    * @return the method join point
+    * @throws Throwable for any error
+    */
+   public static MethodJoinpoint findMethod(boolean trace, BeanInfo info, ClassLoader cl, String name, List<ParameterMetaData> parameters, boolean isStatic, boolean isPublic) throws Throwable
+   {
+      if (info == null)
+         throw new IllegalArgumentException("Null bean info");
+      if (name == null)
+         throw new IllegalArgumentException("Null name");
+
+      String[] paramTypes = getParameterTypes(trace, parameters);
+      MethodInfo minfo = findMethodInfo(info.getClassInfo(), name, paramTypes, isStatic, isPublic);
+      JoinpointFactory jpf = info.getJoinpointFactory();
+      MethodJoinpoint joinPoint = jpf.getMethodJoinpoint(minfo);
+
+      // Set the parameters
+      if (minfo != null)
+      {
+         TypeInfo[] pinfos = minfo.getParameterTypes();
+         Object[] params = getParameters(trace, cl, pinfos, parameters);
+         joinPoint.setArguments(params);
+      }
+
+      return joinPoint;
+   }
+
+   /**
+    * Get the parameters types
+    *
+    * @param trace whether trace is enabled
+    * @param parameters the parameter metadata
+    * @return an array of parameter types
+    * @throws Throwable for any error
+    */
+   public static String[] getParameterTypes(boolean trace, List<ParameterMetaData> parameters) throws Throwable
+   {
+      if (parameters == null)
+         return null;
+
+      String[] paramTypes = new String[parameters.size()];
+      int x = 0;
+      for (Iterator<ParameterMetaData> i = parameters.iterator(); i.hasNext();)
+      {
+         ParameterMetaData pmd = i.next();
+         paramTypes[x++] = pmd.getType();
+      }
+      return paramTypes;
+   }
+
+   /**
+    * Get the parameters types
+    *
+    * @param trace whether trace is enabled
+    * @param parameters the parameter types
+    * @return an array of parameter types
+    * @throws Throwable for any error
+    */
+   public static String[] getParameterTypes(boolean trace, TypeInfo[] parameters) throws Throwable
+   {
+      if (parameters == null)
+         return null;
+
+      String[] paramTypes = new String[parameters.length];
+      int x = 0;
+      for (int i = 0; i < parameters.length; ++i)
+         paramTypes[x++] = parameters[i].getName();
+      return paramTypes;
+   }
+
+   /**
+    * Get the parameters
+    *
+    * @param trace whether trace is enabled
+    * @param cl the classloader
+    * @param pinfos the parameter infos
+    * @param parameters the parameter metadata
+    * @return an array of parameters
+    * @throws Throwable for any error
+    */
+   public static Object[] getParameters(boolean trace, ClassLoader cl, TypeInfo[] pinfos, List<ParameterMetaData> parameters) throws Throwable
+   {
+      if (parameters == null)
+         return null;
+
+      Object[] params = new Object[parameters.size()];
+      int x = 0;
+      for (Iterator<ParameterMetaData> i = parameters.iterator(); i.hasNext();)
+      {
+         ParameterMetaData pdata = i.next();
+         ValueMetaData vmd = pdata.getValue();
+         params[x] = vmd.getValue(pinfos[x], cl);
+         x++;
+      }
+      return params;
+   }
+
+   /**
+    * Get the classloader for some BeanMetaData
+    *
+    * @param metaData the metaData
+    * @return the classloader
+    * @throws Throwable for any error
+    */
+   public static ClassLoader getClassLoader(BeanMetaData metaData) throws Throwable
+   {
+      ClassLoaderMetaData clmd = null;
+      if (metaData != null)
+         clmd = metaData.getClassLoader();
+      return getClassLoader(clmd);
+   }
+
+   /**
+    * Get the classloader for some ClassLoaderMetaData
+    *
+    * @param metaData the metaData
+    * @return the classloader
+    * @throws Throwable for any error
+    */
+   public static ClassLoader getClassLoader(ClassLoaderMetaData metaData) throws Throwable
+   {
+      ClassLoader tcl = null;
+      ClassLoader cl = null;
+
+      if (metaData != null)
+      {
+            ValueMetaData clVMD = metaData.getClassLoader();
+            if (clVMD != null)
+            {
+               tcl = Thread.currentThread().getContextClassLoader();
+               Object object = clVMD.getValue(null, tcl);
+               if (object != null && object instanceof ClassLoader == false)
+                  throw new IllegalArgumentException("Configured object is not a classloader " + metaData);
+               cl = (ClassLoader) object;
+            }
+      }
+
+      if (cl == null)
+      {
+         return (tcl != null) ? tcl : Thread.currentThread().getContextClassLoader();   
+      }
+      else
+      {
+         return cl;
+      }
+   }
+
+   /**
+    * Test whether type names can be assigned to type infos
+    *
+    * @param tif the type info factory
+    * @param cl bean classloader
+    * @param typeNames the type names
+    * @param typeInfos the type infos
+    * @return true when they can be assigned
+    * @throws Throwable for any error
+    */
+   @SuppressWarnings("unchecked")
+   public static boolean isAssignable(TypeInfoFactory tif, ClassLoader cl, String[] typeNames, TypeInfo[] typeInfos) throws Throwable
+   {
+      if (cl == null)
+         return false;
+
+      if (simpleCheck(typeNames, typeInfos) == false)
+         return false;
+
+      for (int i = 0; i < typeNames.length; ++i)
+      {
+         if (typeNames[i] != null)
+         {
+            if (typeInfos[i].isAssignableFrom(tif.getTypeInfo(typeNames[i], cl)) == false)
+            {
+               return false;
+            }
+         }
+      }
+      return true;
+   }
+
+   /**
+    * ValueJoinpoint.
+    */
+   private static class ValueJoinpoint implements Joinpoint
+   {
+      /** The value metadata */
+      private ValueMetaData vmd;
+
+      /** The type info */
+      private TypeInfo info;
+
+      /** The classloader */
+      private ClassLoader cl;
+
+      /**
+       * Create a new ValueJoinpoint.
+       * 
+       * @param vmd the value metadata
+       * @param info the type info
+       * @param cl the classloader
+       */
+      public ValueJoinpoint(ValueMetaData vmd, TypeInfo info, ClassLoader cl)
+      {
+         this.vmd = vmd;
+         this.info = info;
+         this.cl = cl;
+      }
+
+      public Object dispatch() throws Throwable
+      {
+         return vmd.getValue(info, cl);
+      }
+
+      public String toHumanReadableString()
+      {
+         return vmd.toShortString();
+      }
+
+      public Object clone()
+      {
+         try
+         {
+            return super.clone();
+         }
+         catch (CloneNotSupportedException e)
+         {
+            throw new Error(e);
+         }
+      }
+
+   }
+}

Deleted: projects/microcontainer/tags/2.0.0.GA/kernel/src/main/java/org/jboss/kernel/plugins/dependency/PropertyDispatchWrapper.java
===================================================================
--- projects/microcontainer/branches/Branch_2_0/kernel/src/main/java/org/jboss/kernel/plugins/dependency/PropertyDispatchWrapper.java	2008-11-25 08:40:28 UTC (rev 81534)
+++ projects/microcontainer/tags/2.0.0.GA/kernel/src/main/java/org/jboss/kernel/plugins/dependency/PropertyDispatchWrapper.java	2008-11-25 13:56:03 UTC (rev 81552)
@@ -1,140 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.kernel.plugins.dependency;
-
-import java.security.PrivilegedExceptionAction;
-
-import org.jboss.beans.info.plugins.BeanInfoUtil;
-import org.jboss.beans.info.spi.BeanInfo;
-import org.jboss.beans.info.spi.PropertyInfo;
-import org.jboss.beans.metadata.spi.PropertyMetaData;
-import org.jboss.beans.metadata.spi.ValueMetaData;
-import org.jboss.kernel.spi.dependency.KernelControllerContext;
-import org.jboss.logging.Logger;
-
-/**
- * PropertyDispatchWrapper.
- *
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- */
-class PropertyDispatchWrapper extends ExecutionWrapper
-{
-   private static Logger log = Logger.getLogger(ConfigureAction.class);
-
-   private KernelControllerContext context;
-   private PropertyMetaData property;
-   private boolean nullify;
-   private BeanInfo beanInfo;
-   private Object target;
-   private ClassLoader cl;
-
-   public PropertyDispatchWrapper(KernelControllerContext context, PropertyMetaData property, boolean nullify, BeanInfo beanInfo, Object target, ClassLoader cl)
-   {
-      if (context == null)
-         throw new IllegalArgumentException("Null context");
-      this.context = context;
-      if (property == null)
-         throw new IllegalArgumentException("Null property");
-      this.property = property;
-      this.nullify = nullify;
-      if (beanInfo == null)
-         throw new IllegalArgumentException("Null bean info");
-      this.beanInfo = beanInfo;
-      if (target == null)
-         throw new IllegalArgumentException("Null target");
-      this.target = target;
-      this.cl = cl;
-   }
-
-   public Object execute() throws Throwable
-   {
-      String name = property.getName();
-      if (nullify)
-      {
-         try
-         {
-            beanInfo.setProperty(target, name, null);
-         }
-         catch (Throwable t)
-         {
-            if (log.isTraceEnabled())
-               log.trace("Ignored for " + target + "." + name, t);
-         }
-      }
-      else
-      {
-         PropertyInfo propertyInfo = BeanInfoUtil.getPropertyInfo(beanInfo, target, name);
-         ValueMetaData valueMetaData = property.getValue();
-         Object value = valueMetaData.getValue(propertyInfo.getType(), cl);
-         validatePropertyValue(context, target, propertyInfo, value);
-         beanInfo.setProperty(target, name, value);
-      }
-      return null;
-   }
-
-   /**
-    * Validate value injection.
-    * Use jsr303 constraints.
-    *
-    * @param context the owner context
-    * @param target the target
-    * @param pi the property info
-    * @param value the new value
-    * @throws Throwable for any error
-    */
-   protected void validatePropertyValue(KernelControllerContext context, Object target, PropertyInfo pi, Object value) throws Throwable
-   {
-      BeanValidatorBridge bridge = KernelControllerContextAction.getBeanValidatorBridge(context);
-      if (bridge != null)
-         bridge.validatePropertyValue(context, target, pi, value);
-   }
-
-   protected PrivilegedExceptionAction<Object> getAction()
-   {
-      return new PrivilegedExceptionAction<Object>()
-      {
-         public Object run() throws Exception
-         {
-            try
-            {
-               return execute();
-            }
-            catch (RuntimeException e)
-            {
-               throw e;
-            }
-            catch (Exception e)
-            {
-               throw e;
-            }
-            catch (Error e)
-            {
-               throw e;
-            }
-            catch (Throwable t)
-            {
-               throw new RuntimeException(t);
-            }
-         }
-      };
-   }
-}

Copied: projects/microcontainer/tags/2.0.0.GA/kernel/src/main/java/org/jboss/kernel/plugins/dependency/PropertyDispatchWrapper.java (from rev 81535, projects/microcontainer/branches/Branch_2_0/kernel/src/main/java/org/jboss/kernel/plugins/dependency/PropertyDispatchWrapper.java)
===================================================================
--- projects/microcontainer/tags/2.0.0.GA/kernel/src/main/java/org/jboss/kernel/plugins/dependency/PropertyDispatchWrapper.java	                        (rev 0)
+++ projects/microcontainer/tags/2.0.0.GA/kernel/src/main/java/org/jboss/kernel/plugins/dependency/PropertyDispatchWrapper.java	2008-11-25 13:56:03 UTC (rev 81552)
@@ -0,0 +1,145 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.kernel.plugins.dependency;
+
+import java.security.PrivilegedExceptionAction;
+
+import org.jboss.beans.info.plugins.BeanInfoUtil;
+import org.jboss.beans.info.spi.BeanInfo;
+import org.jboss.beans.info.spi.PropertyInfo;
+import org.jboss.beans.metadata.spi.PropertyMetaData;
+import org.jboss.beans.metadata.spi.ValueMetaData;
+import org.jboss.kernel.spi.dependency.KernelControllerContext;
+import org.jboss.logging.Logger;
+import org.jboss.reflect.spi.TypeInfo;
+
+/**
+ * PropertyDispatchWrapper.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+class PropertyDispatchWrapper extends ExecutionWrapper
+{
+   private static Logger log = Logger.getLogger(ConfigureAction.class);
+
+   private KernelControllerContext context;
+   private PropertyMetaData property;
+   private boolean nullify;
+   private BeanInfo beanInfo;
+   private Object target;
+   private ClassLoader cl;
+
+   public PropertyDispatchWrapper(KernelControllerContext context, PropertyMetaData property, boolean nullify, BeanInfo beanInfo, Object target, ClassLoader cl)
+   {
+      if (context == null)
+         throw new IllegalArgumentException("Null context");
+      this.context = context;
+      if (property == null)
+         throw new IllegalArgumentException("Null property");
+      this.property = property;
+      this.nullify = nullify;
+      if (beanInfo == null)
+         throw new IllegalArgumentException("Null bean info");
+      this.beanInfo = beanInfo;
+      if (target == null)
+         throw new IllegalArgumentException("Null target");
+      this.target = target;
+      this.cl = cl;
+   }
+
+   public Object execute() throws Throwable
+   {
+      String name = property.getName();
+      PropertyInfo propertyInfo = BeanInfoUtil.getPropertyInfo(beanInfo, target, name);
+      TypeInfo typeInfo = propertyInfo.getType();
+      if (nullify)
+      {
+         if (typeInfo.isPrimitive() == false)
+         {
+            try
+            {
+               beanInfo.setProperty(target, name, null);
+            }
+            catch (Throwable t)
+            {
+               if (log.isTraceEnabled())
+                  log.trace("Ignored for " + target + "." + name, t);
+            }
+         }
+      }
+      else
+      {
+         ValueMetaData valueMetaData = property.getValue();
+         Object value = valueMetaData.getValue(typeInfo, cl);
+         validatePropertyValue(context, target, propertyInfo, value);
+         beanInfo.setProperty(target, name, value);
+      }
+      return null;
+   }
+
+   /**
+    * Validate value injection.
+    * Use jsr303 constraints.
+    *
+    * @param context the owner context
+    * @param target the target
+    * @param pi the property info
+    * @param value the new value
+    * @throws Throwable for any error
+    */
+   protected void validatePropertyValue(KernelControllerContext context, Object target, PropertyInfo pi, Object value) throws Throwable
+   {
+      BeanValidatorBridge bridge = KernelControllerContextAction.getBeanValidatorBridge(context);
+      if (bridge != null)
+         bridge.validatePropertyValue(context, target, pi, value);
+   }
+
+   protected PrivilegedExceptionAction<Object> getAction()
+   {
+      return new PrivilegedExceptionAction<Object>()
+      {
+         public Object run() throws Exception
+         {
+            try
+            {
+               return execute();
+            }
+            catch (RuntimeException e)
+            {
+               throw e;
+            }
+            catch (Exception e)
+            {
+               throw e;
+            }
+            catch (Error e)
+            {
+               throw e;
+            }
+            catch (Throwable t)
+            {
+               throw new RuntimeException(t);
+            }
+         }
+      };
+   }
+}

Deleted: projects/microcontainer/tags/2.0.0.GA/kernel/src/main/java/org/jboss/kernel/plugins/deployment/AbstractKernelDeployment.java
===================================================================
--- projects/microcontainer/branches/Branch_2_0/kernel/src/main/java/org/jboss/kernel/plugins/deployment/AbstractKernelDeployment.java	2008-11-25 08:40:28 UTC (rev 81534)
+++ projects/microcontainer/tags/2.0.0.GA/kernel/src/main/java/org/jboss/kernel/plugins/deployment/AbstractKernelDeployment.java	2008-11-25 13:56:03 UTC (rev 81552)
@@ -1,446 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.kernel.plugins.deployment;
-
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.CopyOnWriteArrayList;
-import javax.xml.bind.annotation.XmlAnyElement;
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElements;
-import javax.xml.bind.annotation.XmlNsForm;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.jboss.beans.metadata.plugins.AbstractAnnotationMetaData;
-import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
-import org.jboss.beans.metadata.plugins.AbstractClassLoaderMetaData;
-import org.jboss.beans.metadata.plugins.AbstractLazyMetaData;
-import org.jboss.beans.metadata.plugins.AbstractLifecycleMetaData;
-import org.jboss.beans.metadata.plugins.AbstractNamedAliasMetaData;
-import org.jboss.beans.metadata.plugins.AbstractValueMetaData;
-import org.jboss.beans.metadata.plugins.MutableLifecycleHolder;
-import org.jboss.beans.metadata.plugins.AbstractDependencyValueMetaData;
-import org.jboss.beans.metadata.spi.AnnotationMetaData;
-import org.jboss.beans.metadata.spi.BeanMetaData;
-import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
-import org.jboss.beans.metadata.spi.ClassLoaderMetaData;
-import org.jboss.beans.metadata.spi.LifecycleMetaData;
-import org.jboss.beans.metadata.spi.NamedAliasMetaData;
-import org.jboss.beans.metadata.spi.ValueMetaData;
-import org.jboss.beans.metadata.spi.factory.GenericBeanFactoryMetaData;
-import org.jboss.dependency.spi.ControllerMode;
-import org.jboss.dependency.spi.ControllerState;
-import org.jboss.kernel.spi.dependency.KernelControllerContext;
-import org.jboss.kernel.spi.deployment.KernelDeployment;
-import org.jboss.managed.api.annotation.ManagementDeployment;
-import org.jboss.managed.api.annotation.ManagementObject;
-import org.jboss.managed.api.annotation.ManagementProperties;
-import org.jboss.managed.api.annotation.ManagementProperty;
-import org.jboss.util.JBossObject;
-import org.jboss.util.JBossStringBuilder;
-import org.jboss.xb.annotations.JBossXmlSchema;
-
-/**
- * An abstract kernel deployment.
- * 
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision$
- */
- at ManagementDeployment(types={"jboss-beans"})
- at ManagementObject(properties = ManagementProperties.EXPLICIT) // TODO - explicitly add props we want to manage 
- at JBossXmlSchema(namespace="urn:jboss:bean-deployer:2.0", elementFormDefault=XmlNsForm.QUALIFIED, replacePropertyRefs=false)
- at XmlRootElement(name="deployment")
- at XmlType(name="deploymentType", propOrder={"annotations", "classLoader", "beanFactories", "create", "start", "stop", "destroy", "aliases"})
-public class AbstractKernelDeployment extends JBossObject
-   implements KernelDeployment, MutableLifecycleHolder, Serializable
-{
-   private static final long serialVersionUID = 3l;
-
-   /** The name of the deployment */
-   protected String name;
-
-   /** Whether it is installed */
-   protected boolean installed;
-
-   /** The installed contexts */
-   protected transient List<KernelControllerContext> installedContexts = new CopyOnWriteArrayList<KernelControllerContext>();
-
-   /** Is deployment scoped */
-   protected Boolean scoped;
-
-   /** The annotations */
-   protected Set<AnnotationMetaData> annotations;
-
-   /** The beans List<BeanMetaDataFactory> */
-   protected List<BeanMetaDataFactory> beanFactories;
-
-   /** The ClassLoader */
-   protected ClassLoaderMetaData classLoader;
-
-   /** default create lifecycle method */
-   protected LifecycleMetaData create;
-
-   /** default start lifecycle method */
-   protected LifecycleMetaData start;
-
-   /** default stop lifecycle method */
-   protected LifecycleMetaData stop;
-
-   /** default destroy lifecycle method */
-   protected LifecycleMetaData destroy;
-
-   /** The ControllerMode */
-   protected ControllerMode mode;
-
-   /** The aliases */
-   protected Set<NamedAliasMetaData> aliases;
-
-   /**
-    * Create a new kernel deployment
-    */
-   public AbstractKernelDeployment()
-   {
-   }
-
-   /**
-    * Set the bean factories.
-    *
-    * @deprecated use setBeanFactories
-    * @param beans a List<BeanMetaData>.
-    */
-   @SuppressWarnings("unchecked")
-   public void setBeans(List beans)
-   {
-      this.beanFactories = beans;
-      flushJBossObjectCache();
-   }
-
-   /**
-    * Set the bean factories.
-    * 
-    * @param beanFactories a List<BeanMetaDataFactory>.
-    */
-   @ManagementProperty(managed=true)
-   @XmlElements
-   ({
-      @XmlElement(name="bean", type=AbstractBeanMetaData.class),
-      @XmlElement(name="beanfactory", type=GenericBeanFactoryMetaData.class),
-      @XmlElement(name="lazy", type=AbstractLazyMetaData.class)
-   })
-   @XmlAnyElement
-   public void setBeanFactories(List<BeanMetaDataFactory> beanFactories)
-   {
-      this.beanFactories = beanFactories;
-      flushJBossObjectCache();
-   }
-
-   public String getName()
-   {
-      return name;
-   }
-
-   @XmlAttribute
-   public void setName(String name)
-   {
-      this.name = name;
-      flushJBossObjectCache();
-   }
-
-   public boolean isInstalled()
-   {
-      return installed;
-   }
-
-   public void setInstalled(boolean installed)
-   {
-      this.installed = installed;
-      flushJBossObjectCache();
-   }
-
-   public void addInstalledContext(KernelControllerContext context)
-   {
-      installedContexts.add(context);
-      flushJBossObjectCache();
-   }
-
-   public List<KernelControllerContext> getInstalledContexts()
-   {
-      return installedContexts;
-   }
-
-   public void removeInstalledContext(KernelControllerContext context)
-   {
-      installedContexts.remove(context);
-      flushJBossObjectCache();
-   }
-
-   public List<BeanMetaData> getBeans()
-   {
-      List<BeanMetaData> result = new ArrayList<BeanMetaData>();
-      
-      // Include the classloader if it is a bean
-      ClassLoaderMetaData classLoaderMetaData = getClassLoader();
-      if (classLoaderMetaData != null)
-      {
-         ValueMetaData classLoader = classLoaderMetaData.getClassLoader();
-         if (classLoader instanceof BeanMetaData)
-         {
-            // Hack, if it doesn't have a classloader use the "null" classloader
-            // we don't want it to gain itself as the classloader
-            BeanMetaData classLoaderBean = (BeanMetaData) classLoader;
-            if (classLoaderBean.getClassLoader() == null)
-               classLoaderBean.setClassLoader(new AbstractClassLoaderMetaData(new AbstractValueMetaData()));
-            result.add((BeanMetaData) classLoader);
-         }
-      }
-
-      List<BeanMetaDataFactory> factories = getBeanFactories();
-      if (factories != null && factories.isEmpty() == false)
-      {
-         for (BeanMetaDataFactory factory : factories)
-         {
-            if (factory == null)
-               throw new IllegalArgumentException("BeanMetaDataFactory cannot be null.");
-
-            List<BeanMetaData> beans = factory.getBeans();
-            if (beans != null && beans.isEmpty() == false)
-            {
-               for (BeanMetaData bmd : beans)
-               {
-                  if (bmd == null)
-                     throw new IllegalArgumentException("Bean meta data cannot be null.");
-
-                  // check annotations
-                  if (annotations != null && annotations.isEmpty() == false)
-                  {
-                     Set<AnnotationMetaData> annotationsBMD = bmd.getAnnotations();
-                     if (annotationsBMD == null)
-                     {
-                        annotationsBMD = new HashSet<AnnotationMetaData>();
-                        bmd.setAnnotations(annotationsBMD);
-                     }
-                     annotationsBMD.addAll(annotations);
-                  }
-
-                  // impl specific
-                  if (bmd instanceof AbstractBeanMetaData)
-                  {
-                     AbstractBeanMetaData bean = (AbstractBeanMetaData)bmd;
-                     // set deployment defaults, if not already set per bean
-                     if (bean.getCreate() == null && getCreate() != null)
-                     {
-                        bean.setCreate(getCreate());
-                     }
-                     if (bean.getStart() == null && getStart() != null)
-                     {
-                        bean.setStart(getStart());
-                     }
-                     if (bean.getStop() == null && getStop() != null)
-                     {
-                        bean.setStop(getStop());
-                     }
-                     if (bean.getDestroy() == null && getDestroy() != null)
-                     {
-                        bean.setDestroy(getDestroy());
-                     }
-
-                     // controller mode
-                     if (bean.getMode() == null && getMode() != null)
-                     {
-                        bean.setMode(getMode());
-                     }
-                  }
-
-                  // Use any deployment classloader if present and the bean doesn't have one
-                  ClassLoaderMetaData beanClassLoader = bmd.getClassLoader();
-                  if (beanClassLoader == null)
-                  {
-                     ClassLoaderMetaData deploymentClassLoader = getClassLoader();
-                     if (deploymentClassLoader != null)
-                     {
-                        // If the deployment classloader is a bean, replace it with an injection
-                        ValueMetaData classLoader = deploymentClassLoader.getClassLoader();
-                        if (classLoader instanceof BeanMetaData)
-                        {
-                           classLoader = new AbstractDependencyValueMetaData(((BeanMetaData) classLoader).getName());
-                           beanClassLoader = new AbstractClassLoaderMetaData(classLoader);
-                        }
-                        else
-                        {
-                           beanClassLoader = deploymentClassLoader;
-                        }
-                        bmd.setClassLoader(beanClassLoader);
-                     }
-                  }
-               }
-               result.addAll(beans);
-            }
-         }
-      }
-      // For backwards compatibility
-      if (result.isEmpty())
-         return null;
-      return result;
-   }
-
-   public Boolean getScoped()
-   {
-      return scoped;
-   }
-
-   @XmlAttribute
-   public void setScoped(Boolean scoped)
-   {
-      this.scoped = scoped;
-   }
-
-   public Set<AnnotationMetaData> getAnnotations()
-   {
-      return annotations;
-   }
-
-   @XmlElement(name="annotation", type=AbstractAnnotationMetaData.class)
-   public void setAnnotations(Set<AnnotationMetaData> annotations)
-   {
-      this.annotations = annotations;
-   }
-
-   public List<BeanMetaDataFactory> getBeanFactories()
-   {
-      return beanFactories;
-   }
-
-   public ClassLoaderMetaData getClassLoader()
-   {
-      return classLoader;
-   }
-
-   /**
-    * Set the classloader
-    * 
-    * @param classLoader the classloader metadata
-    */
-   @XmlElement(name="classloader", type=AbstractClassLoaderMetaData.class)
-   public void setClassLoader(ClassLoaderMetaData classLoader)
-   {
-      this.classLoader = classLoader;
-   }
-
-   public LifecycleMetaData getCreate()
-   {
-      return create;
-   }
-
-   @XmlElement(name="create", type=AbstractLifecycleMetaData.class)
-   public void setCreate(LifecycleMetaData create)
-   {
-      create.setState(ControllerState.CREATE);
-      this.create = create;
-   }
-
-   public LifecycleMetaData getStart()
-   {
-      return start;
-   }
-
-   @XmlElement(name="start", type=AbstractLifecycleMetaData.class)
-   public void setStart(LifecycleMetaData start)
-   {
-      start.setState(ControllerState.START);
-      this.start = start;
-   }
-
-   public LifecycleMetaData getStop()
-   {
-      return stop;
-   }
-
-   @XmlElement(name="stop", type=AbstractLifecycleMetaData.class)
-   public void setStop(LifecycleMetaData stop)
-   {
-      stop.setState(ControllerState.START);
-      this.stop = stop;
-   }
-
-   public LifecycleMetaData getDestroy()
-   {
-      return destroy;
-   }
-
-   @XmlElement(name="destroy", type=AbstractLifecycleMetaData.class)
-   public void setDestroy(LifecycleMetaData destroy)
-   {
-      destroy.setState(ControllerState.CREATE);
-      this.destroy = destroy;
-   }
-
-   public Set<NamedAliasMetaData> getAliases()
-   {
-      return aliases;
-   }
-
-   @XmlElement(name="alias", type=AbstractNamedAliasMetaData.class)
-   public void setAliases(Set<NamedAliasMetaData> aliases)
-   {
-      this.aliases = aliases;
-   }
-
-   public ControllerMode getMode()
-   {
-      return mode;
-   }
-
-   @XmlAttribute
-   public void setMode(ControllerMode mode)
-   {
-      this.mode = mode;
-   }
-
-   public void toString(JBossStringBuilder buffer)
-   {
-      buffer.append("name=").append(name);
-      buffer.append(" installed=").append(installed);
-      if (classLoader != null)
-         buffer.append(" classLoader=").append(classLoader);
-      if (beanFactories != null)
-         buffer.append(" beanFactories=").append(beanFactories);
-   }
-
-   public void toShortString(JBossStringBuilder buffer)
-   {
-      buffer.append(name);
-   }
-
-   private void readObject(java.io.ObjectInputStream in)
-       throws IOException, ClassNotFoundException
-   {
-      in.defaultReadObject();
-      installedContexts = new CopyOnWriteArrayList<KernelControllerContext>();
-   }
-}
\ No newline at end of file

Copied: projects/microcontainer/tags/2.0.0.GA/kernel/src/main/java/org/jboss/kernel/plugins/deployment/AbstractKernelDeployment.java (from rev 81535, projects/microcontainer/branches/Branch_2_0/kernel/src/main/java/org/jboss/kernel/plugins/deployment/AbstractKernelDeployment.java)
===================================================================
--- projects/microcontainer/tags/2.0.0.GA/kernel/src/main/java/org/jboss/kernel/plugins/deployment/AbstractKernelDeployment.java	                        (rev 0)
+++ projects/microcontainer/tags/2.0.0.GA/kernel/src/main/java/org/jboss/kernel/plugins/deployment/AbstractKernelDeployment.java	2008-11-25 13:56:03 UTC (rev 81552)
@@ -0,0 +1,447 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.kernel.plugins.deployment;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.CopyOnWriteArrayList;
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElements;
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.beans.metadata.plugins.AbstractAnnotationMetaData;
+import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
+import org.jboss.beans.metadata.plugins.AbstractClassLoaderMetaData;
+import org.jboss.beans.metadata.plugins.AbstractLazyMetaData;
+import org.jboss.beans.metadata.plugins.AbstractLifecycleMetaData;
+import org.jboss.beans.metadata.plugins.AbstractNamedAliasMetaData;
+import org.jboss.beans.metadata.plugins.AbstractValueMetaData;
+import org.jboss.beans.metadata.plugins.MutableLifecycleHolder;
+import org.jboss.beans.metadata.plugins.AbstractDependencyValueMetaData;
+import org.jboss.beans.metadata.spi.AnnotationMetaData;
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
+import org.jboss.beans.metadata.spi.ClassLoaderMetaData;
+import org.jboss.beans.metadata.spi.LifecycleMetaData;
+import org.jboss.beans.metadata.spi.NamedAliasMetaData;
+import org.jboss.beans.metadata.spi.ValueMetaData;
+import org.jboss.beans.metadata.spi.factory.GenericBeanFactoryMetaData;
+import org.jboss.dependency.spi.ControllerMode;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.kernel.spi.dependency.KernelControllerContext;
+import org.jboss.kernel.spi.deployment.KernelDeployment;
+import org.jboss.managed.api.annotation.ManagementDeployment;
+import org.jboss.managed.api.annotation.ManagementObject;
+import org.jboss.managed.api.annotation.ManagementProperties;
+import org.jboss.managed.api.annotation.ManagementProperty;
+import org.jboss.util.JBossObject;
+import org.jboss.util.JBossStringBuilder;
+import org.jboss.xb.annotations.JBossXmlSchema;
+
+/**
+ * An abstract kernel deployment.
+ * 
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision$
+ */
+ at ManagementDeployment(types={"jboss-beans"})
+ at ManagementObject(properties = ManagementProperties.EXPLICIT) // TODO - explicitly add props we want to manage 
+ at JBossXmlSchema(namespace="urn:jboss:bean-deployer:2.0", elementFormDefault=XmlNsForm.QUALIFIED, replacePropertyRefs=false)
+ at XmlRootElement(name="deployment")
+ at XmlType(name="deploymentType", propOrder={"annotations", "classLoader", "beanFactories", "create", "start", "stop", "destroy", "aliases"})
+public class AbstractKernelDeployment extends JBossObject
+   implements KernelDeployment, MutableLifecycleHolder, Serializable
+{
+   private static final long serialVersionUID = 3l;
+
+   /** The name of the deployment */
+   protected String name;
+
+   /** Whether it is installed */
+   protected boolean installed;
+
+   /** The installed contexts */
+   protected transient List<KernelControllerContext> installedContexts = new CopyOnWriteArrayList<KernelControllerContext>();
+
+   /** Is deployment scoped */
+   protected Boolean scoped;
+
+   /** The annotations */
+   protected Set<AnnotationMetaData> annotations;
+
+   /** The beans List<BeanMetaDataFactory> */
+   protected List<BeanMetaDataFactory> beanFactories;
+
+   /** The ClassLoader */
+   protected ClassLoaderMetaData classLoader;
+
+   /** default create lifecycle method */
+   protected LifecycleMetaData create;
+
+   /** default start lifecycle method */
+   protected LifecycleMetaData start;
+
+   /** default stop lifecycle method */
+   protected LifecycleMetaData stop;
+
+   /** default destroy lifecycle method */
+   protected LifecycleMetaData destroy;
+
+   /** The ControllerMode */
+   protected ControllerMode mode;
+
+   /** The aliases */
+   protected Set<NamedAliasMetaData> aliases;
+
+   /**
+    * Create a new kernel deployment
+    */
+   public AbstractKernelDeployment()
+   {
+   }
+
+   /**
+    * Set the bean factories.
+    *
+    * @deprecated use setBeanFactories
+    * @param beans a List<BeanMetaData>.
+    */
+   @SuppressWarnings("unchecked")
+   @Deprecated
+   public void setBeans(List beans)
+   {
+      this.beanFactories = beans;
+      flushJBossObjectCache();
+   }
+
+   /**
+    * Set the bean factories.
+    * 
+    * @param beanFactories a List<BeanMetaDataFactory>.
+    */
+   @ManagementProperty(managed=true)
+   @XmlElements
+   ({
+      @XmlElement(name="bean", type=AbstractBeanMetaData.class),
+      @XmlElement(name="beanfactory", type=GenericBeanFactoryMetaData.class),
+      @XmlElement(name="lazy", type=AbstractLazyMetaData.class)
+   })
+   @XmlAnyElement
+   public void setBeanFactories(List<BeanMetaDataFactory> beanFactories)
+   {
+      this.beanFactories = beanFactories;
+      flushJBossObjectCache();
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+
+   @XmlAttribute
+   public void setName(String name)
+   {
+      this.name = name;
+      flushJBossObjectCache();
+   }
+
+   public boolean isInstalled()
+   {
+      return installed;
+   }
+
+   public void setInstalled(boolean installed)
+   {
+      this.installed = installed;
+      flushJBossObjectCache();
+   }
+
+   public void addInstalledContext(KernelControllerContext context)
+   {
+      installedContexts.add(context);
+      flushJBossObjectCache();
+   }
+
+   public List<KernelControllerContext> getInstalledContexts()
+   {
+      return installedContexts;
+   }
+
+   public void removeInstalledContext(KernelControllerContext context)
+   {
+      installedContexts.remove(context);
+      flushJBossObjectCache();
+   }
+
+   public List<BeanMetaData> getBeans()
+   {
+      List<BeanMetaData> result = new ArrayList<BeanMetaData>();
+      
+      // Include the classloader if it is a bean
+      ClassLoaderMetaData classLoaderMetaData = getClassLoader();
+      if (classLoaderMetaData != null)
+      {
+         ValueMetaData classLoader = classLoaderMetaData.getClassLoader();
+         if (classLoader instanceof BeanMetaData)
+         {
+            // Hack, if it doesn't have a classloader use the "null" classloader
+            // we don't want it to gain itself as the classloader
+            BeanMetaData classLoaderBean = (BeanMetaData) classLoader;
+            if (classLoaderBean.getClassLoader() == null)
+               classLoaderBean.setClassLoader(new AbstractClassLoaderMetaData(new AbstractValueMetaData()));
+            result.add((BeanMetaData) classLoader);
+         }
+      }
+
+      List<BeanMetaDataFactory> factories = getBeanFactories();
+      if (factories != null && factories.isEmpty() == false)
+      {
+         for (BeanMetaDataFactory factory : factories)
+         {
+            if (factory == null)
+               throw new IllegalArgumentException("BeanMetaDataFactory cannot be null.");
+
+            List<BeanMetaData> beans = factory.getBeans();
+            if (beans != null && beans.isEmpty() == false)
+            {
+               for (BeanMetaData bmd : beans)
+               {
+                  if (bmd == null)
+                     throw new IllegalArgumentException("Bean meta data cannot be null.");
+
+                  // check annotations
+                  if (annotations != null && annotations.isEmpty() == false)
+                  {
+                     Set<AnnotationMetaData> annotationsBMD = bmd.getAnnotations();
+                     if (annotationsBMD == null)
+                     {
+                        annotationsBMD = new HashSet<AnnotationMetaData>();
+                        bmd.setAnnotations(annotationsBMD);
+                     }
+                     annotationsBMD.addAll(annotations);
+                  }
+
+                  // impl specific
+                  if (bmd instanceof AbstractBeanMetaData)
+                  {
+                     AbstractBeanMetaData bean = (AbstractBeanMetaData)bmd;
+                     // set deployment defaults, if not already set per bean
+                     if (bean.getCreate() == null && getCreate() != null)
+                     {
+                        bean.setCreate(getCreate());
+                     }
+                     if (bean.getStart() == null && getStart() != null)
+                     {
+                        bean.setStart(getStart());
+                     }
+                     if (bean.getStop() == null && getStop() != null)
+                     {
+                        bean.setStop(getStop());
+                     }
+                     if (bean.getDestroy() == null && getDestroy() != null)
+                     {
+                        bean.setDestroy(getDestroy());
+                     }
+
+                     // controller mode
+                     if (bean.getMode() == null && getMode() != null)
+                     {
+                        bean.setMode(getMode());
+                     }
+                  }
+
+                  // Use any deployment classloader if present and the bean doesn't have one
+                  ClassLoaderMetaData beanClassLoader = bmd.getClassLoader();
+                  if (beanClassLoader == null)
+                  {
+                     ClassLoaderMetaData deploymentClassLoader = getClassLoader();
+                     if (deploymentClassLoader != null)
+                     {
+                        // If the deployment classloader is a bean, replace it with an injection
+                        ValueMetaData classLoader = deploymentClassLoader.getClassLoader();
+                        if (classLoader instanceof BeanMetaData)
+                        {
+                           classLoader = new AbstractDependencyValueMetaData(((BeanMetaData) classLoader).getName());
+                           beanClassLoader = new AbstractClassLoaderMetaData(classLoader);
+                        }
+                        else
+                        {
+                           beanClassLoader = deploymentClassLoader;
+                        }
+                        bmd.setClassLoader(beanClassLoader);
+                     }
+                  }
+               }
+               result.addAll(beans);
+            }
+         }
+      }
+      // For backwards compatibility
+      if (result.isEmpty())
+         return null;
+      return result;
+   }
+
+   public Boolean getScoped()
+   {
+      return scoped;
+   }
+
+   @XmlAttribute
+   public void setScoped(Boolean scoped)
+   {
+      this.scoped = scoped;
+   }
+
+   public Set<AnnotationMetaData> getAnnotations()
+   {
+      return annotations;
+   }
+
+   @XmlElement(name="annotation", type=AbstractAnnotationMetaData.class)
+   public void setAnnotations(Set<AnnotationMetaData> annotations)
+   {
+      this.annotations = annotations;
+   }
+
+   public List<BeanMetaDataFactory> getBeanFactories()
+   {
+      return beanFactories;
+   }
+
+   public ClassLoaderMetaData getClassLoader()
+   {
+      return classLoader;
+   }
+
+   /**
+    * Set the classloader
+    * 
+    * @param classLoader the classloader metadata
+    */
+   @XmlElement(name="classloader", type=AbstractClassLoaderMetaData.class)
+   public void setClassLoader(ClassLoaderMetaData classLoader)
+   {
+      this.classLoader = classLoader;
+   }
+
+   public LifecycleMetaData getCreate()
+   {
+      return create;
+   }
+
+   @XmlElement(name="create", type=AbstractLifecycleMetaData.class)
+   public void setCreate(LifecycleMetaData create)
+   {
+      create.setState(ControllerState.CREATE);
+      this.create = create;
+   }
+
+   public LifecycleMetaData getStart()
+   {
+      return start;
+   }
+
+   @XmlElement(name="start", type=AbstractLifecycleMetaData.class)
+   public void setStart(LifecycleMetaData start)
+   {
+      start.setState(ControllerState.START);
+      this.start = start;
+   }
+
+   public LifecycleMetaData getStop()
+   {
+      return stop;
+   }
+
+   @XmlElement(name="stop", type=AbstractLifecycleMetaData.class)
+   public void setStop(LifecycleMetaData stop)
+   {
+      stop.setState(ControllerState.START);
+      this.stop = stop;
+   }
+
+   public LifecycleMetaData getDestroy()
+   {
+      return destroy;
+   }
+
+   @XmlElement(name="destroy", type=AbstractLifecycleMetaData.class)
+   public void setDestroy(LifecycleMetaData destroy)
+   {
+      destroy.setState(ControllerState.CREATE);
+      this.destroy = destroy;
+   }
+
+   public Set<NamedAliasMetaData> getAliases()
+   {
+      return aliases;
+   }
+
+   @XmlElement(name="alias", type=AbstractNamedAliasMetaData.class)
+   public void setAliases(Set<NamedAliasMetaData> aliases)
+   {
+      this.aliases = aliases;
+   }
+
+   public ControllerMode getMode()
+   {
+      return mode;
+   }
+
+   @XmlAttribute
+   public void setMode(ControllerMode mode)
+   {
+      this.mode = mode;
+   }
+
+   public void toString(JBossStringBuilder buffer)
+   {
+      buffer.append("name=").append(name);
+      buffer.append(" installed=").append(installed);
+      if (classLoader != null)
+         buffer.append(" classLoader=").append(classLoader);
+      if (beanFactories != null)
+         buffer.append(" beanFactories=").append(beanFactories);
+   }
+
+   public void toShortString(JBossStringBuilder buffer)
+   {
+      buffer.append(name);
+   }
+
+   private void readObject(java.io.ObjectInputStream in)
+       throws IOException, ClassNotFoundException
+   {
+      in.defaultReadObject();
+      installedContexts = new CopyOnWriteArrayList<KernelControllerContext>();
+   }
+}
\ No newline at end of file

Deleted: projects/microcontainer/tags/2.0.0.GA/kernel/src/test/java/org/jboss/test/kernel/config/test/BeanMetaDataBuilderTestCase.java
===================================================================
--- projects/microcontainer/branches/Branch_2_0/kernel/src/test/java/org/jboss/test/kernel/config/test/BeanMetaDataBuilderTestCase.java	2008-11-25 08:40:28 UTC (rev 81534)
+++ projects/microcontainer/tags/2.0.0.GA/kernel/src/test/java/org/jboss/test/kernel/config/test/BeanMetaDataBuilderTestCase.java	2008-11-25 13:56:03 UTC (rev 81552)
@@ -1,914 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.kernel.config.test;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.HashSet;
-
-import junit.framework.Test;
-import org.jboss.beans.metadata.api.model.AutowireType;
-import org.jboss.beans.metadata.plugins.InstallCallbackMetaData;
-import org.jboss.beans.metadata.plugins.UninstallCallbackMetaData;
-import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
-import org.jboss.beans.metadata.plugins.AbstractRelatedClassMetaData;
-import org.jboss.beans.metadata.plugins.builder.BeanMetaDataBuilderFactory;
-import org.jboss.beans.metadata.spi.BeanMetaData;
-import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
-import org.jboss.beans.metadata.spi.CallbackMetaData;
-import org.jboss.beans.metadata.spi.ValueMetaData;
-import org.jboss.beans.metadata.spi.LifecycleMetaData;
-import org.jboss.beans.metadata.spi.RelatedClassMetaData;
-import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
-import org.jboss.dependency.spi.Cardinality;
-import org.jboss.dependency.spi.ControllerContext;
-import org.jboss.dependency.spi.ControllerState;
-import org.jboss.dependency.spi.ErrorHandlingMode;
-import org.jboss.kernel.Kernel;
-import org.jboss.kernel.plugins.deployment.AbstractKernelDeployer;
-import org.jboss.kernel.plugins.deployment.AbstractKernelDeployment;
-import org.jboss.kernel.spi.dependency.KernelController;
-import org.jboss.kernel.spi.dependency.KernelControllerContext;
-import org.jboss.metadata.spi.MetaData;
-import org.jboss.test.kernel.config.support.SimpleAnnotation;
-import org.jboss.test.kernel.config.support.SimpleBean;
-import org.jboss.test.kernel.config.support.SimpleCallbackBean;
-import org.jboss.test.kernel.config.support.SimpleLifecycleBean;
-import org.jboss.test.kernel.config.support.Transformer;
-import org.jboss.test.kernel.config.support.TrimTransformer;
-
-/**
- * Builder TestCase.
- *
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- */
-public class BeanMetaDataBuilderTestCase extends AbstractKernelConfigTest
-{
-   public static Test suite()
-   {
-      return suite(BeanMetaDataBuilderTestCase.class);
-   }
-
-   public BeanMetaDataBuilderTestCase(String name) throws Throwable
-   {
-      super(name);
-   }
-
-   public void testConstructor() throws Throwable
-   {
-      BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder("FromBMD", SimpleBean.class.getName());
-      builder.addConstructorParameter(String.class.getName(), "TestConstructor");
-      BeanMetaData beanMetaData = builder.getBeanMetaData();
-      SimpleBean fbmd = (SimpleBean)instantiateAndConfigure(beanMetaData);
-
-      assertNotNull(fbmd);
-      assertNotNull(fbmd.getConstructorUsed());
-      assertEquals("TestConstructor", fbmd.getConstructorUsed());
-   }
-
-   public void testProperty() throws Throwable
-   {
-      BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder("PropBMD", SimpleBean.class.getName())
-            .addPropertyMetaData("adouble", 3.1459)
-            .addPropertyMetaData("anint", "123")
-            .addPropertyMetaData("collection", new ArrayList<Object>());
-      BeanMetaData beanMetaData = builder.getBeanMetaData();
-      SimpleBean pbmd = (SimpleBean)instantiateAndConfigure(beanMetaData);
-
-      assertNotNull(pbmd);
-      assertEquals(3.1459, pbmd.getAdouble());
-      assertEquals(123, pbmd.getAnint());
-      assertNotNull(pbmd.getCollection());
-      assertTrue(pbmd.getCollection().isEmpty());
-   }
-
-   public void testLifecycle() throws Throwable
-   {
-      Kernel kernel = bootstrap();
-
-      BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder("SLB", SimpleLifecycleBean.class.getName())
-            .addCreateParameter(String.class.getName(), "ParamCreate")
-            .setStart("doStart")
-            .addStartParameter(String.class.getName(), "ParamStart")
-            .setStop("doStop")
-            .addStopParameter(String.class.getName(), "ParamStop")
-            .addDestroyParameter(String.class.getName(), "ParamDestroy");
-      BeanMetaData beanMetaData = builder.getBeanMetaData();
-
-      KernelController controller = kernel.getController();
-
-      KernelControllerContext context = controller.install(beanMetaData);
-      SimpleLifecycleBean slb = (SimpleLifecycleBean)context.getTarget();
-
-      assertNotNull(slb);
-      assertEquals("ParamCreate", slb.getCreate());
-      assertEquals("ParamStart", slb.getStart());
-
-      controller.uninstall("SLB");
-
-      assertEquals("ParamStop", slb.getStop());
-      assertEquals("ParamDestroy", slb.getDestroy());
-   }
-
-   public void testInstall() throws Throwable
-   {
-      Kernel kernel = bootstrap();
-
-      BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder("SLB", SimpleLifecycleBean.class.getName())
-            .addInstall("installParam", String.class.getName(), "Install")
-            .addUninstall("uninstallParam", String.class.getName(), "Uninstall");
-      BeanMetaData beanMetaData = builder.getBeanMetaData();
-
-      KernelController controller = kernel.getController();
-
-      KernelControllerContext context = controller.install(beanMetaData);
-      SimpleLifecycleBean slb = (SimpleLifecycleBean)context.getTarget();
-
-      assertNotNull(slb);
-      assertEquals("Install", slb.getInstall());
-
-      controller.uninstall("SLB");
-
-      assertEquals("Uninstall", slb.getInstall());
-   }
-
-   @SuppressWarnings("deprecation")
-   public void testDemandSupply() throws Throwable
-   {
-      BeanMetaDataBuilder demand = BeanMetaDataBuilderFactory.createBuilder("DemandBean", SimpleBean.class.getName());
-      demand.addDemand("Barrier");
-      BeanMetaData demandBean = demand.getBeanMetaData();
-
-      BeanMetaDataBuilder supply = BeanMetaDataBuilderFactory.createBuilder("SupplyBean", SimpleLifecycleBean.class.getName());
-      supply.addSupply("Barrier");
-      BeanMetaData supplyBean = supply.getBeanMetaData();
-
-      AbstractKernelDeployment deployment = new AbstractKernelDeployment();
-      deployment.setBeans(Arrays.asList(demandBean, supplyBean));
-
-      Kernel kernel = bootstrap();
-      KernelController controller = kernel.getController();
-      AbstractKernelDeployer deployer = new AbstractKernelDeployer(kernel);
-
-      deployer.deploy(deployment);
-      try
-      {
-         Object db = controller.getInstalledContext("DemandBean").getTarget();
-         assertNotNull(db);
-         Object sb = controller.getInstalledContext("SupplyBean").getTarget();
-         assertNotNull(sb);
-      }
-      finally
-      {
-         deployer.undeploy(deployment);
-      }
-   }
-
-   @SuppressWarnings("deprecation")
-   public void testDependency() throws Throwable
-   {
-      BeanMetaDataBuilder dependOn = BeanMetaDataBuilderFactory.createBuilder("DependOnBean", SimpleBean.class.getName());
-      dependOn.addDependency("DependencyResolver");
-      BeanMetaData dependOnBean = dependOn.getBeanMetaData();
-
-      BeanMetaDataBuilder resolver = BeanMetaDataBuilderFactory.createBuilder("DependencyResolver", SimpleLifecycleBean.class.getName());
-      BeanMetaData resolverBean = resolver.getBeanMetaData();
-
-      AbstractKernelDeployment deployment = new AbstractKernelDeployment();
-      deployment.setBeans(Arrays.asList(dependOnBean, resolverBean));
-
-      Kernel kernel = bootstrap();
-      KernelController controller = kernel.getController();
-      AbstractKernelDeployer deployer = new AbstractKernelDeployer(kernel);
-
-      deployer.deploy(deployment);
-      try
-      {
-         Object db = controller.getInstalledContext("DependOnBean").getTarget();
-         assertNotNull(db);
-         Object rb = controller.getInstalledContext("DependencyResolver").getTarget();
-         assertNotNull(rb);
-      }
-      finally
-      {
-         deployer.undeploy(deployment);
-      }
-   }
-
-   @SuppressWarnings("deprecation")
-   public void testCollectionProperties() throws Throwable
-   {
-      BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder("CollectionBean", SimpleBean.class.getName());
-
-      List<ValueMetaData> array = builder.createArray();
-      array.add(builder.createValue(new Integer(5)));
-      array.add(builder.createValue(new Integer(10)));
-      builder.addPropertyMetaData("array", array);
-
-      List<ValueMetaData> list = builder.createList();
-      list.add(builder.createValue("One"));
-      list.add(builder.createValue("Two"));
-      builder.addPropertyMetaData("list", list);
-
-      Set<ValueMetaData> set = builder.createSet();
-      set.add(builder.createValue("En"));
-      set.add(builder.createValue("To"));
-      builder.addPropertyMetaData("set", set);
-
-      Collection<ValueMetaData> collection = builder.createCollection();
-      collection.add(builder.createValue("Eins"));
-      collection.add(builder.createValue("Zwei"));
-      builder.addPropertyMetaData("collection", collection);
-
-      Map<ValueMetaData, ValueMetaData> map = builder.createMap();
-      map.put(builder.createValue("One"), builder.createValue("Uno"));
-      map.put(builder.createValue("Two"), builder.createValue("Dos"));
-      builder.addPropertyMetaData("map", map);
-
-      AbstractKernelDeployment deployment = new AbstractKernelDeployment();
-      deployment.setBeans(Arrays.asList(builder.getBeanMetaData()));
-
-      Kernel kernel = bootstrap();
-      KernelController controller = kernel.getController();
-      AbstractKernelDeployer deployer = new AbstractKernelDeployer(kernel);
-
-      deployer.deploy(deployment);
-      try
-      {
-         Object o = controller.getInstalledContext("CollectionBean").getTarget();
-         assertNotNull(o);
-         assertInstanceOf(o, SimpleBean.class);
-         SimpleBean bean = (SimpleBean)o;
-
-         Object[] arr = bean.getArray();
-         assertEquals(2, arr.length);
-         assertEquals(5, arr[0]);
-         assertEquals(10, arr[1]);
-
-         List<?> lst = bean.getList();
-         assertEquals(2, lst.size());
-         assertEquals("One", lst.get(0));
-         assertEquals("Two", lst.get(1));
-
-         Set<?> st = bean.getSet();
-         assertEquals(2, lst.size());
-         assertTrue(st.contains("En"));
-         assertTrue(st.contains("To"));
-
-         Collection<?> coll = bean.getCollection();
-         assertEquals(2, lst.size());
-         assertTrue(coll.contains("Eins"));
-         assertTrue(coll.contains("Zwei"));
-
-         Map<?, ?> mp = bean.getMap();
-         assertEquals(2, mp.size());
-         assertEquals("Uno", mp.get("One"));
-         assertEquals("Dos", mp.get("Two"));
-      }
-      finally
-      {
-         deployer.undeploy(deployment);
-      }
-   }
-
-   @SuppressWarnings("deprecation")
-   public void testReplacePropertyMetaData() throws Throwable
-   {
-      BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder("ReplaceBean", SimpleBean.class.getName());
-
-      builder.addPropertyMetaData("anInt", new Integer(1));
-      builder.addPropertyMetaData("anInt", new Integer(5));
-
-      builder.addPropertyMetaData("AString", "One");
-      builder.addPropertyMetaData("AString", "Two");
-
-      ValueMetaData value = builder.createValue("Three");
-      builder.addPropertyMetaData("anObject", value);
-      value = builder.createValue("Four");
-      builder.addPropertyMetaData("anObject", value);
-
-      List<ValueMetaData> array = builder.createArray();
-      builder.addPropertyMetaData("array", array);
-
-      array = builder.createArray();
-      array.add(builder.createValue(new Integer(5)));
-      array.add(builder.createValue(new Integer(10)));
-      builder.addPropertyMetaData("array", array);
-
-      Map<ValueMetaData, ValueMetaData> map = builder.createMap();
-      builder.addPropertyMetaData("map", map);
-
-      map = builder.createMap();
-      map.put(builder.createValue("One"), builder.createValue("Uno"));
-      map.put(builder.createValue("Two"), builder.createValue("Dos"));
-      builder.addPropertyMetaData("map", map);
-
-      AbstractKernelDeployment deployment = new AbstractKernelDeployment();
-      deployment.setBeans(Arrays.asList(builder.getBeanMetaData()));
-
-      Kernel kernel = bootstrap();
-      KernelController controller = kernel.getController();
-      AbstractKernelDeployer deployer = new AbstractKernelDeployer(kernel);
-
-      deployer.deploy(deployment);
-      try
-      {
-         Object o = controller.getInstalledContext("ReplaceBean").getTarget();
-         assertNotNull(o);
-         assertInstanceOf(o, SimpleBean.class);
-         SimpleBean bean = (SimpleBean)o;
-
-         Integer integer = bean.getAnInt();
-         assertEquals(new Integer(5), integer);
-
-         String string = bean.getAString();
-         assertEquals("Two", string);
-
-         Object obj = bean.getAnObject();
-         assertEquals("Four", obj);
-
-         Object[] arr = bean.getArray();
-         assertEquals(2, arr.length);
-         assertEquals(5, arr[0]);
-         assertEquals(10, arr[1]);
-
-         Map<?, ?> mp = bean.getMap();
-         assertEquals(2, mp.size());
-         assertEquals("Uno", mp.get("One"));
-         assertEquals("Dos", mp.get("Two"));
-      }
-      finally
-      {
-         deployer.undeploy(deployment);
-      }
-   }
-
-   public void testCallbacks() throws Throwable
-   {
-      BeanMetaDataBuilder builder;
-      BeanMetaData beanMetaData;
-      List<CallbackMetaData> callbacks;
-      CallbackMetaData callback;
-      KernelControllerContext cc;
-      Object target;
-      Transformer<?> transformer;
-      SimpleCallbackBean bean;
-
-      Kernel kernel = bootstrap();
-      KernelController controller = kernel.getController();
-      try
-      {
-         beanMetaData = BeanMetaDataBuilder.createBuilder("t", TrimTransformer.class.getName()).getBeanMetaData();
-         cc = controller.install(beanMetaData);
-         assertNotNull(cc);
-         assertEquals(ControllerState.INSTALLED, cc.getState());
-         target = cc.getTarget();
-         assertNotNull(target);
-         transformer = assertInstanceOf(target, Transformer.class);
-
-         // ct1
-
-         builder = BeanMetaDataBuilder.createBuilder("ct1", SimpleCallbackBean.class.getName());
-         builder.addPropertyInstallCallback("transformers");
-         builder.addPropertyUninstallCallback("transformers");
-         beanMetaData = builder.getBeanMetaData();
-
-         callbacks = beanMetaData.getInstallCallbacks();
-         assertNotNull(callbacks);
-         assertEquals(1, callbacks.size());
-         callback = callbacks.get(0);
-         assertNotNull(callback);
-         assertInstanceOf(callback, InstallCallbackMetaData.class, false);
-         assertEquals("transformers", callback.getProperty());
-         assertEquals(ControllerState.INSTALLED, callback.getDependentState());
-         assertNull(callback.getState());
-         assertNull(callback.getSignature());
-         assertNull(callback.getMethodName());
-         assertNull(callback.getCardinality());
-         assertNull(callback.getParameters());
-
-         callbacks = beanMetaData.getUninstallCallbacks();
-         assertNotNull(callbacks);
-         assertEquals(1, callbacks.size());
-         callback = callbacks.get(0);
-         assertNotNull(callback);
-         assertInstanceOf(callback, UninstallCallbackMetaData.class, false);
-         assertEquals("transformers", callback.getProperty());
-         assertEquals(ControllerState.INSTALLED, callback.getDependentState());
-         assertNull(callback.getState());
-         assertNull(callback.getSignature());
-         assertNull(callback.getMethodName());
-         assertNull(callback.getCardinality());
-         assertNull(callback.getParameters());
-
-         cc = controller.install(beanMetaData);
-         assertNotNull(cc);
-         assertEquals(ControllerState.INSTALLED, cc.getState());
-         target = cc.getTarget();
-         assertNotNull(target);
-         bean = assertInstanceOf(target, SimpleCallbackBean.class);
-         assertNotNull(bean.getTransformers());
-         assertEquals(1, bean.getTransformers().size());
-         assertSame(transformer, bean.getTransformers().iterator().next());
-
-         // ct2
-
-         builder = BeanMetaDataBuilder.createBuilder("ct2", SimpleCallbackBean.class.getName());
-         builder.addPropertyInstallCallback("transformers", Cardinality.ONE_TO_MANY);
-         builder.addPropertyUninstallCallback("transformers", Cardinality.ONE_TO_MANY);
-         beanMetaData = builder.getBeanMetaData();
-
-         callbacks = beanMetaData.getInstallCallbacks();
-         assertNotNull(callbacks);
-         assertEquals(1, callbacks.size());
-         callback = callbacks.get(0);
-         assertNotNull(callback);
-         assertInstanceOf(callback, InstallCallbackMetaData.class, false);
-         assertEquals("transformers", callback.getProperty());
-         assertEquals(ControllerState.INSTALLED, callback.getDependentState());
-         assertNull(callback.getState());
-         assertNull(callback.getSignature());
-         assertNull(callback.getMethodName());
-         assertEquals(Cardinality.ONE_TO_MANY, callback.getCardinality());
-         assertNull(callback.getParameters());
-
-         callbacks = beanMetaData.getUninstallCallbacks();
-         assertNotNull(callbacks);
-         assertEquals(1, callbacks.size());
-         callback = callbacks.get(0);
-         assertNotNull(callback);
-         assertInstanceOf(callback, UninstallCallbackMetaData.class, false);
-         assertEquals("transformers", callback.getProperty());
-         assertEquals(ControllerState.INSTALLED, callback.getDependentState());
-         assertNull(callback.getState());
-         assertNull(callback.getSignature());
-         assertNull(callback.getMethodName());
-         assertEquals(Cardinality.ONE_TO_MANY, callback.getCardinality());
-         assertNull(callback.getParameters());
-
-         cc = controller.install(beanMetaData);
-         assertNotNull(cc);
-         assertEquals(ControllerState.INSTALLED, cc.getState());
-         target = cc.getTarget();
-         assertNotNull(target);
-         bean = assertInstanceOf(target, SimpleCallbackBean.class);
-         assertNotNull(bean.getTransformers());
-         assertEquals(1, bean.getTransformers().size());
-         assertSame(transformer, bean.getTransformers().iterator().next());
-
-         // ct3
-
-         builder = BeanMetaDataBuilder.createBuilder("ct3", SimpleCallbackBean.class.getName());
-         builder.addPropertyInstallCallback("transformers", ControllerState.CREATE);
-         builder.addPropertyUninstallCallback("transformers", ControllerState.CREATE);
-         beanMetaData = builder.getBeanMetaData();
-
-         callbacks = beanMetaData.getInstallCallbacks();
-         assertNotNull(callbacks);
-         assertEquals(1, callbacks.size());
-         callback = callbacks.get(0);
-         assertNotNull(callback);
-         assertInstanceOf(callback, InstallCallbackMetaData.class, false);
-         assertEquals("transformers", callback.getProperty());
-         assertEquals(ControllerState.INSTALLED, callback.getDependentState());
-         assertEquals(ControllerState.CREATE, callback.getState());
-         assertNull(callback.getSignature());
-         assertNull(callback.getMethodName());
-         assertNull(callback.getCardinality());
-         assertNull(callback.getParameters());
-
-         callbacks = beanMetaData.getUninstallCallbacks();
-         assertNotNull(callbacks);
-         assertEquals(1, callbacks.size());
-         callback = callbacks.get(0);
-         assertNotNull(callback);
-         assertInstanceOf(callback, UninstallCallbackMetaData.class, false);
-         assertEquals("transformers", callback.getProperty());
-         assertEquals(ControllerState.INSTALLED, callback.getDependentState());
-         assertEquals(ControllerState.CREATE, callback.getState());
-         assertNull(callback.getSignature());
-         assertNull(callback.getMethodName());
-         assertNull(callback.getCardinality());
-         assertNull(callback.getParameters());
-
-         cc = controller.install(beanMetaData);
-         assertNotNull(cc);
-         assertEquals(ControllerState.INSTALLED, cc.getState());
-         target = cc.getTarget();
-         assertNotNull(target);
-         bean = assertInstanceOf(target, SimpleCallbackBean.class);
-         assertNotNull(bean.getTransformers());
-         assertEquals(1, bean.getTransformers().size());
-         assertSame(transformer, bean.getTransformers().iterator().next());
-
-         // ct4
-
-         builder = BeanMetaDataBuilder.createBuilder("ct4", SimpleCallbackBean.class.getName());
-         builder.addPropertyInstallCallback("transformers", Set.class.getName(), ControllerState.CREATE, ControllerState.START, Cardinality.ZERO_TO_ONE);
-         builder.addPropertyUninstallCallback("transformers", Set.class.getName(), ControllerState.CREATE, ControllerState.START, Cardinality.ZERO_TO_ONE);
-         beanMetaData = builder.getBeanMetaData();
-
-         callbacks = beanMetaData.getInstallCallbacks();
-         assertNotNull(callbacks);
-         assertEquals(1, callbacks.size());
-         callback = callbacks.get(0);
-         assertNotNull(callback);
-         assertInstanceOf(callback, InstallCallbackMetaData.class, false);
-         assertEquals("transformers", callback.getProperty());
-         assertEquals(ControllerState.START, callback.getDependentState());
-         assertEquals(ControllerState.CREATE, callback.getState());
-         assertEquals(Set.class.getName(), callback.getSignature());
-         assertEquals(Cardinality.ZERO_TO_ONE, callback.getCardinality());
-         assertNull(callback.getMethodName());
-         assertNull(callback.getParameters());
-
-         callbacks = beanMetaData.getUninstallCallbacks();
-         assertNotNull(callbacks);
-         assertEquals(1, callbacks.size());
-         callback = callbacks.get(0);
-         assertNotNull(callback);
-         assertInstanceOf(callback, UninstallCallbackMetaData.class, false);
-         assertEquals("transformers", callback.getProperty());
-         assertEquals(ControllerState.START, callback.getDependentState());
-         assertEquals(ControllerState.CREATE, callback.getState());
-         assertEquals(Set.class.getName(), callback.getSignature());
-         assertEquals(Cardinality.ZERO_TO_ONE, callback.getCardinality());
-         assertNull(callback.getMethodName());
-         assertNull(callback.getParameters());
-
-         cc = controller.install(beanMetaData);
-         assertNotNull(cc);
-         assertEquals(ControllerState.INSTALLED, cc.getState());
-         target = cc.getTarget();
-         assertNotNull(target);
-         bean = assertInstanceOf(target, SimpleCallbackBean.class);
-         assertNotNull(bean.getTransformers());
-         assertEquals(1, bean.getTransformers().size());
-         assertSame(transformer, bean.getTransformers().iterator().next());
-
-         // ct1
-
-         builder = BeanMetaDataBuilder.createBuilder("mct1", SimpleCallbackBean.class.getName());
-         builder.addMethodInstallCallback("addTransformer");
-         builder.addMethodUninstallCallback("removeTransformer");
-         beanMetaData = builder.getBeanMetaData();
-
-         callbacks = beanMetaData.getInstallCallbacks();
-         assertNotNull(callbacks);
-         assertEquals(1, callbacks.size());
-         callback = callbacks.get(0);
-         assertNotNull(callback);
-         assertInstanceOf(callback, InstallCallbackMetaData.class, false);
-         assertEquals("addTransformer", callback.getMethodName());
-         assertEquals(ControllerState.INSTALLED, callback.getDependentState());
-         assertNull(callback.getState());
-         assertNull(callback.getSignature());
-         assertNull(callback.getProperty());
-         assertNull(callback.getCardinality());
-         assertNull(callback.getParameters());
-
-         callbacks = beanMetaData.getUninstallCallbacks();
-         assertNotNull(callbacks);
-         assertEquals(1, callbacks.size());
-         callback = callbacks.get(0);
-         assertNotNull(callback);
-         assertInstanceOf(callback, UninstallCallbackMetaData.class, false);
-         assertEquals("removeTransformer", callback.getMethodName());
-         assertEquals(ControllerState.INSTALLED, callback.getDependentState());
-         assertNull(callback.getState());
-         assertNull(callback.getSignature());
-         assertNull(callback.getProperty());
-         assertNull(callback.getCardinality());
-         assertNull(callback.getParameters());
-
-         cc = controller.install(beanMetaData);
-         assertNotNull(cc);
-         assertEquals(ControllerState.INSTALLED, cc.getState());
-         target = cc.getTarget();
-         assertNotNull(target);
-         bean = assertInstanceOf(target, SimpleCallbackBean.class);
-         assertNotNull(bean.getTransformers());
-         assertEquals(1, bean.getTransformers().size());
-         assertSame(transformer, bean.getTransformers().iterator().next());
-
-         // ct2
-
-         builder = BeanMetaDataBuilder.createBuilder("mct2", SimpleCallbackBean.class.getName());
-         builder.addMethodInstallCallback("addTransformer", Cardinality.ONE_TO_MANY);
-         builder.addMethodUninstallCallback("removeTransformer", Cardinality.ONE_TO_MANY);
-         beanMetaData = builder.getBeanMetaData();
-
-         callbacks = beanMetaData.getInstallCallbacks();
-         assertNotNull(callbacks);
-         assertEquals(1, callbacks.size());
-         callback = callbacks.get(0);
-         assertNotNull(callback);
-         assertInstanceOf(callback, InstallCallbackMetaData.class, false);
-         assertEquals("addTransformer", callback.getMethodName());
-         assertEquals(ControllerState.INSTALLED, callback.getDependentState());
-         assertNull(callback.getState());
-         assertNull(callback.getSignature());
-         assertNull(callback.getProperty());
-         assertEquals(Cardinality.ONE_TO_MANY, callback.getCardinality());
-         assertNull(callback.getParameters());
-
-         callbacks = beanMetaData.getUninstallCallbacks();
-         assertNotNull(callbacks);
-         assertEquals(1, callbacks.size());
-         callback = callbacks.get(0);
-         assertNotNull(callback);
-         assertInstanceOf(callback, UninstallCallbackMetaData.class, false);
-         assertEquals("removeTransformer", callback.getMethodName());
-         assertEquals(ControllerState.INSTALLED, callback.getDependentState());
-         assertNull(callback.getState());
-         assertNull(callback.getSignature());
-         assertNull(callback.getProperty());
-         assertEquals(Cardinality.ONE_TO_MANY, callback.getCardinality());
-         assertNull(callback.getParameters());
-
-         cc = controller.install(beanMetaData);
-         assertNotNull(cc);
-         assertEquals(ControllerState.INSTALLED, cc.getState());
-         target = cc.getTarget();
-         assertNotNull(target);
-         bean = assertInstanceOf(target, SimpleCallbackBean.class);
-         assertNotNull(bean.getTransformers());
-         assertEquals(1, bean.getTransformers().size());
-         assertSame(transformer, bean.getTransformers().iterator().next());
-
-         // ct3
-
-         builder = BeanMetaDataBuilder.createBuilder("mct3", SimpleCallbackBean.class.getName());
-         builder.addMethodInstallCallback("addTransformer", ControllerState.CREATE);
-         builder.addMethodUninstallCallback("removeTransformer", ControllerState.CREATE);
-         beanMetaData = builder.getBeanMetaData();
-
-         callbacks = beanMetaData.getInstallCallbacks();
-         assertNotNull(callbacks);
-         assertEquals(1, callbacks.size());
-         callback = callbacks.get(0);
-         assertNotNull(callback);
-         assertInstanceOf(callback, InstallCallbackMetaData.class, false);
-         assertEquals("addTransformer", callback.getMethodName());
-         assertEquals(ControllerState.INSTALLED, callback.getDependentState());
-         assertEquals(ControllerState.CREATE, callback.getState());
-         assertNull(callback.getSignature());
-         assertNull(callback.getProperty());
-         assertNull(callback.getCardinality());
-         assertNull(callback.getParameters());
-
-         callbacks = beanMetaData.getUninstallCallbacks();
-         assertNotNull(callbacks);
-         assertEquals(1, callbacks.size());
-         callback = callbacks.get(0);
-         assertNotNull(callback);
-         assertInstanceOf(callback, UninstallCallbackMetaData.class, false);
-         assertEquals("removeTransformer", callback.getMethodName());
-         assertEquals(ControllerState.INSTALLED, callback.getDependentState());
-         assertEquals(ControllerState.CREATE, callback.getState());
-         assertNull(callback.getSignature());
-         assertNull(callback.getProperty());
-         assertNull(callback.getCardinality());
-         assertNull(callback.getParameters());
-
-         cc = controller.install(beanMetaData);
-         assertNotNull(cc);
-         assertEquals(ControllerState.INSTALLED, cc.getState());
-         target = cc.getTarget();
-         assertNotNull(target);
-         bean = assertInstanceOf(target, SimpleCallbackBean.class);
-         assertNotNull(bean.getTransformers());
-         assertEquals(1, bean.getTransformers().size());
-         assertSame(transformer, bean.getTransformers().iterator().next());
-
-         // ct4
-
-         builder = BeanMetaDataBuilder.createBuilder("mct4", SimpleCallbackBean.class.getName());
-         builder.addMethodInstallCallback("addTransformer", Transformer.class.getName(), ControllerState.CREATE, ControllerState.START, Cardinality.ZERO_TO_ONE);
-         builder.addMethodUninstallCallback("removeTransformer", Transformer.class.getName(), ControllerState.CREATE, ControllerState.START, Cardinality.ZERO_TO_ONE);
-         beanMetaData = builder.getBeanMetaData();
-
-         callbacks = beanMetaData.getInstallCallbacks();
-         assertNotNull(callbacks);
-         assertEquals(1, callbacks.size());
-         callback = callbacks.get(0);
-         assertNotNull(callback);
-         assertInstanceOf(callback, InstallCallbackMetaData.class, false);
-         assertEquals("addTransformer", callback.getMethodName());
-         assertEquals(ControllerState.START, callback.getDependentState());
-         assertEquals(ControllerState.CREATE, callback.getState());
-         assertEquals(Transformer.class.getName(), callback.getSignature());
-         assertEquals(Cardinality.ZERO_TO_ONE, callback.getCardinality());
-         assertNull(callback.getProperty());
-         assertNull(callback.getParameters());
-
-         callbacks = beanMetaData.getUninstallCallbacks();
-         assertNotNull(callbacks);
-         assertEquals(1, callbacks.size());
-         callback = callbacks.get(0);
-         assertNotNull(callback);
-         assertInstanceOf(callback, UninstallCallbackMetaData.class, false);
-         assertEquals("removeTransformer", callback.getMethodName());
-         assertEquals(ControllerState.START, callback.getDependentState());
-         assertEquals(ControllerState.CREATE, callback.getState());
-         assertEquals(Transformer.class.getName(), callback.getSignature());
-         assertEquals(Cardinality.ZERO_TO_ONE, callback.getCardinality());
-         assertNull(callback.getProperty());
-         assertNull(callback.getParameters());
-
-         cc = controller.install(beanMetaData);
-         assertNotNull(cc);
-         assertEquals(ControllerState.INSTALLED, cc.getState());
-         target = cc.getTarget();
-         assertNotNull(target);
-         bean = assertInstanceOf(target, SimpleCallbackBean.class);
-         assertNotNull(bean.getTransformers());
-         assertEquals(1, bean.getTransformers().size());
-         assertSame(transformer, bean.getTransformers().iterator().next());
-      }
-      finally
-      {
-         controller.shutdown();
-      }
-   }
-
-   public void testAliases() throws Throwable
-   {
-      Kernel kernel = bootstrap();
-      KernelController controller = kernel.getController();
-      try
-      {
-         BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder("bean", SimpleBean.class.getName());
-         builder.addAlias("alias");
-         controller.install(builder.getBeanMetaData());
-         assertNotNull(controller.getInstalledContext("alias"));
-
-         builder = BeanMetaDataBuilderFactory.createBuilder("other", SimpleBean.class.getName());
-         Object foobar = "foobar";
-         builder.setAliases(Collections.singleton(foobar));
-         controller.install(builder.getBeanMetaData());
-         assertNotNull(controller.getInstalledContext("foobar"));
-      }
-      finally
-      {
-         controller.shutdown();
-      }
-   }
-
-   public void testAnnotations() throws Throwable
-   {
-      Kernel kernel = bootstrap();
-      KernelController controller = kernel.getController();
-      try
-      {
-         BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder("bean", SimpleBean.class.getName());
-         builder.addAnnotation("@" + SimpleAnnotation.class.getName() + "(name=\"foobar\")");
-         controller.install(builder.getBeanMetaData());
-         ControllerContext cc = controller.getInstalledContext("bean");
-         assertNotNull(cc);
-         MetaData metaData = cc.getScopeInfo().getMetaData();
-         assertNotNull(metaData);
-         assertNotNull(metaData.getAnnotation(SimpleAnnotation.class));
-
-         builder = BeanMetaDataBuilderFactory.createBuilder("other", SimpleBean.class.getName());
-         builder.setAnnotations(Collections.singleton("@" + SimpleAnnotation.class.getName() + "(name=\"foobar\")"));
-         controller.install(builder.getBeanMetaData());
-         cc = controller.getInstalledContext("other");
-         assertNotNull(cc);
-         metaData = cc.getScopeInfo().getMetaData();
-         assertNotNull(metaData);
-         assertNotNull(metaData.getAnnotation(SimpleAnnotation.class));
-      }
-      finally
-      {
-         controller.shutdown();
-      }
-   }
-
-   public void testNewEnums() throws Throwable
-   {
-      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(Object.class.getName());
-      builder.setErrorHandlingMode(ErrorHandlingMode.MANUAL);
-      builder.setAutowireType(AutowireType.CONSTRUCTOR);
-      builder.setAutowireCandidate(false);
-
-      BeanMetaData bmd = builder.getBeanMetaData();
-      assertEquals(ErrorHandlingMode.MANUAL, bmd.getErrorHandlingMode());
-      assertEquals(AutowireType.CONSTRUCTOR, bmd.getAutowireType());
-      assertFalse(bmd.isAutowireCandidate());
-   }
-
-   public void testBeanMetaDataFactory() throws Throwable
-   {
-      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("bean", Object.class.getName());
-      BeanMetaDataFactory f1 = builder.getBeanMetaDataFactory();
-      assertNotNull(f1);
-      BeanMetaDataFactory f2 = builder.asBeanMetaDataFactory();
-      assertNotNull(f2);
-      List<BeanMetaData> b1 = f1.getBeans();
-      assertNotNull(b1);
-      List<BeanMetaData> b2 = f1.getBeans();
-      assertNotNull(b2);
-      assertEquals(b1, b2);
-
-      AbstractBeanMetaData abmd = new AbstractBeanMetaData("bean", Object.class.getName());
-      builder = BeanMetaDataBuilder.createBuilder(abmd);
-      assertSame(abmd, builder.getBeanMetaDataFactory());
-      BeanMetaDataFactory bmdf = builder.asBeanMetaDataFactory();
-      assertNotNull(bmdf);
-      List<BeanMetaData> beans = bmdf.getBeans();
-      assertNotNull(beans);
-      assertFalse(beans.isEmpty());
-      assertSame(abmd, beans.get(0));
-   }
-
-   public void testRelatedClassName() throws Throwable
-   {
-      RelatedClassMetaData rcmd = new AbstractRelatedClassMetaData(Object.class.getName());
-      Set<RelatedClassMetaData> related = new HashSet<RelatedClassMetaData>();
-      related.add(rcmd);
-
-      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("Bean");
-      builder.addRelatedClass(Object.class.getName());
-      BeanMetaData bmd = builder.getBeanMetaData();
-
-      assertEquals(related, bmd.getRelated());
-   }
-
-   public void testRelatedClassNameWithEnabled() throws Throwable
-   {
-      AbstractRelatedClassMetaData rcmd = new AbstractRelatedClassMetaData(Object.class.getName());
-      rcmd.setEnabledValue("aop");
-      Set<RelatedClassMetaData> related = new HashSet<RelatedClassMetaData>();
-      related.add(rcmd);
-
-      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("Bean");
-      builder.addRelatedClass(Object.class.getName(), "aop");
-      BeanMetaData bmd = builder.getBeanMetaData();
-
-      assertEquals(related, bmd.getRelated());
-   }
-
-   public void testMultipleRelatedClassNameWithMultipleEnabled() throws Throwable
-   {
-      AbstractRelatedClassMetaData rcmd1 = new AbstractRelatedClassMetaData(Object.class.getName());
-      rcmd1.setEnabled(new HashSet<Object>(Arrays.asList("aop", "md")));
-      AbstractRelatedClassMetaData rcmd2 = new AbstractRelatedClassMetaData(String.class.getName());
-      rcmd2.setEnabled(new HashSet<Object>(Arrays.asList("qwert", "foobar")));
-
-      Set<RelatedClassMetaData> related = new HashSet<RelatedClassMetaData>();
-      related.add(rcmd1);
-      related.add(rcmd2);
-
-      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("Bean");
-      builder.addRelatedClass(Object.class.getName(), "aop", "md");
-      builder.addRelatedClass(String.class.getName(), "qwert", "foobar");
-      BeanMetaData bmd = builder.getBeanMetaData();
-
-      assertEquals(related, bmd.getRelated());
-   }
-
-   public void testIgnoredLifecycle() throws Throwable
-   {
-      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("test");
-      builder.ignoreCreate();
-      builder.ignoreStart();
-      builder.ignoreStop();
-      builder.ignoreDestroy();
-      BeanMetaData bmd = builder.getBeanMetaData();
-      assertIgnoredLifecycle(bmd.getCreate());
-      assertIgnoredLifecycle(bmd.getStart());
-      assertIgnoredLifecycle(bmd.getStop());
-      assertIgnoredLifecycle(bmd.getDestroy());
-   }
-
-   protected void assertIgnoredLifecycle(LifecycleMetaData lmd)
-   {
-      assertNotNull(lmd);
-      assertTrue(lmd.isIgnored());
-   }
-}

Copied: projects/microcontainer/tags/2.0.0.GA/kernel/src/test/java/org/jboss/test/kernel/config/test/BeanMetaDataBuilderTestCase.java (from rev 81535, projects/microcontainer/branches/Branch_2_0/kernel/src/test/java/org/jboss/test/kernel/config/test/BeanMetaDataBuilderTestCase.java)
===================================================================
--- projects/microcontainer/tags/2.0.0.GA/kernel/src/test/java/org/jboss/test/kernel/config/test/BeanMetaDataBuilderTestCase.java	                        (rev 0)
+++ projects/microcontainer/tags/2.0.0.GA/kernel/src/test/java/org/jboss/test/kernel/config/test/BeanMetaDataBuilderTestCase.java	2008-11-25 13:56:03 UTC (rev 81552)
@@ -0,0 +1,914 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.kernel.config.test;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import junit.framework.Test;
+import org.jboss.beans.metadata.api.model.AutowireType;
+import org.jboss.beans.metadata.plugins.AbstractBeanMetaData;
+import org.jboss.beans.metadata.plugins.AbstractRelatedClassMetaData;
+import org.jboss.beans.metadata.plugins.InstallCallbackMetaData;
+import org.jboss.beans.metadata.plugins.UninstallCallbackMetaData;
+import org.jboss.beans.metadata.plugins.builder.BeanMetaDataBuilderFactory;
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.beans.metadata.spi.BeanMetaDataFactory;
+import org.jboss.beans.metadata.spi.CallbackMetaData;
+import org.jboss.beans.metadata.spi.RelatedClassMetaData;
+import org.jboss.beans.metadata.spi.ValueMetaData;
+import org.jboss.beans.metadata.spi.LifecycleMetaData;
+import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
+import org.jboss.dependency.spi.Cardinality;
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.dependency.spi.ErrorHandlingMode;
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.plugins.deployment.AbstractKernelDeployer;
+import org.jboss.kernel.plugins.deployment.AbstractKernelDeployment;
+import org.jboss.kernel.spi.dependency.KernelController;
+import org.jboss.kernel.spi.dependency.KernelControllerContext;
+import org.jboss.metadata.spi.MetaData;
+import org.jboss.test.kernel.config.support.SimpleAnnotation;
+import org.jboss.test.kernel.config.support.SimpleBean;
+import org.jboss.test.kernel.config.support.SimpleCallbackBean;
+import org.jboss.test.kernel.config.support.SimpleLifecycleBean;
+import org.jboss.test.kernel.config.support.Transformer;
+import org.jboss.test.kernel.config.support.TrimTransformer;
+
+/**
+ * Builder TestCase.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public class BeanMetaDataBuilderTestCase extends AbstractKernelConfigTest
+{
+   public static Test suite()
+   {
+      return suite(BeanMetaDataBuilderTestCase.class);
+   }
+
+   public BeanMetaDataBuilderTestCase(String name) throws Throwable
+   {
+      super(name);
+   }
+
+   public void testConstructor() throws Throwable
+   {
+      BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder("FromBMD", SimpleBean.class.getName());
+      builder.addConstructorParameter(String.class.getName(), "TestConstructor");
+      BeanMetaData beanMetaData = builder.getBeanMetaData();
+      SimpleBean fbmd = (SimpleBean)instantiateAndConfigure(beanMetaData);
+
+      assertNotNull(fbmd);
+      assertNotNull(fbmd.getConstructorUsed());
+      assertEquals("TestConstructor", fbmd.getConstructorUsed());
+   }
+
+   public void testProperty() throws Throwable
+   {
+      BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder("PropBMD", SimpleBean.class.getName())
+            .addPropertyMetaData("adouble", 3.1459)
+            .addPropertyMetaData("anint", "123")
+            .addPropertyMetaData("collection", new ArrayList<Object>());
+      BeanMetaData beanMetaData = builder.getBeanMetaData();
+      SimpleBean pbmd = (SimpleBean)instantiateAndConfigure(beanMetaData);
+
+      assertNotNull(pbmd);
+      assertEquals(3.1459, pbmd.getAdouble());
+      assertEquals(123, pbmd.getAnint());
+      assertNotNull(pbmd.getCollection());
+      assertTrue(pbmd.getCollection().isEmpty());
+   }
+
+   public void testLifecycle() throws Throwable
+   {
+      Kernel kernel = bootstrap();
+
+      BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder("SLB", SimpleLifecycleBean.class.getName())
+            .addCreateParameter(String.class.getName(), "ParamCreate")
+            .setStart("doStart")
+            .addStartParameter(String.class.getName(), "ParamStart")
+            .setStop("doStop")
+            .addStopParameter(String.class.getName(), "ParamStop")
+            .addDestroyParameter(String.class.getName(), "ParamDestroy");
+      BeanMetaData beanMetaData = builder.getBeanMetaData();
+
+      KernelController controller = kernel.getController();
+
+      KernelControllerContext context = controller.install(beanMetaData);
+      SimpleLifecycleBean slb = (SimpleLifecycleBean)context.getTarget();
+
+      assertNotNull(slb);
+      assertEquals("ParamCreate", slb.getCreate());
+      assertEquals("ParamStart", slb.getStart());
+
+      controller.uninstall("SLB");
+
+      assertEquals("ParamStop", slb.getStop());
+      assertEquals("ParamDestroy", slb.getDestroy());
+   }
+
+   public void testInstall() throws Throwable
+   {
+      Kernel kernel = bootstrap();
+
+      BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder("SLB", SimpleLifecycleBean.class.getName())
+            .addInstall("installParam", String.class.getName(), "Install")
+            .addUninstall("uninstallParam", String.class.getName(), "Uninstall");
+      BeanMetaData beanMetaData = builder.getBeanMetaData();
+
+      KernelController controller = kernel.getController();
+
+      KernelControllerContext context = controller.install(beanMetaData);
+      SimpleLifecycleBean slb = (SimpleLifecycleBean)context.getTarget();
+
+      assertNotNull(slb);
+      assertEquals("Install", slb.getInstall());
+
+      controller.uninstall("SLB");
+
+      assertEquals("Uninstall", slb.getInstall());
+   }
+
+   @SuppressWarnings("deprecation")
+   public void testDemandSupply() throws Throwable
+   {
+      BeanMetaDataBuilder demand = BeanMetaDataBuilderFactory.createBuilder("DemandBean", SimpleBean.class.getName());
+      demand.addDemand("Barrier");
+      BeanMetaDataFactory demandBean = demand.getBeanMetaDataFactory();
+
+      BeanMetaDataBuilder supply = BeanMetaDataBuilderFactory.createBuilder("SupplyBean", SimpleLifecycleBean.class.getName());
+      supply.addSupply("Barrier");
+      BeanMetaDataFactory supplyBean = supply.getBeanMetaDataFactory();
+
+      AbstractKernelDeployment deployment = new AbstractKernelDeployment();
+      deployment.setBeanFactories(Arrays.asList(demandBean, supplyBean));
+
+      Kernel kernel = bootstrap();
+      KernelController controller = kernel.getController();
+      AbstractKernelDeployer deployer = new AbstractKernelDeployer(kernel);
+
+      deployer.deploy(deployment);
+      try
+      {
+         Object db = controller.getInstalledContext("DemandBean").getTarget();
+         assertNotNull(db);
+         Object sb = controller.getInstalledContext("SupplyBean").getTarget();
+         assertNotNull(sb);
+      }
+      finally
+      {
+         deployer.undeploy(deployment);
+      }
+   }
+
+   @SuppressWarnings("deprecation")
+   public void testDependency() throws Throwable
+   {
+      BeanMetaDataBuilder dependOn = BeanMetaDataBuilderFactory.createBuilder("DependOnBean", SimpleBean.class.getName());
+      dependOn.addDependency("DependencyResolver");
+      BeanMetaDataFactory dependOnBean = dependOn.getBeanMetaDataFactory();
+
+      BeanMetaDataBuilder resolver = BeanMetaDataBuilderFactory.createBuilder("DependencyResolver", SimpleLifecycleBean.class.getName());
+      BeanMetaDataFactory resolverBean = resolver.getBeanMetaDataFactory();
+
+      AbstractKernelDeployment deployment = new AbstractKernelDeployment();
+      deployment.setBeanFactories(Arrays.asList(dependOnBean, resolverBean));
+
+      Kernel kernel = bootstrap();
+      KernelController controller = kernel.getController();
+      AbstractKernelDeployer deployer = new AbstractKernelDeployer(kernel);
+
+      deployer.deploy(deployment);
+      try
+      {
+         Object db = controller.getInstalledContext("DependOnBean").getTarget();
+         assertNotNull(db);
+         Object rb = controller.getInstalledContext("DependencyResolver").getTarget();
+         assertNotNull(rb);
+      }
+      finally
+      {
+         deployer.undeploy(deployment);
+      }
+   }
+
+   @SuppressWarnings("deprecation")
+   public void testCollectionProperties() throws Throwable
+   {
+      BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder("CollectionBean", SimpleBean.class.getName());
+
+      List<ValueMetaData> array = builder.createArray();
+      array.add(builder.createValue(new Integer(5)));
+      array.add(builder.createValue(new Integer(10)));
+      builder.addPropertyMetaData("array", array);
+
+      List<ValueMetaData> list = builder.createList();
+      list.add(builder.createValue("One"));
+      list.add(builder.createValue("Two"));
+      builder.addPropertyMetaData("list", list);
+
+      Set<ValueMetaData> set = builder.createSet();
+      set.add(builder.createValue("En"));
+      set.add(builder.createValue("To"));
+      builder.addPropertyMetaData("set", set);
+
+      Collection<ValueMetaData> collection = builder.createCollection();
+      collection.add(builder.createValue("Eins"));
+      collection.add(builder.createValue("Zwei"));
+      builder.addPropertyMetaData("collection", collection);
+
+      Map<ValueMetaData, ValueMetaData> map = builder.createMap();
+      map.put(builder.createValue("One"), builder.createValue("Uno"));
+      map.put(builder.createValue("Two"), builder.createValue("Dos"));
+      builder.addPropertyMetaData("map", map);
+
+      AbstractKernelDeployment deployment = new AbstractKernelDeployment();
+      deployment.setBeanFactories(Arrays.asList(builder.getBeanMetaDataFactory()));
+
+      Kernel kernel = bootstrap();
+      KernelController controller = kernel.getController();
+      AbstractKernelDeployer deployer = new AbstractKernelDeployer(kernel);
+
+      deployer.deploy(deployment);
+      try
+      {
+         Object o = controller.getInstalledContext("CollectionBean").getTarget();
+         assertNotNull(o);
+         assertInstanceOf(o, SimpleBean.class);
+         SimpleBean bean = (SimpleBean)o;
+
+         Object[] arr = bean.getArray();
+         assertEquals(2, arr.length);
+         assertEquals(5, arr[0]);
+         assertEquals(10, arr[1]);
+
+         List<?> lst = bean.getList();
+         assertEquals(2, lst.size());
+         assertEquals("One", lst.get(0));
+         assertEquals("Two", lst.get(1));
+
+         Set<?> st = bean.getSet();
+         assertEquals(2, lst.size());
+         assertTrue(st.contains("En"));
+         assertTrue(st.contains("To"));
+
+         Collection<?> coll = bean.getCollection();
+         assertEquals(2, lst.size());
+         assertTrue(coll.contains("Eins"));
+         assertTrue(coll.contains("Zwei"));
+
+         Map<?, ?> mp = bean.getMap();
+         assertEquals(2, mp.size());
+         assertEquals("Uno", mp.get("One"));
+         assertEquals("Dos", mp.get("Two"));
+      }
+      finally
+      {
+         deployer.undeploy(deployment);
+      }
+   }
+
+   @SuppressWarnings("deprecation")
+   public void testReplacePropertyMetaData() throws Throwable
+   {
+      BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder("ReplaceBean", SimpleBean.class.getName());
+
+      builder.addPropertyMetaData("anInt", new Integer(1));
+      builder.addPropertyMetaData("anInt", new Integer(5));
+
+      builder.addPropertyMetaData("AString", "One");
+      builder.addPropertyMetaData("AString", "Two");
+
+      ValueMetaData value = builder.createValue("Three");
+      builder.addPropertyMetaData("anObject", value);
+      value = builder.createValue("Four");
+      builder.addPropertyMetaData("anObject", value);
+
+      List<ValueMetaData> array = builder.createArray();
+      builder.addPropertyMetaData("array", array);
+
+      array = builder.createArray();
+      array.add(builder.createValue(new Integer(5)));
+      array.add(builder.createValue(new Integer(10)));
+      builder.addPropertyMetaData("array", array);
+
+      Map<ValueMetaData, ValueMetaData> map = builder.createMap();
+      builder.addPropertyMetaData("map", map);
+
+      map = builder.createMap();
+      map.put(builder.createValue("One"), builder.createValue("Uno"));
+      map.put(builder.createValue("Two"), builder.createValue("Dos"));
+      builder.addPropertyMetaData("map", map);
+
+      AbstractKernelDeployment deployment = new AbstractKernelDeployment();
+      deployment.setBeanFactories(Arrays.asList(builder.getBeanMetaDataFactory()));
+
+      Kernel kernel = bootstrap();
+      KernelController controller = kernel.getController();
+      AbstractKernelDeployer deployer = new AbstractKernelDeployer(kernel);
+
+      deployer.deploy(deployment);
+      try
+      {
+         Object o = controller.getInstalledContext("ReplaceBean").getTarget();
+         assertNotNull(o);
+         assertInstanceOf(o, SimpleBean.class);
+         SimpleBean bean = (SimpleBean)o;
+
+         Integer integer = bean.getAnInt();
+         assertEquals(new Integer(5), integer);
+
+         String string = bean.getAString();
+         assertEquals("Two", string);
+
+         Object obj = bean.getAnObject();
+         assertEquals("Four", obj);
+
+         Object[] arr = bean.getArray();
+         assertEquals(2, arr.length);
+         assertEquals(5, arr[0]);
+         assertEquals(10, arr[1]);
+
+         Map<?, ?> mp = bean.getMap();
+         assertEquals(2, mp.size());
+         assertEquals("Uno", mp.get("One"));
+         assertEquals("Dos", mp.get("Two"));
+      }
+      finally
+      {
+         deployer.undeploy(deployment);
+      }
+   }
+
+   public void testCallbacks() throws Throwable
+   {
+      BeanMetaDataBuilder builder;
+      BeanMetaData beanMetaData;
+      List<CallbackMetaData> callbacks;
+      CallbackMetaData callback;
+      KernelControllerContext cc;
+      Object target;
+      Transformer<?> transformer;
+      SimpleCallbackBean bean;
+
+      Kernel kernel = bootstrap();
+      KernelController controller = kernel.getController();
+      try
+      {
+         beanMetaData = BeanMetaDataBuilder.createBuilder("t", TrimTransformer.class.getName()).getBeanMetaData();
+         cc = controller.install(beanMetaData);
+         assertNotNull(cc);
+         assertEquals(ControllerState.INSTALLED, cc.getState());
+         target = cc.getTarget();
+         assertNotNull(target);
+         transformer = assertInstanceOf(target, Transformer.class);
+
+         // ct1
+
+         builder = BeanMetaDataBuilder.createBuilder("ct1", SimpleCallbackBean.class.getName());
+         builder.addPropertyInstallCallback("transformers");
+         builder.addPropertyUninstallCallback("transformers");
+         beanMetaData = builder.getBeanMetaData();
+
+         callbacks = beanMetaData.getInstallCallbacks();
+         assertNotNull(callbacks);
+         assertEquals(1, callbacks.size());
+         callback = callbacks.get(0);
+         assertNotNull(callback);
+         assertInstanceOf(callback, InstallCallbackMetaData.class, false);
+         assertEquals("transformers", callback.getProperty());
+         assertEquals(ControllerState.INSTALLED, callback.getDependentState());
+         assertNull(callback.getState());
+         assertNull(callback.getSignature());
+         assertNull(callback.getMethodName());
+         assertNull(callback.getCardinality());
+         assertNull(callback.getParameters());
+
+         callbacks = beanMetaData.getUninstallCallbacks();
+         assertNotNull(callbacks);
+         assertEquals(1, callbacks.size());
+         callback = callbacks.get(0);
+         assertNotNull(callback);
+         assertInstanceOf(callback, UninstallCallbackMetaData.class, false);
+         assertEquals("transformers", callback.getProperty());
+         assertEquals(ControllerState.INSTALLED, callback.getDependentState());
+         assertNull(callback.getState());
+         assertNull(callback.getSignature());
+         assertNull(callback.getMethodName());
+         assertNull(callback.getCardinality());
+         assertNull(callback.getParameters());
+
+         cc = controller.install(beanMetaData);
+         assertNotNull(cc);
+         assertEquals(ControllerState.INSTALLED, cc.getState());
+         target = cc.getTarget();
+         assertNotNull(target);
+         bean = assertInstanceOf(target, SimpleCallbackBean.class);
+         assertNotNull(bean.getTransformers());
+         assertEquals(1, bean.getTransformers().size());
+         assertSame(transformer, bean.getTransformers().iterator().next());
+
+         // ct2
+
+         builder = BeanMetaDataBuilder.createBuilder("ct2", SimpleCallbackBean.class.getName());
+         builder.addPropertyInstallCallback("transformers", Cardinality.ONE_TO_MANY);
+         builder.addPropertyUninstallCallback("transformers", Cardinality.ONE_TO_MANY);
+         beanMetaData = builder.getBeanMetaData();
+
+         callbacks = beanMetaData.getInstallCallbacks();
+         assertNotNull(callbacks);
+         assertEquals(1, callbacks.size());
+         callback = callbacks.get(0);
+         assertNotNull(callback);
+         assertInstanceOf(callback, InstallCallbackMetaData.class, false);
+         assertEquals("transformers", callback.getProperty());
+         assertEquals(ControllerState.INSTALLED, callback.getDependentState());
+         assertNull(callback.getState());
+         assertNull(callback.getSignature());
+         assertNull(callback.getMethodName());
+         assertEquals(Cardinality.ONE_TO_MANY, callback.getCardinality());
+         assertNull(callback.getParameters());
+
+         callbacks = beanMetaData.getUninstallCallbacks();
+         assertNotNull(callbacks);
+         assertEquals(1, callbacks.size());
+         callback = callbacks.get(0);
+         assertNotNull(callback);
+         assertInstanceOf(callback, UninstallCallbackMetaData.class, false);
+         assertEquals("transformers", callback.getProperty());
+         assertEquals(ControllerState.INSTALLED, callback.getDependentState());
+         assertNull(callback.getState());
+         assertNull(callback.getSignature());
+         assertNull(callback.getMethodName());
+         assertEquals(Cardinality.ONE_TO_MANY, callback.getCardinality());
+         assertNull(callback.getParameters());
+
+         cc = controller.install(beanMetaData);
+         assertNotNull(cc);
+         assertEquals(ControllerState.INSTALLED, cc.getState());
+         target = cc.getTarget();
+         assertNotNull(target);
+         bean = assertInstanceOf(target, SimpleCallbackBean.class);
+         assertNotNull(bean.getTransformers());
+         assertEquals(1, bean.getTransformers().size());
+         assertSame(transformer, bean.getTransformers().iterator().next());
+
+         // ct3
+
+         builder = BeanMetaDataBuilder.createBuilder("ct3", SimpleCallbackBean.class.getName());
+         builder.addPropertyInstallCallback("transformers", ControllerState.CREATE);
+         builder.addPropertyUninstallCallback("transformers", ControllerState.CREATE);
+         beanMetaData = builder.getBeanMetaData();
+
+         callbacks = beanMetaData.getInstallCallbacks();
+         assertNotNull(callbacks);
+         assertEquals(1, callbacks.size());
+         callback = callbacks.get(0);
+         assertNotNull(callback);
+         assertInstanceOf(callback, InstallCallbackMetaData.class, false);
+         assertEquals("transformers", callback.getProperty());
+         assertEquals(ControllerState.INSTALLED, callback.getDependentState());
+         assertEquals(ControllerState.CREATE, callback.getState());
+         assertNull(callback.getSignature());
+         assertNull(callback.getMethodName());
+         assertNull(callback.getCardinality());
+         assertNull(callback.getParameters());
+
+         callbacks = beanMetaData.getUninstallCallbacks();
+         assertNotNull(callbacks);
+         assertEquals(1, callbacks.size());
+         callback = callbacks.get(0);
+         assertNotNull(callback);
+         assertInstanceOf(callback, UninstallCallbackMetaData.class, false);
+         assertEquals("transformers", callback.getProperty());
+         assertEquals(ControllerState.INSTALLED, callback.getDependentState());
+         assertEquals(ControllerState.CREATE, callback.getState());
+         assertNull(callback.getSignature());
+         assertNull(callback.getMethodName());
+         assertNull(callback.getCardinality());
+         assertNull(callback.getParameters());
+
+         cc = controller.install(beanMetaData);
+         assertNotNull(cc);
+         assertEquals(ControllerState.INSTALLED, cc.getState());
+         target = cc.getTarget();
+         assertNotNull(target);
+         bean = assertInstanceOf(target, SimpleCallbackBean.class);
+         assertNotNull(bean.getTransformers());
+         assertEquals(1, bean.getTransformers().size());
+         assertSame(transformer, bean.getTransformers().iterator().next());
+
+         // ct4
+
+         builder = BeanMetaDataBuilder.createBuilder("ct4", SimpleCallbackBean.class.getName());
+         builder.addPropertyInstallCallback("transformers", Set.class.getName(), ControllerState.CREATE, ControllerState.START, Cardinality.ZERO_TO_ONE);
+         builder.addPropertyUninstallCallback("transformers", Set.class.getName(), ControllerState.CREATE, ControllerState.START, Cardinality.ZERO_TO_ONE);
+         beanMetaData = builder.getBeanMetaData();
+
+         callbacks = beanMetaData.getInstallCallbacks();
+         assertNotNull(callbacks);
+         assertEquals(1, callbacks.size());
+         callback = callbacks.get(0);
+         assertNotNull(callback);
+         assertInstanceOf(callback, InstallCallbackMetaData.class, false);
+         assertEquals("transformers", callback.getProperty());
+         assertEquals(ControllerState.START, callback.getDependentState());
+         assertEquals(ControllerState.CREATE, callback.getState());
+         assertEquals(Set.class.getName(), callback.getSignature());
+         assertEquals(Cardinality.ZERO_TO_ONE, callback.getCardinality());
+         assertNull(callback.getMethodName());
+         assertNull(callback.getParameters());
+
+         callbacks = beanMetaData.getUninstallCallbacks();
+         assertNotNull(callbacks);
+         assertEquals(1, callbacks.size());
+         callback = callbacks.get(0);
+         assertNotNull(callback);
+         assertInstanceOf(callback, UninstallCallbackMetaData.class, false);
+         assertEquals("transformers", callback.getProperty());
+         assertEquals(ControllerState.START, callback.getDependentState());
+         assertEquals(ControllerState.CREATE, callback.getState());
+         assertEquals(Set.class.getName(), callback.getSignature());
+         assertEquals(Cardinality.ZERO_TO_ONE, callback.getCardinality());
+         assertNull(callback.getMethodName());
+         assertNull(callback.getParameters());
+
+         cc = controller.install(beanMetaData);
+         assertNotNull(cc);
+         assertEquals(ControllerState.INSTALLED, cc.getState());
+         target = cc.getTarget();
+         assertNotNull(target);
+         bean = assertInstanceOf(target, SimpleCallbackBean.class);
+         assertNotNull(bean.getTransformers());
+         assertEquals(1, bean.getTransformers().size());
+         assertSame(transformer, bean.getTransformers().iterator().next());
+
+         // ct1
+
+         builder = BeanMetaDataBuilder.createBuilder("mct1", SimpleCallbackBean.class.getName());
+         builder.addMethodInstallCallback("addTransformer");
+         builder.addMethodUninstallCallback("removeTransformer");
+         beanMetaData = builder.getBeanMetaData();
+
+         callbacks = beanMetaData.getInstallCallbacks();
+         assertNotNull(callbacks);
+         assertEquals(1, callbacks.size());
+         callback = callbacks.get(0);
+         assertNotNull(callback);
+         assertInstanceOf(callback, InstallCallbackMetaData.class, false);
+         assertEquals("addTransformer", callback.getMethodName());
+         assertEquals(ControllerState.INSTALLED, callback.getDependentState());
+         assertNull(callback.getState());
+         assertNull(callback.getSignature());
+         assertNull(callback.getProperty());
+         assertNull(callback.getCardinality());
+         assertNull(callback.getParameters());
+
+         callbacks = beanMetaData.getUninstallCallbacks();
+         assertNotNull(callbacks);
+         assertEquals(1, callbacks.size());
+         callback = callbacks.get(0);
+         assertNotNull(callback);
+         assertInstanceOf(callback, UninstallCallbackMetaData.class, false);
+         assertEquals("removeTransformer", callback.getMethodName());
+         assertEquals(ControllerState.INSTALLED, callback.getDependentState());
+         assertNull(callback.getState());
+         assertNull(callback.getSignature());
+         assertNull(callback.getProperty());
+         assertNull(callback.getCardinality());
+         assertNull(callback.getParameters());
+
+         cc = controller.install(beanMetaData);
+         assertNotNull(cc);
+         assertEquals(ControllerState.INSTALLED, cc.getState());
+         target = cc.getTarget();
+         assertNotNull(target);
+         bean = assertInstanceOf(target, SimpleCallbackBean.class);
+         assertNotNull(bean.getTransformers());
+         assertEquals(1, bean.getTransformers().size());
+         assertSame(transformer, bean.getTransformers().iterator().next());
+
+         // ct2
+
+         builder = BeanMetaDataBuilder.createBuilder("mct2", SimpleCallbackBean.class.getName());
+         builder.addMethodInstallCallback("addTransformer", Cardinality.ONE_TO_MANY);
+         builder.addMethodUninstallCallback("removeTransformer", Cardinality.ONE_TO_MANY);
+         beanMetaData = builder.getBeanMetaData();
+
+         callbacks = beanMetaData.getInstallCallbacks();
+         assertNotNull(callbacks);
+         assertEquals(1, callbacks.size());
+         callback = callbacks.get(0);
+         assertNotNull(callback);
+         assertInstanceOf(callback, InstallCallbackMetaData.class, false);
+         assertEquals("addTransformer", callback.getMethodName());
+         assertEquals(ControllerState.INSTALLED, callback.getDependentState());
+         assertNull(callback.getState());
+         assertNull(callback.getSignature());
+         assertNull(callback.getProperty());
+         assertEquals(Cardinality.ONE_TO_MANY, callback.getCardinality());
+         assertNull(callback.getParameters());
+
+         callbacks = beanMetaData.getUninstallCallbacks();
+         assertNotNull(callbacks);
+         assertEquals(1, callbacks.size());
+         callback = callbacks.get(0);
+         assertNotNull(callback);
+         assertInstanceOf(callback, UninstallCallbackMetaData.class, false);
+         assertEquals("removeTransformer", callback.getMethodName());
+         assertEquals(ControllerState.INSTALLED, callback.getDependentState());
+         assertNull(callback.getState());
+         assertNull(callback.getSignature());
+         assertNull(callback.getProperty());
+         assertEquals(Cardinality.ONE_TO_MANY, callback.getCardinality());
+         assertNull(callback.getParameters());
+
+         cc = controller.install(beanMetaData);
+         assertNotNull(cc);
+         assertEquals(ControllerState.INSTALLED, cc.getState());
+         target = cc.getTarget();
+         assertNotNull(target);
+         bean = assertInstanceOf(target, SimpleCallbackBean.class);
+         assertNotNull(bean.getTransformers());
+         assertEquals(1, bean.getTransformers().size());
+         assertSame(transformer, bean.getTransformers().iterator().next());
+
+         // ct3
+
+         builder = BeanMetaDataBuilder.createBuilder("mct3", SimpleCallbackBean.class.getName());
+         builder.addMethodInstallCallback("addTransformer", ControllerState.CREATE);
+         builder.addMethodUninstallCallback("removeTransformer", ControllerState.CREATE);
+         beanMetaData = builder.getBeanMetaData();
+
+         callbacks = beanMetaData.getInstallCallbacks();
+         assertNotNull(callbacks);
+         assertEquals(1, callbacks.size());
+         callback = callbacks.get(0);
+         assertNotNull(callback);
+         assertInstanceOf(callback, InstallCallbackMetaData.class, false);
+         assertEquals("addTransformer", callback.getMethodName());
+         assertEquals(ControllerState.INSTALLED, callback.getDependentState());
+         assertEquals(ControllerState.CREATE, callback.getState());
+         assertNull(callback.getSignature());
+         assertNull(callback.getProperty());
+         assertNull(callback.getCardinality());
+         assertNull(callback.getParameters());
+
+         callbacks = beanMetaData.getUninstallCallbacks();
+         assertNotNull(callbacks);
+         assertEquals(1, callbacks.size());
+         callback = callbacks.get(0);
+         assertNotNull(callback);
+         assertInstanceOf(callback, UninstallCallbackMetaData.class, false);
+         assertEquals("removeTransformer", callback.getMethodName());
+         assertEquals(ControllerState.INSTALLED, callback.getDependentState());
+         assertEquals(ControllerState.CREATE, callback.getState());
+         assertNull(callback.getSignature());
+         assertNull(callback.getProperty());
+         assertNull(callback.getCardinality());
+         assertNull(callback.getParameters());
+
+         cc = controller.install(beanMetaData);
+         assertNotNull(cc);
+         assertEquals(ControllerState.INSTALLED, cc.getState());
+         target = cc.getTarget();
+         assertNotNull(target);
+         bean = assertInstanceOf(target, SimpleCallbackBean.class);
+         assertNotNull(bean.getTransformers());
+         assertEquals(1, bean.getTransformers().size());
+         assertSame(transformer, bean.getTransformers().iterator().next());
+
+         // ct4
+
+         builder = BeanMetaDataBuilder.createBuilder("mct4", SimpleCallbackBean.class.getName());
+         builder.addMethodInstallCallback("addTransformer", Transformer.class.getName(), ControllerState.CREATE, ControllerState.START, Cardinality.ZERO_TO_ONE);
+         builder.addMethodUninstallCallback("removeTransformer", Transformer.class.getName(), ControllerState.CREATE, ControllerState.START, Cardinality.ZERO_TO_ONE);
+         beanMetaData = builder.getBeanMetaData();
+
+         callbacks = beanMetaData.getInstallCallbacks();
+         assertNotNull(callbacks);
+         assertEquals(1, callbacks.size());
+         callback = callbacks.get(0);
+         assertNotNull(callback);
+         assertInstanceOf(callback, InstallCallbackMetaData.class, false);
+         assertEquals("addTransformer", callback.getMethodName());
+         assertEquals(ControllerState.START, callback.getDependentState());
+         assertEquals(ControllerState.CREATE, callback.getState());
+         assertEquals(Transformer.class.getName(), callback.getSignature());
+         assertEquals(Cardinality.ZERO_TO_ONE, callback.getCardinality());
+         assertNull(callback.getProperty());
+         assertNull(callback.getParameters());
+
+         callbacks = beanMetaData.getUninstallCallbacks();
+         assertNotNull(callbacks);
+         assertEquals(1, callbacks.size());
+         callback = callbacks.get(0);
+         assertNotNull(callback);
+         assertInstanceOf(callback, UninstallCallbackMetaData.class, false);
+         assertEquals("removeTransformer", callback.getMethodName());
+         assertEquals(ControllerState.START, callback.getDependentState());
+         assertEquals(ControllerState.CREATE, callback.getState());
+         assertEquals(Transformer.class.getName(), callback.getSignature());
+         assertEquals(Cardinality.ZERO_TO_ONE, callback.getCardinality());
+         assertNull(callback.getProperty());
+         assertNull(callback.getParameters());
+
+         cc = controller.install(beanMetaData);
+         assertNotNull(cc);
+         assertEquals(ControllerState.INSTALLED, cc.getState());
+         target = cc.getTarget();
+         assertNotNull(target);
+         bean = assertInstanceOf(target, SimpleCallbackBean.class);
+         assertNotNull(bean.getTransformers());
+         assertEquals(1, bean.getTransformers().size());
+         assertSame(transformer, bean.getTransformers().iterator().next());
+      }
+      finally
+      {
+         controller.shutdown();
+      }
+   }
+
+   public void testAliases() throws Throwable
+   {
+      Kernel kernel = bootstrap();
+      KernelController controller = kernel.getController();
+      try
+      {
+         BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder("bean", SimpleBean.class.getName());
+         builder.addAlias("alias");
+         controller.install(builder.getBeanMetaData());
+         assertNotNull(controller.getInstalledContext("alias"));
+
+         builder = BeanMetaDataBuilderFactory.createBuilder("other", SimpleBean.class.getName());
+         Object foobar = "foobar";
+         builder.setAliases(Collections.singleton(foobar));
+         controller.install(builder.getBeanMetaData());
+         assertNotNull(controller.getInstalledContext("foobar"));
+      }
+      finally
+      {
+         controller.shutdown();
+      }
+   }
+
+   public void testAnnotations() throws Throwable
+   {
+      Kernel kernel = bootstrap();
+      KernelController controller = kernel.getController();
+      try
+      {
+         BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder("bean", SimpleBean.class.getName());
+         builder.addAnnotation("@" + SimpleAnnotation.class.getName() + "(name=\"foobar\")");
+         controller.install(builder.getBeanMetaData());
+         ControllerContext cc = controller.getInstalledContext("bean");
+         assertNotNull(cc);
+         MetaData metaData = cc.getScopeInfo().getMetaData();
+         assertNotNull(metaData);
+         assertNotNull(metaData.getAnnotation(SimpleAnnotation.class));
+
+         builder = BeanMetaDataBuilderFactory.createBuilder("other", SimpleBean.class.getName());
+         builder.setAnnotations(Collections.singleton("@" + SimpleAnnotation.class.getName() + "(name=\"foobar\")"));
+         controller.install(builder.getBeanMetaData());
+         cc = controller.getInstalledContext("other");
+         assertNotNull(cc);
+         metaData = cc.getScopeInfo().getMetaData();
+         assertNotNull(metaData);
+         assertNotNull(metaData.getAnnotation(SimpleAnnotation.class));
+      }
+      finally
+      {
+         controller.shutdown();
+      }
+   }
+
+   public void testNewEnums() throws Throwable
+   {
+      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(Object.class.getName());
+      builder.setErrorHandlingMode(ErrorHandlingMode.MANUAL);
+      builder.setAutowireType(AutowireType.CONSTRUCTOR);
+      builder.setAutowireCandidate(false);
+
+      BeanMetaData bmd = builder.getBeanMetaData();
+      assertEquals(ErrorHandlingMode.MANUAL, bmd.getErrorHandlingMode());
+      assertEquals(AutowireType.CONSTRUCTOR, bmd.getAutowireType());
+      assertFalse(bmd.isAutowireCandidate());
+   }
+
+   public void testBeanMetaDataFactory() throws Throwable
+   {
+      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("bean", Object.class.getName());
+      BeanMetaDataFactory f1 = builder.getBeanMetaDataFactory();
+      assertNotNull(f1);
+      BeanMetaDataFactory f2 = builder.asBeanMetaDataFactory();
+      assertNotNull(f2);
+      List<BeanMetaData> b1 = f1.getBeans();
+      assertNotNull(b1);
+      List<BeanMetaData> b2 = f1.getBeans();
+      assertNotNull(b2);
+      assertEquals(b1, b2);
+
+      AbstractBeanMetaData abmd = new AbstractBeanMetaData("bean", Object.class.getName());
+      builder = BeanMetaDataBuilder.createBuilder(abmd);
+      assertSame(abmd, builder.getBeanMetaDataFactory());
+      BeanMetaDataFactory bmdf = builder.asBeanMetaDataFactory();
+      assertNotNull(bmdf);
+      List<BeanMetaData> beans = bmdf.getBeans();
+      assertNotNull(beans);
+      assertFalse(beans.isEmpty());
+      assertSame(abmd, beans.get(0));
+   }
+
+   public void testRelatedClassName() throws Throwable
+   {
+      RelatedClassMetaData rcmd = new AbstractRelatedClassMetaData(Object.class.getName());
+      Set<RelatedClassMetaData> related = new HashSet<RelatedClassMetaData>();
+      related.add(rcmd);
+
+      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("Bean");
+      builder.addRelatedClass(Object.class.getName());
+      BeanMetaData bmd = builder.getBeanMetaData();
+
+      assertEquals(related, bmd.getRelated());
+   }
+
+   public void testRelatedClassNameWithEnabled() throws Throwable
+   {
+      AbstractRelatedClassMetaData rcmd = new AbstractRelatedClassMetaData(Object.class.getName());
+      rcmd.setEnabledValue("aop");
+      Set<RelatedClassMetaData> related = new HashSet<RelatedClassMetaData>();
+      related.add(rcmd);
+
+      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("Bean");
+      builder.addRelatedClass(Object.class.getName(), "aop");
+      BeanMetaData bmd = builder.getBeanMetaData();
+
+      assertEquals(related, bmd.getRelated());
+   }
+
+   public void testMultipleRelatedClassNameWithMultipleEnabled() throws Throwable
+   {
+      AbstractRelatedClassMetaData rcmd1 = new AbstractRelatedClassMetaData(Object.class.getName());
+      rcmd1.setEnabled(new HashSet<Object>(Arrays.asList("aop", "md")));
+      AbstractRelatedClassMetaData rcmd2 = new AbstractRelatedClassMetaData(String.class.getName());
+      rcmd2.setEnabled(new HashSet<Object>(Arrays.asList("qwert", "foobar")));
+
+      Set<RelatedClassMetaData> related = new HashSet<RelatedClassMetaData>();
+      related.add(rcmd1);
+      related.add(rcmd2);
+
+      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("Bean");
+      builder.addRelatedClass(Object.class.getName(), "aop", "md");
+      builder.addRelatedClass(String.class.getName(), "qwert", "foobar");
+      BeanMetaData bmd = builder.getBeanMetaData();
+
+      assertEquals(related, bmd.getRelated());
+   }
+
+   public void testIgnoredLifecycle() throws Throwable
+   {
+      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder("test");
+      builder.ignoreCreate();
+      builder.ignoreStart();
+      builder.ignoreStop();
+      builder.ignoreDestroy();
+      BeanMetaData bmd = builder.getBeanMetaData();
+      assertIgnoredLifecycle(bmd.getCreate());
+      assertIgnoredLifecycle(bmd.getStart());
+      assertIgnoredLifecycle(bmd.getStop());
+      assertIgnoredLifecycle(bmd.getDestroy());       
+   }
+
+   protected void assertIgnoredLifecycle(LifecycleMetaData lmd)
+   {
+      assertNotNull(lmd);
+      assertTrue(lmd.isIgnored());
+   }
+}

Deleted: projects/microcontainer/tags/2.0.0.GA/pom.xml
===================================================================
--- projects/microcontainer/branches/Branch_2_0/pom.xml	2008-11-25 08:40:28 UTC (rev 81534)
+++ projects/microcontainer/tags/2.0.0.GA/pom.xml	2008-11-25 13:56:03 UTC (rev 81552)
@@ -1,358 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.jboss</groupId>
-    <artifactId>jboss-parent</artifactId>
-    <version>4-beta-2</version>
-  </parent>
-  <groupId>org.jboss.microcontainer</groupId>
-  <artifactId>jboss-microcontainer</artifactId>
-  <version>2.0.0-SNAPSHOT</version>
-  <packaging>pom</packaging>
-  <name>JBoss Microcontainer Parent POM</name>
-  <url>http://www.jboss.org/jbossmc/</url>
-  <description>
-    The JBoss Microcontainer provides a lightweight container for managing POJOs, their deployment
-    and configuration.
-  </description>
-  <scm>
-    <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/microcontainer/branches/Branch_2_0/</connection>
-    <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/microcontainer/branches/Branch_2_0/</developerConnection>
-    <url>http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/microcontainer/branches/Branch_2_0/</url>
-  </scm>
-
-  <modules>
-    <module>dependency</module>
-    <module>kernel</module>
-    <module>aop-mc-int</module>
-    <module>spring-int</module>
-    <module>guice-int</module>
-    <module>build</module>
-  </modules>
-
-  <properties>
-    <version.jboss.common.core>2.2.9.GA</version.jboss.common.core>
-    <version.jboss.logging.spi>2.0.5.GA</version.jboss.logging.spi>
-    <version.jboss.logging.log4j>2.0.5.GA</version.jboss.logging.log4j>
-    <version.jbossxb>2.0.0.GA</version.jbossxb>
-    <version.jboss.man>2.0.0.CR2</version.jboss.man>
-    <version.jboss.vfs>2.0.0.CR2</version.jboss.vfs>
-    <version.javassist>3.9.0.GA</version.javassist>
-    <version.jboss.aop>2.0.0.GA</version.jboss.aop>
-    <version.org.jboss.reflect>2.0.0.GA</version.org.jboss.reflect>
-    <version.org.jboss.mdr>2.0.1.GA</version.org.jboss.mdr>
-    <version.org.jboss.test>1.1.1.GA</version.org.jboss.test>
-    <version.junit>4.4</version.junit>
-    <version.jboss.profiler.jvmti>1.0.0.CR5</version.jboss.profiler.jvmti>
-    <version.ant.junit>1.6.5</version.ant.junit>
-    <version.jboss.drools>4.0.1</version.jboss.drools>
-    <version.jboss.jbpm>3.1.1</version.jboss.jbpm>
-    <version.google.guice>1.0</version.google.guice>
-  </properties>
-
-  <build>
-    <outputDirectory>${microcontainer.outputDirectory}</outputDirectory>
-    <testOutputDirectory>${microcontainer.testOutputDirectory}</testOutputDirectory>
-    <finalName>${artifactId}</finalName>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-enforcer-plugin</artifactId>
-        <version>1.0-alpha-3</version>
-        <executions>
-          <execution>
-            <id>enforce-versions</id>
-            <goals>
-              <goal>enforce</goal>
-            </goals>
-            <phase>validate</phase>
-            <configuration>
-              <rules>
-                <requireMavenVersion>
-                  <version>2.0.9</version>
-                </requireMavenVersion>
-                <requireJavaVersion>
-                  <version>1.5.0</version>
-                </requireJavaVersion>
-              </rules>
-            </configuration>
-          </execution>
-        </executions>
-        <inherited>true</inherited>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-release-plugin</artifactId>
-        <version>2.0-beta-7</version>
-        <configuration>
-          <generateReleasePoms>false</generateReleasePoms>
-          <tagBase>https://svn.jboss.org/repos/jbossas/projects/microcontainer/tags</tagBase>
-          <autoVersionSubmodules>true</autoVersionSubmodules>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <version>2.0.2</version>
-        <configuration>
-          <source>1.5</source>
-          <target>1.5</target>
-          <showDeprecation>true</showDeprecation>
-          <showWarnings>true</showWarnings>
-          <optimize>true</optimize>
-        </configuration>
-      </plugin>
-    </plugins>
-
-    <pluginManagement>
-      <plugins>
-        <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-idea-plugin</artifactId>
-          <version>2.2</version>
-          <configuration>
-            <downloadSources>true</downloadSources>
-          </configuration>
-        </plugin>
-        <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-surefire-plugin</artifactId>
-          <version>2.4.3</version>
-          <configuration>
-            <redirectTestOutputToFile>true</redirectTestOutputToFile>
-            <includes>
-              <include>org/jboss/test/**/*TestCase.java</include>
-            </includes>
-          </configuration>
-        </plugin>
-      </plugins>
-    </pluginManagement>
-  </build>
-
-  <repositories>
-    <repository>
-      <id>repository.jboss.org</id>
-      <name>JBoss Repository</name>
-      <layout>default</layout>
-      <url>http://repository.jboss.org/maven2/</url>
-      <snapshots>
-        <enabled>false</enabled>
-      </snapshots>
-    </repository>
-    <repository>
-      <id>snapshots.jboss.org</id>
-      <name>JBoss Snapshots Repository</name>
-      <layout>default</layout>
-      <url>http://snapshots.jboss.org/maven2/</url>
-      <snapshots>
-        <enabled>true</enabled>
-      </snapshots>
-      <releases>
-        <enabled>false</enabled>
-      </releases>
-    </repository>
-  </repositories>
-
-  <dependencyManagement>
-    <!-- The parent pom manages the inter-dependencies of the modules. -->
-    <dependencies>
-      <dependency>
-        <groupId>org.jboss.microcontainer</groupId>
-        <artifactId>jboss-aop-mc-int</artifactId>
-        <version>${project.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.jboss.microcontainer</groupId>
-        <artifactId>jboss-dependency</artifactId>
-        <version>${project.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.jboss.microcontainer</groupId>
-        <artifactId>jboss-kernel</artifactId>
-        <version>${project.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.jboss.microcontainer</groupId>
-        <artifactId>jboss-kernel</artifactId>
-        <version>${project.version}</version>
-        <type>test-jar</type>
-        <scope>test</scope>
-      </dependency>
-      <dependency>
-        <groupId>org.jboss.man</groupId>
-        <artifactId>jboss-managed</artifactId>
-        <version>${version.jboss.man}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.jboss.man</groupId>
-        <artifactId>jboss-metatype</artifactId>
-        <version>${version.jboss.man}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.jboss.microcontainer</groupId>
-        <artifactId>jboss-spring-int</artifactId>
-        <version>${project.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.jboss.microcontainer</groupId>
-        <artifactId>jboss-guice-int</artifactId>
-        <version>${project.version}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.jboss</groupId>
-        <artifactId>jboss-common-core</artifactId>
-        <version>${version.jboss.common.core}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.jboss.logging</groupId>
-        <artifactId>jboss-logging-spi</artifactId>
-        <version>${version.jboss.logging.spi}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.jboss.logging</groupId>
-        <artifactId>jboss-logging-log4j</artifactId>
-        <version>${version.jboss.logging.log4j}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.jboss</groupId>
-        <artifactId>jbossxb</artifactId>
-        <version>${version.jbossxb}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.jboss</groupId>
-        <artifactId>jboss-reflect</artifactId>
-        <version>${version.org.jboss.reflect}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.jboss</groupId>
-        <artifactId>jboss-mdr</artifactId>
-        <version>${version.org.jboss.mdr}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.jboss</groupId>
-        <artifactId>jboss-vfs</artifactId>
-        <version>${version.jboss.vfs}</version>
-         <!-- FIXME http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077827#4077827 -->
-         <exclusions>
-           <exclusion>
-             <groupId>org.jboss</groupId>
-             <artifactId>jboss-common-core</artifactId>
-           </exclusion>
-         </exclusions>
-      </dependency>
-      <dependency>
-        <groupId>javassist</groupId>
-        <artifactId>javassist</artifactId>
-        <version>${version.javassist}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.jboss.aop</groupId>
-        <artifactId>jboss-aop</artifactId>
-        <version>${version.jboss.aop}</version>
-      </dependency>
-      <dependency>
-        <groupId>ant</groupId>
-        <artifactId>ant-junit</artifactId>
-        <version>${version.ant.junit}</version>
-      </dependency>
-      <!-- test dependencies -->
-      <dependency>
-        <groupId>org.jboss.test</groupId>
-        <artifactId>jboss-test</artifactId>
-        <version>${version.org.jboss.test}</version>
-        <scope>test</scope>
-      </dependency>
-      <dependency>
-        <groupId>junit</groupId>
-        <artifactId>junit</artifactId>
-        <version>${version.junit}</version>
-        <scope>test</scope>
-      </dependency>
-      <dependency>
-        <groupId>jboss.profiler.jvmti</groupId>
-        <artifactId>jboss-profiler-jvmti</artifactId>
-        <version>${version.jboss.profiler.jvmti}</version>
-        <scope>test</scope>
-      </dependency>
-      <dependency>
-        <groupId>com.google.code.guice</groupId>
-        <artifactId>guice</artifactId>
-        <version>${version.google.guice}</version>
-      </dependency>
-    </dependencies>
-  </dependencyManagement>
-
-  <reporting>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-project-info-reports-plugin</artifactId>
-        <version>2.1</version>
-        <reportSets>
-          <reportSet>
-            <reports>
-              <report>dependencies</report>
-              <report>issue-tracking</report>
-              <report>license</report>
-              <report>scm</report>
-            </reports>
-          </reportSet>
-        </reportSets>
-      </plugin>
-      <plugin>
-        <groupId>org.codehaus.mojo</groupId>
-        <artifactId>findbugs-maven-plugin</artifactId>
-        <version>1.0.0</version>
-      </plugin>
-    </plugins>
-  </reporting>
-
-  <profiles>
-    <profile>
-      <id>default</id>
-      <activation>
-        <activeByDefault>true</activeByDefault>
-      </activation>
-      <properties>
-        <microcontainer.outputDirectory>target/classes</microcontainer.outputDirectory>
-        <microcontainer.testOutputDirectory>target/test-classes</microcontainer.testOutputDirectory>
-      </properties>
-    </profile>
-    <profile>
-      <id>eclipse</id>
-      <build>
-        <defaultGoal>process-test-resources</defaultGoal>
-        <plugins>
-          <plugin>
-            <artifactId>maven-eclipse-plugin</artifactId>
-            <executions>
-              <execution>
-                <id>eclipse</id>
-                <phase>process-test-resources</phase>
-                <goals>
-                  <goal>eclipse</goal>
-                </goals>
-              </execution>
-            </executions>
-            <configuration>
-              <downloadSources>true</downloadSources>
-              <buildOutputDirectory>${microcontainer.outputDirectory}</buildOutputDirectory>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-      <properties>
-        <microcontainer.outputDirectory>eclipse-target/classes</microcontainer.outputDirectory>
-        <microcontainer.testOutputDirectory>eclipse-target/tests-classes</microcontainer.testOutputDirectory>
-      </properties>
-    </profile>
-
-    <profile>
-      <id>assembly</id>
-      <modules>
-        <module>docs</module>
-      </modules>
-    </profile>
-  </profiles>
-
-</project>

Copied: projects/microcontainer/tags/2.0.0.GA/pom.xml (from rev 81551, projects/microcontainer/branches/Branch_2_0/pom.xml)
===================================================================
--- projects/microcontainer/tags/2.0.0.GA/pom.xml	                        (rev 0)
+++ projects/microcontainer/tags/2.0.0.GA/pom.xml	2008-11-25 13:56:03 UTC (rev 81552)
@@ -0,0 +1,358 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.jboss</groupId>
+    <artifactId>jboss-parent</artifactId>
+    <version>4-beta-2</version>
+  </parent>
+  <groupId>org.jboss.microcontainer</groupId>
+  <artifactId>jboss-microcontainer</artifactId>
+  <version>2.0.0.GA</version>
+  <packaging>pom</packaging>
+  <name>JBoss Microcontainer Parent POM</name>
+  <url>http://www.jboss.org/jbossmc/</url>
+  <description>
+    The JBoss Microcontainer provides a lightweight container for managing POJOs, their deployment
+    and configuration.
+  </description>
+  <scm>
+    <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/microcontainer/tags/2.0.0.GA</connection>
+    <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/microcontainer/tags/2.0.0.GA</developerConnection>
+    <url>http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/microcontainer/tags/2.0.0.GA</url>
+  </scm>
+
+  <modules>
+    <module>dependency</module>
+    <module>kernel</module>
+    <module>aop-mc-int</module>
+    <module>spring-int</module>
+    <module>guice-int</module>
+    <module>build</module>
+  </modules>
+
+  <properties>
+    <version.jboss.common.core>2.2.9.GA</version.jboss.common.core>
+    <version.jboss.logging.spi>2.0.5.GA</version.jboss.logging.spi>
+    <version.jboss.logging.log4j>2.0.5.GA</version.jboss.logging.log4j>
+    <version.jbossxb>2.0.0.GA</version.jbossxb>
+    <version.jboss.man>2.0.0.GA</version.jboss.man>
+    <version.jboss.vfs>2.0.0.GA</version.jboss.vfs>
+    <version.javassist>3.9.0.GA</version.javassist>
+    <version.jboss.aop>2.0.0.SP1</version.jboss.aop>
+    <version.org.jboss.reflect>2.0.2.GA</version.org.jboss.reflect>
+    <version.org.jboss.mdr>2.0.1.GA</version.org.jboss.mdr>
+    <version.org.jboss.test>1.1.1.GA</version.org.jboss.test>
+    <version.junit>4.4</version.junit>
+    <version.jboss.profiler.jvmti>1.0.0.CR5</version.jboss.profiler.jvmti>
+    <version.ant.junit>1.6.5</version.ant.junit>
+    <version.jboss.drools>4.0.1</version.jboss.drools>
+    <version.jboss.jbpm>3.1.1</version.jboss.jbpm>
+    <version.google.guice>1.0</version.google.guice>
+  </properties>
+
+  <build>
+    <outputDirectory>${microcontainer.outputDirectory}</outputDirectory>
+    <testOutputDirectory>${microcontainer.testOutputDirectory}</testOutputDirectory>
+    <finalName>${artifactId}</finalName>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-enforcer-plugin</artifactId>
+        <version>1.0-alpha-3</version>
+        <executions>
+          <execution>
+            <id>enforce-versions</id>
+            <goals>
+              <goal>enforce</goal>
+            </goals>
+            <phase>validate</phase>
+            <configuration>
+              <rules>
+                <requireMavenVersion>
+                  <version>2.0.9</version>
+                </requireMavenVersion>
+                <requireJavaVersion>
+                  <version>1.5.0</version>
+                </requireJavaVersion>
+              </rules>
+            </configuration>
+          </execution>
+        </executions>
+        <inherited>true</inherited>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-release-plugin</artifactId>
+        <version>2.0-beta-7</version>
+        <configuration>
+          <generateReleasePoms>false</generateReleasePoms>
+          <tagBase>https://svn.jboss.org/repos/jbossas/projects/microcontainer/tags</tagBase>
+          <autoVersionSubmodules>true</autoVersionSubmodules>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.0.2</version>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+          <showDeprecation>true</showDeprecation>
+          <showWarnings>true</showWarnings>
+          <optimize>true</optimize>
+        </configuration>
+      </plugin>
+    </plugins>
+
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-idea-plugin</artifactId>
+          <version>2.2</version>
+          <configuration>
+            <downloadSources>true</downloadSources>
+          </configuration>
+        </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-surefire-plugin</artifactId>
+          <version>2.4.3</version>
+          <configuration>
+            <redirectTestOutputToFile>true</redirectTestOutputToFile>
+            <includes>
+              <include>org/jboss/test/**/*TestCase.java</include>
+            </includes>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+
+  <repositories>
+    <repository>
+      <id>repository.jboss.org</id>
+      <name>JBoss Repository</name>
+      <layout>default</layout>
+      <url>http://repository.jboss.org/maven2/</url>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+    </repository>
+    <repository>
+      <id>snapshots.jboss.org</id>
+      <name>JBoss Snapshots Repository</name>
+      <layout>default</layout>
+      <url>http://snapshots.jboss.org/maven2/</url>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+    </repository>
+  </repositories>
+
+  <dependencyManagement>
+    <!-- The parent pom manages the inter-dependencies of the modules. -->
+    <dependencies>
+      <dependency>
+        <groupId>org.jboss.microcontainer</groupId>
+        <artifactId>jboss-aop-mc-int</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.microcontainer</groupId>
+        <artifactId>jboss-dependency</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.microcontainer</groupId>
+        <artifactId>jboss-kernel</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.microcontainer</groupId>
+        <artifactId>jboss-kernel</artifactId>
+        <version>${project.version}</version>
+        <type>test-jar</type>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.man</groupId>
+        <artifactId>jboss-managed</artifactId>
+        <version>${version.jboss.man}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.man</groupId>
+        <artifactId>jboss-metatype</artifactId>
+        <version>${version.jboss.man}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.microcontainer</groupId>
+        <artifactId>jboss-spring-int</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.microcontainer</groupId>
+        <artifactId>jboss-guice-int</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss</groupId>
+        <artifactId>jboss-common-core</artifactId>
+        <version>${version.jboss.common.core}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.logging</groupId>
+        <artifactId>jboss-logging-spi</artifactId>
+        <version>${version.jboss.logging.spi}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.logging</groupId>
+        <artifactId>jboss-logging-log4j</artifactId>
+        <version>${version.jboss.logging.log4j}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss</groupId>
+        <artifactId>jbossxb</artifactId>
+        <version>${version.jbossxb}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss</groupId>
+        <artifactId>jboss-reflect</artifactId>
+        <version>${version.org.jboss.reflect}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss</groupId>
+        <artifactId>jboss-mdr</artifactId>
+        <version>${version.org.jboss.mdr}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss</groupId>
+        <artifactId>jboss-vfs</artifactId>
+        <version>${version.jboss.vfs}</version>
+         <!-- FIXME http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077827#4077827 -->
+         <exclusions>
+           <exclusion>
+             <groupId>org.jboss</groupId>
+             <artifactId>jboss-common-core</artifactId>
+           </exclusion>
+         </exclusions>
+      </dependency>
+      <dependency>
+        <groupId>javassist</groupId>
+        <artifactId>javassist</artifactId>
+        <version>${version.javassist}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.aop</groupId>
+        <artifactId>jboss-aop</artifactId>
+        <version>${version.jboss.aop}</version>
+      </dependency>
+      <dependency>
+        <groupId>ant</groupId>
+        <artifactId>ant-junit</artifactId>
+        <version>${version.ant.junit}</version>
+      </dependency>
+      <!-- test dependencies -->
+      <dependency>
+        <groupId>org.jboss.test</groupId>
+        <artifactId>jboss-test</artifactId>
+        <version>${version.org.jboss.test}</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>junit</groupId>
+        <artifactId>junit</artifactId>
+        <version>${version.junit}</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>jboss.profiler.jvmti</groupId>
+        <artifactId>jboss-profiler-jvmti</artifactId>
+        <version>${version.jboss.profiler.jvmti}</version>
+        <scope>test</scope>
+      </dependency>
+      <dependency>
+        <groupId>com.google.code.guice</groupId>
+        <artifactId>guice</artifactId>
+        <version>${version.google.guice}</version>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-project-info-reports-plugin</artifactId>
+        <version>2.1</version>
+        <reportSets>
+          <reportSet>
+            <reports>
+              <report>dependencies</report>
+              <report>issue-tracking</report>
+              <report>license</report>
+              <report>scm</report>
+            </reports>
+          </reportSet>
+        </reportSets>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>findbugs-maven-plugin</artifactId>
+        <version>1.0.0</version>
+      </plugin>
+    </plugins>
+  </reporting>
+
+  <profiles>
+    <profile>
+      <id>default</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <properties>
+        <microcontainer.outputDirectory>target/classes</microcontainer.outputDirectory>
+        <microcontainer.testOutputDirectory>target/test-classes</microcontainer.testOutputDirectory>
+      </properties>
+    </profile>
+    <profile>
+      <id>eclipse</id>
+      <build>
+        <defaultGoal>process-test-resources</defaultGoal>
+        <plugins>
+          <plugin>
+            <artifactId>maven-eclipse-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>eclipse</id>
+                <phase>process-test-resources</phase>
+                <goals>
+                  <goal>eclipse</goal>
+                </goals>
+              </execution>
+            </executions>
+            <configuration>
+              <downloadSources>true</downloadSources>
+              <buildOutputDirectory>${microcontainer.outputDirectory}</buildOutputDirectory>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+      <properties>
+        <microcontainer.outputDirectory>eclipse-target/classes</microcontainer.outputDirectory>
+        <microcontainer.testOutputDirectory>eclipse-target/tests-classes</microcontainer.testOutputDirectory>
+      </properties>
+    </profile>
+
+    <profile>
+      <id>assembly</id>
+      <modules>
+        <module>docs</module>
+      </modules>
+    </profile>
+  </profiles>
+
+</project>

Deleted: projects/microcontainer/tags/2.0.0.GA/spring-int/pom.xml
===================================================================
--- projects/microcontainer/branches/Branch_2_0/spring-int/pom.xml	2008-11-25 08:40:28 UTC (rev 81534)
+++ projects/microcontainer/tags/2.0.0.GA/spring-int/pom.xml	2008-11-25 13:56:03 UTC (rev 81552)
@@ -1,43 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <parent>
-    <groupId>org.jboss.microcontainer</groupId>
-    <artifactId>jboss-microcontainer</artifactId>
-    <version>2.0.0-SNAPSHOT</version>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>jboss-spring-int</artifactId>
-  <packaging>jar</packaging>
-  <name>JBoss Microcontainer Spring Int</name>
-  <url>http://www.jboss.com/products/jbossmc</url>
-  <description>JBoss Microcontainer Spring Integration</description>
-
-  <!-- Do not add version information here, use ../pom.xml instead -->
-  <dependencies>
-    <!-- Global dependencies -->
-    <dependency>
-      <groupId>org.jboss.microcontainer</groupId>
-      <artifactId>jboss-kernel</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.man</groupId>
-      <artifactId>jboss-managed</artifactId>
-      <optional>true</optional>
-    </dependency>
-    <!-- Test dependencies -->
-    <dependency>
-      <groupId>org.jboss.logging</groupId>
-      <artifactId>jboss-logging-log4j</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.test</groupId>
-      <artifactId>jboss-test</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-</project>

Copied: projects/microcontainer/tags/2.0.0.GA/spring-int/pom.xml (from rev 81551, projects/microcontainer/branches/Branch_2_0/spring-int/pom.xml)
===================================================================
--- projects/microcontainer/tags/2.0.0.GA/spring-int/pom.xml	                        (rev 0)
+++ projects/microcontainer/tags/2.0.0.GA/spring-int/pom.xml	2008-11-25 13:56:03 UTC (rev 81552)
@@ -0,0 +1,43 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <parent>
+    <groupId>org.jboss.microcontainer</groupId>
+    <artifactId>jboss-microcontainer</artifactId>
+    <version>2.0.0.GA</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>jboss-spring-int</artifactId>
+  <packaging>jar</packaging>
+  <name>JBoss Microcontainer Spring Int</name>
+  <url>http://www.jboss.com/products/jbossmc</url>
+  <description>JBoss Microcontainer Spring Integration</description>
+
+  <!-- Do not add version information here, use ../pom.xml instead -->
+  <dependencies>
+    <!-- Global dependencies -->
+    <dependency>
+      <groupId>org.jboss.microcontainer</groupId>
+      <artifactId>jboss-kernel</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.man</groupId>
+      <artifactId>jboss-managed</artifactId>
+      <optional>true</optional>
+    </dependency>
+    <!-- Test dependencies -->
+    <dependency>
+      <groupId>org.jboss.logging</groupId>
+      <artifactId>jboss-logging-log4j</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.test</groupId>
+      <artifactId>jboss-test</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>




More information about the jboss-cvs-commits mailing list