[jboss-cvs] JBossAS SVN: r84729 - in projects/jboss-osgi/branches/tdiesler: distribution and 34 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Feb 25 07:40:29 EST 2009


Author: thomas.diesler at jboss.com
Date: 2009-02-25 07:40:29 -0500 (Wed, 25 Feb 2009)
New Revision: 84729

Added:
   projects/jboss-osgi/branches/tdiesler/microcontainer/.project
   projects/jboss-osgi/branches/tdiesler/repository/.project
   projects/jboss-osgi/branches/tdiesler/runtime/.project
   projects/jboss-osgi/branches/tdiesler/runtime/.settings/
   projects/jboss-osgi/branches/tdiesler/runtime/.settings/org.eclipse.jdt.core.prefs
   projects/jboss-osgi/branches/tdiesler/runtime/.settings/org.maven.ide.eclipse.prefs
   projects/jboss-osgi/branches/tdiesler/runtime/deployer/
   projects/jboss-osgi/branches/tdiesler/runtime/deployer/.classpath
   projects/jboss-osgi/branches/tdiesler/runtime/deployer/.project
   projects/jboss-osgi/branches/tdiesler/runtime/deployer/.settings/
   projects/jboss-osgi/branches/tdiesler/runtime/deployer/.settings/org.eclipse.jdt.core.prefs
   projects/jboss-osgi/branches/tdiesler/runtime/deployer/.settings/org.maven.ide.eclipse.prefs
   projects/jboss-osgi/branches/tdiesler/runtime/deployer/pom.xml
   projects/jboss-osgi/branches/tdiesler/runtime/deployer/scripts/
   projects/jboss-osgi/branches/tdiesler/runtime/deployer/scripts/assembly-config.xml
   projects/jboss-osgi/branches/tdiesler/runtime/deployer/src/
   projects/jboss-osgi/branches/tdiesler/runtime/deployer/src/main/
   projects/jboss-osgi/branches/tdiesler/runtime/deployer/src/main/java/
   projects/jboss-osgi/branches/tdiesler/runtime/deployer/src/main/java/org/
   projects/jboss-osgi/branches/tdiesler/runtime/deployer/src/main/java/org/jboss/
   projects/jboss-osgi/branches/tdiesler/runtime/deployer/src/main/java/org/jboss/osgi/
   projects/jboss-osgi/branches/tdiesler/runtime/deployer/src/main/java/org/jboss/osgi/deployer/
   projects/jboss-osgi/branches/tdiesler/runtime/deployer/src/main/java/org/jboss/osgi/deployer/OSGiDeployer.java
   projects/jboss-osgi/branches/tdiesler/runtime/deployer/src/main/java/org/jboss/osgi/deployer/OSGiMetaData.java
   projects/jboss-osgi/branches/tdiesler/runtime/deployer/src/main/java/org/jboss/osgi/deployer/OSGiMetaDataDeployer.java
   projects/jboss-osgi/branches/tdiesler/runtime/deployer/src/main/resources/
   projects/jboss-osgi/branches/tdiesler/runtime/deployer/src/main/resources/osgi-deployers-jboss-beans.xml
   projects/jboss-osgi/branches/tdiesler/testsuite/
   projects/jboss-osgi/branches/tdiesler/testsuite/.classpath
   projects/jboss-osgi/branches/tdiesler/testsuite/.project
   projects/jboss-osgi/branches/tdiesler/testsuite/.settings/
   projects/jboss-osgi/branches/tdiesler/testsuite/.settings/org.eclipse.jdt.core.prefs
   projects/jboss-osgi/branches/tdiesler/testsuite/.settings/org.maven.ide.eclipse.prefs
   projects/jboss-osgi/branches/tdiesler/testsuite/pom.xml
   projects/jboss-osgi/branches/tdiesler/testsuite/scripts/
   projects/jboss-osgi/branches/tdiesler/testsuite/scripts/antrun-test-jars.xml
   projects/jboss-osgi/branches/tdiesler/testsuite/src/
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/http/
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/http/EndpointService.java
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/http/EndpointServlet.java
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/http/ServiceActivator.java
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/http/junit/
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/http/junit/EndpointServiceTest.java
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/microcontainer/
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/microcontainer/Foo.java
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/microcontainer/FooMBean.java
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/microcontainer/MBeanTestService.java
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/microcontainer/ServiceActivator.java
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/microcontainer/junit/
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/microcontainer/junit/MicrocontainerServiceTest.java
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/jndi.properties
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/log4j.xml
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/service/
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/service/http/
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/service/http/http-service.bnd
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/service/http/message.txt
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/service/microcontainer/
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/service/microcontainer/microcontainer-service.bnd
   projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/tst.policy
Modified:
   projects/jboss-osgi/branches/tdiesler/distribution/.project
   projects/jboss-osgi/branches/tdiesler/distribution/pom.xml
   projects/jboss-osgi/branches/tdiesler/pom.xml
   projects/jboss-osgi/branches/tdiesler/runtime/pom.xml
Log:
wip

Modified: projects/jboss-osgi/branches/tdiesler/distribution/.project
===================================================================
--- projects/jboss-osgi/branches/tdiesler/distribution/.project	2009-02-25 12:32:59 UTC (rev 84728)
+++ projects/jboss-osgi/branches/tdiesler/distribution/.project	2009-02-25 12:40:29 UTC (rev 84729)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
-	<name>jbpm-distribution</name>
+	<name>jboss-osgi-distribution</name>
 	<comment></comment>
 	<projects>
 	</projects>

