[jboss-cvs] JBossAS SVN: r78337 - in projects/microcontainer/trunk: dependency/src/main/java/org/jboss/dependency/plugins and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Sep 10 09:05:40 EDT 2008


Author: alesj
Date: 2008-09-10 09:05:40 -0400 (Wed, 10 Sep 2008)
New Revision: 78337

Added:
   projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/AliasesImpl.java
   projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/ApplicationScopeImpl.java
   projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/ScopingDependencyTestCase.java
Modified:
   projects/microcontainer/trunk/dependency/src/main/java/org/jboss/dependency/plugins/AbstractController.java
   projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/DeploymentTestSuite.java
   projects/microcontainer/trunk/pom.xml
Log:
[JBMICROCONT-341]; applying fixed Kabir's patch.
[JBMICROCONT-345, JBMICROCONT-348, JBMICROCONT-349]; update libs to CR or GA.

Modified: projects/microcontainer/trunk/dependency/src/main/java/org/jboss/dependency/plugins/AbstractController.java
===================================================================
--- projects/microcontainer/trunk/dependency/src/main/java/org/jboss/dependency/plugins/AbstractController.java	2008-09-10 12:57:30 UTC (rev 78336)
+++ projects/microcontainer/trunk/dependency/src/main/java/org/jboss/dependency/plugins/AbstractController.java	2008-09-10 13:05:40 UTC (rev 78337)
@@ -52,6 +52,7 @@
 import org.jboss.dependency.spi.graph.LookupStrategy;
 import org.jboss.dependency.spi.graph.SearchInfo;
 import org.jboss.util.JBossObject;
