[jboss-cvs] JBossAS SVN: r59321 - in projects/microcontainer/branches/2_0: aop-mc-int build container dependency deployers deployers/src/main/org/jboss/deployers/plugins/attachments deployers/src/main/org/jboss/deployers/plugins/deployer deployers/src/main/org/jboss/deployers/plugins/deployers/helpers deployers/src/main/org/jboss/deployers/plugins/deployment deployers/src/main/org/jboss/deployers/plugins/structure deployers/src/main/org/jboss/deployers/plugins/structure/vfs deployers/src/main/org/jboss/deployers/plugins/structure/vfs/jar deployers/src/main/org/jboss/deployers/plugins/structure/vfs/war deployers/src/main/org/jboss/deployers/spi/deployer deployers/src/main/org/jboss/deployers/spi/deployment deployers/src/main/org/jboss/deployers/spi/structure deployers/src/main/org/jboss/deployers/spi/structure/vfs deployers/src/tests/org/jboss/test/deployers deployers/src/tests/org/jboss/test/deployers/deployer deployers/src/tests/org/jboss/test/deployers/metadata/test deployer! s/src/tests/org/jboss/test/deployers/structure deployers/src/tests/org/jboss/test/deployers/structure/ear/support deployers/src/tests/org/jboss/test/deployers/structure/ear/test deployers/src/tests/org/jboss/test/deployers/structure/jar/test deployers/src/tests/org/jboss/test/deployers/structure/main/test kernel tools/etc/buildmagic
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Jan 3 21:43:01 EST 2007
Author: scott.stark at jboss.org
Date: 2007-01-03 21:42:21 -0500 (Wed, 03 Jan 2007)
New Revision: 59321
Modified:
projects/microcontainer/branches/2_0/aop-mc-int/build.xml
projects/microcontainer/branches/2_0/build/build-thirdparty.xml
projects/microcontainer/branches/2_0/build/build.xml
projects/microcontainer/branches/2_0/container/build.xml
projects/microcontainer/branches/2_0/dependency/build.xml
projects/microcontainer/branches/2_0/deployers/.classpath
projects/microcontainer/branches/2_0/deployers/build-test.xml
projects/microcontainer/branches/2_0/deployers/build.xml
projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/attachments/AttachmentsImpl.java
projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/deployer/DeployerWrapper.java
projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/deployers/helpers/AttachmentLocator.java
projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/deployment/MainDeployerImpl.java
projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/AbstractDeploymentContext.java
projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/ClassPathInfoImpl.java
projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/ComponentDeploymentContext.java
projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/vfs/AbstractCandidateStructureVisitor.java
projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/vfs/AbstractStructureDeployer.java
projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/vfs/CandidateStructureVisitorFactory.java
projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/vfs/StructureDeployerWrapper.java
projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/vfs/jar/JARCandidateStructureVisitor.java
projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/vfs/jar/JARStructure.java
projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/vfs/war/WebInfLibFilter.java
projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/spi/deployer/Deployer.java
projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/spi/deployment/MainDeployer.java
projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/spi/structure/DeploymentContext.java
projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/spi/structure/vfs/ClassPathInfo.java
projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/spi/structure/vfs/StructureBuilder.java
projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/spi/structure/vfs/StructuredDeployers.java
projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/BaseDeployersTest.java
projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/deployer/DeployerTestSuite.java
projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/metadata/test/MetaDataUnitTestCase.java
projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/structure/StructureTestSuite.java
projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/structure/ear/support/MockEarStructureDeployer.java
projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/structure/ear/test/EARStructureUnitTestCase.java
projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/structure/jar/test/JARStructureUnitTestCase.java
projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/structure/main/test/MainDeployerStructureUnitTestCase.java
projects/microcontainer/branches/2_0/kernel/build.xml
projects/microcontainer/branches/2_0/tools/etc/buildmagic/buildmagic.ent
projects/microcontainer/branches/2_0/tools/etc/buildmagic/modules.ent
Log:
Merge deployer/managed object changes from trunk
Modified: projects/microcontainer/branches/2_0/aop-mc-int/build.xml
===================================================================
--- projects/microcontainer/branches/2_0/aop-mc-int/build.xml 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/aop-mc-int/build.xml 2007-01-04 02:42:21 UTC (rev 59321)
@@ -72,7 +72,9 @@
<path refid="oswego.concurrent.classpath"/>
<path refid="junit.junit.classpath"/>
<path refid="jboss.aop.classpath"/>
- <path refid="jboss.common.classpath"/>
+ <path refid="jboss/common.core.classpath"/>
+ <path refid="jboss/common.logging.spi.classpath"/>
+ <path refid="jboss/common.logging.log4j.classpath"/>
<path refid="jboss.jbossxb.classpath"/>
<path refid="jboss.test.classpath"/>
</path>
Modified: projects/microcontainer/branches/2_0/build/build-thirdparty.xml
===================================================================
--- projects/microcontainer/branches/2_0/build/build-thirdparty.xml 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/build/build-thirdparty.xml 2007-01-04 02:42:21 UTC (rev 59321)
@@ -46,16 +46,20 @@
<componentref name="apache-log4j" version="1.2.8"/>
<componentref name="apache-xerces" version="2.7.1"/>
<componentref name="javassist" version="3.4.GA"/>
- <componentref name="jboss/common" version="snapshot"/>
+ <componentref name="jboss/common-core" version="2.0.4.Alpha2"/>
+ <componentref name="jboss/common-logging-log4j" version="2.0.2.GA"/>
+ <componentref name="jboss/common-logging-jdk" version="2.0.2.GA"/>
+ <componentref name="jboss/common-logging-spi" version="2.0.2.GA"/>
<componentref name="jboss/jbossxb" version="snapshot"/>
+ <componentref name="jboss/jboss-vfs" version="2.0.0.Beta2"/>
<componentref name="jboss/profiler/jvmti" version="1.0.0.CR4"/>
<componentref name="junit" version="3.8.1"/>
<componentref name="junit4" version="4.1"/>
<componentref name="jboss/aop" version="2.0.0.alpha2" />
<componentref name="jboss/backport-concurrent" version="2.1.0.GA"/>
<componentref name="jboss/jbossretro" version="1.0.4.GA"/>
- <componentref name="jboss/test" version="snapshot"/>
- <componentref name="jboss/test14" version="snapshot"/>
+ <componentref name="jboss/test" version="1.0.1.GA"/>
+ <componentref name="jboss/test14" version="1.0.0.GA"/>
<componentref name="osgi" version="4.0"/>
<componentref name="oswego-concurrent" version="1.3.4"/>
<componentref name="sun-javacc" version="4.0"/>
Modified: projects/microcontainer/branches/2_0/build/build.xml
===================================================================
--- projects/microcontainer/branches/2_0/build/build.xml 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/build/build.xml 2007-01-04 02:42:21 UTC (rev 59321)
@@ -81,7 +81,8 @@
<module name="deployers"/>
<module name="kernel"/>
<module name="aop-mc-int"/>
- <module name="osgi-int"/>
+ <module name="managed"/>
+ <module name="metatype"/>
<!-- Module groups -->
@@ -93,7 +94,7 @@
</group>
<group name="core">
- <include modules="container, dependency, kernel, aop-mc-int, deployers, osgi-int"/>
+ <include modules="container, dependency, kernel, aop-mc-int, metatype, managed, deployers"/>
</group>
<group name="default">
@@ -219,12 +220,16 @@
<artifact id="jboss-aop-mc-int-deployer.jar"/>
<artifact id="jboss-container.jar"/>
<artifact id="jboss-dependency.jar"/>
+ <artifact id="jboss-deployers.jar"/>
+ <artifact id="jboss-managed.jar"/>
+ <artifact id="jboss-metatype.jar"/>
<artifact id="jboss-microcontainer.jar"/>
- <artifact id="jboss-deployers.jar"/>
<artifact id="jboss-aop-mc-int-src.zip"/>
<artifact id="jboss-container-src.zip"/>
<artifact id="jboss-dependency-src.zip"/>
<artifact id="jboss-deployers-src.zip"/>
+ <artifact id="jboss-managed-src.zip"/>
+ <artifact id="jboss-metatype-src.zip"/>
<artifact id="jboss-microcontainer-src.zip"/>
<export>
<include input="jboss-aop-mc-int.jar"/>
@@ -232,8 +237,10 @@
<include input="jboss-aop-mc-int-deployer.jar"/>
<include input="jboss-container.jar"/>
<include input="jboss-dependency.jar"/>
+ <include input="jboss-deployers.jar"/>
+ <include input="jboss-managed.jar"/>
+ <include input="jboss-metatype.jar"/>
<include input="jboss-microcontainer.jar"/>
- <include input="jboss-deployers.jar"/>
</export>
</component>
@@ -259,7 +266,15 @@
<fileset dir="../kernel/output/lib">
<include name="*.jar" />
<include name="*-src.zip" />
- </fileset>
+ </fileset>
+ <fileset dir="../managed/output/lib">
+ <include name="*.jar" />
+ <include name="*-src.zip" />
+ </fileset>
+ <fileset dir="../metatype/output/lib">
+ <include name="*.jar" />
+ <include name="*-src.zip" />
+ </fileset>
</copy>
<!-- The JDK14 compatible versions -->
<mkdir dir="${jbossbuild.repository.dir}/jboss/microcontainer14/${jbossbuild.repository.version}" />
Modified: projects/microcontainer/branches/2_0/container/build.xml
===================================================================
--- projects/microcontainer/branches/2_0/container/build.xml 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/container/build.xml 2007-01-04 02:42:21 UTC (rev 59321)
@@ -70,7 +70,10 @@
<path refid="javassist.classpath"/>
<path refid="apache.log4j.classpath"/>
<path refid="oswego.concurrent.classpath"/>
- <path refid="jboss.common.classpath"/>
+ <path refid="jboss/common.core.classpath"/>
+ <path refid="jboss/common.logging.spi.classpath"/>
+ <path refid="jboss/common.logging.log4j.classpath"/>
+ <path refid="jboss/jboss.vfs.classpath"/>
<path refid="jboss.test.classpath"/>
</path>
Modified: projects/microcontainer/branches/2_0/dependency/build.xml
===================================================================
--- projects/microcontainer/branches/2_0/dependency/build.xml 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/dependency/build.xml 2007-01-04 02:42:21 UTC (rev 59321)
@@ -67,7 +67,9 @@
<!-- The combined library classpath -->
<path id="library.classpath">
<path refid="oswego.concurrent.classpath"/>
- <path refid="jboss.common.classpath"/>
+ <path refid="jboss/common.core.classpath"/>
+ <path refid="jboss/common.logging.spi.classpath"/>
+ <path refid="jboss/common.logging.log4j.classpath"/>
</path>
<!-- The combined dependant module classpath -->
Modified: projects/microcontainer/branches/2_0/deployers/.classpath
===================================================================
--- projects/microcontainer/branches/2_0/deployers/.classpath 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/.classpath 2007-01-04 02:42:21 UTC (rev 59321)
@@ -4,7 +4,9 @@
<classpathentry kind="src" path="src/tests"/>
<classpathentry kind="lib" path="src/resources/tests"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="lib" path="/thirdparty/jboss/common/lib/jboss-common.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss/common-core/lib/jboss-common-core.jar" sourcepath="/thirdparty/jboss/common-core/lib/jboss-common-core-sources.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss/common-logging-spi/lib/jboss-logging-spi.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss/common-logging-log4j/lib/jboss-logging-log4j.jar"/>
<classpathentry kind="lib" path="/thirdparty/junit/lib/junit.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss/test/lib/jboss-test.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-log4j/lib/log4j.jar"/>
@@ -12,5 +14,7 @@
<classpathentry kind="lib" path="/thirdparty/jboss/jbossxb/lib/jboss-xml-binding.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/kernel"/>
<classpathentry combineaccessrules="false" kind="src" path="/dependency"/>
+ <classpathentry kind="lib" path="/thirdparty/jboss/jboss-vfs/lib/jboss-vfs.jar" sourcepath="/thirdparty/jboss/jboss-vfs/lib/jboss-vfs-sources.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/managed"/>
<classpathentry kind="output" path="output/eclipse-classes"/>
</classpath>
Modified: projects/microcontainer/branches/2_0/deployers/build-test.xml
===================================================================
--- projects/microcontainer/branches/2_0/deployers/build-test.xml 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/build-test.xml 2007-01-04 02:42:21 UTC (rev 59321)
@@ -68,9 +68,12 @@
<!-- The combined library classpath -->
<path id="library.classpath">
- <path refid="jboss.common.classpath"/>
+ <path refid="jboss/common.core.classpath"/>
+ <path refid="jboss/common.logging.spi.classpath"/>
+ <path refid="jboss/common.logging.log4j.classpath"/>
<path refid="jboss.jbossxb.classpath"/>
- <path refid="jboss.container.classpath"/>
+ <path refid="jboss/jboss.vfs.classpath"/>
+ <path refid="oswego.concurrent.classpath"/>
<path refid="junit.junit.classpath"/>
<path refid="apache.log4j.classpath"/>
<path refid="jboss.test.classpath"/>
@@ -97,6 +100,8 @@
<path refid="jboss.container.classpath"/>
<path refid="jboss.dependency.classpath"/>
<path refid="jboss.kernel.classpath"/>
+ <path refid="jboss.metatype.classpath"/>
+ <path refid="jboss.managed.classpath"/>
<path refid="jboss.this.classpath"/>
</path>
Modified: projects/microcontainer/branches/2_0/deployers/build.xml
===================================================================
--- projects/microcontainer/branches/2_0/deployers/build.xml 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/build.xml 2007-01-04 02:42:21 UTC (rev 59321)
@@ -67,7 +67,10 @@
<!-- The combined library classpath -->
<path id="library.classpath">
- <path refid="jboss.common.classpath"/>
+ <path refid="jboss/common.core.classpath"/>
+ <path refid="jboss/common.logging.spi.classpath"/>
+ <path refid="jboss/common.logging.log4j.classpath"/>
+ <path refid="jboss/jboss.vfs.classpath"/>
<path refid="jboss.jbossxb.classpath"/>
</path>
@@ -78,6 +81,7 @@
<path refid="jboss.container.classpath"/>
<path refid="jboss.dependency.classpath"/>
<path refid="jboss.kernel.classpath"/>
+ <path refid="jboss.managed.classpath"/>
</path>
<!-- ===== -->
Modified: projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/attachments/AttachmentsImpl.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/attachments/AttachmentsImpl.java 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/attachments/AttachmentsImpl.java 2007-01-04 02:42:21 UTC (rev 59321)
@@ -33,6 +33,8 @@
*/
public class AttachmentsImpl extends AbstractAttachments
{
+ private static final long serialVersionUID = 1;
+
/** The attachments */
private Map<String, Object> attachments = new ConcurrentHashMap<String, Object>();
@@ -40,6 +42,11 @@
{
return Collections.unmodifiableMap(attachments);
}
+ public void setAttachments(Map<String, Object> map)
+ {
+ attachments.clear();
+ attachments.putAll(map);
+ }
public Object addAttachment(String name, Object attachment)
{
Modified: projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/deployer/DeployerWrapper.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/deployer/DeployerWrapper.java 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/deployer/DeployerWrapper.java 2007-01-04 02:42:21 UTC (rev 59321)
@@ -21,10 +21,14 @@
*/
package org.jboss.deployers.plugins.deployer;
+import java.util.Map;
+
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.deployer.Deployer;
import org.jboss.deployers.spi.deployer.DeploymentUnit;
+import org.jboss.deployers.spi.managed.ManagedObjectBuilder;
import org.jboss.logging.Logger;
+import org.jboss.managed.api.ManagedObject;
/**
* DeployerWrapper.<p>
@@ -35,7 +39,7 @@
* @author <a href="adrian at jboss.com">Adrian Brock</a>
* @version $Revision: 1.1 $
*/
-public class DeployerWrapper implements Deployer
+public class DeployerWrapper implements Deployer, ManagedObjectBuilder
{
/** The log */
private Logger log;
@@ -43,6 +47,9 @@
/** The deployer */
private Deployer deployer;
+ /** The managed object builder */
+ private ManagedObjectBuilder managedObjectBuilder;
+
/**
* Create a new DeployerWrapper.
*
@@ -54,6 +61,10 @@
throw new IllegalArgumentException("Null deployer");
this.deployer = deployer;
this.log = Logger.getLogger(deployer.getClass());
+
+ // Check to see whether the deployer also builds managed objects
+ if (deployer instanceof ManagedObjectBuilder)
+ managedObjectBuilder = (ManagedObjectBuilder) deployer;
}
public boolean isRelevant(DeploymentUnit unit)
@@ -176,11 +187,35 @@
{
return deployer.getRelativeOrder();
}
+
public void setRelativeOrder(int order)
{
deployer.setRelativeOrder(order);
}
+ public void build(DeploymentUnit unit, Map<String, ManagedObject> managedObjects) throws DeploymentException
+ {
+ // Not a managed object builder
+ if (managedObjectBuilder == null)
+ return;
+
+ if (unit == null)
+ throw new IllegalArgumentException("Null unit");
+ if (managedObjects == null)
+ throw new IllegalArgumentException("Null managed objects");
+
+ try
+ {
+ log.trace("build: " + unit.getName());
+ managedObjectBuilder.build(unit, managedObjects);
+ log.trace("built: " + unit.getName());
+ }
+ catch (Throwable t)
+ {
+ log.warn("Error during commit undeployment: " + unit.getName(), t);
+ }
+ }
+
@Override
public boolean equals(Object obj)
{
Modified: projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/deployers/helpers/AttachmentLocator.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/deployers/helpers/AttachmentLocator.java 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/deployers/helpers/AttachmentLocator.java 2007-01-04 02:42:21 UTC (rev 59321)
@@ -36,6 +36,7 @@
/**
* Get a named attachment
*
+ * @param unit the deployment unit
* @param name the name of the attachment
* @return the attachment or null if not present
* @throws IllegalArgumentException for a null name
@@ -56,6 +57,7 @@
* Get named attachment of a given type
*
* @param <T> the expected type
+ * @param unit the deployment unit
* @param name the name of the attachment
* @param expectedType the expected type
* @return the attachment or null if not present
@@ -74,6 +76,7 @@
*
* @param <T> the expected type
* @param type the type
+ * @param unit the deployment unit
* @return the attachment or null if not present
* @throws IllegalArgumentException for a null name or type
*/
Modified: projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/deployment/MainDeployerImpl.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/deployment/MainDeployerImpl.java 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/deployment/MainDeployerImpl.java 2007-01-04 02:42:21 UTC (rev 59321)
@@ -33,6 +33,7 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
@@ -57,13 +58,20 @@
import org.jboss.deployers.spi.structure.vfs.StructureDeployer;
import org.jboss.deployers.spi.structure.vfs.StructureMetaData;
import org.jboss.logging.Logger;
+import org.jboss.managed.api.ManagedObject;
+import org.jboss.util.graph.Graph;
+import org.jboss.util.graph.Vertex;
import org.jboss.virtual.VirtualFile;
/**
* MainDeployerImpl.
*
* TODO full deployer protocol
+ *
* TODO sort out a proper state machine
+ *
+ * TODO implement attachment flow see comment in {@link Deployer}
+ *
* @author <a href="adrian at jboss.com">Adrian Brock</a>
* @version $Revision: 1.1 $
*/
@@ -82,7 +90,7 @@
private StructureBuilder structureBuilder = new DefaultStructureBuilder();
/** The deployers */
- private SortedSet<Deployer> deployers = new TreeSet<Deployer>(Deployer.COMPARATOR);
+ private SortedSet<DeployerWrapper> deployers = new TreeSet<DeployerWrapper>(Deployer.COMPARATOR);
/** The deployments by name */
private Map<String, DeploymentContext> topLevelDeployments = new ConcurrentHashMap<String, DeploymentContext>();
@@ -161,7 +169,9 @@
*/
public synchronized Set<Deployer> getDeployers()
{
- return new TreeSet<Deployer>(deployers);
+ TreeSet<Deployer> result = new TreeSet<Deployer>(Deployer.COMPARATOR);
+ result.addAll(deployers);
+ return result;
}
/**
@@ -224,6 +234,48 @@
return allDeployments.get(name);
}
+ public Map<String, ManagedObject> getManagedObjects(DeploymentContext context) throws DeploymentException
+ {
+ if (context == null)
+ throw new IllegalArgumentException("Null context");
+
+ Map<String, ManagedObject> managedObjects = new HashMap<String, ManagedObject>();
+ for (DeployerWrapper deployer : deployers)
+ deployer.build(context.getDeploymentUnit(), managedObjects);
+
+ return managedObjects;
+ }
+ /**
+ *
+ */
+ public Graph<Map<String, ManagedObject>> getManagedObjects(String name) throws DeploymentException
+ {
+ DeploymentContext context = getDeploymentContext(name);
+ Graph<Map<String, ManagedObject>> managedObjectsGraph = new Graph<Map<String, ManagedObject>>();
+ Vertex<Map<String, ManagedObject>> parent = new Vertex<Map<String, ManagedObject>>(context.getName());
+ managedObjectsGraph.setRootVertex(parent);
+ Map<String, ManagedObject> managedObjects = getManagedObjects(context);
+ parent.setData(managedObjects);
+ processContext(context, managedObjectsGraph, parent);
+
+ return managedObjectsGraph;
+ }
+ protected void processContext(DeploymentContext context,
+ Graph<Map<String, ManagedObject>> graph,
+ Vertex<Map<String, ManagedObject>> parent)
+ throws DeploymentException
+ {
+ Set<DeploymentContext> children = context.getChildren();
+ for(DeploymentContext child : children)
+ {
+ Vertex<Map<String, ManagedObject>> vertex = new Vertex<Map<String, ManagedObject>>(child.getName());
+ Map<String, ManagedObject> managedObjects = getManagedObjects(context);
+ vertex.setData(managedObjects);
+ graph.addEdge(parent, vertex, 0);
+ processContext(child, graph, vertex);
+ }
+ }
+
public StructureBuilder getStructureBuilder()
{
return structureBuilder;
Modified: projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/AbstractDeploymentContext.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/AbstractDeploymentContext.java 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/AbstractDeploymentContext.java 2007-01-04 02:42:21 UTC (rev 59321)
@@ -46,7 +46,8 @@
* AbstractDeploymentContext.
*
* @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
+ * @author Scott.Stark at jboss.org
+ * @version $Revision$
*/
public class AbstractDeploymentContext
implements DeploymentContext, Serializable
@@ -586,7 +587,12 @@
{
return predeterminedManagedObjects;
}
-
+ public void setPredeterminedManagedObjects(Attachments objects)
+ {
+ predeterminedManagedObjects.clear();
+ ((AttachmentsImpl)predeterminedManagedObjects).setAttachments(objects.getAttachments());
+ }
+
public Attachments getTransientManagedObjects()
{
return transientManagedObjects;
Modified: projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/ClassPathInfoImpl.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/ClassPathInfoImpl.java 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/ClassPathInfoImpl.java 2007-01-04 02:42:21 UTC (rev 59321)
@@ -40,7 +40,7 @@
private static final long serialVersionUID = 1;
private String path;
- private HashMap options = new HashMap();
+ private HashMap<Object, Object> options = new HashMap<Object, Object>();
public ClassPathInfoImpl()
{
@@ -65,7 +65,7 @@
return options.get(key);
}
- public Map getOptions()
+ public Map<Object, Object> getOptions()
{
return options;
}
@@ -75,7 +75,7 @@
options.put(key, value);
}
- public void setOptions(Map options)
+ public void setOptions(Map<Object, Object> options)
{
this.options.clear();
this.options.putAll(options);
Modified: projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/ComponentDeploymentContext.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/ComponentDeploymentContext.java 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/ComponentDeploymentContext.java 2007-01-04 02:42:21 UTC (rev 59321)
@@ -43,7 +43,8 @@
* AbstractDeploymentContext.
*
* @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
+ * @author Scott.Stark at jboss.org
+ * @version $Revision$
*/
public class ComponentDeploymentContext
implements DeploymentContext, Serializable
@@ -348,6 +349,10 @@
{
return parent.getPredeterminedManagedObjects();
}
+ public void setPredeterminedManagedObjects(Attachments objects)
+ {
+ // TODO should throw an exception or support this at the component
+ }
public Attachments getTransientManagedObjects()
{
Modified: projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/vfs/AbstractCandidateStructureVisitor.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/vfs/AbstractCandidateStructureVisitor.java 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/vfs/AbstractCandidateStructureVisitor.java 2007-01-04 02:42:21 UTC (rev 59321)
@@ -60,6 +60,8 @@
* Create a new CandidateStructureVisitor.
*
* @param parent the parent
+ * @param metaData the structure meta data
+ * @param deployers the structure deployers
* @throws IllegalArgumentException for a null parent
*/
public AbstractCandidateStructureVisitor(VirtualFile parent, StructureMetaData metaData, StructuredDeployers deployers)
@@ -71,6 +73,8 @@
* Create a new CandidateStructureVisitor.
*
* @param parent the parent
+ * @param metaData the structure meta data
+ * @param deployers the structure deployers
* @param attributes the attributes
* @throws IllegalArgumentException for a null parent
*/
Modified: projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/vfs/AbstractStructureDeployer.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/vfs/AbstractStructureDeployer.java 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/vfs/AbstractStructureDeployer.java 2007-01-04 02:42:21 UTC (rev 59321)
@@ -96,7 +96,8 @@
*
* @param file
* @param metaData
- * @return
+ * @return true when it is top level
+ * @throws IOException for an error accessing the file
*/
public boolean isTopLevel(VirtualFile file, StructureMetaData metaData)
throws IOException
@@ -168,6 +169,8 @@
* Add all children as candidates
*
* @param parent the parent context
+ * @param metaData the structure meta data
+ * @param deployers the structure deployers
* @throws Exception for any error
*/
protected void addAllChildren(VirtualFile parent, StructureMetaData metaData, StructuredDeployers deployers)
@@ -180,6 +183,8 @@
* Add all children as candidates
*
* @param parent the parent context
+ * @param metaData the structure meta data
+ * @param deployers the structure deployers
* @param attributes the visitor attributes uses {@link VisitorAttributes#DEFAULT} when null
* @throws Exception for any error
*/
Modified: projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/vfs/CandidateStructureVisitorFactory.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/vfs/CandidateStructureVisitorFactory.java 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/vfs/CandidateStructureVisitorFactory.java 2007-01-04 02:42:21 UTC (rev 59321)
@@ -38,6 +38,9 @@
/**
* Create the visitor
*
+ * @param parent the parent virtual file
+ * @param metaData the structure metaData
+ * @param deployers the structure deployers
* @param context the deployment context
* @param attributes the visitor attributes uses {@link VisitorAttributes#DEFAULT} when null
* @return the visitor
Modified: projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/vfs/StructureDeployerWrapper.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/vfs/StructureDeployerWrapper.java 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/vfs/StructureDeployerWrapper.java 2007-01-04 02:42:21 UTC (rev 59321)
@@ -21,7 +21,6 @@
*/
package org.jboss.deployers.plugins.structure.vfs;
-import org.jboss.deployers.spi.structure.DeploymentContext;
import org.jboss.deployers.spi.structure.vfs.StructureDeployer;
import org.jboss.deployers.spi.structure.vfs.StructureMetaData;
import org.jboss.deployers.spi.structure.vfs.StructuredDeployers;
Modified: projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/vfs/jar/JARCandidateStructureVisitor.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/vfs/jar/JARCandidateStructureVisitor.java 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/vfs/jar/JARCandidateStructureVisitor.java 2007-01-04 02:42:21 UTC (rev 59321)
@@ -39,6 +39,8 @@
* Create a new JARCandidateStructureVisitor.
*
* @param parent the parent
+ * @param metaData the structure meta data
+ * @param deployers the structure deployers
* @param attributes the attributes
* @throws IllegalArgumentException for a null parent
* @throws Exception for any error
Modified: projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/vfs/jar/JARStructure.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/vfs/jar/JARStructure.java 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/vfs/jar/JARStructure.java 2007-01-04 02:42:21 UTC (rev 59321)
@@ -47,6 +47,7 @@
/**
* Sets the default relative order 10000.
*
+ * @param suffixes the suffixes
*/
public JARStructure(Set<String> suffixes)
{
Modified: projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/vfs/war/WebInfLibFilter.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/vfs/war/WebInfLibFilter.java 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/plugins/structure/vfs/war/WebInfLibFilter.java 2007-01-04 02:42:21 UTC (rev 59321)
@@ -21,7 +21,6 @@
*/
package org.jboss.deployers.plugins.structure.vfs.war;
-import org.jboss.logging.Logger;
import org.jboss.virtual.VirtualFile;
import org.jboss.virtual.VirtualFileFilterWithAttributes;
import org.jboss.virtual.VisitorAttributes;
@@ -35,9 +34,6 @@
*/
public class WebInfLibFilter implements VirtualFileFilterWithAttributes
{
- /** The log */
- private static final Logger log = Logger.getLogger(WebInfLibFilter.class);
-
/** The instance */
public static final WebInfLibFilter INSTANCE = new WebInfLibFilter();
Modified: projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/spi/deployer/Deployer.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/spi/deployer/Deployer.java 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/spi/deployer/Deployer.java 2007-01-04 02:42:21 UTC (rev 59321)
@@ -21,8 +21,6 @@
*/
package org.jboss.deployers.spi.deployer;
-import java.util.Comparator;
-
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.OrderedDeployer;
@@ -31,6 +29,12 @@
*
* TODO contract for redeployment
*
+ * TODO the contract should really be based on attachment flow
+ * i.e. input/output of attachments
+ * e.g. - parsing deployer (creates an attachment)
+ * - component deployers splits one attachment into mulitple attachments
+ * - real deployer produces the real work for the attachment
+ *
* @author <a href="adrian at jboss.com">Adrian Brock</a>
* @version $Revision: 1.1 $
*/
Modified: projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/spi/deployment/MainDeployer.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/spi/deployment/MainDeployer.java 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/spi/deployment/MainDeployer.java 2007-01-04 02:42:21 UTC (rev 59321)
@@ -22,10 +22,14 @@
package org.jboss.deployers.spi.deployment;
import java.util.Collection;
+import java.util.Map;
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.structure.DeploymentContext;
+import org.jboss.managed.api.ManagedObject;
+import org.jboss.util.graph.Graph;
+
/**
* MainDeployer.<p>
*
@@ -45,8 +49,24 @@
* @return the context or null if not found
*/
DeploymentContext getDeploymentContext(String name);
-
+
/**
+ * Get the managed object for a deployment context
+ *
+ * @param context the context
+ * @return the managed object
+ * @throws DeploymentException for any error
+ */
+ public Map<String, ManagedObject> getManagedObjects(DeploymentContext context) throws DeploymentException;
+ /**
+ * Get the graph of managed objects starting with the top-level deployment associated with name.
+ * @param name - the name of the top-level DeploymentContext to process.
+ * @return the graph of managed objects for the top-level DeploymentContex and its children.
+ * @throws DeploymentException
+ */
+ public Graph<Map<String, ManagedObject>> getManagedObjects(String name) throws DeploymentException;
+
+ /**
* Get the top level deployments
*
* @return the top level deployments
Modified: projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/spi/structure/DeploymentContext.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/spi/structure/DeploymentContext.java 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/spi/structure/DeploymentContext.java 2007-01-04 02:42:21 UTC (rev 59321)
@@ -34,7 +34,8 @@
* DeploymentContext.
*
* @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
+ * @author Scott.Stark at jboss.org
+ * @version $Revision$
*/
public interface DeploymentContext
{
@@ -304,6 +305,11 @@
* @return the predetermined managed objects
*/
Attachments getPredeterminedManagedObjects();
+ /**
+ * Sst the predetermined managed objects
+ * @param objects the predetermined managed objects
+ */
+ void setPredeterminedManagedObjects(Attachments objects);
/**
* Get the managed objects
Modified: projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/spi/structure/vfs/ClassPathInfo.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/spi/structure/vfs/ClassPathInfo.java 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/spi/structure/vfs/ClassPathInfo.java 2007-01-04 02:42:21 UTC (rev 59321)
@@ -32,31 +32,45 @@
public interface ClassPathInfo
{
/**
- * path relative to the context virtual file.
+ * Get the path relative to the context virtual file
+ *
+ * @return the path.
*/
- public String getPath();
- public void setPath(String path);
+ String getPath();
+
/**
+ * Set the path relative to the context virtual file
+ *
+ * @param path the path
+ */
+ void setPath(String path);
+
+ /**
* Get the options associated with the classpath entry.
+ *
* @return A map of entry options.
*/
- public Map getOptions();
+ Map<Object, Object> getOptions();
+
/**
* Set the options associated with the classpath entry.
+ *
* @param options - A map of entry options.
*/
- public void setOptions(Map options);
+ void setOptions(Map<Object, Object> options);
/**
* Get a classpath entry option
* @param key - the option key
* @return the option if it exists, null otherwise
*/
- public Object getOption(Object key);
+ Object getOption(Object key);
+
/**
* Set a classpath entry option
+ *
* @param key - the option key
* @param value - the option value
*/
- public void setOption(Object key, Object value);
+ void setOption(Object key, Object value);
}
Modified: projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/spi/structure/vfs/StructureBuilder.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/spi/structure/vfs/StructureBuilder.java 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/spi/structure/vfs/StructureBuilder.java 2007-01-04 02:42:21 UTC (rev 59321)
@@ -40,7 +40,7 @@
* @param context - the root deployment context to populate
* @param metaData - the metadata from a structural parse of the context
* root VirtualFile
- * @throws Exception for any error
+ * @throws DeploymentException for any error
*/
public void populateContext(DeploymentContext context, StructureMetaData metaData)
throws DeploymentException;
Modified: projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/spi/structure/vfs/StructuredDeployers.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/spi/structure/vfs/StructuredDeployers.java 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/src/main/org/jboss/deployers/spi/structure/vfs/StructuredDeployers.java 2007-01-04 02:42:21 UTC (rev 59321)
@@ -49,9 +49,10 @@
* @return the ordered set of deployers.
*/
public SortedSet<StructureDeployer> getDeployers();
+
/**
* Are there any deployers
- * @return
+ * @return true when empty
*/
public boolean isEmpty();
}
Modified: projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/BaseDeployersTest.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/BaseDeployersTest.java 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/BaseDeployersTest.java 2007-01-04 02:42:21 UTC (rev 59321)
@@ -22,7 +22,6 @@
package org.jboss.test.deployers;
import java.io.IOException;
-import java.net.MalformedURLException;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.HashMap;
@@ -95,8 +94,20 @@
URL url = getResource(path);
return url.toString();
}
-
/**
+ * Get a vfs url string from a path
+ *
+ * @param path
+ * @return the url
+ * @throws Exception
+ */
+ protected String getVfsURL(String path) throws Exception
+ {
+ URL url = getResource(path);
+ return "vfs"+url.toString();
+ }
+
+ /**
* Get a jar url string from a path
*
* @param path the path
@@ -125,9 +136,11 @@
deployers.addDeployer(getStrucutureDeployer());
return deployers;
}
+
/**
* Get the StructureVisitorFactory that translates the StructureMetaData into a DeploymentContext tree.
- * @return
+ *
+ * @return the builder
*/
protected StructureBuilderFactory getStructureBuilderFactory()
{
@@ -138,7 +151,9 @@
* Determine the structure
*
* @param context the context
+ * @param addTopLevelInfo whether to add top level info
* @return the result
+ * @throws Exception for any error
*/
protected boolean determineStructure(DeploymentContext context, boolean addTopLevelInfo)
throws Exception
@@ -151,9 +166,10 @@
/**
* Determine the structure
*
- * @param structure the structural deployer
+ * @param deployer the structural deployer
* @param context the context
* @return the result
+ * @throws Exception for any error
*/
protected boolean determineStructure(StructureDeployer deployer,
DeploymentContext context)
@@ -161,12 +177,15 @@
{
return determineStructure(deployer, getStrucuturedDeployers(), context, false);
}
+
/**
* Determine the structure
*
- * @param structure the structural deployer
+ * @param deployer the structural deployer
* @param context the context
+ * @param addTopLevelInfo whether to add top level info
* @return the result
+ * @throws Exception for any error
*/
protected boolean determineStructure(StructureDeployer deployer,
DeploymentContext context, boolean addTopLevelInfo)
@@ -175,14 +194,15 @@
return determineStructure(deployer, getStrucuturedDeployers(), context, addTopLevelInfo);
}
/**
+ * Determine the structure
*
* @param deployer
* @param deployers
* @param context
* @param addTopLevelInfo - should a ContextInfo be created for the
* context root
- * @return
- * @throws Exception
+ * @return whether the structure was determined
+ * @throws Exception for any error
*/
protected boolean determineStructure(StructureDeployer deployer,
StructuredDeployers deployers, DeploymentContext context,
@@ -341,7 +361,8 @@
* Translate a set of DeploymentContexts string paths relative to the root
* URL.
*
- * @param set
+ * @param set the deployment contexts
+ * @param root the root url
* @return set of
* @throws URISyntaxException
* @throws IOException
@@ -374,7 +395,9 @@
* some.ear/child.jar
*
* @param root ctx
- * @return
+ * @return the map
+ * @throws IOException for an error accessing the vfs path
+ * @throws URISyntaxException for an error resolving the uri
*/
protected Map<String, DeploymentContext> createDeploymentPathMap(DeploymentContext root)
throws IOException, URISyntaxException
Modified: projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/deployer/DeployerTestSuite.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/deployer/DeployerTestSuite.java 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/deployer/DeployerTestSuite.java 2007-01-04 02:42:21 UTC (rev 59321)
@@ -32,6 +32,7 @@
import org.jboss.test.deployers.deployer.test.DeployerProtocolUnitTestCase;
import org.jboss.test.deployers.deployer.test.DeployerWidthFirstUnitTestCase;
import org.jboss.test.deployers.deployer.test.MainDeployerDeployerUnitTestCase;
+import org.jboss.test.deployers.managed.ManagedTestSuite;
import org.jboss.test.deployers.metadata.test.MetaDataUnitTestCase;
/**
@@ -57,6 +58,7 @@
suite.addTest(DeployerClassLoaderUnitTestCase.suite());
suite.addTest(MainDeployerDeployerUnitTestCase.suite());
suite.addTest(MetaDataUnitTestCase.suite());
+ suite.addTest(ManagedTestSuite.suite());
suite.addTest(BeanDeployerUnitTestCase.suite());
suite.addTest(KernelDeployerUnitTestCase.suite());
Modified: projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/metadata/test/MetaDataUnitTestCase.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/metadata/test/MetaDataUnitTestCase.java 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/metadata/test/MetaDataUnitTestCase.java 2007-01-04 02:42:21 UTC (rev 59321)
@@ -53,7 +53,7 @@
public void testExactMatchTopLevel() throws Exception
{
DeploymentContext context = createDeploymentContext("/metadata", "toplevel/exact/jboss-service.xml");
- String expected = getURL("/metadata/toplevel/exact/jboss-service.xml");
+ String expected = getVfsURL("/metadata/toplevel/exact/jboss-service.xml");
assertMetaDataMatch(context, expected, "jboss-service.xml");
}
@@ -67,7 +67,7 @@
{
DeploymentContext context = createDeploymentContext("/metadata", "toplevel/partial/mydb-ds.xml");
Set<String> expected = new HashSet<String>();
- expected.add(getURL("/metadata/toplevel/partial/mydb-ds.xml"));
+ expected.add(getVfsURL("/metadata/toplevel/partial/mydb-ds.xml"));
assertMetaDataMatch(context, expected, null, "-ds.xml");
}
@@ -81,7 +81,7 @@
{
DeploymentContext context = createDeploymentContext("/metadata", "toplevel/metadata.jar");
context.setMetaDataPath("META-INF");
- String expected = getURL("/metadata/toplevel/metadata.jar/META-INF/jboss-service.xml");
+ String expected = getVfsURL("/metadata/toplevel/metadata.jar/META-INF/jboss-service.xml");
assertMetaDataMatch(context, expected, "jboss-service.xml");
}
@@ -111,8 +111,8 @@
DeploymentContext context = createDeploymentContext("/metadata", "toplevel/metadata.jar");
context.setMetaDataPath("META-INF");
Set<String> expected = new HashSet<String>();
- expected.add(getURL("/metadata/toplevel/metadata.jar/META-INF/1-ds.xml"));
- expected.add(getURL("/metadata/toplevel/metadata.jar/META-INF/2-ds.xml"));
+ expected.add(getVfsURL("/metadata/toplevel/metadata.jar/META-INF/1-ds.xml"));
+ expected.add(getVfsURL("/metadata/toplevel/metadata.jar/META-INF/2-ds.xml"));
assertMetaDataMatch(context, expected, null, "-ds.xml");
}
@@ -142,9 +142,9 @@
DeploymentContext context = createDeploymentContext("/metadata", "toplevel/metadata.jar");
context.setMetaDataPath("META-INF");
Set<String> expected = new HashSet<String>();
- expected.add(getURL("/metadata/toplevel/metadata.jar/META-INF/jboss-service.xml"));
- expected.add(getURL("/metadata/toplevel/metadata.jar/META-INF/1-ds.xml"));
- expected.add(getURL("/metadata/toplevel/metadata.jar/META-INF/2-ds.xml"));
+ expected.add(getVfsURL("/metadata/toplevel/metadata.jar/META-INF/jboss-service.xml"));
+ expected.add(getVfsURL("/metadata/toplevel/metadata.jar/META-INF/1-ds.xml"));
+ expected.add(getVfsURL("/metadata/toplevel/metadata.jar/META-INF/2-ds.xml"));
assertMetaDataMatch(context, expected, "jboss-service.xml", "-ds.xml");
}
Modified: projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/structure/StructureTestSuite.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/structure/StructureTestSuite.java 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/structure/StructureTestSuite.java 2007-01-04 02:42:21 UTC (rev 59321)
@@ -26,6 +26,7 @@
import junit.textui.TestRunner;
import org.jboss.test.deployers.structure.ear.test.EARStructureUnitTestCase;
+import org.jboss.test.deployers.structure.explicit.test.DeclaredStructureUnitTestCase;
import org.jboss.test.deployers.structure.file.test.FileStructureUnitTestCase;
import org.jboss.test.deployers.structure.jar.test.JARStructureUnitTestCase;
import org.jboss.test.deployers.structure.main.test.MainDeployerFileStructureUnitTestCase;
@@ -56,6 +57,7 @@
suite.addTest(JARStructureUnitTestCase.suite());
suite.addTest(WARStructureUnitTestCase.suite());
suite.addTest(EARStructureUnitTestCase.suite());
+ suite.addTest(DeclaredStructureUnitTestCase.suite());
suite.addTest(MainDeployerStructureUnitTestCase.suite());
suite.addTest(MainDeployerStructureOrderingUnitTestCase.suite());
suite.addTest(MainDeployerFileStructureUnitTestCase.suite());
Modified: projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/structure/ear/support/MockEarStructureDeployer.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/structure/ear/support/MockEarStructureDeployer.java 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/structure/ear/support/MockEarStructureDeployer.java 2007-01-04 02:42:21 UTC (rev 59321)
@@ -26,7 +26,6 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
-import java.util.Set;
import org.jboss.deployers.plugins.structure.ContextInfoImpl;
import org.jboss.deployers.plugins.structure.vfs.AbstractStructureDeployer;
Modified: projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/structure/ear/test/EARStructureUnitTestCase.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/structure/ear/test/EARStructureUnitTestCase.java 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/structure/ear/test/EARStructureUnitTestCase.java 2007-01-04 02:42:21 UTC (rev 59321)
@@ -35,7 +35,6 @@
import org.jboss.deployers.plugins.structure.vfs.file.FileStructure;
import org.jboss.deployers.plugins.structure.vfs.jar.JARStructure;
import org.jboss.deployers.plugins.structure.vfs.war.WARStructure;
-import org.jboss.deployers.spi.deployer.DeploymentUnit;
import org.jboss.deployers.spi.structure.DeploymentContext;
import org.jboss.deployers.spi.structure.vfs.StructureDeployer;
import org.jboss.deployers.spi.structure.vfs.StructuredDeployers;
Modified: projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/structure/jar/test/JARStructureUnitTestCase.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/structure/jar/test/JARStructureUnitTestCase.java 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/structure/jar/test/JARStructureUnitTestCase.java 2007-01-04 02:42:21 UTC (rev 59321)
@@ -149,8 +149,13 @@
// Test it got all the candidates
Map<String, Boolean> expected = new HashMap<String, Boolean>();
+ /* With the change to not expose the outer jar url, these are
+ no longer valid checks.
expected.put(getJarURL("/structure/jar/indirectory/archive.jar"), true);
expected.put(getJarURL("/structure/jar/indirectory/archive.zip"), true);
+ */
+ expected.put(getVfsURL("/structure/jar/indirectory/archive.jar"), true);
+ expected.put(getVfsURL("/structure/jar/indirectory/archive.zip"), true);
assertContexts(expected, context.getChildren());
assertCandidatesValid(context);
@@ -175,7 +180,7 @@
// Test it got all the candidates
Map<String, Boolean> expected = new HashMap<String, Boolean>();
- expected.put(getURL("/structure/jar/subdirisajar/sub.jar/"), true);
+ expected.put(getVfsURL("/structure/jar/subdirisajar/sub.jar/"), true);
assertContexts(expected, context.getChildren());
assertCandidatesValid(context);
Modified: projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/structure/main/test/MainDeployerStructureUnitTestCase.java
===================================================================
--- projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/structure/main/test/MainDeployerStructureUnitTestCase.java 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/deployers/src/tests/org/jboss/test/deployers/structure/main/test/MainDeployerStructureUnitTestCase.java 2007-01-04 02:42:21 UTC (rev 59321)
@@ -23,10 +23,7 @@
import java.util.Collections;
import java.util.HashSet;
-import java.util.Iterator;
import java.util.Set;
-import java.util.SortedSet;
-import java.util.TreeSet;
import junit.framework.AssertionFailedError;
import junit.framework.Test;
@@ -34,10 +31,6 @@
import org.jboss.deployers.plugins.deployment.MainDeployerImpl;
import org.jboss.deployers.plugins.structure.AbstractDeploymentContext;
-import org.jboss.deployers.plugins.structure.BasicStructuredDeployers;
-import org.jboss.deployers.plugins.structure.vfs.StructureDeployerWrapper;
-import org.jboss.deployers.plugins.structure.vfs.explicit.DeclaredStructure;
-import org.jboss.deployers.plugins.structure.vfs.file.FileStructure;
import org.jboss.deployers.plugins.structure.vfs.jar.JARStructure;
import org.jboss.deployers.plugins.structure.vfs.war.WARStructure;
import org.jboss.deployers.spi.structure.DeploymentContext;
Modified: projects/microcontainer/branches/2_0/kernel/build.xml
===================================================================
--- projects/microcontainer/branches/2_0/kernel/build.xml 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/kernel/build.xml 2007-01-04 02:42:21 UTC (rev 59321)
@@ -70,8 +70,10 @@
<path id="library.classpath">
<path refid="oswego.concurrent.classpath"/>
<path refid="junit.junit.classpath"/>
- <path refid="jboss.common.classpath"/>
- <path refid="jboss.test.classpath"/>
+ <path refid="jboss/common.core.classpath"/>
+ <path refid="jboss/common.logging.spi.classpath"/>
+ <path refid="jboss/common.logging.log4j.classpath"/>
+ <path refid="jboss.test.classpath"/>
<path refid="jboss.jbossxb.classpath"/>
</path>
Modified: projects/microcontainer/branches/2_0/tools/etc/buildmagic/buildmagic.ent
===================================================================
--- projects/microcontainer/branches/2_0/tools/etc/buildmagic/buildmagic.ent 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/tools/etc/buildmagic/buildmagic.ent 2007-01-04 02:42:21 UTC (rev 59321)
@@ -524,6 +524,14 @@
</fileset>
</copy>
</target>
+<target name="_default:compile-resources-no-filter" depends="init" unless="compile.disable">
+ <mkdir dir="${build.resources}"/>
+ <copy todir="${build.resources}" filtering="no">
+ <fileset dir="${source.resources}">
+ <patternset refid="compile-resources.filter.pattern"/>
+ </fileset>
+ </copy>
+</target>
<patternset id="compile-resources.filter.pattern">
<include name="**/*"/>
Modified: projects/microcontainer/branches/2_0/tools/etc/buildmagic/modules.ent
===================================================================
--- projects/microcontainer/branches/2_0/tools/etc/buildmagic/modules.ent 2007-01-04 01:33:45 UTC (rev 59320)
+++ projects/microcontainer/branches/2_0/tools/etc/buildmagic/modules.ent 2007-01-04 02:42:21 UTC (rev 59321)
@@ -28,6 +28,15 @@
<include name="jboss-dependency14.jar"/>
</fileset>
</path>
+<!-- managed -->
+<property name="jboss.managed.root" value="${project.root}/managed"/>
+<property name="jboss.managed.lib" value="${jboss.managed.root}/output/lib"/>
+<path id="jboss.managed.classpath">
+ <fileset dir="${jboss.managed.lib}">
+ <include name="jboss-managed.jar"/>
+ </fileset>
+</path>
+
<!-- kernel -->
<property name="jboss.kernel.root" value="${project.root}/kernel"/>
<property name="jboss.kernel.lib" value="${jboss.kernel.root}/output/lib"/>
@@ -67,5 +76,13 @@
</fileset>
</path>
+<!-- metatype -->
+<property name="jboss.metatype.root" value="${project.root}/metatype"/>
+<property name="jboss.metatype.lib" value="${jboss.metatype.root}/output/lib"/>
+<path id="jboss.metatype.classpath">
+ <fileset dir="${jboss.metatype.lib}">
+ <include name="jboss-metatype.jar"/>
+ </fileset>
+</path>
More information about the jboss-cvs-commits
mailing list