Modified: projects/jboss-osgi/branches/tdiesler/distribution/pom.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/distribution/pom.xml	2009-02-25 12:32:59 UTC (rev 84728)
+++ projects/jboss-osgi/branches/tdiesler/distribution/pom.xml	2009-02-25 12:40:29 UTC (rev 84729)
@@ -24,8 +24,7 @@
   <parent>
     <groupId>org.jboss.osgi</groupId>
     <artifactId>jboss-osgi</artifactId>
-    <version>1.0.0.Alpha2</version>
-    <relativePath>../../pom.xml</relativePath>
+    <version>1.0.0.Alpha3</version>
   </parent>
 
   <!-- Properties -->

Added: projects/jboss-osgi/branches/tdiesler/microcontainer/.project
===================================================================
--- projects/jboss-osgi/branches/tdiesler/microcontainer/.project	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/microcontainer/.project	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>jboss-osgi-microcontainer</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.maven.ide.eclipse.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.maven.ide.eclipse.maven2Nature</nature>
+	</natures>
+</projectDescription>

Modified: projects/jboss-osgi/branches/tdiesler/pom.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/pom.xml	2009-02-25 12:32:59 UTC (rev 84728)
+++ projects/jboss-osgi/branches/tdiesler/pom.xml	2009-02-25 12:40:29 UTC (rev 84729)
@@ -29,9 +29,7 @@
     <module>repository</module>
     <module>runtime</module>
     <module>service</module>
-    <!-- 
     <module>testsuite</module>
-    -->
   </modules>
 
   <properties>
@@ -296,6 +294,11 @@
   </reporting>
 
   <profiles>
+  
+    <!--
+      Name: default
+      Desc: The default profile
+    -->
     <profile>
       <id>default</id>
       <activation>
@@ -306,7 +309,49 @@
         <microcontainer.testOutputDirectory>target/tests-classes</microcontainer.testOutputDirectory>
       </properties>
     </profile>
+    
+    <!--
+      Name: distro
+      Desc: Build the distribution
+    -->
     <profile>
+      <id>distro</id>
+      <modules>
+        <module>distribution</module>
+      </modules>
+      <build>
+        <plugins>
+          <!-- 
+          <plugin>
+            <artifactId>maven-javadoc-plugin</artifactId>
+            <configuration>
+              <quiet>true</quiet>
+            </configuration>
+            <executions>
+              <execution>
+                <id>attach-javadocs</id>
+                <goals>
+                  <goal>jar</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+          -->
+          <plugin>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <configuration>
+              <skipTests>true</skipTests>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    
+    <!--
+      Name: eclipse
+      Desc: The eclipse profile
+    -->
+    <profile>
       <id>eclipse</id>
       <build>
         <defaultGoal>process-test-resources</defaultGoal>

Added: projects/jboss-osgi/branches/tdiesler/repository/.project
===================================================================
--- projects/jboss-osgi/branches/tdiesler/repository/.project	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/repository/.project	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>jboss-osgi-repository</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.maven.ide.eclipse.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.maven.ide.eclipse.maven2Nature</nature>
+	</natures>
+</projectDescription>

Added: projects/jboss-osgi/branches/tdiesler/runtime/.project
===================================================================
--- projects/jboss-osgi/branches/tdiesler/runtime/.project	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/runtime/.project	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>jboss-osgi-runtime</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.maven.ide.eclipse.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.maven.ide.eclipse.maven2Nature</nature>
+	</natures>
+</projectDescription>

Added: projects/jboss-osgi/branches/tdiesler/runtime/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/jboss-osgi/branches/tdiesler/runtime/.settings/org.eclipse.jdt.core.prefs	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/runtime/.settings/org.eclipse.jdt.core.prefs	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,5 @@
+#Wed Feb 25 13:14:51 CET 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.source=1.5

Added: projects/jboss-osgi/branches/tdiesler/runtime/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- projects/jboss-osgi/branches/tdiesler/runtime/.settings/org.maven.ide.eclipse.prefs	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/runtime/.settings/org.maven.ide.eclipse.prefs	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,8 @@
+#Wed Feb 25 13:14:25 CET 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+version=1

Added: projects/jboss-osgi/branches/tdiesler/runtime/deployer/.classpath
===================================================================
--- projects/jboss-osgi/branches/tdiesler/runtime/deployer/.classpath	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/runtime/deployer/.classpath	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
+	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Added: projects/jboss-osgi/branches/tdiesler/runtime/deployer/.project
===================================================================
--- projects/jboss-osgi/branches/tdiesler/runtime/deployer/.project	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/runtime/deployer/.project	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>jboss-osgi-deployer</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.maven.ide.eclipse.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.maven.ide.eclipse.maven2Nature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: projects/jboss-osgi/branches/tdiesler/runtime/deployer/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/jboss-osgi/branches/tdiesler/runtime/deployer/.settings/org.eclipse.jdt.core.prefs	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/runtime/deployer/.settings/org.eclipse.jdt.core.prefs	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,12 @@
+#Wed Feb 04 09:36:33 CET 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5

Added: projects/jboss-osgi/branches/tdiesler/runtime/deployer/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- projects/jboss-osgi/branches/tdiesler/runtime/deployer/.settings/org.maven.ide.eclipse.prefs	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/runtime/deployer/.settings/org.maven.ide.eclipse.prefs	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,9 @@
+#Tue Feb 17 14:09:36 CET 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1

