JBoss-OSGI SVN: r97688 - in projects/jboss-osgi/projects/osgitck/trunk: hudson/hudson-home/jobs and 2 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-10 05:12:48 -0500 (Thu, 10 Dec 2009)
New Revision: 97688
Added:
projects/jboss-osgi/projects/osgitck/trunk/overlay/org.osgi.test.cases.startlevel/
projects/jboss-osgi/projects/osgitck/trunk/overlay/org.osgi.test.cases.startlevel/bnd.bnd
Removed:
projects/jboss-osgi/projects/osgitck/trunk/hudson/hudson-home/jobs/osgi.blueprint.tests/
Modified:
projects/jboss-osgi/projects/osgitck/trunk/build.xml
Log:
Reduce start level test timeouts to 20sec
Modified: projects/jboss-osgi/projects/osgitck/trunk/build.xml
===================================================================
--- projects/jboss-osgi/projects/osgitck/trunk/build.xml 2009-12-10 09:46:05 UTC (rev 97687)
+++ projects/jboss-osgi/projects/osgitck/trunk/build.xml 2009-12-10 10:12:48 UTC (rev 97688)
@@ -61,7 +61,6 @@
<!-- Check if the osgitck dir is available -->
<available property="osgitck.dir.available" file="${osgitck.dir}" />
- <property name="jboss.framework.repo.dir" value="${osgitck.dir}/licensed/repo/org.jboss.osgi.framework" />
</target>
@@ -100,8 +99,8 @@
</copy>
<!-- Copy the OSGi Framework -->
- <mkdir dir="${jboss.framework.repo.dir}" />
- <copy file="${jboss.osgi.framework.jar}" tofile="${jboss.framework.repo.dir}/org.jboss.osgi.framework-1.0.0.jar" overwrite="true" />
+ <mkdir dir="${osgitck.dir}/licensed/repo/org.jboss.osgi.framework" />
+ <copy file="${jboss.osgi.framework.jar}" tofile="${osgitck.dir}/licensed/repo/org.jboss.osgi.framework/org.jboss.osgi.framework-1.0.0.jar" overwrite="true" />
<!-- Copy the aQute.bnd -->
<copy file="${aQute.bnd.jar}" tofile="${osgitck.dir}/licensed/repo/biz.aQute.bnd/biz.aQute.bnd-latest.jar" overwrite="true" />
Added: projects/jboss-osgi/projects/osgitck/trunk/overlay/org.osgi.test.cases.startlevel/bnd.bnd
===================================================================
--- projects/jboss-osgi/projects/osgitck/trunk/overlay/org.osgi.test.cases.startlevel/bnd.bnd (rev 0)
+++ projects/jboss-osgi/projects/osgitck/trunk/overlay/org.osgi.test.cases.startlevel/bnd.bnd 2009-12-10 10:12:48 UTC (rev 97688)
@@ -0,0 +1,35 @@
+Bundle-Description: Tests the Start Level service control bundle
+Bundle-Version : 4.2.0.${project.build}
+
+Private-Package = org.osgi.test.support.*, \
+ ${p}.junit.*
+
+Export-Package = \
+
+
+Include-Resource = \
+ tb1.jar, \
+ tb2.jar, \
+ tb3.jar, \
+ tb4.jar, \
+ tb5.jar
+
+Test-Cases = ${testcases}
+-signaturetest = org.osgi.service.startlevel
+
+-buildpath = \
+ org.osgi.test.support; version=project , \
+ org.osgi.service.startlevel; version=project , \
+ osgi.core; version=4.2 , \
+ ee.minimum; version=1.2 , \
+ ${junit}
+
+-runbundles = \
+
+
+-runproperties = report=true, \
+ osgi.compatibility.bootdelegation=false, \
+ osgi.resolverMode=strict
+
+# TDI: Reduce start level test timeouts to 20sec
+-runvm = osgi.tc.startlevel.sleeptime=200, osgi.tc.startlevel.timeout=100
\ No newline at end of file
16 years
JBoss-OSGI SVN: r97687 - projects/jboss-osgi/trunk/reactor/blueprint.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-10 04:46:05 -0500 (Thu, 10 Dec 2009)
New Revision: 97687
Modified:
projects/jboss-osgi/trunk/reactor/blueprint/.project
Log:
Fix blueprint eclipse .project
Modified: projects/jboss-osgi/trunk/reactor/blueprint/.project
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/.project 2009-12-10 09:27:12 UTC (rev 97686)
+++ projects/jboss-osgi/trunk/reactor/blueprint/.project 2009-12-10 09:46:05 UTC (rev 97687)
@@ -1,28 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>jboss-osgi-blueprint</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
- <triggers>full,incremental,</triggers>
- <arguments>
- <dictionary>
- <key>LaunchConfigHandle</key>
- <value><project>/.externalToolBuilders/org.eclipse.jdt.core.javabuilder.launch</value>
- </dictionary>
- </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>
+ <name>jboss-osgi-blueprint</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>
16 years
JBoss-OSGI SVN: r97684 - projects/jboss-osgi/projects/aQute/trunk/aQute.bnd.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-10 03:44:56 -0500 (Thu, 10 Dec 2009)
New Revision: 97684
Modified:
projects/jboss-osgi/projects/aQute/trunk/aQute.bnd/pom.xml
Log:
Remove trailing , which causes the bnd plugin to fail in eclipse
Modified: projects/jboss-osgi/projects/aQute/trunk/aQute.bnd/pom.xml
===================================================================
--- projects/jboss-osgi/projects/aQute/trunk/aQute.bnd/pom.xml 2009-12-10 08:41:37 UTC (rev 97683)
+++ projects/jboss-osgi/projects/aQute/trunk/aQute.bnd/pom.xml 2009-12-10 08:44:56 UTC (rev 97684)
@@ -280,7 +280,9 @@
aQute.bnd.service;uses:="aQute.lib.osgi,aQute.bnd.build,aQute.libg.reporter,aQute.libg.version",
aQute.bnd.service.action;uses:="aQute.bnd.build",
aQute.lib.osgi;uses:="aQute.bnd.service,aQute.libg.reporter,aQute.libg.sed,aQute.libg.version",
- aQute.libg.reporter,aQute.libg.version,aQute.libg.sed,
+ aQute.libg.reporter,
+ aQute.libg.version,
+ aQute.libg.sed
</Export-Package>
<Ignore-Package>
org.eclipse.core.resources,
@@ -316,7 +318,7 @@
org.eclipse.ui,org.eclipse.jface.text.source,
org.eclipse.ui.part,
org.eclipse.ui.plugin,
- org.eclipse.ui.texteditor,
+ org.eclipse.ui.texteditor
</Ignore-Package>
<Import-Package>
aQute.bnd.build,
@@ -335,7 +337,7 @@
org.osgi.service.permissionadmin,
org.osgi.util.tracker,
org.w3c.dom,org.xml.sax,
- sun.security.util;resolution:=optional,
+ sun.security.util;resolution:=optional
</Import-Package>
<Private-Package>
aQute.bnd.annotation,
@@ -366,26 +368,24 @@
aQute.libg.header,
aQute.libg.qtokens,
aQute.service.scripting;version="1.0",
- icons,
+ icons
</Private-Package>
<Require-Bundle>
- org.apache.ant; resolution:=optional,
- org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)"; resolution:=optional,
- org.eclipse.debug.ui;bundle-version="[3.3.0,4.0.0)"; resolution:=optional,
- org.eclipse.jdt.core;bundle-version="[3.3.0,4.0.0)"; resolution:=optional,
- org.eclipse.jdt.debug.ui;bundle-version="[3.2.0,4.0.0)"; resolution:=optional,
- org.eclipse.jdt.junit;bundle-version="[3.2.0,4.0.0)"; resolution:=optional,
- org.eclipse.jdt.launching;bundle-version="[3.2.0,4.0.0)"; resolution:=optional,
- org.eclipse.jdt.ui;bundle-version="[3.3.0,4.0.0)"; resolution:=optional,
- org.eclipse.jface.text;bundle-version="[3.3.0,4.0.0)"; resolution:=optional,
- org.eclipse.ui;bundle-version="[3.3.0,4.0.0)"; resolution:=optional,
- org.eclipse.ui.console; resolution:=optional,
- org.eclipse.ui.editors;bundle-version="[3.3.0,4.0.0)"; resolution:=optional,
- org.eclipse.ui.ide;
- bundle-version="[3.3.0,4.0.0)"; resolution:=optional,
- org.eclipse.ui.workbench.texteditor;bundle-version="[3.3.0,4.0.0)"; resolution:=optional,
- org.junit;
- resolution:=optional,
+ org.apache.ant;resolution:=optional,
+ org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)";resolution:=optional,
+ org.eclipse.debug.ui;bundle-version="[3.3.0,4.0.0)";resolution:=optional,
+ org.eclipse.jdt.core;bundle-version="[3.3.0,4.0.0)";resolution:=optional,
+ org.eclipse.jdt.debug.ui;bundle-version="[3.2.0,4.0.0)";resolution:=optional,
+ org.eclipse.jdt.junit;bundle-version="[3.2.0,4.0.0)";resolution:=optional,
+ org.eclipse.jdt.launching;bundle-version="[3.2.0,4.0.0)";resolution:=optional,
+ org.eclipse.jdt.ui;bundle-version="[3.3.0,4.0.0)";resolution:=optional,
+ org.eclipse.jface.text;bundle-version="[3.3.0,4.0.0)";resolution:=optional,
+ org.eclipse.ui;bundle-version="[3.3.0,4.0.0)";resolution:=optional,
+ org.eclipse.ui.console;resolution:=optional,
+ org.eclipse.ui.editors;bundle-version="[3.3.0,4.0.0)";resolution:=optional,
+ org.eclipse.ui.ide;bundle-version="[3.3.0,4.0.0)";resolution:=optional,
+ org.eclipse.ui.workbench.texteditor;bundle-version="[3.3.0,4.0.0)";resolution:=optional,
+ org.junit;resolution:=optional
</Require-Bundle>
<Main-Class>aQute.bnd.main.bnd</Main-Class>
</instructions>
16 years
JBoss-OSGI SVN: r97678 - in projects/jboss-osgi: trunk and 1 other directory.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-10 01:45:51 -0500 (Thu, 10 Dec 2009)
New Revision: 97678
Added:
projects/jboss-osgi/projects/osgitck/trunk/
Removed:
projects/jboss-osgi/trunk/osgitck/
Log:
update osgitck/trunk
Copied: projects/jboss-osgi/projects/osgitck/trunk (from rev 97677, projects/jboss-osgi/trunk/osgitck)
16 years
JBoss-OSGI SVN: r97676 - projects/jboss-osgi/projects.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-10 01:44:44 -0500 (Thu, 10 Dec 2009)
New Revision: 97676
Added:
projects/jboss-osgi/projects/osgitck/
Log:
mkdir projects/osgitck
16 years
JBoss-OSGI SVN: r97667 - in projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi: bundle and 1 other directory.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-10 00:34:45 -0500 (Thu, 10 Dec 2009)
New Revision: 97667
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/FrameworkTest.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/BundleContextUnitTestCase.java
Log:
Add installBundle to FrameworkTest
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/FrameworkTest.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/FrameworkTest.java 2009-12-10 05:26:04 UTC (rev 97666)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/FrameworkTest.java 2009-12-10 05:34:45 UTC (rev 97667)
@@ -21,8 +21,7 @@
*/
package org.jboss.test.osgi;
-import static org.junit.Assert.assertEquals;
-
+import java.io.InputStream;
import java.net.URL;
import java.util.Arrays;
import java.util.Collection;
@@ -168,6 +167,18 @@
return getDelegate().deployBundle(file);
}
+ protected Bundle installBundle(String location) throws BundleException
+ {
+ BundleContext context = getBundleManager().getSystemContext();
+ return context.installBundle(location);
+ }
+
+ protected Bundle installBundle(String location, InputStream instream) throws BundleException
+ {
+ BundleContext context = getBundleManager().getSystemContext();
+ return context.installBundle(location, instream);
+ }
+
/**
* Remove a bundle
*
@@ -584,7 +595,7 @@
assertEquals(reference, event.getServiceReference());
}
- @SuppressWarnings({"unchecked", "SynchronizationOnLocalVariableOrMethodParameter"})
+ @SuppressWarnings("rawtypes")
private void waitForEvent(List events, int type) throws InterruptedException
{
// Timeout for event delivery: 3 sec
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/BundleContextUnitTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/BundleContextUnitTestCase.java 2009-12-10 05:26:04 UTC (rev 97666)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/BundleContextUnitTestCase.java 2009-12-10 05:34:45 UTC (rev 97667)
@@ -215,11 +215,10 @@
public void testInstallBundle() throws Exception
{
OSGiTestHelper helper = new OSGiTestHelper();
- BundleContext context = getBundleManager().getSystemContext();
// Test URL location
URL url = helper.getTestArchiveURL("bundles/jboss-osgi-common.jar");
- Bundle bundle = context.installBundle(url.toExternalForm());
+ Bundle bundle = installBundle(url.toExternalForm());
try
{
assertBundleState(Bundle.INSTALLED, bundle.getState());
@@ -233,7 +232,7 @@
// Test file location
String location = helper.getTestArchivePath("bundles/jboss-osgi-common.jar");
- bundle = context.installBundle(location);
+ bundle = installBundle(location);
try
{
assertBundleState(Bundle.INSTALLED, bundle.getState());
@@ -246,7 +245,7 @@
}
// Test symbolic location
- bundle = context.installBundle("/symbolic/location", url.openStream());
+ bundle = installBundle("/symbolic/location", url.openStream());
try
{
assertBundleState(Bundle.INSTALLED, bundle.getState());
@@ -258,7 +257,7 @@
assertBundleState(Bundle.UNINSTALLED, bundle.getState());
}
}
-
+
public void testServiceListener() throws Exception
{
Bundle bundle = addBundle("/bundles/simple/", "simple-bundle1");
16 years
JBoss-OSGI SVN: r97666 - in projects/jboss-osgi/projects: bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal and 8 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-10 00:26:04 -0500 (Thu, 10 Dec 2009)
New Revision: 97666
Modified:
projects/jboss-osgi/projects/bundles/husky/trunk/pom.xml
projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/EmbeddedRuntime.java
projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/OSGiRuntimeImpl.java
projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/RemoteRuntime.java
projects/jboss-osgi/projects/runtime/deployment/trunk/pom.xml
projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/Deployment.java
projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/internal/DeploymentImpl.java
projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/internal/DeploymentRegistryServiceImpl.java
projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/internal/SystemDeployerService.java
projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/FrameworkTest.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/BundleContextUnitTestCase.java
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/BundleInfo.java
Log:
Preserve bundle location on installBundle
Modified: projects/jboss-osgi/projects/bundles/husky/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/bundles/husky/trunk/pom.xml 2009-12-10 05:13:04 UTC (rev 97665)
+++ projects/jboss-osgi/projects/bundles/husky/trunk/pom.xml 2009-12-10 05:26:04 UTC (rev 97666)
@@ -41,8 +41,7 @@
<!-- Properties -->
<properties>
<version.jboss.osgi.runtime.felix>2.0.0</version.jboss.osgi.runtime.felix>
- <version.jboss.osgi.spi>1.0.3</version.jboss.osgi.spi>
- <version.jboss.osgi.deployment>1.0.0</version.jboss.osgi.deployment>
+ <version.jboss.osgi.deployment>1.0.1-SNAPSHOT</version.jboss.osgi.deployment>
<version.osgi>4.2.0</version.osgi>
</properties>
@@ -53,11 +52,6 @@
<artifactId>bnd</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-spi</artifactId>
- <version>${version.jboss.osgi.spi}</version>
- </dependency>
- <dependency>
<groupId>org.jboss.osgi.runtime</groupId>
<artifactId>jboss-osgi-deployment</artifactId>
<version>${version.jboss.osgi.deployment}</version>
Modified: projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/EmbeddedRuntime.java
===================================================================
--- projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/EmbeddedRuntime.java 2009-12-10 05:13:04 UTC (rev 97665)
+++ projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/EmbeddedRuntime.java 2009-12-10 05:26:04 UTC (rev 97666)
@@ -23,7 +23,6 @@
// $Id$
-import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -34,6 +33,8 @@
import javax.management.MBeanServerFactory;
import org.jboss.osgi.deployment.deployer.DeployerService;
+import org.jboss.osgi.deployment.deployer.Deployment;
+import org.jboss.osgi.deployment.deployer.DeploymentFactory;
import org.jboss.osgi.spi.capability.Capability;
import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
import org.jboss.osgi.spi.util.BundleInfo;
@@ -67,9 +68,9 @@
public OSGiBundle installBundle(String location) throws BundleException
{
BundleInfo info = BundleInfo.createBundleInfo(location);
+ Deployment dep = DeploymentFactory.createDeployment(info);
String symbolicName = info.getSymbolicName();
Version version = info.getVersion();
- URL rootURL = info.getRootURL();
OSGiBundle bundle;
@@ -79,13 +80,13 @@
{
DeployerService service = (DeployerService)context.getService(sref);
log.debug("Install using DeployerService: " + service.getClass().getName());
- service.deploy(rootURL);
+ service.deploy(new Deployment[] { dep });
bundle = getBundle(symbolicName, version, true);
}
else
{
log.debug("Install using system context");
- Bundle auxBundle = context.installBundle(rootURL.toExternalForm());
+ Bundle auxBundle = context.installBundle(info.getLocation());
bundle = new EmbeddedBundle(this, auxBundle);
}
return registerBundle(bundle.getLocation(), bundle);
Modified: projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/OSGiRuntimeImpl.java
===================================================================
--- projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/OSGiRuntimeImpl.java 2009-12-10 05:13:04 UTC (rev 97665)
+++ projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/OSGiRuntimeImpl.java 2009-12-10 05:26:04 UTC (rev 97666)
@@ -164,13 +164,13 @@
log.debug("End Shutdown");
}
- protected void deploy(URL archiveURL) throws Exception
+ void deploy(URL archiveURL) throws Exception
{
DeployerServiceClient deployer = new DeployerServiceClient(this, DeployerService.MBEAN_DEPLOYER_SERVICE);
deployer.deploy(archiveURL);
}
- protected void undeploy(URL archiveURL) throws Exception
+ void undeploy(URL archiveURL) throws Exception
{
DeployerServiceClient deployer = new DeployerServiceClient(this, DeployerService.MBEAN_DEPLOYER_SERVICE);
deployer.undeploy(archiveURL);
@@ -212,7 +212,7 @@
return sref;
}
- protected OSGiBundle getBundle(String symbolicName, Version version, boolean mustExist)
+ OSGiBundle getBundle(String symbolicName, Version version, boolean mustExist)
{
OSGiBundle bundle = null;
List<OSGiBundle> bundles = Arrays.asList(getBundles());
@@ -234,7 +234,7 @@
return bundle;
}
- protected String getManifestEntry(String location, String key)
+ String getManifestEntry(String location, String key)
{
Manifest manifest = getManifest(location);
Attributes attribs = manifest.getMainAttributes();
Modified: projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/RemoteRuntime.java
===================================================================
--- projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/RemoteRuntime.java 2009-12-10 05:13:04 UTC (rev 97665)
+++ projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/RemoteRuntime.java 2009-12-10 05:26:04 UTC (rev 97666)
@@ -35,6 +35,7 @@
import org.jboss.osgi.deployment.deployer.DeployerService;
import org.jboss.osgi.deployment.deployer.Deployment;
+import org.jboss.osgi.deployment.deployer.DeploymentFactory;
import org.jboss.osgi.spi.management.MBeanProxy;
import org.jboss.osgi.spi.management.MBeanProxyException;
import org.jboss.osgi.spi.management.ManagedBundleMBean;
@@ -70,13 +71,11 @@
{
// Get the bundle info from the location
BundleInfo info = BundleInfo.createBundleInfo(location);
-
- // Create the deployment from the info
- DeployerServiceClient deployer = new DeployerServiceClient(this, DeployerService.MBEAN_DEPLOYER_SERVICE);
- Deployment dep = deployer.createDeployment(info);
+ Deployment dep = DeploymentFactory.createDeployment(info);
dep.setAutoStart(false);
-
+
// Deploy the deployemnt through the DeployerService
+ DeployerServiceClient deployer = new DeployerServiceClient(this, DeployerService.MBEAN_DEPLOYER_SERVICE);
deployer.deploy(new Deployment[] { dep });
String symbolicName = info.getSymbolicName();
Modified: projects/jboss-osgi/projects/runtime/deployment/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/deployment/trunk/pom.xml 2009-12-10 05:13:04 UTC (rev 97665)
+++ projects/jboss-osgi/projects/runtime/deployment/trunk/pom.xml 2009-12-10 05:26:04 UTC (rev 97666)
@@ -39,7 +39,7 @@
<!-- Properties -->
<properties>
<version.jboss.deployers>2.0.9.GA</version.jboss.deployers>
- <version.jboss.osgi.spi>1.0.3</version.jboss.osgi.spi>
+ <version.jboss.osgi.spi>1.0.4-SNAPSHOT</version.jboss.osgi.spi>
<version.osgi>4.2.0</version.osgi>
</properties>
Modified: projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/Deployment.java
===================================================================
--- projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/Deployment.java 2009-12-10 05:13:04 UTC (rev 97665)
+++ projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/deployer/Deployment.java 2009-12-10 05:26:04 UTC (rev 97666)
@@ -21,8 +21,6 @@
*/
package org.jboss.osgi.deployment.deployer;
-import java.net.URL;
-
import org.jboss.osgi.spi.Attachments;
import org.jboss.virtual.VirtualFile;
@@ -45,7 +43,7 @@
/**
* Get the bundle location
*/
- public URL getLocation();
+ public String getLocation();
/**
* Get the bundle symbolic name
Modified: projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/internal/DeploymentImpl.java
===================================================================
--- projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/internal/DeploymentImpl.java 2009-12-10 05:13:04 UTC (rev 97665)
+++ projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/internal/DeploymentImpl.java 2009-12-10 05:26:04 UTC (rev 97666)
@@ -22,7 +22,6 @@
package org.jboss.osgi.deployment.internal;
import java.io.Serializable;
-import java.net.URL;
import org.jboss.osgi.deployment.deployer.Deployment;
import org.jboss.osgi.spi.util.AttachmentSupport;
@@ -64,9 +63,9 @@
/**
* Get the bundle location
*/
- public URL getLocation()
+ public String getLocation()
{
- return info.getRootURL();
+ return info.getLocation();
}
/**
@@ -146,7 +145,7 @@
{
String symbolicName = getSymbolicName();
String version = getVersion();
- URL url = getLocation();
+ String url = info.getLocation();
return "[" + symbolicName + "-" + version + ",url=" + url + "]";
}
}
\ No newline at end of file
Modified: projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/internal/DeploymentRegistryServiceImpl.java
===================================================================
--- projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/internal/DeploymentRegistryServiceImpl.java 2009-12-10 05:13:04 UTC (rev 97665)
+++ projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/internal/DeploymentRegistryServiceImpl.java 2009-12-10 05:26:04 UTC (rev 97666)
@@ -96,9 +96,11 @@
throw new IllegalArgumentException("Cannot obtain bundle deployment for: null");
Deployment dep = null;
+ String urlLocation = url.toExternalForm();
for (Deployment auxDep : deployments)
{
- if (url.equals(auxDep.getLocation()))
+ String auxLocation = auxDep.getLocation();
+ if (urlLocation.equals(auxLocation))
{
dep = auxDep;
break;
Modified: projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/internal/SystemDeployerService.java
===================================================================
--- projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/internal/SystemDeployerService.java 2009-12-10 05:13:04 UTC (rev 97665)
+++ projects/jboss-osgi/projects/runtime/deployment/trunk/src/main/java/org/jboss/osgi/deployment/internal/SystemDeployerService.java 2009-12-10 05:26:04 UTC (rev 97666)
@@ -103,7 +103,7 @@
{
log.debug("Install: " + dep.getLocation());
- String location = dep.getLocation().toExternalForm();
+ String location = dep.getLocation();
Bundle bundle = context.installBundle(location);
bundleMap.put(dep, bundle);
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml 2009-12-10 05:13:04 UTC (rev 97665)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml 2009-12-10 05:26:04 UTC (rev 97666)
@@ -54,12 +54,12 @@
<version.jboss.osgi.apache.xerces>2.9.1.SP3</version.jboss.osgi.apache.xerces>
<version.jboss.osgi.common>1.0.3</version.jboss.osgi.common>
<version.jboss.osgi.common.core>2.2.13.GA</version.jboss.osgi.common.core>
- <version.jboss.osgi.deployment>1.0.0</version.jboss.osgi.deployment>
- <version.jboss.osgi.husky>1.0.2</version.jboss.osgi.husky>
+ <version.jboss.osgi.deployment>1.0.1-SNAPSHOT</version.jboss.osgi.deployment>
+ <version.jboss.osgi.husky>1.0.3-SNAPSHOT</version.jboss.osgi.husky>
<version.jboss.osgi.jaxb>2.1.10.SP3</version.jboss.osgi.jaxb>
<version.jboss.osgi.jmx>1.0.2</version.jboss.osgi.jmx>
<version.jboss.osgi.runtime.deployers>1.0.3</version.jboss.osgi.runtime.deployers>
- <version.jboss.osgi.spi>1.0.3</version.jboss.osgi.spi>
+ <version.jboss.osgi.spi>1.0.4-SNAPSHOT</version.jboss.osgi.spi>
<version.jboss.osgi.xml.binding>2.0.2.Beta3</version.jboss.osgi.xml.binding>
<version.jboss.test>1.1.4.GA</version.jboss.test>
<version.ops4j.pax.web>0.7.2</version.ops4j.pax.web>
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2009-12-10 05:13:04 UTC (rev 97665)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2009-12-10 05:26:04 UTC (rev 97666)
@@ -118,9 +118,6 @@
/** The bundle manager's bean name: OSGiBundleManager */
public static final String BEAN_BUNDLE_MANAGER = "OSGiBundleManager";
- /** The string representation of this bundle's location identifier. */
- public static final String PROPERTY_BUNDLE_LOCATION = "org.jboss.osgi.bundle.location";
-
/** The framework version */
private static String OSGi_FRAMEWORK_VERSION = "r4v42"; // [TODO] externalise
@@ -833,9 +830,10 @@
osgiMetaData = new AbstractOSGiMetaData(manifest);
}
- String location = (String)unit.getAttachment(PROPERTY_BUNDLE_LOCATION);
- if (location == null)
- location = unit.getName();
+ // The bundle location is not necessarily the bundle root url
+ // The framework is expected to preserve the location passed into installBundle(String)
+ Deployment dep = unit.getAttachment(Deployment.class);
+ String location = (dep != null ? dep.getLocation() : unit.getName());
OSGiBundleState bundleState = new OSGiBundleState(location, osgiMetaData, unit);
addBundle(bundleState);
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/FrameworkTest.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/FrameworkTest.java 2009-12-10 05:13:04 UTC (rev 97665)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/FrameworkTest.java 2009-12-10 05:26:04 UTC (rev 97666)
@@ -21,6 +21,8 @@
*/
package org.jboss.test.osgi;
+import static org.junit.Assert.assertEquals;
+
import java.net.URL;
import java.util.Arrays;
import java.util.Collection;
@@ -242,6 +244,13 @@
getDelegate().addPath(dir, path, name);
}
+ protected void assertBundleState(int expState, int wasState)
+ {
+ String expstr = ConstantsHelper.bundleState(expState);
+ String wasstr = ConstantsHelper.bundleState(wasState);
+ assertEquals("Bundle " + expstr, expstr, wasstr);
+ }
+
protected void assertClassEquality(Class<?> expected, Class<?> actual)
{
assertTrue("Should be the same " + ClassLoaderUtils.classToString(expected) + " and " + ClassLoaderUtils.classToString(actual), expected == actual);
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/BundleContextUnitTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/BundleContextUnitTestCase.java 2009-12-10 05:13:04 UTC (rev 97665)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/bundle/BundleContextUnitTestCase.java 2009-12-10 05:26:04 UTC (rev 97666)
@@ -22,6 +22,7 @@
package org.jboss.test.osgi.bundle;
import java.io.File;
+import java.net.URL;
import java.util.Arrays;
import java.util.Dictionary;
import java.util.HashSet;
@@ -31,6 +32,7 @@
import junit.framework.Test;
+import org.jboss.osgi.testing.OSGiTestHelper;
import org.jboss.test.osgi.FrameworkTest;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
@@ -212,7 +214,49 @@
public void testInstallBundle() throws Exception
{
- // TODO testInstallBundle
+ OSGiTestHelper helper = new OSGiTestHelper();
+ BundleContext context = getBundleManager().getSystemContext();
+
+ // Test URL location
+ URL url = helper.getTestArchiveURL("bundles/jboss-osgi-common.jar");
+ Bundle bundle = context.installBundle(url.toExternalForm());
+ try
+ {
+ assertBundleState(Bundle.INSTALLED, bundle.getState());
+ assertEquals(url.toExternalForm(), bundle.getLocation());
+ }
+ finally
+ {
+ bundle.uninstall();
+ assertBundleState(Bundle.UNINSTALLED, bundle.getState());
+ }
+
+ // Test file location
+ String location = helper.getTestArchivePath("bundles/jboss-osgi-common.jar");
+ bundle = context.installBundle(location);
+ try
+ {
+ assertBundleState(Bundle.INSTALLED, bundle.getState());
+ assertEquals(location, bundle.getLocation());
+ }
+ finally
+ {
+ bundle.uninstall();
+ assertBundleState(Bundle.UNINSTALLED, bundle.getState());
+ }
+
+ // Test symbolic location
+ bundle = context.installBundle("/symbolic/location", url.openStream());
+ try
+ {
+ assertBundleState(Bundle.INSTALLED, bundle.getState());
+ assertEquals("/symbolic/location", bundle.getLocation());
+ }
+ finally
+ {
+ bundle.uninstall();
+ assertBundleState(Bundle.UNINSTALLED, bundle.getState());
+ }
}
public void testServiceListener() throws Exception
Modified: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/BundleInfo.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/BundleInfo.java 2009-12-10 05:13:04 UTC (rev 97665)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/BundleInfo.java 2009-12-10 05:26:04 UTC (rev 97666)
@@ -67,7 +67,7 @@
if (url == null)
throw new IllegalArgumentException("Cannot obtain root url from: " + location);
- return new BundleInfo(toVirtualFile(url), location);
+ return new BundleInfo(toVirtualFile(url), url.toExternalForm());
}
public static BundleInfo createBundleInfo(URL url)
@@ -179,6 +179,18 @@
return manifest;
}
+ private static VirtualFile toVirtualFile(URL url)
+ {
+ try
+ {
+ return VFS.getRoot(url);
+ }
+ catch (IOException e)
+ {
+ throw new IllegalArgumentException("Invalid root url: " + url, e);
+ }
+ }
+
private static URL getRealLocation(String location)
{
// Try location as URL
@@ -217,19 +229,7 @@
return url;
}
-
- private static VirtualFile toVirtualFile(URL url)
- {
- try
- {
- return VFS.getRoot(url);
- }
- catch (IOException e)
- {
- throw new IllegalArgumentException("Invalid root url: " + url, e);
- }
- }
-
+
private static URL toURL(VirtualFile file)
{
try
16 years
JBoss-OSGI SVN: r97646 - in projects/jboss-osgi: projects/runtime/framework/trunk/src/etc/osgitck and 5 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-09 18:08:00 -0500 (Wed, 09 Dec 2009)
New Revision: 97646
Added:
projects/jboss-osgi/trunk/osgitck/readme.txt
Removed:
projects/jboss-osgi/trunk/osgitck/hudson/apache-tomcat/conf/tomcat-users.xml
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/scripts/assembly-all.xml
projects/jboss-osgi/projects/runtime/framework/trunk/src/etc/osgitck/jboss-osgi-bootstrap.xml
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/launch/OSGiFrameworkFactory.java
projects/jboss-osgi/trunk/osgitck/ant.properties.example
projects/jboss-osgi/trunk/osgitck/build.xml
projects/jboss-osgi/trunk/osgitck/hudson/hudson-home/jobs/osgi.core.tests/config.xml
Log:
Fix TCK setup for framework SNAPSHOT
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/scripts/assembly-all.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/scripts/assembly-all.xml 2009-12-09 23:06:14 UTC (rev 97645)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/scripts/assembly-all.xml 2009-12-09 23:08:00 UTC (rev 97646)
@@ -34,11 +34,13 @@
<include>*:jboss-managed:jar</include>
<include>*:jboss-mdr:jar</include>
<include>*:jboss-metatype:jar</include>
+ <include>*:jboss-osgi-deployment:jar</include>
<include>*:jboss-osgi-deployers:jar</include>
<include>*:jboss-osgi-spi:jar</include>
<include>*:jboss-reflect:jar</include>
<include>*:jboss-vfs:jar</include>
<include>*:jbossxb:jar</include>
+ <include>*:mcann-core:jar</include>
<include>*:org.osgi.core:jar</include>
<include>*:org.osgi.compendium:jar</include>
</includes>
@@ -52,7 +54,7 @@
<include>*:jboss-logging-log4j:jar</include>
</includes>
<useStrictFiltering>true</useStrictFiltering>
- <scope>test</scope>
+ <scope>provided</scope>
<unpack>true</unpack>
</dependencySet>
</dependencySets>
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/etc/osgitck/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/etc/osgitck/jboss-osgi-bootstrap.xml 2009-12-09 23:06:14 UTC (rev 97645)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/etc/osgitck/jboss-osgi-bootstrap.xml 2009-12-09 23:08:00 UTC (rev 97646)
@@ -132,6 +132,7 @@
<constructor>
<parameter class="org.jboss.dependency.spi.Controller"><inject bean="jboss.kernel:service=KernelController" /></parameter>
</constructor>
+ <property name="deploymentRegistry"><inject bean="DeploymentRegistry"/></property>
</bean>
<!-- OSGI Deployment -->
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2009-12-09 23:06:14 UTC (rev 97645)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2009-12-09 23:08:00 UTC (rev 97646)
@@ -660,8 +660,9 @@
// Invoke the bundle lifecycle interceptors
if (getBundleManager().isFrameworkActive() && getBundleId() != 0)
{
- LifecycleInterceptorServicePlugin plugin = getBundleManager().getPlugin(LifecycleInterceptorServicePlugin.class);
- plugin.handleStateChange(state, getBundleInternal());
+ LifecycleInterceptorServicePlugin plugin = getBundleManager().getOptionalPlugin(LifecycleInterceptorServicePlugin.class);
+ if (plugin != null)
+ plugin.handleStateChange(state, getBundleInternal());
}
this.state.set(state);
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2009-12-09 23:06:14 UTC (rev 97645)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2009-12-09 23:08:00 UTC (rev 97646)
@@ -433,10 +433,10 @@
*
* @param properties the properties
*/
- public void setProperties(Map<String, Object> properties)
+ public void setProperties(Map<String, Object> props)
{
- this.properties = properties;
-
+ properties.putAll(props);
+
// Init default framework properties
if (getProperty(Constants.FRAMEWORK_VERSION) == null)
setProperty(Constants.FRAMEWORK_VERSION, OSGi_FRAMEWORK_VERSION);
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/launch/OSGiFrameworkFactory.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/launch/OSGiFrameworkFactory.java 2009-12-09 23:06:14 UTC (rev 97645)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/launch/OSGiFrameworkFactory.java 2009-12-09 23:08:00 UTC (rev 97646)
@@ -63,7 +63,7 @@
/** The system property used to get a bootstrap path loaded from a classloader */
public static final String BOOTSTRAP_PATH = "org.jboss.osgi.framework.launch.bootstrapPath";
- @SuppressWarnings("unchecked")
+ @SuppressWarnings({ "unchecked", "rawtypes" })
public Framework newFramework(Map configuration)
{
// Bootstrap the kernel
@@ -117,6 +117,7 @@
try
{
deployer.deploy(url);
+ deployer.validate();
}
catch (Throwable ex)
{
@@ -127,7 +128,11 @@
if (managerContext == null)
throw new IllegalStateException("Cannot obtain installed bean: " + OSGiBundleManager.BEAN_BUNDLE_MANAGER);
+ // Get the manger and copy the configuration
OSGiBundleManager manager = (OSGiBundleManager)managerContext.getTarget();
+ if (configuration != null)
+ manager.setProperties(configuration);
+
return new OSGiFramework(manager);
}
Modified: projects/jboss-osgi/trunk/osgitck/ant.properties.example
===================================================================
--- projects/jboss-osgi/trunk/osgitck/ant.properties.example 2009-12-09 23:06:14 UTC (rev 97645)
+++ projects/jboss-osgi/trunk/osgitck/ant.properties.example 2009-12-09 23:08:00 UTC (rev 97646)
@@ -4,13 +4,14 @@
# $Id: ant.properties.example 3995 2007-07-26 08:52:45Z thomas.diesler(a)jboss.com $
# The JBoss OSGi framework version
-jboss.osgi.framework.version=1.0.0-SNAPSHOT
+framework.version=1.0.0-SNAPSHOT
# The aQute Bnd version
aQute.bnd.version=0.0.366-SNAPSHOT
# The location of the OSGi TCK
# osgitck.export=/home/username/svn/osgitck/r4v42
+# osgitck.zip.file=/home/username/svn/osgitck/osgitck-r4v42.zip
# The location of the local maven repository
# maven.local.repository=/home/username/.m2/repository
@@ -26,7 +27,7 @@
hudson.maven.path=/usr/java/apache-maven-2.2.1
# Hudson QA Environment
-hudson.username=changeme
+# hudson.username=username
# Hudson workspace root
# hudson.root=/home/username/workspace/osgitck
Modified: projects/jboss-osgi/trunk/osgitck/build.xml
===================================================================
--- projects/jboss-osgi/trunk/osgitck/build.xml 2009-12-09 23:06:14 UTC (rev 97645)
+++ projects/jboss-osgi/trunk/osgitck/build.xml 2009-12-09 23:08:00 UTC (rev 97646)
@@ -14,6 +14,8 @@
<project default="setup.jboss">
<property name="target.dir" value="${basedir}/target" />
+ <property name="reports.dir" value="${target.dir}/test-reports" />
+ <property name="osgitck.dir" value="${target.dir}/osgitck-r4v42" />
<!-- ================================================================== -->
<!-- Initialization -->
@@ -29,14 +31,23 @@
<!-- Setup property defaults -->
<property environment="env"/>
- <property name="username" value="${env.USER}" />
- <property name="osgitck.export" value="/home/${username}/svn/osgitck/r4v42" />
- <property name="maven.local.repository" value="/home/${username}/.m2/repository" />
- <property name="hudson.root" value="/home/${username}/workspace/osgitck" />
-
+ <property name="hudson.username" value="${env.USER}" />
+ <property name="osgitck.export" value="/home/${hudson.username}/svn/osgitck/r4v42" />
+ <property name="osgitck.tar.file" value="${osgitck.export}/../osgitck-r4v42.tar" />
+ <property name="maven.local.repository" value="/home/${hudson.username}/.m2/repository" />
+ <property name="hudson.root" value="/home/${hudson.username}/workspace/osgitck" />
+
+ <echo>************************************************</echo>
+ <echo message="hudson.username=${hudson.username}"/>
+ <echo message="aQute.bnd.version=${aQute.bnd.version}"/>
+ <echo message="framework.version=${framework.version}"/>
+ <echo message="osgitck.export=${osgitck.export}"/>
+ <echo message="osgitck.tar.file=${osgitck.tar.file}"/>
+ <echo>************************************************</echo>
+
<!-- Check if the osgitck export is available -->
<available property="osgitck.export.available" file="${osgitck.export}" />
- <fail message="Cannot find: ${osgitck.export}" unless="osgitck.export.available" />
+ <available property="osgitck.tar.available" file="${osgitck.tar.file}" />
<!-- Check if the aQute.bnd jar is available -->
<property name="aQute.bnd.jar" value="${maven.local.repository}/biz/aQute/aQute.bnd/${aQute.bnd.version}/aQute.bnd-${aQute.bnd.version}.jar" />
@@ -44,49 +55,46 @@
<fail message="Cannot find: ${aQute.bnd.jar}" unless="aQute.bnd.available" />
<!-- Check if the jboss.osgi.framework jar is available -->
- <property name="jboss.osgi.framework.jar" value="${maven.local.repository}/org/jboss/osgi/runtime/jboss-osgi-framework/${jboss.osgi.framework.version}/jboss-osgi-framework-${jboss.osgi.framework.version}-all.jar" />
+ <property name="jboss.osgi.framework.jar" value="${maven.local.repository}/org/jboss/osgi/runtime/jboss-osgi-framework/${framework.version}/jboss-osgi-framework-${framework.version}-all.jar" />
<available property="jboss.osgi.framework.available" file="${jboss.osgi.framework.jar}" />
<fail message="Cannot find: ${jboss.osgi.framework.jar}" unless="jboss.osgi.framework.available" />
<!-- Check if the osgitck dir is available -->
- <property name="osgitck.dir" value="${target.dir}/osgitck-r4v42" />
<available property="osgitck.dir.available" file="${osgitck.dir}" />
<property name="jboss.framework.repo.dir" value="${osgitck.dir}/licensed/repo/org.jboss.osgi.framework" />
- <echo message="osgitck.export=${osgitck.export}"/>
- <echo message="aQute.bnd.jar=${aQute.bnd.jar}"/>
- <echo message="jboss.osgi.framework=${jboss.osgi.framework.jar}"/>
-
</target>
<!-- ================================================================== -->
<!-- Setup -->
<!-- ================================================================== -->
- <!-- Copy the OSGi TCK-->
- <target name="copy-osgitck" depends="init" unless="osgitck.dir.available">
- <copy toDir="${osgitck.dir}">
- <fileset dir="${osgitck.export}">
- <exclude name="**/.svn"/>
- </fileset>
- </copy>
+ <!-- Tar the OSGi TCK-->
+ <target name="tar-osgitck" depends="init" unless="osgitck.tar.available">
+ <fail message="Cannot find osgitck export: ${osgitck.export}" unless="osgitck.export.available"/>
+ <tar basedir="${osgitck.export}" destfile="${osgitck.tar.file}" longfile="gnu" excludes="**/.svn"/>
+ </target>
+
+ <!-- Untar the OSGi TCK-->
+ <target name="untar-osgitck" depends="tar-osgitck" unless="osgitck.dir.available">
+ <mkdir dir="${osgitck.dir}"/>
+ <untar src="${osgitck.tar.file}" dest="${osgitck.dir}"/>
<available property="osgitck.dir.available" file="${osgitck.dir}" />
</target>
<!-- Setup the TCK to use the RI (equinox) -->
- <target name="setup.ri" description="Setup the TCK using the RI (Equinox)" depends="init,copy-osgitck">
+ <target name="setup.ri" description="Setup the TCK using the RI (Equinox)" depends="init,untar-osgitck">
<!-- Copy the aQute.bnd -->
+ <fail message="Cannot find: ${osgitck.dir}" unless="osgitck.dir.available" />
<copy file="${aQute.bnd.jar}" tofile="${osgitck.dir}/licensed/repo/biz.aQute.bnd/biz.aQute.bnd-latest.jar" overwrite="true" />
</target>
<!-- Setup the TCK to use the JBoss OSGi Framework -->
- <target name="setup.jboss" description="Setup the TCK using the JBoss OSGi Framework" depends="init,copy-osgitck">
-
- <!-- Check if the osgitck dir is available -->
+ <target name="setup.jboss" description="Setup the TCK using the JBoss OSGi Framework" depends="init,untar-osgitck">
+
+ <!-- Overlay the TCK setup -->
<fail message="Cannot find: ${osgitck.dir}" unless="osgitck.dir.available" />
-
- <!-- Overlay the TCK setup -->
<copy todir="${osgitck.dir}" overwrite="true">
<fileset dir="${basedir}/overlay" />
</copy>
@@ -119,12 +127,28 @@
<!-- TCK Tests -->
<!-- ================================================================== -->
- <target name="tck-core-tests" description="Run the TCK core tests" depends="init">
+ <target name="run-tests" description="Run the TCK core tests" depends="init">
+ <fail message="Cannot find: ${osgitck.dir}" unless="osgitck.dir.available" />
<ant dir="${osgitck.dir}/osgi.ct" target="clean" />
<ant dir="${osgitck.dir}/osgi.ct" target="publish" />
<ant dir="${osgitck.dir}/osgi.ct" target="osgi.core.tests" />
</target>
+ <target name="test-reports" description="Generate the TCK test reports" depends="init">
+ <fail message="Cannot find: ${osgitck.dir}" unless="osgitck.dir.available" />
+ <mkdir dir="${reports.dir}"/>
+ <junitreport todir="${reports.dir}">
+ <fileset dir="${osgitck.dir}">
+ <include name="**/test-reports/TEST-*.xml"/>
+ </fileset>
+ <report format="frames" todir="${reports.dir}/html"/>
+ </junitreport>
+
+ <echo/>
+ <echo message="Generated test reports: ${reports.dir}"/>
+ <echo/>
+ </target>
+
<!-- ================================================================== -->
<!-- Clean -->
<!-- ================================================================== -->
Deleted: projects/jboss-osgi/trunk/osgitck/hudson/apache-tomcat/conf/tomcat-users.xml
===================================================================
--- projects/jboss-osgi/trunk/osgitck/hudson/apache-tomcat/conf/tomcat-users.xml 2009-12-09 23:06:14 UTC (rev 97645)
+++ projects/jboss-osgi/trunk/osgitck/hudson/apache-tomcat/conf/tomcat-users.xml 2009-12-09 23:08:00 UTC (rev 97646)
@@ -1,5 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<tomcat-users>
- <role rolename="admin"/>
- <user username="@hudson.username@" password="@hudson.password@" roles="admin"/>
-</tomcat-users>
Modified: projects/jboss-osgi/trunk/osgitck/hudson/hudson-home/jobs/osgi.core.tests/config.xml
===================================================================
--- projects/jboss-osgi/trunk/osgitck/hudson/hudson-home/jobs/osgi.core.tests/config.xml 2009-12-09 23:06:14 UTC (rev 97645)
+++ projects/jboss-osgi/trunk/osgitck/hudson/hudson-home/jobs/osgi.core.tests/config.xml 2009-12-09 23:08:00 UTC (rev 97646)
@@ -22,7 +22,6 @@
<hudson.tasks.Shell>
<command>
TCKSETUPDIR=$WORKSPACE/osgitck-setup
-TCKHOMEDIR=$TCKSETUPDIR/target/osgitck-r4v42
# Setup the TCK
cd $TCKSETUPDIR
@@ -32,8 +31,7 @@
ant clean setup.ri
# Run the core tests
-cd $TCKHOMEDIR/osgi.ct
-ant clean publish osgi.core.tests
+ant run-tests
</command>
</hudson.tasks.Shell>
</builders>
Added: projects/jboss-osgi/trunk/osgitck/readme.txt
===================================================================
--- projects/jboss-osgi/trunk/osgitck/readme.txt (rev 0)
+++ projects/jboss-osgi/trunk/osgitck/readme.txt 2009-12-09 23:08:00 UTC (rev 97646)
@@ -0,0 +1,5 @@
+
+Running Tests with JPDA
+-----------------------
+
+export ANT_OPTS="-Djpda=-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y"
\ No newline at end of file
16 years
JBoss-OSGI SVN: r97636 - projects/jboss-osgi/projects.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-09 14:31:11 -0500 (Wed, 09 Dec 2009)
New Revision: 97636
Removed:
projects/jboss-osgi/projects/osgitck/
Log:
Move osgitck to jboss-osgi
16 years
JBoss-OSGI SVN: r97635 - in projects/jboss-osgi/trunk: osgitck and 1 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-09 14:26:49 -0500 (Wed, 09 Dec 2009)
New Revision: 97635
Removed:
projects/jboss-osgi/trunk/osgitck/.classpath
projects/jboss-osgi/trunk/src/
projects/jboss-osgi/trunk/testsuite/src/
Modified:
projects/jboss-osgi/trunk/osgitck/.project
Log:
Import osgitck
Deleted: projects/jboss-osgi/trunk/osgitck/.classpath
===================================================================
--- projects/jboss-osgi/trunk/osgitck/.classpath 2009-12-09 19:23:21 UTC (rev 97634)
+++ projects/jboss-osgi/trunk/osgitck/.classpath 2009-12-09 19:26:49 UTC (rev 97635)
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
Modified: projects/jboss-osgi/trunk/osgitck/.project
===================================================================
--- projects/jboss-osgi/trunk/osgitck/.project 2009-12-09 19:23:21 UTC (rev 97634)
+++ projects/jboss-osgi/trunk/osgitck/.project 2009-12-09 19:26:49 UTC (rev 97635)
@@ -1,17 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>osgitck-r4v42</name>
+ <name>jboss-osgi-tcksetup</name>
<comment></comment>
<projects>
</projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
</projectDescription>
16 years