+import org.jboss.util.collection.CollectionsFactory;
 
 /**
  * Abstract controller.
@@ -648,6 +649,9 @@
             if (trace)
                log.trace("Uninstalling " + context.toShortString());
 
+            // get a hold on possible parent before its nullified in uninstall
+            AbstractController parent = getParentController();
+
             uninstallContext(context, ControllerState.NOT_INSTALLED, trace);
 
             try
@@ -659,7 +663,6 @@
                log.warn("Error unregistering context: " + context.toShortString() + " with name: " + name);
             }
 
-            AbstractController parent = getParentController();
             while (parent != null)
             {
                try
@@ -1184,14 +1187,19 @@
                      {
                         if (item.unresolved(this))
                         {
-                           ControllerContext dependent = getContext(item.getName(), null);
-                           if (dependent != null)
+                           Set<ControllerContext> dependents = CollectionsFactory.createLazySet();
+                           getContexts(item.getName(), dependents);
+                           if (dependents.isEmpty() == false)
                            {
                               ControllerState whenRequired = item.getWhenRequired();
                               if (whenRequired == null)
                                  whenRequired = ControllerState.NOT_INSTALLED;
-                              if (isBeforeState(dependent.getState(), whenRequired) == false)
-                                 uninstallContext(dependent, whenRequired, trace);
+
+                              for (ControllerContext dependent : dependents)
+                              {
+                                 if (isBeforeState(dependent.getState(), whenRequired) == false)
+                                    uninstallContext(dependent, whenRequired, trace);
+                              }
                            }
                         }
                      }
@@ -1249,6 +1257,34 @@
    }
 
    /**
+    * Get all contexts by name.
+    *
+    * @param name the name of the context
+    * @param contexts found contexts
+    */
+   protected void getContexts(Object name, Set<ControllerContext> contexts)
+   {
+      ControllerContext context = getContext(name, null);
+      if (context != null)
+      {
+         Set<Object> aliases = context.getAliases();
+         // only pick up unique name
+         // TODO also ignore alises from @Aliases?
+         if (aliases == null || aliases.contains(name) == false)
+            contexts.add(context);
+      }
+
+      Set<AbstractController> children = getControllers();
+      if (children != null && children.isEmpty() == false)
+      {
+         for (AbstractController child : children)
+         {
+            child.getContexts(name, contexts);
+         }
+      }
+   }
+
+   /**
     * Add callback item under demand name.
     *
     * @param <T> the callback item type

Added: projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/AliasesImpl.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/AliasesImpl.java	                        (rev 0)
+++ projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/AliasesImpl.java	2008-09-10 13:05:40 UTC (rev 78337)
@@ -0,0 +1,57 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file 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.deployment.support;
+
+import java.lang.annotation.Annotation;
+
+import org.jboss.beans.metadata.api.annotations.Aliases;
+
+/**
+ * Simple alises impl.
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class AliasesImpl implements Aliases
+{
+   private String value;
+
+   public AliasesImpl(String value)
+   {
+      this.value = value;
+   }
+
+   public boolean replace()
+   {
+      return false;
+   }
+
+   public String[] value()
+   {
+      return new String[] {value};
+   }
+
+   public Class<? extends Annotation> annotationType()
+   {
+      return Aliases.class;
+   }
+}

Added: projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/ApplicationScopeImpl.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/ApplicationScopeImpl.java	                        (rev 0)
+++ projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/support/ApplicationScopeImpl.java	2008-09-10 13:05:40 UTC (rev 78337)
@@ -0,0 +1,51 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file 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.deployment.support;
+
+import java.lang.annotation.Annotation;
+
+import org.jboss.metadata.plugins.scope.ApplicationScope;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ApplicationScopeImpl implements ApplicationScope
+{
+   String value;
+
+   public ApplicationScopeImpl(String value)
+   {
+      this.value = value;
+   }
+
+   public String value()
+   {
+      return value;
+   }
+
+   public Class<? extends Annotation> annotationType()
+   {
+      return ApplicationScope.class;
+   }
+}

Modified: projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/DeploymentTestSuite.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/DeploymentTestSuite.java	2008-09-10 12:57:30 UTC (rev 78336)
+++ projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/DeploymentTestSuite.java	2008-09-10 13:05:40 UTC (rev 78337)
@@ -81,6 +81,7 @@
       suite.addTest(ScopingAliasTestCase.suite());
       suite.addTest(ScopingAliasAPITestCase.suite());
       suite.addTest(ScopingOverrideTestCase.suite());
+      suite.addTest(ScopingDependencyTestCase.suite());
 
       return suite;
    }

Added: projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/ScopingDependencyTestCase.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/ScopingDependencyTestCase.java	                        (rev 0)
+++ projects/microcontainer/trunk/kernel/src/test/java/org/jboss/test/kernel/deployment/test/ScopingDependencyTestCase.java	2008-09-10 13:05:40 UTC (rev 78337)
@@ -0,0 +1,327 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file 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.deployment.test;
+
+import java.util.Collections;
+import java.util.List;
+
+import junit.framework.Test;
+import org.jboss.beans.metadata.plugins.builder.BeanMetaDataBuilderFactory;
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.beans.metadata.spi.ValueMetaData;
+import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.kernel.plugins.deployment.AbstractKernelDeployment;
+import org.jboss.kernel.spi.dependency.KernelControllerContext;
+import org.jboss.kernel.spi.deployment.KernelDeployment;
+import org.jboss.test.kernel.deployment.support.AliasesImpl;
+import org.jboss.test.kernel.deployment.support.ApplicationScopeImpl;
+import org.jboss.test.kernel.deployment.support.SimpleBeanImpl;
+import org.jboss.test.kernel.deployment.support.SimpleObjectWithBean;
+
+/**
+ * Scoping dependency tests.
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ * @version $Revision: 1.1 $
+ */
+public class ScopingDependencyTestCase extends ScopingDeploymentTest
+{
+   private final static String PARENT_CLASS = SimpleBeanImpl.class.getName();
+
+   private final static String CHILD_CLASS = SimpleObjectWithBean.class.getName();
+
+   private final static String PARENT = "Parent";
+
+   private final static String CHILD = "Child";
+
+   private final static String SCOPED_PARENT = "Scoped_Parent";
+
+   private final static String APP_SCOPE_1 = "scoped1";
+
+   private final static String APP_SCOPE_2 = "scoped2";
+
+   public ScopingDependencyTestCase(String name) throws Throwable
+   {
+      super(name);
+   }
+
+   public static Test suite()
+   {
+      return suite(ScopingDependencyTestCase.class);
+   }
+
+   public void testScopedChildDependencyOnParent() throws Throwable
+   {
+      KernelDeployment childDeployment = createChildDeployment(CHILD, PARENT, APP_SCOPE_1, null);
+      deploy(childDeployment);
+
+      try
+      {
+         assertNoSuchContext(CHILD);
+
+         KernelDeployment parentDeployment = createParentDeployment();
+         deploy(parentDeployment);
+
+         try
+         {
+            ControllerContext parent = getControllerContext(PARENT);
+            ControllerContext child = getControllerContext(CHILD);
+            assertNotSame(parent.getController(), child.getController());
+         }
+         finally
+         {
+            undeploy(parentDeployment);
+         }
+         assertNoSuchContext(PARENT);
+         assertNoSuchContext(CHILD);
+      }
+      finally
+      {
+         undeploy(childDeployment);
+      }
+   }
+
+   public void testScopedChildWithDependencyOnAliasInScopedControllerWithSameNameAsParent() throws Throwable
+   {
+      KernelDeployment childDeployment = createChildDeployment(CHILD, PARENT, APP_SCOPE_1, null);
+      deploy(childDeployment);
+
+      try
+      {
+         assertNoSuchContext(CHILD);
+
+         KernelDeployment parentInChildScopeDeployment =  createDeployment(SCOPED_PARENT, PARENT_CLASS, null, APP_SCOPE_1, PARENT);
+
+         deploy(parentInChildScopeDeployment);
+         try
+         {
+            ControllerContext scopedParent = getControllerContext(SCOPED_PARENT);
+            ControllerContext child = getControllerContext(CHILD);
+            assertSame(scopedParent.getController(), child.getController());
+
+            KernelDeployment parentDeployment = createParentDeployment();
+            deploy(parentDeployment);
+            try
+            {
+               ControllerContext parent = getControllerContext(PARENT);
+               assertNotSame(parent.getController(), child.getController());
+            }
+            finally
+            {
+               undeploy(parentDeployment);
+            }
+            scopedParent = getControllerContext(SCOPED_PARENT);
+            child = getControllerContext(CHILD);
+         }
+         finally
+         {
+            undeploy(parentInChildScopeDeployment);
+         }
+         assertNoSuchContext(CHILD);
+      }
+      finally
+      {
+         undeploy(childDeployment);
+      }
+   }
+
+   public void testScopedChildWithNoDependencyAndGlobalChildWithDependencyOnParent() throws Throwable
+   {
+      KernelDeployment childDeploymentNoDependencies = createChildDeployment(CHILD, null, APP_SCOPE_2, null);
+      deploy(childDeploymentNoDependencies);
+      try
+      {
+         List<KernelControllerContext> contextsNoDependencies = childDeploymentNoDependencies.getInstalledContexts();
+         assertEquals(1, contextsNoDependencies.size());
+         KernelControllerContext childNoDependencies = contextsNoDependencies.get(0);
+         assertEquals(ControllerState.INSTALLED, childNoDependencies.getState());
+
+         KernelDeployment childDeploymentWithDependencies = createChildDeployment(CHILD + 1, CHILD, PARENT, APP_SCOPE_1, null);
+         deploy(childDeploymentWithDependencies);
+         try
+         {
+            List<KernelControllerContext> contextsWithDependencies = childDeploymentWithDependencies.getInstalledContexts();
+            assertEquals(1, contextsWithDependencies.size());
+            KernelControllerContext childWithDependencies = contextsWithDependencies.get(0);
+            assertFalse(ControllerState.INSTALLED.equals(childWithDependencies.getState()));
+            assertNotSame(childNoDependencies.getController(), childWithDependencies.getController());
+
+            KernelDeployment parentDeployment = createParentDeployment();
+            deploy(parentDeployment);
+            try
+            {
+               ControllerContext parent = getControllerContext(PARENT);
+               ControllerContext child = getControllerContext(CHILD);
+               assertNotSame(parent.getController(), child.getController());
+               assertNotSame(parent.getController(), childNoDependencies.getController());
+               assertNotSame(parent.getController(), childWithDependencies.getController());
+               assertEquals(ControllerState.INSTALLED, childNoDependencies.getState());
+            }
+            finally
+            {
+               undeploy(parentDeployment);
+            }
+            assertNoSuchContext(PARENT);
+            assertFalse(ControllerState.INSTALLED.equals(childWithDependencies.getState()));
+            // unwinded due to the same name
+            assertFalse(ControllerState.INSTALLED.equals(childNoDependencies.getState()));
+         }
+         finally
+         {
+            undeploy(childDeploymentWithDependencies);
+         }
+      }
+      finally
+      {
+         undeploy(childDeploymentNoDependencies);
+      }
+   }
+
+   public void testScopedChildWithNoDependencyAndGlobalChildWithDependencyOnParentViaAliases() throws Throwable
+   {
+      KernelDeployment childDeploymentNoDependencies = createChildDeployment(CHILD + 1, null, APP_SCOPE_2, CHILD);
+      deploy(childDeploymentNoDependencies);
+      try
+      {
+         List<KernelControllerContext> contextsNoDependencies = childDeploymentNoDependencies.getInstalledContexts();
+         assertEquals(1, contextsNoDependencies.size());
+         KernelControllerContext childNoDependencies = contextsNoDependencies.get(0);
+         assertEquals(ControllerState.INSTALLED, childNoDependencies.getState());
+
+         KernelDeployment childDeploymentWithDependencies = createChildDeployment(CHILD + 2, CHILD + 2, PARENT, APP_SCOPE_1, CHILD);
+         deploy(childDeploymentWithDependencies);
+         try
+         {
+            List<KernelControllerContext> contextsWithDependencies = childDeploymentWithDependencies.getInstalledContexts();
+            assertEquals(1, contextsWithDependencies.size());
+            KernelControllerContext childWithDependencies = contextsWithDependencies.get(0);
+            assertFalse(ControllerState.INSTALLED.equals(childWithDependencies.getState()));
+            assertNotSame(childNoDependencies.getController(), childWithDependencies.getController());
+
+            KernelDeployment parentDeployment = createParentDeployment();
+            deploy(parentDeployment);
+            try
+            {
+               ControllerContext parent = getControllerContext(PARENT);
+               ControllerContext child = getControllerContext(CHILD);
+               assertNotSame(parent.getController(), child.getController());
+               assertNotSame(parent.getController(), childNoDependencies.getController());
+               assertNotSame(parent.getController(), childWithDependencies.getController());
+               assertEquals(ControllerState.INSTALLED, childNoDependencies.getState());
+            }
+            finally
+            {
+               undeploy(parentDeployment);
+            }
+            assertNoSuchContext(PARENT);
+            assertFalse(ControllerState.INSTALLED.equals(childWithDependencies.getState()));
+            assertEquals(ControllerState.INSTALLED, childNoDependencies.getState());
+         }
+         finally
+         {
+            undeploy(childDeploymentWithDependencies);
+         }
+      }
+      finally
+      {
+         undeploy(childDeploymentNoDependencies);
+      }
+   }
+
+   public void testTwoScopedChildrenOneWithDependencyOnParent() throws Throwable
+   {
+      runTestTwoScopedChildrenWithDependencyOnParent(false);
+   }
+
+   public void testTwoScopedChildrenOneWithDependencyOnParentReverseOrder() throws Throwable
+   {
+      runTestTwoScopedChildrenWithDependencyOnParent(true);
+   }
+
+   private void runTestTwoScopedChildrenWithDependencyOnParent(boolean withDependencyFirst) throws Throwable
+   {
+      //TODO this will not work until Abstract
+   }
+
+   private KernelDeployment createParentDeployment() throws Throwable
+   {
+      return createDeployment(PARENT, PARENT_CLASS, null, null, null);
+   }
+
+   private KernelDeployment createChildDeployment(String beanName, String dependency, String scope, String alias)
+   {
+      return createChildDeployment(beanName, beanName, dependency, scope, alias);
+   }
+
+   private KernelDeployment createChildDeployment(String deploymentName, String beanName, String dependency, String scope, String alias)
+   {
+      return createDeployment(deploymentName, beanName, CHILD_CLASS, dependency, scope, alias);
+   }
+
+   private KernelDeployment createDeployment(String beanName, String clazz, String dependency, String scope, String alias)
+   {
+      return createDeployment(beanName, beanName, clazz, dependency, scope, alias);
+   }
+
+   @SuppressWarnings({"deprecation"})
+   private KernelDeployment createDeployment(String deploymentName, String beanName, String clazz, String dependency, String scope, String alias)
+   {
+      BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder(beanName, clazz);
+      if (dependency != null)
+      {
+         ValueMetaData inject = builder.createInject(dependency);
+         builder.addPropertyMetaData("simpleBean", inject);
+      }
+      if (scope != null)
+      {
+         builder.addAnnotation(new ApplicationScopeImpl(scope));
+      }
+      if (alias != null)
+      {
+         builder.addAnnotation(new AliasesImpl(alias));
+      }
+
+      AbstractKernelDeployment deployment = new AbstractKernelDeployment();
+      deployment.setName(deploymentName);
+      List<BeanMetaData> beans = Collections.singletonList(builder.getBeanMetaData());
+      deployment.setBeans(beans);
+      return deployment;
+   }
+
+   /**
+    * assertNoControllerContext() never fails for scoped beans whether installed or not, so use this instead
+    */
+   private void assertNoSuchContext(String name)
+   {
+      try
+      {
+         getControllerContext(name);
+         fail(name + " should not be found");
+      }
+      catch (IllegalStateException e)
+      {
+      }
+   }
+}