Added: projects/jboss-osgi/branches/tdiesler/runtime/deployer/pom.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/runtime/deployer/pom.xml	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/runtime/deployer/pom.xml	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+
+  <name>JBoss OSGi - Runtime Deployer</name>
+  <description>JBoss OSGi - JBoss Deployer</description>
+
+  <groupId>org.jboss.osgi</groupId>
+  <artifactId>jboss-osgi-deployer</artifactId>
+  <packaging>jar</packaging>
+
+  <parent>
+    <groupId>org.jboss.osgi</groupId>
+    <artifactId>jboss-osgi-runtime</artifactId>
+    <version>1.0.0.Alpha3</version>
+  </parent>
+
+  <!-- Properties -->
+  <properties>
+  </properties>
+
+  <!-- Dependencies -->
+  <dependencies>
+    <dependency>
+      <groupId>org.jboss.osgi</groupId>
+      <artifactId>jboss-osgi-spi</artifactId>
+      <version>${version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.deployers</groupId>
+      <artifactId>jboss-deployers-spi</artifactId>
+      <version>${version.jboss.deployers}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.jbossas</groupId>
+      <artifactId>jboss-as-system-jmx</artifactId>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+
+  <!-- Build -->
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>single</goal>
+            </goals>
+            <configuration>
+              <finalName>${project.build.finalName}</finalName>
+              <appendAssemblyId>true</appendAssemblyId>
+              <descriptors>
+                <descriptor>scripts/assembly-config.xml</descriptor>
+              </descriptors>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <excludes>
+            <exclude>*beans.xml</exclude>
+          </excludes>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>


Property changes on: projects/jboss-osgi/branches/tdiesler/runtime/deployer/pom.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jboss-osgi/branches/tdiesler/runtime/deployer/scripts/assembly-config.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/runtime/deployer/scripts/assembly-config.xml	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/runtime/deployer/scripts/assembly-config.xml	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,17 @@
+<assembly 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/xsd/assembly-1.1.0-SNAPSHOT.xsd">
+  <id>config</id>
+  <formats>
+    <format>jar</format>
+  </formats>
+  <includeBaseDirectory>false</includeBaseDirectory>
+  <fileSets>
+    <fileSet>
+      <directory>${project.build.outputDirectory}</directory>
+      <outputDirectory>/</outputDirectory>
+      <includes>
+        <include>*beans.xml</include>
+      </includes>
+    </fileSet>
+  </fileSets>
+</assembly>
\ No newline at end of file


Property changes on: projects/jboss-osgi/branches/tdiesler/runtime/deployer/scripts/assembly-config.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jboss-osgi/branches/tdiesler/runtime/deployer/src/main/java/org/jboss/osgi/deployer/OSGiDeployer.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/runtime/deployer/src/main/java/org/jboss/osgi/deployer/OSGiDeployer.java	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/runtime/deployer/src/main/java/org/jboss/osgi/deployer/OSGiDeployer.java	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,109 @@
+/*
+ * 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.osgi.deployer;
+
+//$Id$
+
+import java.net.URI;
+import java.util.List;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.logging.Logger;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+
+/**
+ * This is the OSGi Deployer
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 03-Feb-2009
+ */
+public class OSGiDeployer extends AbstractRealDeployer
+{
+  // provide logging
+  private static final Logger log = Logger.getLogger(OSGiDeployer.class);
+
+  private BundleContext bundleContext;
+  private List<URI> skipBundles;
+
+  public OSGiDeployer()
+  {
+    setInput(OSGiMetaData.class);
+  }
+
+  public void setBundleContext(BundleContext bundleContext)
+  {
+    this.bundleContext = bundleContext;
+  }
+
+  public void setSkipBundles(List<URI> skipBundles)
+  {
+    this.skipBundles = skipBundles;
+  }
+
+  @Override
+  protected void internalDeploy(DeploymentUnit unit) throws DeploymentException
+  {
+    OSGiMetaData metadata = unit.getAttachment(OSGiMetaData.class);
+    log.info("Install Bundle: " + metadata.getSymbolicName());
+    
+    URI bundleUri = metadata.getBundleLocation();
+    if (bundleUri == null)
+      throw new IllegalStateException("Cannot obtain bundle location for: " + metadata);
+    
+    try
+    {
+      if (skipBundles.contains(bundleUri) == false)
+      {
+        Bundle bundle = bundleContext.installBundle(bundleUri.toString());
+        bundle.start();
+        
+        unit.addAttachment(Bundle.class, bundle);
+      }
+    }
+    catch (BundleException ex)
+    {
+      throw new DeploymentException("Cannot install bundle: " + metadata, ex);
+    }
+  }
+
+  @Override
+  protected void internalUndeploy(DeploymentUnit unit)
+  {
+    Bundle bundle = unit.getAttachment(Bundle.class);
+    if (bundle != null)
+    {
+      log.info("Uninstall Bundle: " + bundle.getSymbolicName());
+      try
+      {
+        bundle.uninstall();
+      }
+      catch (BundleException ex)
+      {
+        log.error(ex);
+      }
+    }
+  }
+}


Property changes on: projects/jboss-osgi/branches/tdiesler/runtime/deployer/src/main/java/org/jboss/osgi/deployer/OSGiDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jboss-osgi/branches/tdiesler/runtime/deployer/src/main/java/org/jboss/osgi/deployer/OSGiMetaData.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/runtime/deployer/src/main/java/org/jboss/osgi/deployer/OSGiMetaData.java	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/runtime/deployer/src/main/java/org/jboss/osgi/deployer/OSGiMetaData.java	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,66 @@
+/*
+ * 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.osgi.deployer;
+
+//$Id$
+
+import java.net.URI;
+
+import org.jboss.deployers.vfs.spi.deployer.helpers.AbstractManifestMetaData;
+
+
+/**
+ * This are the OSGi Meta Data
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 03-Feb-2009
+ */
+public class OSGiMetaData extends AbstractManifestMetaData
+{
+  private String symbolicName;
+  private URI bundleLocation;
+
+  public OSGiMetaData(String symbolicName)
+  {
+    this.symbolicName = symbolicName;
+  }
+
+  public String getSymbolicName()
+  {
+    return symbolicName;
+  }
+
+  public URI getBundleLocation()
+  {
+    return bundleLocation;
+  }
+
+  public void setBundleLocation(URI bundleLocation)
+  {
+    this.bundleLocation = bundleLocation;
+  }
+  
+  public String toString()
+  {
+    return "Bundle[name=" + symbolicName + "]";
+  }
+}


Property changes on: projects/jboss-osgi/branches/tdiesler/runtime/deployer/src/main/java/org/jboss/osgi/deployer/OSGiMetaData.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jboss-osgi/branches/tdiesler/runtime/deployer/src/main/java/org/jboss/osgi/deployer/OSGiMetaDataDeployer.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/runtime/deployer/src/main/java/org/jboss/osgi/deployer/OSGiMetaDataDeployer.java	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/runtime/deployer/src/main/java/org/jboss/osgi/deployer/OSGiMetaDataDeployer.java	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,75 @@
+/*
+ * 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.osgi.deployer;
+
+//$Id$
+
+import java.util.jar.Attributes;
+import java.util.jar.Manifest;
+
+import org.jboss.deployers.vfs.spi.deployer.ManifestDeployer;
+import org.jboss.deployers.vfs.spi.deployer.ManifestMetaData;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.logging.Logger;
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * This is the OSGi Deployer
+ * 
+ * @author Thomas.Diesler at jboss.org
+ * @since 03-Feb-2009
+ */
+public class OSGiMetaDataDeployer<T extends ManifestMetaData> extends ManifestDeployer<OSGiMetaData>
+{
+  // provide logging
+  private static final Logger log = Logger.getLogger(OSGiMetaDataDeployer.class);
+
+  public OSGiMetaDataDeployer()
+  {
+    super(OSGiMetaData.class);
+  }
+
+  @Override
+  protected OSGiMetaData parse(VFSDeploymentUnit unit, VirtualFile file, OSGiMetaData root) throws Exception
+  {
+    OSGiMetaData metaData = super.parse(unit, file, root);
+    if (metaData != null)
+    {
+      metaData.setBundleLocation(unit.getRoot().toURI());
+      log.debug("Bundle-SymbolicName: " + metaData.getSymbolicName() + " in " + file);
+    }
+    return metaData;
+  }
+  
+  @Override
+  protected OSGiMetaData createMetaData(Manifest manifest) throws Exception
+  {
+    OSGiMetaData metaData = null;
+
+    Attributes attribs = manifest.getMainAttributes();
+    String symbolicName = attribs.getValue("Bundle-SymbolicName");
+    if (symbolicName != null)
+      metaData = new OSGiMetaData(symbolicName);
+
+    return metaData;
+  }
+}


Property changes on: projects/jboss-osgi/branches/tdiesler/runtime/deployer/src/main/java/org/jboss/osgi/deployer/OSGiMetaDataDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jboss-osgi/branches/tdiesler/runtime/deployer/src/main/resources/osgi-deployers-jboss-beans.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/runtime/deployer/src/main/resources/osgi-deployers-jboss-beans.xml	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/runtime/deployer/src/main/resources/osgi-deployers-jboss-beans.xml	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+  <!-- Locate the single instance of the kernel -->
+  <bean name="jboss.osgi:service=KernelLocator" class="org.jboss.osgi.spi.internal.KernelLocator">
+    <property name="kernel"><inject bean="jboss.kernel:service=Kernel" /></property>
+  </bean>
+
+  <!-- The OSGiFramework -->
+  <bean name="jboss.osgi:service=Framework" class="org.jboss.osgi.felix.framework.FelixIntegration">
+    <property name="felixProperties">
+      <map keyClass="java.lang.String" valueClass="java.lang.String">
+        <entry><key>felix.cache.rootdir</key><value>${jboss.server.data.dir}</value></entry>
+        <entry><key>org.osgi.framework.storage.clean</key><value>onFirstInit</value></entry>
+        <entry>
+          <key>org.osgi.framework.system.packages</key>
+          <value>
+            javax.servlet,
+            javax.servlet.http,
+            javax.management,
+            javax.security.jacc,
+            javax.xml.parsers,
+            org.jboss.classloading.spi,
+            org.jboss.deployers.client.plugins.deployment,
+            org.jboss.deployers.client.spi,
+            org.jboss.deployers.spi.attachments,
+            org.jboss.deployers.spi.structure,
+            org.jboss.deployers.structure.spi,
+            org.jboss.metadata.javaee.spec,
+            org.jboss.metadata.javaee.support,
+            org.jboss.metadata.web.jboss,
+            org.jboss.metadata.web.spec,
+            org.jboss.mx.util,
+            org.jboss.osgi.service,
+            org.jboss.osgi.spi,
+            org.jboss.osgi.spi.framework,
+            org.jboss.osgi.spi.jmx,
+            org.jboss.web,
+            org.jboss.virtual,
+            org.osgi.framework; version=1.4,
+            org.osgi.service.cm,
+            org.osgi.service.deploymentadmin, 
+            org.osgi.service.event,
+            org.osgi.service.http; version=1.2,
+            org.osgi.service.log,
+            org.osgi.service.metatype,
+            org.osgi.service.packageadmin,
+            org.osgi.service.prefs,
+            org.osgi.service.startlevel,
+            org.xml.sax
+          </value>
+        </entry>
+      </map>
+    </property>
+    <property name="autoStart">
+     <list elementClass="java.net.URI">
+      <value>${jboss.server.home.url}/deployers/osgi.deployer/org.osgi.compendium.jar</value>
+     </list>
+    </property>
+  </bean>
+
+  <!-- A Service that gives access to the Microcontainer Kernel -->
+  <bean name="jboss.osgi:service=Microcontainer" class="org.jboss.osgi.service.MicrocontainerService">
+   <property name="bundleContext"><inject bean="jboss.osgi:service=Framework" property="systemBundleContext"/></property>
+   <property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
+   <property name="kernel"><inject bean="jboss.kernel:service=Kernel" /></property>
+  </bean>
+
+  <!-- The OSGi Meta Data Deployer -->
+  <bean name="jboss.osgi:service=MetaDataDeployer" class="org.jboss.osgi.deployer.OSGiMetaDataDeployer" />
+
+  <!-- The OSGi Deployer -->
+  <bean name="jboss.osgi:service=Deployer" class="org.jboss.osgi.deployer.OSGiDeployer">
+    <property name="bundleContext"><inject bean="jboss.osgi:service=Framework" property="systemBundleContext" /></property>
+    <property name="skipBundles"><inject bean="jboss.osgi:service=Framework" property="autoInstall" /></property>
+  </bean>
+
+</deployment>
\ No newline at end of file


Property changes on: projects/jboss-osgi/branches/tdiesler/runtime/deployer/src/main/resources/osgi-deployers-jboss-beans.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: projects/jboss-osgi/branches/tdiesler/runtime/pom.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/runtime/pom.xml	2009-02-25 12:32:59 UTC (rev 84728)
+++ projects/jboss-osgi/branches/tdiesler/runtime/pom.xml	2009-02-25 12:40:29 UTC (rev 84729)
@@ -13,6 +13,7 @@
   
   <modules>
     <module>spi</module>
+    <module>deployer</module>
     <module>felix</module>
   </modules>
 

Added: projects/jboss-osgi/branches/tdiesler/testsuite/.classpath
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/.classpath	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/.classpath	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+	<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

Added: projects/jboss-osgi/branches/tdiesler/testsuite/.project
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/.project	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/.project	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>jboss-osgi-testsuite</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.maven.ide.eclipse.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.maven.ide.eclipse.maven2Nature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: projects/jboss-osgi/branches/tdiesler/testsuite/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/.settings/org.eclipse.jdt.core.prefs	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/.settings/org.eclipse.jdt.core.prefs	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,5 @@
+#Wed Feb 04 11:13:20 CET 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.source=1.5

Added: projects/jboss-osgi/branches/tdiesler/testsuite/.settings/org.maven.ide.eclipse.prefs
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/.settings/org.maven.ide.eclipse.prefs	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/.settings/org.maven.ide.eclipse.prefs	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,9 @@
+#Tue Feb 17 14:09:40 CET 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1

Added: projects/jboss-osgi/branches/tdiesler/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/pom.xml	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/pom.xml	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+
+  <name>JBoss OSGi - Testsuite</name>
+  <description>JBoss OSGi - Testsuite</description>
+
+  <groupId>org.jboss.osgi</groupId>
+  <artifactId>jboss-osgi-testsuite</artifactId>
+  <packaging>jar</packaging>
+
+  <parent>
+    <groupId>org.jboss.osgi</groupId>
+    <artifactId>jboss-osgi</artifactId>
+    <version>1.0.0.Alpha3</version>
+  </parent>
+
+  <!-- Properties -->
+  <properties>
+    <surefire.security.args>-Djava.security.manager -Djava.security.policy=src/test/resources/tst.policy</surefire.security.args>
+  </properties>
+  
+  <!-- Dependencies -->
+  <dependencies>
+    <dependency>
+      <groupId>org.jboss.osgi</groupId>
+      <artifactId>jboss-osgi-felix</artifactId>
+      <version>${version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.felix</groupId>
+      <artifactId>org.osgi.compendium</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>biz.aQute</groupId>
+      <artifactId>bnd</artifactId>
+      <version>0.0.249</version>
+    </dependency>
+    
+    <!-- Test Dependencies -->
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.jbossas</groupId>
+      <artifactId>jboss-as-client</artifactId>
+      <scope>test</scope>
+      <type>pom</type>
+    </dependency>
+  </dependencies>
+
+  <!-- Build -->
+  <build>
+    <testResources>
+      <testResource>
+        <directory>src/test/resources</directory>
+        <filtering>true</filtering>
+      </testResource>
+    </testResources>
+    <plugins>
+      <plugin>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>build-test-jars</id>
+            <phase>test-compile</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <tasks>
+                <property name="maven.runtime.classpath" refid="maven.runtime.classpath" />
+                <property name="tests.output.dir" value="${project.build.directory}" />
+                <ant antfile="scripts/antrun-test-jars.xml" target="build-test-jars" />
+              </tasks>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <argLine>${surefire.security.args}</argLine>
+          <systemProperties>
+            <property>
+              <name>log4j.output.dir</name>
+              <value>${basedir}/target</value>
+            </property>
+          </systemProperties>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <!-- Profiles -->
+  <profiles>
+
+    <!--
+    Name:  no-jboss-bind-address
+    Descr: Skip tests if no jboss.bind address is given
+    -->
+    <profile>
+      <id>no-jboss-bind-address</id>
+      <activation>
+        <property>
+          <name>!jboss.bind.address</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <configuration>
+              <skipTests>true</skipTests>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+  
+</project>


Property changes on: projects/jboss-osgi/branches/tdiesler/testsuite/pom.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jboss-osgi/branches/tdiesler/testsuite/scripts/antrun-test-jars.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/scripts/antrun-test-jars.xml	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/scripts/antrun-test-jars.xml	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- ============================================================ -->
+<!--  JBoss, the OpenSource J2EE webOS                            -->
+<!--  Distributable under LGPL license.                           -->
+<!--  See terms of license at http://www.gnu.org.                 -->
+<!-- ============================================================ -->
+
+<!-- $Id$ -->
+
+<project default="build-test-jars">
+
+  <description>OSGi test archive builder</description>
+
+	  <!-- ================================================================== -->
+	  <!-- Init                                                               -->
+	  <!-- ================================================================== -->
+	
+	  <target name="init">
+
+	  	<!-- Property override when not called from maven -->
+	    <property name="maven.runtime.classpath" value="/usr/java/bnd.jar" />
+	    <property name="tests.output.dir" value="${basedir}/../target" />
+	    	
+	  	<mkdir dir="${tests.output.dir}/test-libs" />
+	    <property name="tests.classes.dir" value="${tests.output.dir}/test-classes" />
+	    <property name="tests.resources.dir" value="${tests.output.dir}/test-classes" />
+
+	    <taskdef resource="aQute/bnd/ant/taskdef.properties">
+	      <classpath>
+	        <pathelement path="${maven.runtime.classpath}" />
+	      </classpath>
+		</taskdef>
+	  	
+	  </target>
+	
+	  <!-- ================================================================== -->
+	  <!-- Building                                                           -->
+	  <!-- ================================================================== -->
+
+	  <target name="build-test-jars" depends="init" description="Build the test deployments">
+
+	    <!-- http-service-test -->
+	  	<bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/http-service.jar" 
+	  		files="${tests.resources.dir}/service/http/http-service.bnd"/>
+
+	    <!-- microcontainer-service-test -->
+	  	<bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/microcontainer-service.jar" 
+	  		files="${tests.resources.dir}/service/microcontainer/microcontainer-service.bnd"/>
+
+	    <!-- Please add alphabetically -->
+
+	  </target>
+
+</project>


Property changes on: projects/jboss-osgi/branches/tdiesler/testsuite/scripts/antrun-test-jars.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/http/EndpointService.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/http/EndpointService.java	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/http/EndpointService.java	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,99 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.test.service.http;
+
+//$Id$
+
+import java.util.Properties;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceEvent;
+import org.osgi.framework.ServiceListener;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.http.HttpService;
+
+/**
+ * A service that creates an Http context through the HttpService
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 23-Jan-2009
+ */
+public class EndpointService implements ServiceListener
+{
+  private BundleContext context;
+
+  public EndpointService(BundleContext context)
+  {
+    this.context = context;
+    context.addServiceListener(this);
+  }
+  
+  private void registerService()
+  {
+    try
+    {
+      HttpService httpService = getHttpService();
+      
+      Properties initParams = new Properties();
+      initParams.setProperty("initProp", "SomeValue");
+      httpService.registerServlet("/servlet", new EndpointServlet(context), initParams, null);
+      httpService.registerResources("/file", "/res", null);
+    }
+    catch (Exception ex)
+    {
+      throw new RuntimeException("Cannot register context", ex);
+    }
+  }
+
+  private void unregisterService()
+  {
+    HttpService httpService = getHttpService();
+    httpService.unregister("/servlet");
+    httpService.unregister("/file");
+    context.removeServiceListener(this);
+  }
+
+  private HttpService getHttpService()
+  {
+    ServiceReference sref = context.getServiceReference(HttpService.class.getName());
+    if (sref == null)
+      throw new IllegalStateException("HttpService not registered");
+    
+    return (HttpService)context.getService(sref);
+  }
+
+  public void serviceChanged(ServiceEvent event)
+  {
+    Object service = context.getService(event.getServiceReference());
+    if (service == this)
+    {
+      if (event.getType() == ServiceEvent.REGISTERED)
+      {
+        registerService();
+      }
+      else if (event.getType() == ServiceEvent.UNREGISTERING)
+      {
+        unregisterService();
+      }
+    }
+  }
+}


Property changes on: projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/http/EndpointService.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/http/EndpointServlet.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/http/EndpointServlet.java	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/http/EndpointServlet.java	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.test.service.http;
+
+//$Id$
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.service.startlevel.StartLevel;
+import org.osgi.util.tracker.ServiceTracker;
+
+ at SuppressWarnings("serial")
+public class EndpointServlet extends HttpServlet
+{
+  private BundleContext context;
+
+  // This hides the default ctor and verifies that this instance is used 
+  public EndpointServlet(BundleContext context)
+  {
+    this.context = context;
+  }
+
+  @Override
+  protected void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
+  {
+    PrintWriter out = res.getWriter();
+    
+    String testParam = req.getParameter("test");
+    if ("plain".equals(testParam))
+    {
+      out.println("Hello from Servlet");
+    }
+    else if ("initProp".equals(testParam))
+    {
+      String value = getInitParameter(testParam);
+      out.println(testParam + "=" + value);
+    }
+    else if ("context".equals(testParam))
+    {
+      out.println(context.getBundle().getSymbolicName());
+    }
+    else if ("startLevel".equals(testParam))
+    {
+      ServiceTracker tracker = new ServiceTracker(context, StartLevel.class.getName(), null);
+      tracker.open();
+      
+      StartLevel service = (StartLevel)tracker.getService();
+      out.println("startLevel=" + service.getStartLevel());
+    }
+    else
+    {
+      throw new IllegalArgumentException("Invalid 'test' parameter: " + testParam);
+    }
+    
+    out.close();
+  }
+}


Property changes on: projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/http/EndpointServlet.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/http/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/http/ServiceActivator.java	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/http/ServiceActivator.java	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.test.service.http;
+
+//$Id$
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+
+/**
+ * A Service Activator
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 04-Feb-2009
+ */
+public class ServiceActivator implements BundleActivator
+{
+  private ServiceRegistration registration;
+  
+  /*
+   * Implements BundleActivator.start(). 
+   * Registers an instance of a HttpEndpoint Service using the bundle context.
+   */
+  public void start(BundleContext context)
+  {
+    EndpointService service = new EndpointService(context);
+    registration = context.registerService(EndpointService.class.getName(), service, null);
+  }
+
+  /*
+   * Implements BundleActivator.stop(). 
+   */
+  public void stop(BundleContext context)
+  {
+    if (registration != null)
+    {
+      registration.unregister();
+      registration = null;
+    }
+  }
+}
\ No newline at end of file


Property changes on: projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/http/ServiceActivator.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/http/junit/EndpointServiceTest.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/http/junit/EndpointServiceTest.java	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/http/junit/EndpointServiceTest.java	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.test.service.http.junit;
+
+//$Id$
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.URL;
+
+import junit.framework.Test;
+
+import org.jboss.osgi.spi.junit.IntegrationTestCase;
+import org.jboss.osgi.spi.junit.IntegrationTestSetup;
+
+/**
+ * A test that deployes a bundle that containes a HttpServlet which 
+ * is registered through the OSGi HttpService
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 23-Jan-2009
+ */
+public class EndpointServiceTest extends IntegrationTestCase
+{
+  public static Test suite()
+  {
+    return new IntegrationTestSetup(EndpointServiceTest.class, "http-service.jar");
+  }
+  
+  public void testServletAccess() throws Exception
+  {
+    URL url = new URL("http://" + getServerHost() + ":8080/servlet?test=plain");
+    BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+    assertEquals("Hello from Servlet", br.readLine());
+  }
+  
+  public void testServletInitProps() throws Exception
+  {
+    URL url = new URL("http://" + getServerHost() + ":8080/servlet?test=initProp");
+    BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+    assertEquals("initProp=SomeValue", br.readLine());
+  }
+  
+  public void testServletBundleContext() throws Exception
+  {
+    URL url = new URL("http://" + getServerHost() + ":8080/servlet?test=context");
+    BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+    assertEquals("http-service-test", br.readLine());
+  }
+  
+  public void testServletStartLevel() throws Exception
+  {
+    URL url = new URL("http://" + getServerHost() + ":8080/servlet?test=startLevel");
+    BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+    assertEquals("startLevel=1", br.readLine());
+  }
+  
+  public void testResourceAccess() throws Exception
+  {
+    URL url = new URL("http://" + getServerHost() + ":8080/file/message.txt");
+    BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+    assertEquals("Hello from Resource", br.readLine());
+  }
+}
\ No newline at end of file


Property changes on: projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/http/junit/EndpointServiceTest.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/microcontainer/Foo.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/microcontainer/Foo.java	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/microcontainer/Foo.java	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,32 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.test.service.microcontainer;
+
+//$Id$
+
+public class Foo implements FooMBean
+{
+	public String echo(String msg)
+	{
+		return msg;
+	}
+}


Property changes on: projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/microcontainer/Foo.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/microcontainer/FooMBean.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/microcontainer/FooMBean.java	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/microcontainer/FooMBean.java	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,29 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.test.service.microcontainer;
+
+//$Id$
+
+public interface FooMBean 
+{
+	String echo(String msg);
+}


Property changes on: projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/microcontainer/FooMBean.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/microcontainer/MBeanTestService.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/microcontainer/MBeanTestService.java	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/microcontainer/MBeanTestService.java	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,106 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.test.service.microcontainer;
+
+//$Id$
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.jboss.osgi.service.MicrocontainerService;
+import org.jboss.osgi.spi.jmx.ObjectNameFactory;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceEvent;
+import org.osgi.framework.ServiceListener;
+import org.osgi.framework.ServiceReference;
+
+/**
+ * A service that registers an MBean
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 23-Jan-2009
+ */
+public class MBeanTestService implements ServiceListener
+{
+  public static ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.osgi:service=mbean-test-service");
+  
+  private BundleContext context;
+  private MBeanServer mbeanServer;
+
+  public MBeanTestService(BundleContext context)
+  {
+    this.context = context;
+    context.addServiceListener(this);
+  }
+  
+  private void registerService()
+  {
+    try
+    {
+    	MicrocontainerService mcService = getMicrocontainerService();
+    	mbeanServer = mcService.getMbeanServer();
+      mbeanServer.registerMBean(new Foo(), OBJECT_NAME);
+    }
+    catch (Exception ex)
+    {
+      throw new RuntimeException("Cannot register mbean", ex);
+    }
+  }
+
+  private void unregisterService()
+  {
+    try
+    {
+      if (mbeanServer != null && mbeanServer.isRegistered(OBJECT_NAME))
+        mbeanServer.unregisterMBean(OBJECT_NAME);
+    }
+    catch (Exception ex)
+    {
+      throw new RuntimeException("Cannot unregister mbean", ex);
+    }
+  }
+
+  private MicrocontainerService getMicrocontainerService()
+  {
+    ServiceReference sref = context.getServiceReference(MicrocontainerService.class.getName());
+    if (sref == null)
+      throw new IllegalStateException("HttpService not registered");
+    
+    return (MicrocontainerService)context.getService(sref);
+  }
+
+  public void serviceChanged(ServiceEvent event)
+  {
+    Object service = context.getService(event.getServiceReference());
+    if (service == this)
+    {
+      if (event.getType() == ServiceEvent.REGISTERED)
+      {
+        registerService();
+      }
+      else if (event.getType() == ServiceEvent.UNREGISTERING)
+      {
+        unregisterService();
+      }
+    }
+  }
+}


Property changes on: projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/microcontainer/MBeanTestService.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/microcontainer/ServiceActivator.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/microcontainer/ServiceActivator.java	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/microcontainer/ServiceActivator.java	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.test.service.microcontainer;
+
+//$Id$
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+
+/**
+ * A Service Activator
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 04-Feb-2009
+ */
+public class ServiceActivator implements BundleActivator
+{
+  private ServiceRegistration registration;
+  
+  public void start(BundleContext context)
+  {
+    MBeanTestService service = new MBeanTestService(context);
+    registration = context.registerService(MBeanTestService.class.getName(), service, null);
+  }
+
+  public void stop(BundleContext context)
+  {
+    if (registration != null)
+    {
+      registration.unregister();
+      registration = null;
+    }
+  }
+}
\ No newline at end of file


Property changes on: projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/microcontainer/ServiceActivator.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/microcontainer/junit/MicrocontainerServiceTest.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/microcontainer/junit/MicrocontainerServiceTest.java	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/microcontainer/junit/MicrocontainerServiceTest.java	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.test.service.microcontainer.junit;
+
+//$Id$
+
+import junit.framework.Test;
+
+import org.jboss.osgi.spi.jmx.MBeanProxy;
+import org.jboss.osgi.spi.junit.IntegrationTestCase;
+import org.jboss.osgi.spi.junit.IntegrationTestSetup;
+import org.jboss.osgi.test.service.microcontainer.FooMBean;
+import org.jboss.osgi.test.service.microcontainer.MBeanTestService;
+
+/**
+ * A test that deployes a bundle that registeres an MBean
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 12-Feb-2009
+ */
+public class MicrocontainerServiceTest extends IntegrationTestCase
+{
+  public static Test suite()
+  {
+    return new IntegrationTestSetup(MicrocontainerServiceTest.class, "microcontainer-service.jar");
+  }
+
+  public void testMBeanAccess() throws Exception
+  {
+    FooMBean foo = (FooMBean)MBeanProxy.get(FooMBean.class, MBeanTestService.OBJECT_NAME, getServer());
+    assertEquals("hello", foo.echo("hello"));
+  }
+}
\ No newline at end of file


Property changes on: projects/jboss-osgi/branches/tdiesler/testsuite/src/test/java/org/jboss/osgi/test/service/microcontainer/junit/MicrocontainerServiceTest.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/jndi.properties
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/jndi.properties	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/jndi.properties	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,3 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+java.naming.provider.url=jnp://@jboss.bind.address@:1099

Added: projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/log4j.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/log4j.xml	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/log4j.xml	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+  <!-- ================================= -->
+  <!-- Preserve messages in a local file -->
+  <!-- ================================= -->
+
+  <appender name="FILE" class="org.apache.log4j.FileAppender">
+    <param name="File" value="${log4j.output.dir}/test.log"/>
+    <param name="Append" value="false"/>
+    <layout class="org.apache.log4j.PatternLayout">
+      <!-- The default pattern: Date Priority [Category] Message\n -->
+      <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+    </layout>
+  </appender>
+  
+  <!-- ============================== -->
+  <!-- Append messages to the console -->
+  <!-- ============================== -->
+
+  <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+    <param name="Target" value="System.out" />
+    <param name="Threshold" value="INFO" />
+    <layout class="org.apache.log4j.PatternLayout">
+      <param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{1}] %m%n" />
+    </layout>
+  </appender>
+
+  <!-- ================ -->
+  <!-- Limit categories -->
+  <!-- ================ -->
+
+  <category name="org.hibernate">
+    <priority value="INFO" />
+  </category>
+
+  <!-- hide optimistic locking failures
+  <category name="org.hibernate.event.def.AbstractFlushingEventListener">
+    <priority value="FATAL" />
+  </category>
+  -->
+
+  <!-- hide proxy narrowing warns -->
+  <category name="org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog">
+    <priority value="ERROR" />
+  </category>
+
+  <!-- show SQL DML statements as they are executed -->
+  <category name="org.hibernate.SQL">
+    <priority value="DEBUG" />
+  </category>
+
+  <!-- show JDBC parameters
+  <category name="org.hibernate.type">
+    <priority value="TRACE" />
+  </category>
+  -->
+
+  <!-- hide httpclient wire dumps -->
+  <category name="httpclient.wire.header">
+    <priority value="INFO" />
+  </category>
+
+  <!-- ======================= -->
+  <!-- Setup the Root category -->
+  <!-- ======================= -->
+
+  <root>
+    <!--appender-ref ref="CONSOLE"/-->
+    <appender-ref ref="FILE"/>
+  </root>
+
+</log4j:configuration>


Property changes on: projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/log4j.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/service/http/http-service.bnd
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/service/http/http-service.bnd	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/service/http/http-service.bnd	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,9 @@
+# bnd build -classpath target/test-classes -output target/test-libs/http-service.jar src/test/resources/service/http/http-service.bnd
+
+Bundle-SymbolicName: http-service-test
+Bundle-Activator: org.jboss.osgi.test.service.http.ServiceActivator
+Export-Package: org.jboss.osgi.test.service.http
+Include-Resource: res/message.txt=message.txt
+
+# For some reason this does not work
+# Include-Resource: src/test/resources/service/http/message.txt
\ No newline at end of file

Added: projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/service/http/message.txt
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/service/http/message.txt	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/service/http/message.txt	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1 @@
+Hello from Resource
\ No newline at end of file


Property changes on: projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/service/http/message.txt
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/service/microcontainer/microcontainer-service.bnd
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/service/microcontainer/microcontainer-service.bnd	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/service/microcontainer/microcontainer-service.bnd	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,5 @@
+# bnd build -classpath target/test-classes -output target/test-libs/microcontainer-service.jar src/test/resources/service/microcontainer/microcontainer-service.bnd
+
+Bundle-SymbolicName: microcontainer-service-test
+Bundle-Activator: org.jboss.osgi.test.service.microcontainer.ServiceActivator
+Export-Package: org.jboss.osgi.test.service.microcontainer

Added: projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/tst.policy
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/tst.policy	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/src/test/resources/tst.policy	2009-02-25 12:40:29 UTC (rev 84729)
@@ -0,0 +1,4 @@
+grant {
+	permission java.security.AllPermission;
+};
+




More information about the jboss-cvs-commits mailing list