Author: thomas.diesler(a)jboss.com
Date: 2010-03-05 07:17:44 -0500 (Fri, 05 Mar 2010)
New Revision: 101950
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/pom.xml
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/scripts/assembly-all.xml
projects/jboss-osgi/projects/runtime/framework/trunk/core/src/main/java/org/jboss/osgi/framework/bundle/AbstractDeployedBundleState.java
projects/jboss-osgi/trunk/testsuite/pom.xml
Log:
Use vfs30 for remote jbossas/trunk testing
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/bundle/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/bundle/pom.xml 2010-03-05
11:56:55 UTC (rev 101949)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/bundle/pom.xml 2010-03-05
12:17:44 UTC (rev 101950)
@@ -39,11 +39,6 @@
<version>${version}</version>
</dependency>
<dependency>
- <groupId>org.jboss.osgi.framework</groupId>
- <artifactId>jboss-osgi-framework-vfs21</artifactId>
- <version>${version}</version>
- </dependency>
- <dependency>
<groupId>biz.aQute</groupId>
<artifactId>bnd</artifactId>
</dependency>
@@ -167,6 +162,12 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.jboss.osgi.framework</groupId>
+ <artifactId>jboss-osgi-framework-vfs21</artifactId>
+ <version>${version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.jboss.osgi.vfs</groupId>
<artifactId>jboss-osgi-vfs21</artifactId>
<scope>test</scope>
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/scripts/assembly-all.xml
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/scripts/assembly-all.xml 2010-03-05
11:56:55 UTC (rev 101949)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/scripts/assembly-all.xml 2010-03-05
12:17:44 UTC (rev 101950)
@@ -39,7 +39,7 @@
<include>*:jboss-osgi-deployers-vfs21:jar</include>
<include>*:jboss-osgi-spi:jar</include>
<include>*:jboss-reflect:jar</include>
- <include>*:jboss-vfs:jar</include>
+ <!-- include>*:jboss-vfs:jar</include -->
<include>*:jbossxb:jar</include>
<include>*:mcann-core:jar</include>
<include>*:org.osgi.core:jar</include>
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/core/src/main/java/org/jboss/osgi/framework/bundle/AbstractDeployedBundleState.java
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/core/src/main/java/org/jboss/osgi/framework/bundle/AbstractDeployedBundleState.java 2010-03-05
11:56:55 UTC (rev 101949)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/core/src/main/java/org/jboss/osgi/framework/bundle/AbstractDeployedBundleState.java 2010-03-05
12:17:44 UTC (rev 101950)
@@ -32,6 +32,7 @@
import java.util.concurrent.atomic.AtomicLong;
import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentResourceLoader;
import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
import org.jboss.osgi.deployment.deployer.Deployment;
import org.jboss.osgi.framework.deployers.AbstractDeployment;
@@ -75,7 +76,7 @@
public AbstractDeployedBundleState(OSGiBundleManager bundleManager, DeploymentUnit
unit)
{
super(bundleManager);
-
+
if (unit == null)
throw new IllegalArgumentException("Null deployment unit");
@@ -168,7 +169,7 @@
checkInstalled();
if (noAdminPermission(AdminPermission.RESOURCE))
return null;
-
+
return getEntryInternal(path);
}
@@ -178,7 +179,7 @@
checkInstalled();
if (noAdminPermission(AdminPermission.RESOURCE))
return null;
-
+
try
{
return rootFile.getEntryPaths(path);
@@ -188,34 +189,30 @@
throw new RuntimeException("Error determining entry paths for " +
rootFile + " path=" + path);
}
}
-
+
@Override
protected URL getEntryInternal(String path)
{
- DeploymentUnit unit = getDeploymentUnit();
- if (unit instanceof VFSDeploymentUnit)
- {
- VFSDeploymentUnit vfsDeploymentUnit = (VFSDeploymentUnit)unit;
+ VFSDeploymentUnit unit = (VFSDeploymentUnit)getDeploymentUnit();
+ if (path.startsWith("/"))
+ path = path.substring(1);
- if (path.startsWith("/"))
- path = path.substring(1);
-
- return vfsDeploymentUnit.getResourceLoader().getResource(path);
- }
- return null;
+ VFSDeploymentResourceLoader loader = unit.getResourceLoader();
+ URL resource = loader.getResource(path);
+ return resource;
}
-
+
public void uninstall() throws BundleException
{
- checkAdminPermission(AdminPermission.LIFECYCLE);
+ checkAdminPermission(AdminPermission.LIFECYCLE);
// If this bundle's state is UNINSTALLED then an IllegalStateException is
thrown
if (getState() == Bundle.UNINSTALLED)
throw new IllegalStateException("Bundle already uninstalled: " +
this);
-
+
// Cache the headers in the default locale
headersOnUninstall = getHeaders(null);
-
+
getBundleManager().uninstallBundle(this);
}
@@ -224,13 +221,13 @@
{
if (path == null)
throw new IllegalArgumentException("Null path");
-
+
checkInstalled();
if (noAdminPermission(AdminPermission.RESOURCE))
return null;
-
+
resolveBundle();
-
+
try
{
return rootFile.findEntries(path, pattern, recurse);
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2010-03-05 11:56:55 UTC (rev 101949)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2010-03-05 12:17:44 UTC (rev 101950)
@@ -283,10 +283,6 @@
<groupId>org.jboss.osgi.runtime</groupId>
<artifactId>jboss-osgi-equinox</artifactId>
</dependency>
- <dependency>
- <groupId>org.jboss.osgi.vfs</groupId>
- <artifactId>jboss-osgi-vfs21</artifactId>
- </dependency>
</dependencies>
</profile>
@@ -310,10 +306,6 @@
<groupId>org.jboss.osgi.runtime</groupId>
<artifactId>jboss-osgi-felix</artifactId>
</dependency>
- <dependency>
- <groupId>org.jboss.osgi.vfs</groupId>
- <artifactId>jboss-osgi-vfs21</artifactId>
- </dependency>
</dependencies>
</profile>
@@ -340,10 +332,6 @@
<groupId>org.jboss.osgi.framework</groupId>
<artifactId>jboss-osgi-framework</artifactId>
</dependency>
- <dependency>
- <groupId>org.jboss.osgi.vfs</groupId>
- <artifactId>jboss-osgi-vfs21</artifactId>
- </dependency>
</dependencies>
</profile>
<profile>
@@ -364,10 +352,6 @@
<groupId>org.jboss.osgi.framework</groupId>
<artifactId>jboss-osgi-framework</artifactId>
</dependency>
- <dependency>
- <groupId>org.jboss.osgi.vfs</groupId>
- <artifactId>jboss-osgi-vfs21</artifactId>
- </dependency>
</dependencies>
</profile>
@@ -417,6 +401,10 @@
<target.container.excludes>org/jboss/test/osgi/jbossas/**</target.container.excludes>
</properties>
<dependencies>
+ <dependency>
+ <groupId>org.jboss.osgi.vfs</groupId>
+ <artifactId>jboss-osgi-vfs21</artifactId>
+ </dependency>
</dependencies>
</profile>
@@ -442,6 +430,10 @@
<version>${version.jmx.invoker.adaptor.client}</version>
<type>pom</type>
</dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.vfs</groupId>
+ <artifactId>jboss-osgi-vfs21</artifactId>
+ </dependency>
</dependencies>
</profile>
@@ -468,6 +460,10 @@
<scope>test</scope>
<type>pom</type>
</dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.vfs</groupId>
+ <artifactId>jboss-osgi-vfs21</artifactId>
+ </dependency>
</dependencies>
</profile>
@@ -494,6 +490,10 @@
<scope>test</scope>
<type>pom</type>
</dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.vfs</groupId>
+ <artifactId>jboss-osgi-vfs21</artifactId>
+ </dependency>
</dependencies>
</profile>
@@ -526,6 +526,10 @@
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.vfs</groupId>
+ <artifactId>jboss-osgi-vfs21</artifactId>
+ </dependency>
</dependencies>
</profile>
@@ -558,6 +562,10 @@
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.vfs</groupId>
+ <artifactId>jboss-osgi-vfs30</artifactId>
+ </dependency>
</dependencies>
</profile>