Modified: projects/microcontainer/trunk/pom.xml
===================================================================
--- projects/microcontainer/trunk/pom.xml	2008-09-10 12:57:30 UTC (rev 78336)
+++ projects/microcontainer/trunk/pom.xml	2008-09-10 13:05:40 UTC (rev 78337)
@@ -1,358 +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-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/trunk/</connection>
-    <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/microcontainer/trunk/</developerConnection>
-    <url>http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/microcontainer/trunk/</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.man>2.0.0-SNAPSHOT</version.jboss.man>
-    <version.jboss.common.core>2.2.8.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.CR12</version.jbossxb>
-    <version.jboss.vfs>2.0.0.Beta22</version.jboss.vfs>
-    <version.javassist>3.8.1.GA</version.javassist>
-    <version.jboss.aop>2.0.0.CR17</version.jboss.aop>
-    <version.org.jboss.reflect>2.0.0.CR1</version.org.jboss.reflect>
-    <version.org.jboss.mdr>2.0.0.CR1</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 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/trunk/</connection>
+    <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/microcontainer/trunk/</developerConnection>
+    <url>http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/microcontainer/trunk/</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.8.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.CR13</version.jbossxb>
+    <version.jboss.man>2.0.0.CR1</version.jboss.man>
+    <version.jboss.vfs>2.0.0.CR1</version.jboss.vfs>
+    <version.javassist>3.8.1.GA</version.javassist>
+    <version.jboss.aop>2.0.0.CR17</version.jboss.aop>
+    <version.org.jboss.reflect>2.0.0.CR1</version.org.jboss.reflect>
+    <version.org.jboss.mdr>2.0.0.CR1</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>




More information about the jboss-cvs-commits mailing list