Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Waibel2012-08-01 05:55:49 -0400
committerFlorian Waibel2012-08-01 05:55:49 -0400
commitf744bd3eb2bf6b2c5739a211fe40da30d66378d7 (patch)
treee7accbe844589bfa72bf243ac575f9dbfa8f9ed0
parent681379dd27f719755fc28acf771034f724d1b7fc (diff)
parentf3ab852727a723f694064bbfb2f0f0ab926e6c08 (diff)
downloadorg.eclipse.virgo.kernel-f744bd3eb2bf6b2c5739a211fe40da30d66378d7.tar.gz
org.eclipse.virgo.kernel-f744bd3eb2bf6b2c5739a211fe40da30d66378d7.tar.xz
org.eclipse.virgo.kernel-f744bd3eb2bf6b2c5739a211fe40da30d66378d7.zip
Merge branch 'master' of ssh://git.eclipse.org/gitroot/virgo/org.eclipse.virgo.kernel into 369907-rework-dag-interface369907-rework-dag-interface
-rw-r--r--.gitignore1
-rw-r--r--build.versions10
-rw-r--r--org.eclipse.virgo.kernel.agent.dm/.classpath6
-rw-r--r--org.eclipse.virgo.kernel.artifact/.classpath8
-rw-r--r--org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/fs/StandardArtifactFSFactory.java19
-rw-r--r--org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/fs/internal/FileArtifactFS.java2
-rw-r--r--org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/fs/internal/JarFileArtifactFS.java53
-rw-r--r--org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/fs/internal/JarFileArtifactFSEntry.java221
-rw-r--r--org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/internal/BundleManifestUtils.java65
-rw-r--r--org.eclipse.virgo.kernel.artifact/src/test/java/org/eclipse/virgo/kernel/artifact/bundle/BundleBridgeTests.java36
-rw-r--r--org.eclipse.virgo.kernel.artifact/src/test/java/org/eclipse/virgo/kernel/artifact/fs/internal/JarFileArtifactFSRefreshTests.java70
-rw-r--r--org.eclipse.virgo.kernel.artifact/src/test/java/org/eclipse/virgo/kernel/artifact/fs/internal/JarFileArtifactFSTests.java225
-rw-r--r--org.eclipse.virgo.kernel.artifact/src/test/resources/artifacts/bundle.jarbin0 -> 823 bytes
-rw-r--r--org.eclipse.virgo.kernel.artifact/src/test/resources/refresh/simple.module.jarbin0 -> 377 bytes
-rw-r--r--org.eclipse.virgo.kernel.artifact/src/test/resources/refresh/simple2.module.jarbin0 -> 378 bytes
-rw-r--r--org.eclipse.virgo.kernel.artifact/src/test/resources/wars/testbad02.war1
-rw-r--r--org.eclipse.virgo.kernel.deployer.dm/.classpath4
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/.classpath12
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/DMSPlanDeploymentTests.java17
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/DeployerEdgeTests.java13
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/PlanDeploymentTests.java20
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/resources/config/org.eclipse.virgo.kernel.properties2
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/resources/deployer-log-message-tests/malformed-application-context.parbin942 -> 1015 bytes
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/resources/invalidDigest.jarbin1973 -> 0 bytes
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/resources/waralientokernel.war0
-rw-r--r--org.eclipse.virgo.kernel.deployer/.classpath16
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/AbstractArtifactStore.java44
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/ArtifactStore.java49
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/FileMovingArtifactStore.java83
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/GenerationalArtifactStore.java94
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardArtifactStorage.java112
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardArtifactStorageFactory.java9
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/BundleDriver.java7
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleDriver.java10
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleInstallArtifact.java4
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/main/resources/META-INF/spring/deployer-context.xml1
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/FileMovingArtifactStoreTests.java159
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/GenerationalArtifactStoreTests.java157
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardInstallArtifactGraphInclosureTests.java2
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleInstallArtifactTests.java2
-rw-r--r--org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/pipeline/stage/transform/internal/SyntheticContextBundleCreatingTransformerTests.java8
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/.classpath4
-rw-r--r--org.eclipse.virgo.kernel.kerneldmfragment/.classpath2
-rw-r--r--org.eclipse.virgo.kernel.model/.classpath10
-rw-r--r--org.eclipse.virgo.kernel.osgi/.classpath18
-rw-r--r--org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/framework/OsgiFramework.java20
-rw-r--r--org.eclipse.virgo.kernel.osgicommand/.classpath4
-rw-r--r--org.eclipse.virgo.kernel.services/.classpath20
-rw-r--r--org.eclipse.virgo.kernel.shell/.classpath16
-rw-r--r--org.eclipse.virgo.kernel.shell/src/test/java/org/eclipse/virgo/kernel/shell/internal/AnnotationBasedCommandResolverTests.java61
-rw-r--r--org.eclipse.virgo.kernel.smoketest/.classpath2
-rw-r--r--org.eclipse.virgo.kernel.stubs/.classpath8
-rw-r--r--org.eclipse.virgo.kernel.test/.classpath14
-rw-r--r--org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/osgi/test/QuasiFrameworkIntegrationTests.java4
-rw-r--r--org.eclipse.virgo.kernel.userregion/.classpath22
-rw-r--r--org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/equinox/EquinoxOsgiFramework.java31
-rw-r--r--org.eclipse.virgo.kernel.userregionfactory/.classpath10
57 files changed, 1508 insertions, 280 deletions
diff --git a/.gitignore b/.gitignore
index 671b0cd9..2b6b15ee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
*/src/main/resources/META-INF/MANIFEST.MF
*/src/test/resources/META-INF/TEST.MF
+junit*.properties
target
integration-repo
ivy-cache
diff --git a/build.versions b/build.versions
index c23860f3..f53dd529 100644
--- a/build.versions
+++ b/build.versions
@@ -14,10 +14,10 @@ org.eclipse.osgi=3.8.0.v20120508-2119
ch.qos.logback.classic=1.0.0.v20111214-2030
ch.qos.logback.core=1.0.0.v20111214-2030
ch.qos.logback.slf4j=1.0.0.v20120123-1500
-org.eclipse.virgo.medic=3.6.0.D-20120711093918
+org.eclipse.virgo.medic=3.6.0.D-20120717201225
org.eclipse.virgo.osgi=3.6.0.D-20120711092707
-org.eclipse.virgo.repository=3.6.0.D-20120711094540
-org.eclipse.virgo.util=3.6.0.D-20120711093140
+org.eclipse.virgo.repository=3.6.0.D-20120717202028
+org.eclipse.virgo.util=3.6.0.D-20120717181632
org.slf4j=1.6.1
org.slf4j.spi=1.6.1
org.slf4j.api=1.6.4.v20120130-2120
@@ -32,7 +32,7 @@ org.apache.sshd.core=0.5.0.v201108120515
org.apache.felix.gogo.command=0.8.0.v201108120515
org.apache.felix.gogo.runtime=0.8.0.v201108120515
org.apache.felix.gogo.shell=0.8.0.v201110170705
-org.eclipse.virgo.nano=3.6.0.D-20120711095111
+org.eclipse.virgo.nano=3.6.0.D-20120727121316
org.eclipse.virgo.build.tools=1.3.0.RELEASE
org.eclipse.equinox.launcher=1.3.0.v20120308-1358
@@ -51,7 +51,7 @@ javax.servlet=3.0.0.v201112011016
javax.servlet.jsp=2.2.0.v201112011158
javax.transaction=1.1.1.v201105210645
org.easymock=2.3.0
-org.eclipse.virgo.test=3.6.0.D-20120711093701
+org.eclipse.virgo.test=3.6.0.D-20120717182335
org.eclipse.virgo.teststubs=3.6.0.D-20120711092322
org.hsqldb=1.8.0.9
org.junit=4.7.0
diff --git a/org.eclipse.virgo.kernel.agent.dm/.classpath b/org.eclipse.virgo.kernel.agent.dm/.classpath
index 068224c5..cdf8c502 100644
--- a/org.eclipse.virgo.kernel.agent.dm/.classpath
+++ b/org.eclipse.virgo.kernel.agent.dm/.classpath
@@ -22,7 +22,7 @@
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.ajdt.core.ASPECTJRT_CONTAINER"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20120711093918/org.eclipse.virgo.medic-3.6.0.D-20120711093918.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/1.0.0.CI-B20/org.eclipse.virgo.medic-sources-1.0.0.CI-B20.jar">
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20120717201225/org.eclipse.virgo.medic-3.6.0.D-20120717201225.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/1.0.0.CI-B20/org.eclipse.virgo.medic-sources-1.0.0.CI-B20.jar">
<attributes>
<attribute name="org.eclipse.ajdt.aspectpath" value="org.eclipse.ajdt.aspectpath"/>
</attributes>
@@ -35,7 +35,7 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.6.0.D-20120711092322/org.eclipse.virgo.teststubs.osgi-3.6.0.D-20120711092322.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.6.0.D-20120711092322/org.eclipse.virgo.teststubs.osgi-sources-3.6.0.D-20120711092322.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-sources-2.3.0.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.6.0.D-20120711093140/org.eclipse.virgo.util.osgi-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.1.0.M01/org.eclipse.virgo.util.osgi-sources-3.1.0.M01.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.6.0.D-20120717181632/org.eclipse.virgo.util.osgi-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.1.0.M01/org.eclipse.virgo.util.osgi-sources-3.1.0.M01.jar"/>
<classpathentry kind="src" path="/org.eclipse.virgo.kernel.deployer"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.5.RELEASE/org.springframework.core-3.0.5.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.5.RELEASE/org.springframework.core-sources-3.0.5.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.5.RELEASE/org.springframework.beans-3.0.5.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.5.RELEASE/org.springframework.beans-sources-3.0.5.RELEASE.jar"/>
@@ -43,6 +43,6 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.equinox.event/1.2.100.v20111010-1614/org.eclipse.equinox.event-1.2.100.v20111010-1614.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.equinox.region/1.1.0.v20120319-1602/org.eclipse.equinox.region-1.1.0.v20120319-1602.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.region/1.0.0.v20110503/org.eclipse.equinox.region-1.0.0.v20110503.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi.services/3.3.0.v20120307-2102/org.eclipse.osgi.services-3.3.0.v20120307-2102.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20110513/org.eclipse.osgi.services-sources-3.3.0.v20110513.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.kernel.core/3.6.0.D-20120711095111/org.eclipse.virgo.kernel.core-3.6.0.D-20120711095111.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.kernel.core/3.5.0.D-20120615071853/org.eclipse.virgo.kernel.core-sources-3.5.0.D-20120615071853.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.kernel.core/3.6.0.D-20120727121316/org.eclipse.virgo.kernel.core-3.6.0.D-20120727121316.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.kernel.core/3.6.0.D-20120727121316/org.eclipse.virgo.kernel.core-sources-3.6.0.D-20120727121316.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.artifact/.classpath b/org.eclipse.virgo.kernel.artifact/.classpath
index 353f298a..47f2872b 100644
--- a/org.eclipse.virgo.kernel.artifact/.classpath
+++ b/org.eclipse.virgo.kernel.artifact/.classpath
@@ -23,7 +23,7 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.6.0.D-20120711094540/org.eclipse.virgo.repository-3.6.0.D-20120711094540.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.5.0.D-20120615071313/org.eclipse.virgo.repository-sources-3.5.0.D-20120615071313.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.D-20120711093140/org.eclipse.virgo.util.io-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.5.0.D-20120615065828/org.eclipse.virgo.util.io-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.D-20120711093140/org.eclipse.virgo.util.io-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.D-20120711093140/org.eclipse.virgo.util.io-sources-3.6.0.D-20120711093140.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.6.0.D-20120711093140/org.eclipse.virgo.util.osgi.manifest-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.5.0.D-20120615065828/org.eclipse.virgo.util.osgi.manifest-sources-3.5.0.D-20120615065828.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.6.0.D-20120711093140/org.eclipse.virgo.util.parser.manifest-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.5.0.D-20120615065828/org.eclipse.virgo.util.parser.manifest-sources-3.5.0.D-20120615065828.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.6.0.D-20120711093140/org.eclipse.virgo.util.common-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.5.0.D-20120615065828/org.eclipse.virgo.util.common-sources-2.0019103807.jar"/>
@@ -31,10 +31,10 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-sources-1.6.1.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi/3.8.0.v20120508-2119/org.eclipse.osgi-3.8.0.v20120508-2119.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.1.R37x_v20110808-1106/org.eclipse.osgi-sources-3.7.1.R37x_v20110808-1106.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.12.RELEASE/com.springsource.org.aspectj.runtime-1.6.12.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.12.RELEASE/com.springsource.org.aspectj.runtime-1.6.12.RELEASE.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20120711093918/org.eclipse.virgo.medic-3.6.0.D-20120711093918.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/1.0.0.CI-B20/org.eclipse.virgo.medic-sources-1.0.0.CI-B20.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/3.6.0.D-20120711093918/org.eclipse.virgo.medic.core-3.6.0.D-20120711093918.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/3.5.0.D-20120615070622/org.eclipse.virgo.medic.core-sources-3.5.0.D-20120615070622.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20120717201225/org.eclipse.virgo.medic-3.6.0.D-20120717201225.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/1.0.0.CI-B20/org.eclipse.virgo.medic-sources-1.0.0.CI-B20.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/3.6.0.D-20120717201225/org.eclipse.virgo.medic.core-3.6.0.D-20120717201225.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/3.5.0.D-20120615070622/org.eclipse.virgo.medic.core-sources-3.5.0.D-20120615070622.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi.services/3.3.0.v20120307-2102/org.eclipse.osgi.services-3.3.0.v20120307-2102.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20110513/org.eclipse.osgi.services-sources-3.3.0.v20110513.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-sources-2.3.0.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.kernel.core/3.6.0.D-20120711095111/org.eclipse.virgo.kernel.core-3.6.0.D-20120711095111.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.kernel.core/3.6.0.D-20120727121316/org.eclipse.virgo.kernel.core-3.6.0.D-20120727121316.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/fs/StandardArtifactFSFactory.java b/org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/fs/StandardArtifactFSFactory.java
index 7c72be84..9cbfc735 100644
--- a/org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/fs/StandardArtifactFSFactory.java
+++ b/org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/fs/StandardArtifactFSFactory.java
@@ -12,12 +12,18 @@
package org.eclipse.virgo.kernel.artifact.fs;
import java.io.File;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Locale;
import org.eclipse.virgo.kernel.artifact.fs.internal.DirectoryArtifactFS;
import org.eclipse.virgo.kernel.artifact.fs.internal.FileArtifactFS;
+import org.eclipse.virgo.kernel.artifact.fs.internal.JarFileArtifactFS;
public final class StandardArtifactFSFactory implements ArtifactFSFactory {
+
+ private static final List<String> JAR_EXTENSIONS = Arrays.asList("jar", "war");
/**
* {@inheritDoc}
@@ -26,7 +32,18 @@ public final class StandardArtifactFSFactory implements ArtifactFSFactory {
if (file.isDirectory()) {
return new DirectoryArtifactFS(file);
}
- return new FileArtifactFS(file);
+ return looksLikeAJar(file.getName()) ? new JarFileArtifactFS(file) : new FileArtifactFS(file);
}
+
+ private boolean looksLikeAJar(String name) {
+ String fileName = name.toLowerCase(Locale.ENGLISH);
+
+ int dotLocation = fileName.lastIndexOf('.');
+ if (dotLocation == -1) {
+ return false;
+ }
+ return JAR_EXTENSIONS.contains(fileName.substring(dotLocation + 1));
+ }
+
}
diff --git a/org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/fs/internal/FileArtifactFS.java b/org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/fs/internal/FileArtifactFS.java
index 5363753c..5641faf9 100644
--- a/org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/fs/internal/FileArtifactFS.java
+++ b/org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/fs/internal/FileArtifactFS.java
@@ -49,7 +49,7 @@ public class FileArtifactFS implements ArtifactFS {
return new FileArtifactFSEntry(this.file.getParentFile(), this.file);
}
- public File getFile() {
+ public final File getFile() {
return this.file;
}
diff --git a/org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/fs/internal/JarFileArtifactFS.java b/org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/fs/internal/JarFileArtifactFS.java
new file mode 100644
index 00000000..cf293bcd
--- /dev/null
+++ b/org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/fs/internal/JarFileArtifactFS.java
@@ -0,0 +1,53 @@
+/*
+ * This file is part of the Eclipse Virgo project.
+ *
+ * Copyright (c) 2012 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ */
+
+package org.eclipse.virgo.kernel.artifact.fs.internal;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.eclipse.virgo.kernel.artifact.fs.ArtifactFS;
+import org.eclipse.virgo.kernel.artifact.fs.ArtifactFSEntry;
+import org.eclipse.virgo.util.common.StringUtils;
+
+/**
+ * {@link JarFileArtifactFS} is an {@link ArtifactFS} implementation for JAR files.
+ *
+ * <strong>Concurrent Semantics</strong><br />
+ *
+ * Thread safe
+ */
+public final class JarFileArtifactFS extends FileArtifactFS implements ArtifactFS {
+
+ /**
+ * Constructs a new {@link JarFileArtifactFS} for the given file which is assumed to be in JAR format.
+ *
+ * @param file a JAR file
+ */
+ public JarFileArtifactFS(File file) {
+ super(file);
+ }
+
+ /**
+ * {@InheritDoc}
+ */
+ @Override
+ public ArtifactFSEntry getEntry(String name) {
+ if (!StringUtils.hasText(name)) {
+ return super.getEntry(name);
+ } else {
+ return new JarFileArtifactFSEntry(getFile(), name);
+ }
+ }
+
+}
diff --git a/org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/fs/internal/JarFileArtifactFSEntry.java b/org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/fs/internal/JarFileArtifactFSEntry.java
new file mode 100644
index 00000000..43d7d32f
--- /dev/null
+++ b/org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/fs/internal/JarFileArtifactFSEntry.java
@@ -0,0 +1,221 @@
+/*
+ * This file is part of the Eclipse Virgo project.
+ *
+ * Copyright (c) 2012 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ */
+
+package org.eclipse.virgo.kernel.artifact.fs.internal;
+
+import java.io.BufferedInputStream;
+import java.io.Closeable;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
+import org.eclipse.virgo.kernel.artifact.fs.ArtifactFS;
+import org.eclipse.virgo.kernel.artifact.fs.ArtifactFSEntry;
+
+/**
+ * {@link JarFileArtifactFSEntry} is an {@link ArtifactFSEntry} implementation for JAR file entries.
+ * <p/>
+ * The implementation uses ZipInputStream specifically to avoid JarFile's caching behaviour, inherited from that of
+ * ZipFile. See the note on caching in http://java.sun.com/developer/technicalArticles/Programming/compression/
+ * JarFile's caching behaviour is unsuitable as it produces incorrect results when a JAR file is replaced with a new
+ * version since the cache returns entries from the old version.
+ *
+ * <strong>Concurrent Semantics</strong><br />
+ *
+ * Thread safe
+ */
+final class JarFileArtifactFSEntry implements ArtifactFSEntry {
+
+ private final File file;
+
+ private final String entryName;
+
+ /**
+ * Constructs a new {@link JarFileArtifactFSEntry} for the given file which is assumed to be in JAR format and the
+ * given entry name.
+ *
+ * @param file a JAR file
+ * @param entryName the name of an entry
+ * @throws IOException if the entry cannot be created
+ */
+ JarFileArtifactFSEntry(File file, String entryName) {
+ this.file = file;
+ this.entryName = entryName;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getPath() {
+ return this.entryName;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getName() {
+ String filePath = removeTrailingSlash();
+ int lastDir = filePath.lastIndexOf("/");
+ return filePath.substring(lastDir + 1);
+ }
+
+ private String removeTrailingSlash() {
+ return this.entryName.endsWith("/") ? this.entryName.substring(0, this.entryName.length() - 1) : this.entryName;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean delete() {
+ throw new UnsupportedOperationException("This ArtifactFSEntry is a member of a JAR file. Deleting it is unsupported");
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isDirectory() {
+ ZipEntry zipEntry = findZipEntry();
+ return zipEntry != null ? zipEntry.isDirectory() : false;
+ }
+
+ private ZipEntry findZipEntry() {
+ JarFileScanner scanner = new JarFileScanner();
+ try {
+ ZipEntry entry = scanner.getNextEntry();
+ while (entry != null) {
+ if (this.entryName.equals(entry.getName())) {
+ return entry;
+ }
+ entry = scanner.getNextEntry();
+ }
+ return null;
+ } finally {
+ scanner.close();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public InputStream getInputStream() {
+ JarFileScanner scanner = new JarFileScanner();
+ ZipEntry entry = scanner.getNextEntry();
+ while (entry != null && !this.entryName.equals(entry.getName())) {
+ entry = scanner.getNextEntry();
+ }
+
+ if (entry == null) {
+ scanner.close();
+ throw new UnsupportedOperationException("Cannot open an input stream for a non-existent entry");
+ }
+
+ if (entry.isDirectory()) {
+ scanner.close();
+ throw new UnsupportedOperationException("Cannot open an input stream for a directory");
+ }
+ return scanner.getZipInputStream();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public OutputStream getOutputStream() {
+ throw new UnsupportedOperationException("This ArtifactFSEntry is a member of a JAR file. Writing it is unsupported");
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ArtifactFSEntry[] getChildren() {
+ if (!isDirectory()) {
+ throw new UnsupportedOperationException("Cannot get children of a non-directory entry");
+ }
+ Set<ArtifactFSEntry> children = new HashSet<ArtifactFSEntry>();
+ if (exists()) {
+ JarFileScanner scanner = new JarFileScanner();
+ try {
+ ZipEntry entry = scanner.getNextEntry();
+ while (entry != null) {
+ String childEntry = entry.getName();
+ if (childEntry.length() > this.entryName.length() && childEntry.startsWith(this.entryName)) {
+ children.add(new JarFileArtifactFSEntry(this.file, childEntry));
+ }
+ entry = scanner.getNextEntry();
+ }
+ } finally {
+ scanner.close();
+ }
+ }
+ return children.toArray(new ArtifactFSEntry[children.size()]);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public ArtifactFS getArtifactFS() {
+ throw new UnsupportedOperationException("getArtifactFS method not supported by JarFileArtifactFSEntry");
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean exists() {
+ return findZipEntry() != null;
+ }
+
+ private class JarFileScanner implements Closeable {
+
+ private final ZipInputStream zipInputStream;
+
+ public JarFileScanner() {
+ InputStream is = null;
+ try {
+ is = new BufferedInputStream(new FileInputStream(file));
+ } catch (FileNotFoundException _) {
+ }
+ this.zipInputStream = is == null ? null : new ZipInputStream(is);
+ }
+
+ public ZipEntry getNextEntry() {
+ if (this.zipInputStream != null) {
+ try {
+ return this.zipInputStream.getNextEntry();
+ } catch (IOException _) {
+ }
+ }
+ return null;
+ }
+
+ public ZipInputStream getZipInputStream() {
+ return this.zipInputStream;
+ }
+
+ public void close() {
+ if (this.zipInputStream != null) {
+ try {
+ this.zipInputStream.close();
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ }
+ }
+
+}
diff --git a/org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/internal/BundleManifestUtils.java b/org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/internal/BundleManifestUtils.java
index d5cad092..dd7b68cb 100644
--- a/org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/internal/BundleManifestUtils.java
+++ b/org.eclipse.virgo.kernel.artifact/src/main/java/org/eclipse/virgo/kernel/artifact/internal/BundleManifestUtils.java
@@ -18,40 +18,42 @@ import java.io.InputStreamReader;
import java.io.Reader;
import java.io.StringReader;
import java.io.StringWriter;
-import java.util.jar.JarEntry;
import java.util.jar.JarFile;
+import org.eclipse.virgo.kernel.artifact.fs.ArtifactFS;
+import org.eclipse.virgo.kernel.artifact.fs.ArtifactFSEntry;
+import org.eclipse.virgo.kernel.artifact.fs.internal.JarFileArtifactFS;
import org.eclipse.virgo.util.io.FileCopyUtils;
import org.eclipse.virgo.util.osgi.manifest.BundleManifest;
import org.eclipse.virgo.util.osgi.manifest.BundleManifestFactory;
-
/**
- * Utility methods for working with {@link BundleManifest BundleManifests}.
-
+ * Utility methods for working with {@link BundleManifest BundleManifests}.
+ *
* <p />
- *
+ *
* <strong>Concurrent Semantics</strong><br />
- *
+ *
* Thread-safe.
- *
+ *
*/
public final class BundleManifestUtils {
-
+
/**
- * Reads the <code>BundleManifest</code> from the supplied <code>file</code>. The <code>File</code> can either
- * be a file, i.e. a jar archive, or a directory. If the file is an archive its manifest will only be read
- * if its name ends with one of the supplied <code>archiveSuffixes</code>
- *
+ * Reads the <code>BundleManifest</code> from the supplied <code>file</code>. The <code>File</code> can either be a
+ * file, i.e. a jar archive, or a directory. If the file is an archive its manifest will only be read if its name
+ * ends with one of the supplied <code>archiveSuffixes</code>
+ *
* @param file The file from which the manifest is to be read.
* @param archiveSuffixes The suffixes with which an archive's file name must end
* @return The <code>BundleManifest</code> from the file or <code>null</code> if one was not found.
* @throws IOException Thrown if a manifest is detected but the reading of it fails.
- * @throws SecurityException Thrown if a manifest is detected but the reading of it fails because of signature checks (invalid signature file digest...)
+ * @throws SecurityException Thrown if a manifest is detected but the reading of it fails because of signature
+ * checks (invalid signature file digest...)
*/
public static BundleManifest readBundleManifest(File file, String... archiveSuffixes) throws IOException, SecurityException {
String fileName = file.getName();
-
+
Reader reader = null;
if (file.isDirectory()) {
@@ -66,7 +68,7 @@ public final class BundleManifestUtils {
}
}
}
-
+
if (reader != null) {
return BundleManifestFactory.createBundleManifest(reader);
} else {
@@ -75,30 +77,17 @@ public final class BundleManifestUtils {
}
private static Reader manifestReaderFromJar(File file) throws IOException, SecurityException {
- JarFile jar = null;
- try {
- jar = new JarFile(file);
- JarEntry entry = jar.getJarEntry(JarFile.MANIFEST_NAME);
-
- if (entry == null) {
- return null; // not an error -- no manifest means this isn't a bundle
- }
- StringWriter writer = new StringWriter();
- FileCopyUtils.copy(new InputStreamReader(jar.getInputStream(entry)), writer);
- return new StringReader(writer.toString());
- } catch (SecurityException se) {
- throw new SecurityException(String.format("Failed to read manifest from file '%s'.", file.getName()), se);
- } catch (Exception e) {
- throw new IOException(String.format("Failed to read manifest from file '%s'.", file.getName()), e);
- } finally {
- if (jar != null) {
- try {
- jar.close();
- } catch (IOException ioe) {
- throw new IOException(String.format("Failed to close file '%s'.", file.getName()), ioe);
- }
- }
+ if (!file.exists()) {
+ throw new IOException("File '" + file + "' not found");
+ }
+ ArtifactFS fs = new JarFileArtifactFS(file);
+ ArtifactFSEntry fsEntry = fs.getEntry(JarFile.MANIFEST_NAME);
+ if (fsEntry == null || !fsEntry.exists()) {
+ return null; // not an error -- no manifest means this isn't a bundle
}
+ StringWriter writer = new StringWriter();
+ FileCopyUtils.copy(new InputStreamReader(fsEntry.getInputStream()), writer);
+ return new StringReader(writer.toString());
}
private static Reader manifestReaderFromFile(File file) throws IOException {
diff --git a/org.eclipse.virgo.kernel.artifact/src/test/java/org/eclipse/virgo/kernel/artifact/bundle/BundleBridgeTests.java b/org.eclipse.virgo.kernel.artifact/src/test/java/org/eclipse/virgo/kernel/artifact/bundle/BundleBridgeTests.java
index e8190b8e..b2358e52 100644
--- a/org.eclipse.virgo.kernel.artifact/src/test/java/org/eclipse/virgo/kernel/artifact/bundle/BundleBridgeTests.java
+++ b/org.eclipse.virgo.kernel.artifact/src/test/java/org/eclipse/virgo/kernel/artifact/bundle/BundleBridgeTests.java
@@ -34,23 +34,24 @@ import org.osgi.framework.Version;
/**
* <p>
- * Unit tests for {@link org.eclipse.virgo.kernel.artifact.bundle.BundleBridge BundleBridge}. Uses a combination of real bundle files and
- * static test data.
+ * Unit tests for {@link org.eclipse.virgo.kernel.artifact.bundle.BundleBridge BundleBridge}. Uses a combination of real
+ * bundle files and static test data.
* </p>
- *
+ *
* <strong>Concurrent Semantics</strong><br />
- *
+ *
* Threadsafe test case
- *
+ *
*/
public class BundleBridgeTests {
- //Test Data
+ // Test Data
private final static String ARTEFACT_ATTRIBUTE_NAME = "name";
private final static String ARTEFACT_ATTRIBUTE_VERSION = "version";
- //End Test Data
+
+ // End Test Data
private static BundleBridge BUNDLE_BRIDGE;
@@ -78,18 +79,7 @@ public class BundleBridgeTests {
@Test
public void testBadManifest01() {
- File file = new File("./src/test/resources/wars/testbad01.war");
- try {
- BUNDLE_BRIDGE.generateArtifactDescriptor(file);
- assertTrue("Should throw exception", false);
- } catch (ArtifactGenerationException age) {
- assertEquals("ArtifactType in exception is incorrect", age.getArtifactType(), BundleBridge.BRIDGE_TYPE);
- }
- }
-
- @Test
- public void testBadManifest02() {
- File file = new File("./src/test/resources/wars/testbad02.war");
+ File file = new File("./src/test/resources/wars/testbad01.war"); // contains Erroneous-Data: Bundle-Version
try {
BUNDLE_BRIDGE.generateArtifactDescriptor(file);
assertTrue("Should throw exception", false);
@@ -100,7 +90,8 @@ public class BundleBridgeTests {
@Test
public void testGenerateArtefact() throws ArtifactGenerationException {
- File jarsDirectory = new File("../ivy-cache/repository/org.apache.commons/com.springsource.org.apache.commons.dbcp/1.2.2.osgi/com.springsource.org.apache.commons.dbcp-1.2.2.osgi.jar");
+ File jarsDirectory = new File(
+ "../ivy-cache/repository/org.apache.commons/com.springsource.org.apache.commons.dbcp/1.2.2.osgi/com.springsource.org.apache.commons.dbcp-1.2.2.osgi.jar");
File directoriesDirectory = new File("./src/test/resources/directories");
Set<ArtifactDescriptor> artefacts = new HashSet<ArtifactDescriptor>();
@@ -136,7 +127,8 @@ public class BundleBridgeTests {
@Test
public void testBuildDictionary() throws ArtifactGenerationException, IOException {
- File testFile = new File("../ivy-cache/repository/org.eclipse.virgo.mirrored/javax.servlet/3.0.0.v201112011016/javax.servlet-3.0.0.v201112011016.jar");
+ File testFile = new File(
+ "../ivy-cache/repository/org.eclipse.virgo.mirrored/javax.servlet/3.0.0.v201112011016/javax.servlet-3.0.0.v201112011016.jar");
ArtifactDescriptor inputArtefact = BUNDLE_BRIDGE.generateArtifactDescriptor(testFile);
@@ -198,7 +190,7 @@ public class BundleBridgeTests {
Set<ArtifactDescriptor> artefacts = new HashSet<ArtifactDescriptor>();
for (File fileInDir : directory.listFiles()) {
- if(!fileInDir.getName().endsWith(".jar") && !fileInDir.getName().contains("sources")){
+ if (!fileInDir.getName().endsWith(".jar") && !fileInDir.getName().contains("sources")) {
ArtifactDescriptor artefact = BUNDLE_BRIDGE.generateArtifactDescriptor(fileInDir);
if (artefact != null) {
artefacts.add(BUNDLE_BRIDGE.generateArtifactDescriptor(fileInDir));
diff --git a/org.eclipse.virgo.kernel.artifact/src/test/java/org/eclipse/virgo/kernel/artifact/fs/internal/JarFileArtifactFSRefreshTests.java b/org.eclipse.virgo.kernel.artifact/src/test/java/org/eclipse/virgo/kernel/artifact/fs/internal/JarFileArtifactFSRefreshTests.java
new file mode 100644
index 00000000..9f833a62
--- /dev/null
+++ b/org.eclipse.virgo.kernel.artifact/src/test/java/org/eclipse/virgo/kernel/artifact/fs/internal/JarFileArtifactFSRefreshTests.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package org.eclipse.virgo.kernel.artifact.fs.internal;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Scanner;
+
+import org.eclipse.virgo.kernel.artifact.fs.ArtifactFS;
+import org.eclipse.virgo.kernel.artifact.fs.ArtifactFSEntry;
+import org.eclipse.virgo.util.io.PathReference;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Emulate the file manipulations when refreshing a bundle and test that JarFileArtifactFS does not perform
+ * inappropriate caching.
+ */
+public class JarFileArtifactFSRefreshTests {
+
+ private PathReference testModule;
+
+ private PathReference pr;
+
+ @Before
+ public void setUp() throws Exception {
+ this.pr = new PathReference("./target/redeploy-refresh");
+ this.pr.delete(true);
+ this.pr.createDirectory();
+ this.testModule = this.pr.newChild("simple.module.jar");
+ }
+
+ @Test
+ public void testRefresh() throws Exception {
+ PathReference simpleModule = new PathReference("src/test/resources/refresh/simple.module.jar");
+ simpleModule.copy(this.testModule);
+
+ ArtifactFS artifactFS = new JarFileArtifactFS(new PathReference("./target/redeploy-refresh/simple.module.jar").toFile());
+
+ checkBsn(artifactFS, "simple.module");
+
+ PathReference old = this.pr.newChild("simple.module.jar-past");
+ this.testModule.moveTo(old);
+ new PathReference("src/test/resources/refresh/simple2.module.jar").copy(this.testModule);
+
+ JarFileArtifactFS fs = new JarFileArtifactFS(new PathReference("./target/redeploy-refresh/simple.module.jar").toFile());
+
+ checkBsn(fs, "simple2.module");
+ }
+
+ public void checkBsn(ArtifactFS artifactFS, String bsn) throws IOException {
+ ArtifactFSEntry entry = artifactFS.getEntry("META-INF/MANIFEST.MF");
+ InputStream inputStream = entry.getInputStream();
+ String manifest = new Scanner(inputStream).useDelimiter("\\A").next();
+ assertTrue(manifest.contains(bsn));
+ inputStream.close();
+ }
+
+}
diff --git a/org.eclipse.virgo.kernel.artifact/src/test/java/org/eclipse/virgo/kernel/artifact/fs/internal/JarFileArtifactFSTests.java b/org.eclipse.virgo.kernel.artifact/src/test/java/org/eclipse/virgo/kernel/artifact/fs/internal/JarFileArtifactFSTests.java
new file mode 100644
index 00000000..6bc33e84
--- /dev/null
+++ b/org.eclipse.virgo.kernel.artifact/src/test/java/org/eclipse/virgo/kernel/artifact/fs/internal/JarFileArtifactFSTests.java
@@ -0,0 +1,225 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2010 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package org.eclipse.virgo.kernel.artifact.fs.internal;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Scanner;
+
+import org.eclipse.virgo.kernel.artifact.fs.ArtifactFS;
+import org.eclipse.virgo.kernel.artifact.fs.ArtifactFSEntry;
+import org.junit.Test;
+
+public class JarFileArtifactFSTests {
+
+ private final FileArtifactFS artifactFS = new JarFileArtifactFS(new File("src/test/resources/artifacts/simple.jar"));
+
+ @Test(expected = IllegalArgumentException.class)
+ public void constructorDirectory() {
+ new JarFileArtifactFS(new File("target"));
+ }
+
+ /**
+ * This usage is not expected, but is tested to ensure predictable behaviour.
+ */
+ @Test
+ public void constructorNonJarFile() {
+ ArtifactFS fileArtifactFS = new JarFileArtifactFS(new File("src/test/resources/properties/foo.properties"));
+ File file = fileArtifactFS.getFile();
+ assertEquals("foo.properties", file.getName());
+ ArtifactFSEntry entry = fileArtifactFS.getEntry("");
+ assertTrue(entry instanceof FileArtifactFSEntry);
+ assertFalse(entry instanceof JarFileArtifactFSEntry);
+ ArtifactFSEntry badEntry = fileArtifactFS.getEntry("blah");
+ assertFalse(badEntry.exists());
+ }
+
+ /**
+ * Just in case manifests are somehow special cased in the implementation.
+ */
+ @Test
+ public void getManifestEntry() {
+ ArtifactFSEntry entry = this.artifactFS.getEntry("META-INF/MANIFEST.MF");
+ InputStream inputStream = entry.getInputStream();
+ String manifest = new Scanner(inputStream).useDelimiter("\\A").next();
+ assertEquals(
+ "Manifest-Version: 1.0\nCreated-By: 1.6.0_07 (Apple Inc.)\nBundle-Name: test\nBundle-SymbolicName: test\nBundle-Version: 0.0.0\n\n",
+ manifest);
+ assertEquals("MANIFEST.MF", entry.getName());
+ assertEquals("META-INF/MANIFEST.MF", entry.getPath());
+ }
+
+ @Test
+ public void getNormalEntry() {
+ ArtifactFSEntry entry = this.artifactFS.getEntry("test/rawfile");
+ InputStream inputStream = entry.getInputStream();
+ String rawfile = new Scanner(inputStream).useDelimiter("\\A").next();
+ assertEquals("rawfile", rawfile);
+ assertFalse(entry.isDirectory());
+ assertEquals("rawfile", entry.getName());
+ assertEquals("test/rawfile", entry.getPath());
+ assertTrue(entry.exists());
+ }
+
+ @Test(expected = UnsupportedOperationException.class)
+ public void getOutputStream() {
+ ArtifactFSEntry entry = this.artifactFS.getEntry("test/rawfile");
+ entry.getOutputStream();
+ }
+
+ @Test(expected = UnsupportedOperationException.class)
+ public void delete() {
+ ArtifactFSEntry entry = this.artifactFS.getEntry("test/rawfile");
+ entry.delete();
+ }
+
+ @Test(expected = UnsupportedOperationException.class)
+ public void getEntryArtifactFS() {
+ this.artifactFS.getFile();
+ ArtifactFSEntry entry = this.artifactFS.getEntry("test/rawfile");
+ entry.getArtifactFS();
+ }
+
+ @Test
+ public void getDirectoryEntry() {
+ ArtifactFSEntry entry = this.artifactFS.getEntry("test/");
+ assertTrue(entry.isDirectory());
+ assertEquals("test", entry.getName());
+ assertEquals("test/", entry.getPath());
+ assertTrue(entry.exists());
+ }
+
+ @Test(expected = UnsupportedOperationException.class)
+ public void getDirectoryInputStream() throws IOException {
+ ArtifactFSEntry entry = this.artifactFS.getEntry("test/");
+ entry.getInputStream();
+ }
+
+ @Test
+ public void getDirectoryChildren() {
+ ArtifactFSEntry entry = this.artifactFS.getEntry("test/");
+ ArtifactFSEntry[] children = entry.getChildren();
+ assertEquals(1, children.length);
+ assertEquals("rawfile", children[0].getName());
+ }
+
+ @Test(expected = UnsupportedOperationException.class)
+ public void getFileChildren() {
+ ArtifactFSEntry entry = this.artifactFS.getEntry("test/rawfile");
+ ArtifactFSEntry[] children = entry.getChildren();
+ assertEquals(0, children.length);
+ }
+
+ @Test(expected = UnsupportedOperationException.class)
+ public void getChildrenOfNonExistentFile() {
+ ArtifactFSEntry entry = this.artifactFS.getEntry("x/nosuch");
+ ArtifactFSEntry[] children = entry.getChildren();
+ assertEquals(0, children.length);
+ }
+
+ @Test
+ public void getPathOfNonExistentFile() {
+ ArtifactFSEntry entry = this.artifactFS.getEntry("x/nosuch");
+ assertEquals("x/nosuch", entry.getPath());
+ }
+
+ @Test
+ public void getNameOfNonExistentFile() {
+ ArtifactFSEntry entry = this.artifactFS.getEntry("x/nosuch");
+ assertEquals("nosuch", entry.getName());
+ }
+
+ @Test
+ public void isDirectoryOfNonExistentFile() {
+ ArtifactFSEntry entry = this.artifactFS.getEntry("x/nosuch");
+ assertFalse(entry.isDirectory());
+ }
+
+ @Test(expected = UnsupportedOperationException.class)
+ public void getInputStreamOfNonExistentFile() {
+ ArtifactFSEntry entry = this.artifactFS.getEntry("x/nosuch");
+ entry.getInputStream();
+ }
+
+ @Test
+ public void getExistenceOfNonExistentFile() {
+ ArtifactFSEntry entry = this.artifactFS.getEntry("x/nosuch");
+ assertFalse(entry.exists());
+ }
+
+ @Test(expected = UnsupportedOperationException.class)
+ public void getChildrenOfNonExistentDirectory() {
+ ArtifactFSEntry entry = this.artifactFS.getEntry("x/nosuch/");
+ ArtifactFSEntry[] children = entry.getChildren();
+ assertEquals(0, children.length);
+ }
+
+ @Test
+ public void getPathOfNonExistentDirectory() {
+ ArtifactFSEntry entry = this.artifactFS.getEntry("x/nosuch/");
+ assertEquals("x/nosuch/", entry.getPath());
+ }
+
+ @Test
+ public void getNameOfNonExistentDirectory() {
+ ArtifactFSEntry entry = this.artifactFS.getEntry("x/nosuch/");
+ assertEquals("nosuch", entry.getName());
+ }
+
+ @Test
+ public void isDirectoryOfNonExistentDirectory() {
+ ArtifactFSEntry entry = this.artifactFS.getEntry("x/nosuch/");
+ assertFalse(entry.isDirectory());
+ }
+
+ @Test(expected = UnsupportedOperationException.class)
+ public void getInputStreamOfNonExistentDirectory() {
+ ArtifactFSEntry entry = this.artifactFS.getEntry("x/nosuch/");
+ entry.getInputStream();
+ }
+
+ @Test
+ public void getExistenceOfNonExistentDirectory() {
+ ArtifactFSEntry entry = this.artifactFS.getEntry("x/nosuch/");
+ assertFalse(entry.exists());
+ }
+
+ @Test
+ public void getEntryNull() {
+ assertTrue(this.artifactFS.getEntry(null) instanceof FileArtifactFSEntry);
+ }
+
+ @Test
+ public void getFile() {
+ File file = this.artifactFS.getFile();
+ assertEquals("simple.jar", file.getName());
+ }
+
+ @Test
+ public void testDirectory() {
+ ArtifactFS artifactFS = new JarFileArtifactFS(new File("src/test/resources/artifacts/bundle.jar"));
+ ArtifactFSEntry dir = artifactFS.getEntry("META-INF/spring/");
+ assertTrue(dir.exists());
+ ArtifactFSEntry[] files = dir.getChildren();
+ assertEquals(1, files.length);
+ ArtifactFSEntry entry = files[0];
+ InputStream inputStream = entry.getInputStream();
+ String contents = new Scanner(inputStream).useDelimiter("\\A").next();
+ assertTrue(contents.startsWith("<beans xmlns=\"http://www.springframework.org/schema/beans\""));
+ }
+
+}
diff --git a/org.eclipse.virgo.kernel.artifact/src/test/resources/artifacts/bundle.jar b/org.eclipse.virgo.kernel.artifact/src/test/resources/artifacts/bundle.jar
new file mode 100644
index 00000000..1de4b411
--- /dev/null
+++ b/org.eclipse.virgo.kernel.artifact/src/test/resources/artifacts/bundle.jar
Binary files differ
diff --git a/org.eclipse.virgo.kernel.artifact/src/test/resources/refresh/simple.module.jar b/org.eclipse.virgo.kernel.artifact/src/test/resources/refresh/simple.module.jar
new file mode 100644
index 00000000..a1738c44
--- /dev/null
+++ b/org.eclipse.virgo.kernel.artifact/src/test/resources/refresh/simple.module.jar
Binary files differ
diff --git a/org.eclipse.virgo.kernel.artifact/src/test/resources/refresh/simple2.module.jar b/org.eclipse.virgo.kernel.artifact/src/test/resources/refresh/simple2.module.jar
new file mode 100644
index 00000000..cefbadbf
--- /dev/null
+++ b/org.eclipse.virgo.kernel.artifact/src/test/resources/refresh/simple2.module.jar
Binary files differ
diff --git a/org.eclipse.virgo.kernel.artifact/src/test/resources/wars/testbad02.war b/org.eclipse.virgo.kernel.artifact/src/test/resources/wars/testbad02.war
deleted file mode 100644
index 4b90d403..00000000
--- a/org.eclipse.virgo.kernel.artifact/src/test/resources/wars/testbad02.war
+++ /dev/null
@@ -1 +0,0 @@
-This is not a war file really \ No newline at end of file
diff --git a/org.eclipse.virgo.kernel.deployer.dm/.classpath b/org.eclipse.virgo.kernel.deployer.dm/.classpath
index 902d59f4..3628cb93 100644
--- a/org.eclipse.virgo.kernel.deployer.dm/.classpath
+++ b/org.eclipse.virgo.kernel.deployer.dm/.classpath
@@ -32,7 +32,7 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.5.RELEASE/org.springframework.core-3.0.5.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.5.RELEASE/org.springframework.core-sources-3.0.5.RELEASE.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.deployer"/>
<classpathentry kind="con" path="org.eclipse.ajdt.core.ASPECTJRT_CONTAINER"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20120711093918/org.eclipse.virgo.medic-3.6.0.D-20120711093918.jar">
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20120717201225/org.eclipse.virgo.medic-3.6.0.D-20120717201225.jar">
<attributes>
<attribute name="org.eclipse.ajdt.aspectpath" value="org.eclipse.ajdt.aspectpath"/>
</attributes>
@@ -42,6 +42,6 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.aopalliance/com.springsource.org.aopalliance/1.0.0/com.springsource.org.aopalliance-1.0.0.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-sources-2.3.0.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.dmfragment"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.kernel.core/3.6.0.D-20120711095111/org.eclipse.virgo.kernel.core-3.6.0.D-20120711095111.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.kernel.core/3.6.0.D-20120727121316/org.eclipse.virgo.kernel.core-3.6.0.D-20120727121316.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.deployer.test/.classpath b/org.eclipse.virgo.kernel.deployer.test/.classpath
index 1bce5559..ae2f7143 100644
--- a/org.eclipse.virgo.kernel.deployer.test/.classpath
+++ b/org.eclipse.virgo.kernel.deployer.test/.classpath
@@ -28,18 +28,18 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.orm/3.0.5.RELEASE/org.springframework.orm-3.0.5.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.orm/3.0.5.RELEASE/org.springframework.orm-sources-3.0.5.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.transaction/3.0.5.RELEASE/org.springframework.transaction-3.0.5.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.transaction/3.0.5.RELEASE/org.springframework.transaction-sources-3.0.5.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.blueprint.core/1.0.0.RELEASE/org.eclipse.gemini.blueprint.core-1.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.blueprint.core/1.0.0.RELEASE/org.eclipse.gemini.blueprint.core-sources-1.0.0.RELEASE.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.D-20120711093140/org.eclipse.virgo.util.io-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.5.0.D-20120615065828/org.eclipse.virgo.util.io-sources-3.5.0.D-20120615065828.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.6.0.D-20120711093140/org.eclipse.virgo.util.math-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.5.0.D-20120615065828/org.eclipse.virgo.util.math-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.D-20120717181632/org.eclipse.virgo.util.io-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.5.0.D-20120615065828/org.eclipse.virgo.util.io-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.6.0.D-20120717181632/org.eclipse.virgo.util.math-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.5.0.D-20120615065828/org.eclipse.virgo.util.math-sources-3.5.0.D-20120615065828.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi/3.8.0.v20120508-2119/org.eclipse.osgi-3.8.0.v20120508-2119.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.1.R37x_v20110808-1106/org.eclipse.osgi-sources-3.7.1.R37x_v20110808-1106.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/javax.transaction/1.1.1.v201105210645/javax.transaction-1.1.1.v201105210645.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.6.0.D-20120711094540/org.eclipse.virgo.repository-3.6.0.D-20120711094540.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.5.0.D-20120615071313/org.eclipse.virgo.repository-sources-3.5.0.D-20120615071313.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.6.0.D-20120711093140/org.eclipse.virgo.util.common-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.5.0.D-20120615065828/org.eclipse.virgo.util.common-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.6.0.D-20120717202028/org.eclipse.virgo.repository-3.6.0.D-20120717202028.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.5.0.D-20120615071313/org.eclipse.virgo.repository-sources-3.5.0.D-20120615071313.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.6.0.D-20120717181632/org.eclipse.virgo.util.common-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.5.0.D-20120615065828/org.eclipse.virgo.util.common-sources-3.5.0.D-20120615065828.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.osgi"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.test/org.eclipse.virgo.test.framework/3.6.0.D-20120711093701/org.eclipse.virgo.test.framework-3.6.0.D-20120711093701.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.test/org.eclipse.virgo.test.framework/3.5.0.D-20120301131734/org.eclipse.virgo.test.framework-sources-3.5.0.D-20120301131734.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.test/org.eclipse.virgo.test.framework/3.6.0.D-20120717182335/org.eclipse.virgo.test.framework-3.6.0.D-20120717182335.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.test/org.eclipse.virgo.test.framework/3.5.0.D-20120301131734/org.eclipse.virgo.test.framework-sources-3.5.0.D-20120301131734.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.launcher/3.6.0.D-20120711092707/org.eclipse.virgo.osgi.launcher-3.6.0.D-20120711092707.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.launcher/3.5.0.D-20120615065435/org.eclipse.virgo.osgi.launcher-sources-3.5.0.D-20120615065435.jar"/>
<classpathentry kind="src" path="/org.eclipse.virgo.kernel.model"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi.services/3.3.0.v20120307-2102/org.eclipse.osgi.services-3.3.0.v20120307-2102.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20110513/org.eclipse.osgi.services-sources-3.3.0.v20110513.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.equinox.region/1.1.0.v20120319-1602/org.eclipse.equinox.region-1.1.0.v20120319-1602.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.deployer.api/3.6.0.D-20120711095111/org.eclipse.virgo.deployer.api-3.6.0.D-20120711095111.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.deployer.api/3.6.0.D-20120727121316/org.eclipse.virgo.deployer.api-3.6.0.D-20120727121316.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/DMSPlanDeploymentTests.java b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/DMSPlanDeploymentTests.java
index 93017532..c6c15495 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/DMSPlanDeploymentTests.java
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/DMSPlanDeploymentTests.java
@@ -31,6 +31,7 @@ import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleException;
import org.osgi.framework.ServiceReference;
import org.osgi.service.cm.Configuration;
import org.osgi.service.cm.ConfigurationAdmin;
@@ -118,6 +119,8 @@ public class DMSPlanDeploymentTests extends AbstractDeployerIntegrationTest {
if (propertiesFile != null) {
checkConfigUnavailable(pid);
}
+
+ uninstallBundles(afterUndeployBundles, "simple.fragment.one");
}
private void assertBundlesNotInstalled(Bundle[] bundles, String... candidateBsns) {
@@ -131,6 +134,20 @@ public class DMSPlanDeploymentTests extends AbstractDeployerIntegrationTest {
}
}
+ private void uninstallBundles(Bundle[] bundles, String... uninstallBsns) {
+ for (Bundle bundle : bundles) {
+ String symbolicName = bundle.getSymbolicName();
+ for (String uninstallBsn : uninstallBsns) {
+ if (uninstallBsn.equals(symbolicName)) {
+ try {
+ bundle.uninstall();
+ } catch (BundleException _) {
+ }
+ }
+ }
+ }
+ }
+
private void checkConfigAvailable(String pid, File propertiesFile) throws IOException {
Configuration configuration = this.configAdmin.getConfiguration(pid, null);
Dictionary<String, Object> dictionary = configuration.getProperties();
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/DeployerEdgeTests.java b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/DeployerEdgeTests.java
index 8777c965..99037a11 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/DeployerEdgeTests.java
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/DeployerEdgeTests.java
@@ -263,17 +263,4 @@ public class DeployerEdgeTests extends AbstractDeployerIntegrationTest {
this.appDeployer.deploy(dirURI);
}
- @Test(expected = DeploymentException.class)
- public void testWar() throws Exception {
- URI warURI = new File("src/test/resources/waralientokernel.war").toURI();
-
- this.appDeployer.deploy(warURI);
- }
-
- @Test(expected = DeploymentException.class)
- public void testInvalidDigest() throws Exception {
- URI warURI = new File("src/test/resources/invalidDigest.jar").toURI();
-
- this.appDeployer.deploy(warURI);
- }
}
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/PlanDeploymentTests.java b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/PlanDeploymentTests.java
index ff3d1262..062561d1 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/PlanDeploymentTests.java
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/PlanDeploymentTests.java
@@ -142,6 +142,8 @@ public class PlanDeploymentTests extends AbstractDeployerIntegrationTest {
if (propertiesFile != null) {
checkConfigUnavailable(pid);
}
+
+ uninstallBundles(afterUndeployBundles, "simple.fragment.one");
}
private void testPlanDeploymentStartingEvents(File plan, String... candidateBsns) throws Exception {
@@ -179,8 +181,24 @@ public class PlanDeploymentTests extends AbstractDeployerIntegrationTest {
this.deployer.undeploy(deploymentIdentity);
Bundle[] afterUndeployBundles = this.context.getBundles();
assertBundlesNotInstalled(afterUndeployBundles, candidateBsns);
+
+ uninstallBundles(afterUndeployBundles, "simple.fragment.one");
}
-
+
+ private void uninstallBundles(Bundle[] bundles, String... uninstallBsns) {
+ for (Bundle bundle : bundles) {
+ String symbolicName = bundle.getSymbolicName();
+ for (String uninstallBsn : uninstallBsns) {
+ if (uninstallBsn.equals(symbolicName)) {
+ try {
+ bundle.uninstall();
+ } catch (BundleException _) {
+ }
+ }
+ }
+ }
+ }
+
private class StartBundleRunnable implements Runnable {
BundleContext context = null;
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/config/org.eclipse.virgo.kernel.properties b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/config/org.eclipse.virgo.kernel.properties
index 9d192332..50e50309 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/config/org.eclipse.virgo.kernel.properties
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/config/org.eclipse.virgo.kernel.properties
@@ -1,3 +1,5 @@
deployer.timeout= 300
deployer.pickupDirectory= target/pickup
deployer.systemArtifacts=
+deployer.unpackBundles=false
+
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/deployer-log-message-tests/malformed-application-context.par b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/deployer-log-message-tests/malformed-application-context.par
index 4cad753d..3222f4cc 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/deployer-log-message-tests/malformed-application-context.par
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/deployer-log-message-tests/malformed-application-context.par
Binary files differ
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/invalidDigest.jar b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/invalidDigest.jar
deleted file mode 100644
index a046c15c..00000000
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/invalidDigest.jar
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/waralientokernel.war b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/waralientokernel.war
deleted file mode 100644
index e69de29b..00000000
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/waralientokernel.war
+++ /dev/null
diff --git a/org.eclipse.virgo.kernel.deployer/.classpath b/org.eclipse.virgo.kernel.deployer/.classpath
index 7d630461..e29fe379 100644
--- a/org.eclipse.virgo.kernel.deployer/.classpath
+++ b/org.eclipse.virgo.kernel.deployer/.classpath
@@ -27,8 +27,8 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.6.0.D-20120711093140/org.eclipse.virgo.util.common-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.5.0.D-20120615065828/org.eclipse.virgo.util.common-sources-3.5.0.D-20120615065828.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.D-20120711093140/org.eclipse.virgo.util.io-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.5.0.D-20120615065828/org.eclipse.virgo.util.io-sources-3.5.0.D-20120615065828.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.6.0.D-20120711093140/org.eclipse.virgo.util.math-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.5.0.D-20120615065828/org.eclipse.virgo.util.math-sources-3.5.0.D-20120615065828.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.6.0.D-20120711093140/org.eclipse.virgo.util.osgi.manifest-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.5.0.D-20120615065828/org.eclipse.virgo.util.osgi.manifest-sources-3.5.0.D-20120615065828.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.6.0.D-20120711093140/org.eclipse.virgo.util.parser.manifest-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.5.0.D-20120615065828/org.eclipse.virgo.util.parser.manifest-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.6.0.D-20120711093140/org.eclipse.virgo.util.osgi.manifest-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.6.0.D-20120711093140/org.eclipse.virgo.util.osgi.manifest-sources-3.6.0.D-20120711093140.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.6.0.D-20120711093140/org.eclipse.virgo.util.parser.manifest-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.6.0.D-20120711093140/org.eclipse.virgo.util.parser.manifest-sources-3.6.0.D-20120711093140.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi/3.8.0.v20120508-2119/org.eclipse.osgi-3.8.0.v20120508-2119.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.1.R37x_v20110808-1106/org.eclipse.osgi-sources-3.7.1.R37x_v20110808-1106.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.extensions.equinox/3.6.0.D-20120711092707/org.eclipse.virgo.osgi.extensions.equinox-3.6.0.D-20120711092707.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.extensions.equinox/3.5.0.D-20120615065435/org.eclipse.virgo.osgi.extensions.equinox-sources-3.5.0.D-20120615065435.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.5.RELEASE/org.springframework.beans-3.0.5.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.5.RELEASE/org.springframework.beans-sources-3.0.5.RELEASE.jar"/>
@@ -36,14 +36,14 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.5.RELEASE/org.springframework.context-3.0.5.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.5.RELEASE/org.springframework.context-sources-3.0.5.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.blueprint.core/1.0.0.RELEASE/org.eclipse.gemini.blueprint.core-1.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.blueprint.core/1.0.0.RELEASE/org.eclipse.gemini.blueprint.core-sources-1.0.0.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.blueprint.extender/1.0.0.RELEASE/org.eclipse.gemini.blueprint.extender-1.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.blueprint.extender/1.0.0.RELEASE/org.eclipse.gemini.blueprint.extender-sources-1.0.0.RELEASE.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.6.0.D-20120711094540/org.eclipse.virgo.repository-3.6.0.D-20120711094540.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.5.0.D-20120615071313/org.eclipse.virgo.repository-sources-3.5.0.D-20120615071313.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.6.0.D-20120717202028/org.eclipse.virgo.repository-3.6.0.D-20120717202028.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.5.0.D-20120615071313/org.eclipse.virgo.repository-sources-3.5.0.D-20120615071313.jar"/>
<classpathentry kind="con" path="org.eclipse.ajdt.core.ASPECTJRT_CONTAINER"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20120711093918/org.eclipse.virgo.medic-3.6.0.D-20120711093918.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.5.0.D-20120615070622/org.eclipse.virgo.medic-sources-3.5.0.D-20120615070622.jar">
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20120717201225/org.eclipse.virgo.medic-3.6.0.D-20120717201225.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.5.0.D-20120615070622/org.eclipse.virgo.medic-sources-3.5.0.D-20120615070622.jar">
<attributes>
<attribute name="org.eclipse.ajdt.aspectpath" value="org.eclipse.ajdt.aspectpath"/>
</attributes>
</classpathentry>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/3.6.0.D-20120711093918/org.eclipse.virgo.medic.core-3.6.0.D-20120711093918.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/3.5.0.D-20120615070622/org.eclipse.virgo.medic.core-sources-3.5.0.D-20120615070622.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/3.6.0.D-20120717201225/org.eclipse.virgo.medic.core-3.6.0.D-20120717201225.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/3.5.0.D-20120615070622/org.eclipse.virgo.medic.core-sources-3.5.0.D-20120615070622.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.slf4j.api/1.6.4.v20120130-2120/org.slf4j.api-1.6.4.v20120130-2120.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-sources-1.6.1.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.6.0.D-20120711093918/org.eclipse.virgo.medic.test-3.6.0.D-20120711093918.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.5.0.D-20120615070622/org.eclipse.virgo.medic.test-sources-3.5.0.D-20120615070622.jar"/>
@@ -53,9 +53,9 @@
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.services"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.artifact"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.equinox.event/1.2.100.v20111010-1614/org.eclipse.equinox.event-1.2.100.v20111010-1614.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.deployer.api/3.6.0.D-20120711095111/org.eclipse.virgo.deployer.api-3.6.0.D-20120711095111.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.deployer.api/3.5.0.D-20120615071853/org.eclipse.virgo.deployer.api-sources-3.5.0.D-20120615071853.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.deployer.hot/3.6.0.D-20120711095111/org.eclipse.virgo.deployer.hot-3.6.0.D-20120711095111.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.kernel.core/3.6.0.D-20120711095111/org.eclipse.virgo.kernel.core-3.6.0.D-20120711095111.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.deployer.api/3.6.0.D-20120727121316/org.eclipse.virgo.deployer.api-3.6.0.D-20120727121316.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.deployer.api/3.5.0.D-20120615071853/org.eclipse.virgo.deployer.api-sources-3.5.0.D-20120615071853.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.deployer.hot/3.6.0.D-20120727121316/org.eclipse.virgo.deployer.hot-3.6.0.D-20120727121316.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.kernel.core/3.6.0.D-20120727121316/org.eclipse.virgo.kernel.core-3.6.0.D-20120727121316.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi.services/3.3.0.v20120307-2102/org.eclipse.osgi.services-3.3.0.v20120307-2102.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20110513/org.eclipse.osgi.services-sources-3.3.0.v20110513.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/AbstractArtifactStore.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/AbstractArtifactStore.java
new file mode 100644
index 00000000..2db44d82
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/AbstractArtifactStore.java
@@ -0,0 +1,44 @@
+
+package org.eclipse.virgo.kernel.install.artifact.internal;
+
+import org.eclipse.virgo.util.io.PathReference;
+
+public abstract class AbstractArtifactStore implements ArtifactStore {
+
+ private boolean saved = false;
+
+ protected final Object monitor = new Object();
+
+ public AbstractArtifactStore(PathReference basePathReference) {
+ if (basePathReference == null) {
+ throw new IllegalArgumentException("Null path");
+ }
+ if ("".equals(basePathReference.getName())) {
+ throw new IllegalArgumentException("Empty filename");
+ }
+ }
+
+ public abstract PathReference getCurrentPath();
+
+ public void save() {
+ synchronized (this.monitor) {
+ this.saved = true;
+ PathReference currentPathReference = getCurrentPath();
+ currentPathReference.getParent().createDirectory();
+ currentPathReference.delete(true);
+ }
+ }
+
+ public void restore() {
+ synchronized (this.monitor) {
+ if (!this.saved) {
+ throw new IllegalStateException("No saved artifact available");
+ }
+ getCurrentPath().delete(true);
+ this.saved = false;
+ }
+ }
+
+ protected abstract PathReference getSavedPath();
+
+} \ No newline at end of file
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/ArtifactStore.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/ArtifactStore.java
new file mode 100644
index 00000000..711f6c0e
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/ArtifactStore.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2012 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package org.eclipse.virgo.kernel.install.artifact.internal;
+
+import org.eclipse.virgo.util.io.PathReference;
+
+/**
+ * {@link ArtifactStore} manages the disk storage used to hold a working copy of an artifact. When updating the
+ * artifact, the old version of the artifact is saved in case the update operation fails and the artifact needs to be
+ * restored to the old version (in which case the new version is deleted). At most one saved version is maintained to
+ * conserve disk space if the artifact is updated multiple times.
+ * <p />
+ * An implementation of this interface may expose a single current path and save the artifact by moving it, it may
+ * create a series of paths without moving the artifact, or it may use another approach.
+ * <p />
+ * <strong>Concurrent Semantics</strong><br />
+ * Implementations of this interface need not be thread safe.
+ */
+interface ArtifactStore {
+
+ /**
+ * Gets the current artifact path.
+ *
+ * @return a {@link PathReference} to the current artifact path.
+ */
+ public PathReference getCurrentPath();
+
+ /**
+ * Saves the current artifact and prepares the current artifact path storage ready for the new artifact. Only one
+ * saved version is kept: any previously saved version is deleted.
+ */
+ public void save();
+
+ /**
+ * Deletes the current artifact and restores the saved version. The new current artifact has the same path as when
+ * it was last current.
+ */
+ public void restore();
+
+} \ No newline at end of file
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/FileMovingArtifactStore.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/FileMovingArtifactStore.java
new file mode 100644
index 00000000..5e17bb75
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/FileMovingArtifactStore.java
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2012 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package org.eclipse.virgo.kernel.install.artifact.internal;
+
+import org.eclipse.virgo.util.io.PathReference;
+
+/**
+ * {@link FileMovingArtifactStore} implements {@link ArtifactStore} and saves its artifact by moving it to another
+ * location on disk.
+ * <p />
+ *
+ * <strong>Concurrent Semantics</strong><br />
+ * Thread safe.
+ */
+final class FileMovingArtifactStore extends AbstractArtifactStore implements ArtifactStore {
+
+ private final PathReference currentPath;
+
+ private final PathReference savedPath;
+
+ /**
+ * Constructs a {@link FileMovingArtifactStore} at the specified path and prepares the path storage ready for the
+ * new artifact.
+ */
+ FileMovingArtifactStore(PathReference basePathReference) {
+ super(basePathReference);
+ this.currentPath = basePathReference;
+ this.savedPath = new PathReference(String.format("%s-saved", this.currentPath.getAbsolutePath()));
+
+ this.currentPath.getParent().createDirectory();
+ this.currentPath.delete(true);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void save() {
+ if (this.currentPath.exists()) {
+ this.savedPath.delete(true);
+ this.currentPath.moveTo(this.savedPath);
+ }
+ super.save();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void restore() {
+ super.restore();
+ if (this.savedPath.exists()) {
+ this.savedPath.moveTo(this.currentPath);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public PathReference getCurrentPath() {
+ return this.currentPath;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected PathReference getSavedPath() {
+ return this.savedPath;
+ }
+
+}
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/GenerationalArtifactStore.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/GenerationalArtifactStore.java
new file mode 100644
index 00000000..c74b5567
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/GenerationalArtifactStore.java
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * Copyright (c) 2012 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package org.eclipse.virgo.kernel.install.artifact.internal;
+
+import org.eclipse.virgo.util.io.PathReference;
+
+/**
+ * {@link GenerationalArtifactStore} implements {@link ArtifactStore} by creating a series of paths so that each version
+ * of the artifact has a fresh path (unless the series wraps which is extremely unlikely in practice). This is designed
+ * for storing a bundle which will be installed by reference into the OSGi framework since, when the bundle is updated,
+ * the current version of the bundle may be in use until the bundle becomes unresolved.
+ * <p />
+ *
+ * <strong>Concurrent Semantics</strong><br />
+ * TODO Document concurrent semantics of GenerationalArtifactStore
+ */
+final class GenerationalArtifactStore extends AbstractArtifactStore implements ArtifactStore {
+
+ private final PathReference baseDirectory;
+
+ private long generation = 0;
+
+ private final String baseName;
+
+ /**
+ * Constructs a {@link GenerationalArtifactStore} in the directory of the specified path and prepares the path
+ * storage ready for the new artifact. Each path produced by this store has the same filename as the specified path.
+ */
+ GenerationalArtifactStore(PathReference basePathReference) {
+ super(basePathReference);
+ this.baseDirectory = basePathReference.getParent();
+ this.baseName = basePathReference.getName();
+
+ PathReference currentPathReference = getGenerationPath(this.generation, this.baseDirectory, this.baseName);
+ currentPathReference.getParent().createDirectory();
+ currentPathReference.delete(true);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public PathReference getCurrentPath() {
+ synchronized (this.monitor) {
+ return getGenerationPath(this.generation);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void save() {
+ synchronized (this.monitor) {
+ if (this.generation != 0) {
+ getSavedPath().delete(true);
+ }
+ this.generation++;
+ super.save();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void restore() {
+ synchronized (this.monitor) {
+ super.restore();
+ this.generation--;
+ }
+ }
+
+ protected PathReference getSavedPath() {
+ return getGenerationPath(this.generation - 1);
+ }
+
+ private PathReference getGenerationPath(long generation) {
+ return getGenerationPath(generation, this.baseDirectory, this.baseName);
+ }
+
+ private static PathReference getGenerationPath(long generation, PathReference baseDirectory, String baseName) {
+ return baseDirectory.newChild(Long.toString(generation)).newChild(baseName);
+ }
+
+}
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardArtifactStorage.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardArtifactStorage.java
index 013746ec..0a072581 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardArtifactStorage.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardArtifactStorage.java
@@ -17,115 +17,117 @@ import java.util.Arrays;
import java.util.List;
import java.util.Locale;
-
import org.eclipse.virgo.kernel.artifact.fs.ArtifactFS;
import org.eclipse.virgo.kernel.artifact.fs.ArtifactFSFactory;
import org.eclipse.virgo.kernel.deployer.core.DeployerLogEvents;
import org.eclipse.virgo.kernel.install.artifact.ArtifactStorage;
import org.eclipse.virgo.medic.eventlog.EventLogger;
-import org.eclipse.virgo.util.io.FatalIOException;
import org.eclipse.virgo.util.io.JarUtils;
import org.eclipse.virgo.util.io.PathReference;
final class StandardArtifactStorage implements ArtifactStorage {
-
- private static final List<String> JAR_EXTENSIONS = Arrays.asList("jar", "war", "par", "zip");
- private final PathReference sourcePathReference;
+ private static final String DEPLOYER_UNPACK_BUNDLES_TRUE = "true";
+
+ private static final List<String> CONSTANT_PATH_EXTENSIONS = Arrays.asList("par", "zip");
- private final PathReference baseStagingPathReference;
+ private static final List<String> ALWAYS_UNPACKED_EXTENSIONS = Arrays.asList("par", "zip");
- private final PathReference pastStagingPathReference;
+ private static final List<String> CONFIGURABLY_UNPACKED_EXTENSIONS = Arrays.asList("jar", "war");
+
+ private final PathReference sourcePathReference;
- private volatile ArtifactFS artifactFS;
+ private final ArtifactFSFactory artifactFSFactory;
private final EventLogger eventLogger;
- private final Object monitor = new Object();
+ private final boolean unpackBundles;
+
+ private final ArtifactStore pathGenerator;
public StandardArtifactStorage(PathReference sourcePathReference, PathReference baseStagingPathReference, ArtifactFSFactory artifactFSFactory,
- EventLogger eventLogger) {
+ EventLogger eventLogger, String unpackBundlesOption) {
this.sourcePathReference = sourcePathReference;
- this.baseStagingPathReference = baseStagingPathReference;
- this.pastStagingPathReference = new PathReference(String.format("%s-past", this.baseStagingPathReference.getAbsolutePath()));
+ this.artifactFSFactory = artifactFSFactory;
this.eventLogger = eventLogger;
- synchronize();
- this.artifactFS = artifactFSFactory.create(this.baseStagingPathReference.toFile());
+ this.unpackBundles = unpackBundlesOption == null || DEPLOYER_UNPACK_BUNDLES_TRUE.equalsIgnoreCase(unpackBundlesOption);
+
+ this.pathGenerator = CONSTANT_PATH_EXTENSIONS.contains(getFileExtension(sourcePathReference)) ? new FileMovingArtifactStore(
+ baseStagingPathReference) : new GenerationalArtifactStore(baseStagingPathReference);
+
+ synchronize(this.sourcePathReference);
}
+ @Override
public void synchronize() {
+ this.pathGenerator.save();
synchronize(this.sourcePathReference);
}
+ @Override
public ArtifactFS getArtifactFS() {
- return this.artifactFS;
+ return this.artifactFSFactory.create(this.pathGenerator.getCurrentPath().toFile());
}
+ @Override
public void synchronize(URI sourceUri) {
+ this.pathGenerator.save();
synchronize(new PathReference(sourceUri));
}
+ @Override
public void rollBack() {
- synchronized (this.monitor) {
- unstashContent();
- }
+ this.pathGenerator.restore();
}
+ @Override
public void delete() {
- this.baseStagingPathReference.delete(true);
+ PathReference currentPathReference = this.pathGenerator.getCurrentPath();
+ currentPathReference.delete(true);
}
private void synchronize(PathReference normalizedSourcePathReference) {
- synchronized (this.monitor) {
- stashContent();
- if (normalizedSourcePathReference != null && !normalizedSourcePathReference.isDirectory()
- && looksLikeAJar(normalizedSourcePathReference.getName())) {
- try {
- JarUtils.unpackTo(normalizedSourcePathReference, this.baseStagingPathReference);
- } catch (IOException e) {
- this.eventLogger.log(DeployerLogEvents.JAR_UNPACK_ERROR, e, normalizedSourcePathReference);
- throw new RuntimeException(String.format("Exception unpacking '%s'", normalizedSourcePathReference), e);
- }
- } else if (normalizedSourcePathReference != null) {
- this.baseStagingPathReference.getParent().createDirectory();
- normalizedSourcePathReference.copy(this.baseStagingPathReference, true);
- } else {
- this.baseStagingPathReference.createDirectory();
+ PathReference currentPathReference = this.pathGenerator.getCurrentPath();
+
+ if (normalizedSourcePathReference != null && !normalizedSourcePathReference.isDirectory() && needsUnpacking(normalizedSourcePathReference)) {
+ try {
+ JarUtils.unpackTo(normalizedSourcePathReference, currentPathReference);
+ } catch (IOException e) {
+ this.eventLogger.log(DeployerLogEvents.JAR_UNPACK_ERROR, e, normalizedSourcePathReference);
+ throw new RuntimeException(String.format("Exception unpacking '%s'", normalizedSourcePathReference), e);
}
+ } else if (normalizedSourcePathReference != null) {
+ normalizedSourcePathReference.copy(currentPathReference, true);
+ } else {
+ currentPathReference.createDirectory();
}
}
- private boolean looksLikeAJar(String name) {
- String fileName = name.toLowerCase(Locale.ENGLISH);
-
- int dotLocation = fileName.lastIndexOf('.');
- if (dotLocation == -1) {
+ private boolean needsUnpacking(PathReference pathReference) {
+ String fileExtension = getFileExtension(pathReference);
+ if (fileExtension == null) {
return false;
}
- return JAR_EXTENSIONS.contains(fileName.substring(dotLocation + 1));
+ // Always unpack .par/.zip. Unpack .jar/.war if and only if kernel property deployer.unpackBundles is either not
+ // specified or is "true"
+ return ALWAYS_UNPACKED_EXTENSIONS.contains(fileExtension) || this.unpackBundles && CONFIGURABLY_UNPACKED_EXTENSIONS.contains(fileExtension);
}
- private void stashContent() {
- if (this.baseStagingPathReference.exists()) {
- this.pastStagingPathReference.delete(true);
- if (this.pastStagingPathReference.exists()) {
- throw new FatalIOException(String.format("Unable to delete %s while stashing content", this.pastStagingPathReference.toString()));
- }
- this.baseStagingPathReference.moveTo(this.pastStagingPathReference);
+ private static String getFileExtension(PathReference pathReference) {
+ if (pathReference == null) {
+ return null;
}
- }
+ String name = pathReference.getName();
+ String fileName = name.toLowerCase(Locale.ENGLISH);
- private void unstashContent() {
- if (this.pastStagingPathReference.exists()) {
- this.baseStagingPathReference.delete(true);
- if (this.baseStagingPathReference.exists()) {
- throw new FatalIOException(String.format("Unable to delete %s while unstashing content", this.baseStagingPathReference.toString()));
- }
- this.pastStagingPathReference.moveTo(this.baseStagingPathReference);
+ int dotLocation = fileName.lastIndexOf('.');
+ if (dotLocation == -1) {
+ return null;
}
+ return fileName.substring(dotLocation + 1);
}
}
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardArtifactStorageFactory.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardArtifactStorageFactory.java
index e65fb0cd..9d56ed32 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardArtifactStorageFactory.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardArtifactStorageFactory.java
@@ -40,25 +40,28 @@ public final class StandardArtifactStorageFactory implements ArtifactStorageFact
private final ArtifactFSFactory artifactFSFactory;
private final EventLogger eventLogger;
+
+ private final String unpackBundles;
- public StandardArtifactStorageFactory(PathReference workDirectory, ArtifactFSFactory artifactFSFactory, EventLogger eventLogger) {
+ public StandardArtifactStorageFactory(PathReference workDirectory, ArtifactFSFactory artifactFSFactory, EventLogger eventLogger, String unpackBundles) {
this.workDirectory = workDirectory;
this.artifactFSFactory = artifactFSFactory;
this.eventLogger = eventLogger;
+ this.unpackBundles = unpackBundles;
}
public ArtifactStorage create(File file, ArtifactIdentity artifactIdentity) {
PathReference sourcePathReference = new PathReference(file);
PathReference stagingPathReference = createStagingPathReference(artifactIdentity, file.getName());
- return new StandardArtifactStorage(sourcePathReference, stagingPathReference, this.artifactFSFactory, this.eventLogger);
+ return new StandardArtifactStorage(sourcePathReference, stagingPathReference, this.artifactFSFactory, this.eventLogger, this.unpackBundles);
}
public ArtifactStorage createDirectoryStorage(ArtifactIdentity artifactIdentity, String directoryName) {
PathReference stagingPathReference = createStagingPathReference(artifactIdentity, directoryName);
stagingPathReference.createDirectory();
- return new StandardArtifactStorage(null, stagingPathReference, this.artifactFSFactory, this.eventLogger);
+ return new StandardArtifactStorage(null, stagingPathReference, this.artifactFSFactory, this.eventLogger, this.unpackBundles);
}
private PathReference createStagingPathReference(ArtifactIdentity artifactIdentity, String name) {
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/BundleDriver.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/BundleDriver.java
index 3b87f8a0..88670a89 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/BundleDriver.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/BundleDriver.java
@@ -11,6 +11,8 @@
package org.eclipse.virgo.kernel.install.artifact.internal.bundle;
+import java.io.File;
+
import org.osgi.framework.Bundle;
@@ -59,14 +61,15 @@ public interface BundleDriver {
void start(AbortableSignal signal) throws DeploymentException;
/**
- * Updates the bundle associated with this {@link BundleDriver} using the given {@link BundleManifest} which
+ * Updates the bundle associated with this {@link BundleDriver} to the given file or directory using the given {@link BundleManifest} which
* could, for example, result from transforming the updated artifact.
*
* @param manifest the <code>BundleManifest</code>
+ * @param location the <code>File</code>
* @return <code>true</code> if and only if the bundle was successfully updated
* @throws DeploymentException if the update failed
*/
- boolean update(BundleManifest manifest) throws DeploymentException;
+ boolean update(BundleManifest manifest, File location) throws DeploymentException;
/**
* Performs a refresh packages operation specifying the bundle associated with this {@link BundleDriver} and
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleDriver.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleDriver.java
index 92756913..8e8783ab 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleDriver.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleDriver.java
@@ -12,6 +12,8 @@
package org.eclipse.virgo.kernel.install.artifact.internal.bundle;
+import java.io.File;
+
import org.eclipse.virgo.kernel.core.AbortableSignal;
import org.eclipse.virgo.kernel.core.BundleStarter;
import org.eclipse.virgo.kernel.core.BundleUtils;
@@ -239,19 +241,19 @@ final class StandardBundleDriver implements BundleDriver {
/**
* {@inheritDoc}
*/
- public boolean update(BundleManifest bundleManifest) throws DeploymentException {
- updateBundle(bundleManifest);
+ public boolean update(BundleManifest bundleManifest, File location) throws DeploymentException {
+ updateBundle(bundleManifest, location);
refreshBundle();
return true;
}
- private void updateBundle(BundleManifest bundleManifest) throws DeploymentException {
+ private void updateBundle(BundleManifest bundleManifest, File location) throws DeploymentException {
if (!isFragment(bundleManifest)) {
Bundle bundle = obtainLocalBundle();
Assert.isTrue(bundle.getState() == Bundle.INSTALLED || bundle.getState() == Bundle.RESOLVED,
"A bundle cannot be updated unless is in INSTALLED or RESOLVED state");
try {
- this.osgi.update(bundle, new BundleDriverManifestTransformer(bundleManifest));
+ this.osgi.update(bundle, new BundleDriverManifestTransformer(bundleManifest), location);
} catch (BundleException e) {
throw new DeploymentException("Failed to update bundle '" + bundle + "'.", e);
}
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleInstallArtifact.java b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleInstallArtifact.java
index 62e24419..7457afda 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleInstallArtifact.java
+++ b/org.eclipse.virgo.kernel.deployer/src/main/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleInstallArtifact.java
@@ -66,7 +66,7 @@ final class StandardBundleInstallArtifact extends AbstractInstallArtifact implem
private final Logger logger = LoggerFactory.getLogger(this.getClass());
- private static final String MANIFEST_ENTRY_NAME = "/META-INF/MANIFEST.MF";
+ private static final String MANIFEST_ENTRY_NAME = "META-INF/MANIFEST.MF";
private static final String EQUINOX_SYSTEM_BUNDLE_NAME = "org.eclipse.osgi";
@@ -336,7 +336,7 @@ final class StandardBundleInstallArtifact extends AbstractInstallArtifact implem
private boolean completeUpdateAndRefresh(boolean startRequired) {
try {
- boolean refreshed = this.bundleDriver.update(bundleManifest);
+ boolean refreshed = this.bundleDriver.update(bundleManifest, this.artifactStorage.getArtifactFS().getFile());
if (refreshed) {
if (startRequired) {
BlockingAbortableSignal blockingSignal = new BlockingAbortableSignal(true);
diff --git a/org.eclipse.virgo.kernel.deployer/src/main/resources/META-INF/spring/deployer-context.xml b/org.eclipse.virgo.kernel.deployer/src/main/resources/META-INF/spring/deployer-context.xml
index a70ca508..8ea6dc06 100644
--- a/org.eclipse.virgo.kernel.deployer/src/main/resources/META-INF/spring/deployer-context.xml
+++ b/org.eclipse.virgo.kernel.deployer/src/main/resources/META-INF/spring/deployer-context.xml
@@ -27,6 +27,7 @@
class="org.eclipse.virgo.kernel.artifact.fs.StandardArtifactFSFactory" />
</beans:constructor-arg>
<beans:constructor-arg ref="eventLogger" />
+ <beans:constructor-arg value="#{kernelConfig.getProperty('deployer.unpackBundles')}" />
</beans:bean>
<beans:bean id="syntheticContextCreatingTransformer"
diff --git a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/FileMovingArtifactStoreTests.java b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/FileMovingArtifactStoreTests.java
new file mode 100644
index 00000000..fbb80566
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/FileMovingArtifactStoreTests.java
@@ -0,0 +1,159 @@
+/*******************************************************************************
+ * Copyright (c) 2012 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package org.eclipse.virgo.kernel.install.artifact.internal;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+
+import org.eclipse.virgo.util.io.PathReference;
+import org.junit.Before;
+import org.junit.Test;
+
+public class FileMovingArtifactStoreTests {
+
+ private static final String TEST_PATH = "target/fileMovingArtifactStoreTests/";
+
+ private static final String TEST_FILENAME = "some.jar";
+
+ private ArtifactStore artifactHistory;
+
+ @Before
+ public void setUp() throws Exception {
+ PathReference basePathReference = new PathReference(TEST_PATH + TEST_FILENAME);
+ basePathReference.delete(true);
+ this.artifactHistory = new FileMovingArtifactStore(basePathReference);
+ }
+
+ @Test
+ public void testGetCurrentPathReference() {
+ PathReference c = this.artifactHistory.getCurrentPath();
+ checkPath(c);
+ }
+
+ @Test
+ public void testStash() {
+ PathReference original = this.artifactHistory.getCurrentPath();
+ this.artifactHistory.save();
+ PathReference c = this.artifactHistory.getCurrentPath();
+ checkPath(c);
+ assertTrue(original.equals(c));
+ }
+
+ @Test
+ public void testUnstash() {
+ PathReference original = this.artifactHistory.getCurrentPath();
+ this.artifactHistory.save();
+ this.artifactHistory.restore();
+ PathReference c = this.artifactHistory.getCurrentPath();
+ checkPath(c);
+ assertTrue(original.equals(c));
+
+ }
+
+ @Test
+ public void testRepeatedStash() {
+ PathReference original = this.artifactHistory.getCurrentPath();
+ this.artifactHistory.save();
+ PathReference next = this.artifactHistory.getCurrentPath();
+ this.artifactHistory.save();
+ PathReference last = this.artifactHistory.getCurrentPath();
+ checkPath(last);
+ assertTrue(original.equals(next));
+ assertTrue(original.equals(last));
+ }
+
+ @Test
+ public void testFileDeletionOnUnstash() {
+ this.artifactHistory.save();
+ PathReference c = this.artifactHistory.getCurrentPath();
+ c.createFile();
+ assertTrue(c.exists());
+ this.artifactHistory.restore();
+ assertFalse(c.exists());
+ }
+
+ @Test
+ public void testDirectoryDeletionOnUnstash() {
+ this.artifactHistory.save();
+ PathReference c = this.artifactHistory.getCurrentPath();
+ c.createDirectory();
+ assertTrue(c.exists());
+ this.artifactHistory.restore();
+ assertFalse(c.exists());
+ }
+
+ @Test
+ public void testFileDeletionOnDoubleStash() {
+ PathReference c = this.artifactHistory.getCurrentPath();
+ c.createFile();
+ assertTrue(c.exists());
+ this.artifactHistory.save();
+ assertFalse(c.exists());
+ this.artifactHistory.save();
+ assertFalse(c.exists());
+ }
+
+ @Test
+ public void testDirectoryDeletionOnDoubleStash() {
+ PathReference c = this.artifactHistory.getCurrentPath();
+ c.createDirectory();
+ assertTrue(c.exists());
+ this.artifactHistory.save();
+ assertFalse(c.exists());
+ this.artifactHistory.save();
+ assertFalse(c.exists());
+ }
+
+ @Test(expected=IllegalStateException.class)
+ public void testBadUnstash() {
+ this.artifactHistory.restore();
+ }
+
+ @Test(expected=IllegalStateException.class)
+ public void testDoubleUnstash() {
+ this.artifactHistory.save();
+ this.artifactHistory.save();
+ this.artifactHistory.restore();
+ this.artifactHistory.restore();
+ }
+
+ @Test(expected=IllegalArgumentException.class)
+ public void testNullConstructorPath() {
+ new FileMovingArtifactStore(null);
+ }
+
+ @Test(expected=IllegalArgumentException.class)
+ public void testEmptyConstructorPath() {
+ new FileMovingArtifactStore(new PathReference(""));
+ }
+
+ public void testDirectorylessConstructorPath() {
+ ArtifactStore ph = new FileMovingArtifactStore(new PathReference("a"));
+ assertEquals("a", ph.getCurrentPath().getName());
+ }
+
+
+ private void checkPath(PathReference c) {
+ File file = c.toFile();
+ assertTrue(file.toURI().toString().indexOf(TEST_PATH) != -1);
+ assertEquals(TEST_FILENAME, c.getName());
+ assertFalse(c.exists());
+ PathReference parent = c.getParent();
+ assertTrue(parent.isDirectory());
+ assertTrue(parent.exists());
+ }
+
+}
+
diff --git a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/GenerationalArtifactStoreTests.java b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/GenerationalArtifactStoreTests.java
new file mode 100644
index 00000000..abeecd4c
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/GenerationalArtifactStoreTests.java
@@ -0,0 +1,157 @@
+/*******************************************************************************
+ * Copyright (c) 2012 VMware Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VMware Inc. - initial contribution
+ *******************************************************************************/
+
+package org.eclipse.virgo.kernel.install.artifact.internal;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+
+import org.eclipse.virgo.util.io.PathReference;
+import org.junit.Before;
+import org.junit.Test;
+
+public class GenerationalArtifactStoreTests {
+
+ private static final String TEST_PATH = "target/pathGeneratorTests/";
+
+ private static final String TEST_FILENAME = "some.jar";
+
+ private ArtifactStore artifactHistory;
+
+ @Before
+ public void setUp() throws Exception {
+ this.artifactHistory = new GenerationalArtifactStore(new PathReference(TEST_PATH + TEST_FILENAME));
+ }
+
+ @Test
+ public void testGetCurrentPathReference() {
+ PathReference c = this.artifactHistory.getCurrentPath();
+ checkPath(c);
+ }
+
+ @Test
+ public void testStash() {
+ PathReference original = this.artifactHistory.getCurrentPath();
+ this.artifactHistory.save();
+ PathReference c = this.artifactHistory.getCurrentPath();
+ checkPath(c);
+ assertFalse(original.equals(c));
+ }
+
+ @Test
+ public void testUnstash() {
+ PathReference original = this.artifactHistory.getCurrentPath();
+ this.artifactHistory.save();
+ this.artifactHistory.restore();
+ PathReference c = this.artifactHistory.getCurrentPath();
+ checkPath(c);
+ assertTrue(original.equals(c));
+
+ }
+
+ @Test
+ public void testRepeatedStash() {
+ PathReference original = this.artifactHistory.getCurrentPath();
+ this.artifactHistory.save();
+ PathReference next = this.artifactHistory.getCurrentPath();
+ this.artifactHistory.save();
+ PathReference last = this.artifactHistory.getCurrentPath();
+ checkPath(last);
+ assertFalse(original.equals(next));
+ assertFalse(original.equals(last));
+ }
+
+ @Test
+ public void testFileDeletionOnUnstash() {
+ this.artifactHistory.save();
+ PathReference c = this.artifactHistory.getCurrentPath();
+ c.createFile();
+ assertTrue(c.exists());
+ this.artifactHistory.restore();
+ assertFalse(c.exists());
+ }
+
+ @Test
+ public void testDirectoryDeletionOnUnstash() {
+ this.artifactHistory.save();
+ PathReference c = this.artifactHistory.getCurrentPath();
+ c.createDirectory();
+ assertTrue(c.exists());
+ this.artifactHistory.restore();
+ assertFalse(c.exists());
+ }
+
+ @Test
+ public void testFileDeletionOnDoubleStash() {
+ PathReference c = this.artifactHistory.getCurrentPath();
+ c.createFile();
+ assertTrue(c.exists());
+ this.artifactHistory.save();
+ assertTrue(c.exists());
+ this.artifactHistory.save();
+ assertFalse(c.exists());
+ }
+
+ @Test
+ public void testDirectoryDeletionOnDoubleStash() {
+ PathReference c = this.artifactHistory.getCurrentPath();
+ c.createDirectory();
+ assertTrue(c.exists());
+ this.artifactHistory.save();
+ assertTrue(c.exists());
+ this.artifactHistory.save();
+ assertFalse(c.exists());
+ }
+
+ @Test(expected=IllegalStateException.class)
+ public void testBadUnstash() {
+ this.artifactHistory.restore();
+ }
+
+ @Test(expected=IllegalStateException.class)
+ public void testDoubleUnstash() {
+ this.artifactHistory.save();
+ this.artifactHistory.save();
+ this.artifactHistory.restore();
+ this.artifactHistory.restore();
+ }
+
+ @Test(expected=IllegalArgumentException.class)
+ public void testNullConstructorPath() {
+ new GenerationalArtifactStore(null);
+ }
+
+ @Test(expected=IllegalArgumentException.class)
+ public void testEmptyConstructorPath() {
+ new GenerationalArtifactStore(new PathReference(""));
+ }
+
+ public void testDirectorylessConstructorPath() {
+ ArtifactStore ph = new GenerationalArtifactStore(new PathReference("a"));
+ assertEquals("a", ph.getCurrentPath().getName());
+ }
+
+
+ private void checkPath(PathReference c) {
+ File file = c.toFile();
+ assertTrue(file.toURI().toString().indexOf(TEST_PATH) != -1);
+ assertEquals(TEST_FILENAME, c.getName());
+ assertFalse(c.exists());
+ PathReference parent = c.getParent();
+ assertTrue(parent.isDirectory());
+ assertTrue(parent.exists());
+ }
+
+}
+
diff --git a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardInstallArtifactGraphInclosureTests.java b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardInstallArtifactGraphInclosureTests.java
index 5b3ca5fe..f02a9023 100644
--- a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardInstallArtifactGraphInclosureTests.java
+++ b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/StandardInstallArtifactGraphInclosureTests.java
@@ -85,7 +85,7 @@ public class StandardInstallArtifactGraphInclosureTests {
private RepositoryAwareArtifactDescriptor artifactDescriptor;
private final ArtifactStorageFactory artifactStorageFactory = new StandardArtifactStorageFactory(
- new PathReference("target/work/deployer.staging"), new StandardArtifactFSFactory(), new MockEventLogger());
+ new PathReference("target/work/deployer.staging"), new StandardArtifactFSFactory(), new MockEventLogger(), "true");
private Set<ArtifactBridge> testArtifactBridges = new HashSet<ArtifactBridge>();
diff --git a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleInstallArtifactTests.java b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleInstallArtifactTests.java
index 4b2a7032..0dd60b2c 100644
--- a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleInstallArtifactTests.java
+++ b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/artifact/internal/bundle/StandardBundleInstallArtifactTests.java
@@ -122,7 +122,7 @@ public class StandardBundleInstallArtifactTests {
DirectedAcyclicGraph<InstallArtifact> dag = new ThreadSafeDirectedAcyclicGraph<InstallArtifact>();
artifact.setGraph(dag.createNode(artifact));
- expect(this.bundleDriver.update(isA(BundleManifest.class))).andReturn(true);
+ expect(this.bundleDriver.update(isA(BundleManifest.class), isA(File.class))).andReturn(true);
this.bundleDriver.refreshBundle();
replay(this.bundleDriver);
diff --git a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/pipeline/stage/transform/internal/SyntheticContextBundleCreatingTransformerTests.java b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/pipeline/stage/transform/internal/SyntheticContextBundleCreatingTransformerTests.java
index 8c2c1797..9384eec2 100644
--- a/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/pipeline/stage/transform/internal/SyntheticContextBundleCreatingTransformerTests.java
+++ b/org.eclipse.virgo.kernel.deployer/src/test/java/org/eclipse/virgo/kernel/install/pipeline/stage/transform/internal/SyntheticContextBundleCreatingTransformerTests.java
@@ -65,7 +65,7 @@ public final class SyntheticContextBundleCreatingTransformerTests {
private final InstallEnvironment installEnvironment = createMock(InstallEnvironment.class);
private final ArtifactStorageFactory artifactStorageFactory = new StandardArtifactStorageFactory(new PathReference("target/work"),
- new StandardArtifactFSFactory(), new MockEventLogger());
+ new StandardArtifactFSFactory(), new MockEventLogger(), "true");
private final Transformer transformer = new SyntheticContextBundleCreatingTransformer(this.installArtifactGraphFactory,
this.artifactStorageFactory);
@@ -83,7 +83,7 @@ public final class SyntheticContextBundleCreatingTransformerTests {
GraphNode<InstallArtifact> planInstallGraph = createMockPlan(true, new Version(1, 0, 0), "plan-name", "bundle1", "bundle2", "bundle3");
InstallArtifact syntheticContextInstallArtifact = createMock(InstallArtifact.class);
- File syntheticBundleDir = new File("target/work/staging/plan-name-1/bundle/plan-name-1-synthetic.context/1.0.0/plan-name-1-synthetic.context.jar").getAbsoluteFile();
+ File syntheticBundleDir = new File("target/work/staging/plan-name-1/bundle/plan-name-1-synthetic.context/1.0.0/0/plan-name-1-synthetic.context.jar").getAbsoluteFile();
expect(
this.installArtifactGraphFactory.constructInstallArtifactGraph(eq(new ArtifactIdentity("bundle", "plan-name-1-synthetic.context",
new Version(1, 0, 0), ScopeNameFactory.createScopeName("plan-name", new Version(1, 0, 0)))), isA(ArtifactStorage.class),
@@ -109,7 +109,7 @@ public final class SyntheticContextBundleCreatingTransformerTests {
InstallArtifact syntheticContextInstallArtifact = createMock(InstallArtifact.class);
- File syntheticBundleDir = new File("target/work/staging/plan-name-1/bundle/plan-name-1-synthetic.context/1.0.0/plan-name-1-synthetic.context.jar").getAbsoluteFile();
+ File syntheticBundleDir = new File("target/work/staging/plan-name-1/bundle/plan-name-1-synthetic.context/1.0.0/0/plan-name-1-synthetic.context.jar").getAbsoluteFile();
expect(
this.installArtifactGraphFactory.constructInstallArtifactGraph(eq(new ArtifactIdentity("bundle", "plan-name-1-synthetic.context",
new Version(1, 0, 0), ScopeNameFactory.createScopeName("plan-name", new Version(1, 0, 0)))), isA(ArtifactStorage.class),
@@ -136,7 +136,7 @@ public final class SyntheticContextBundleCreatingTransformerTests {
InstallArtifact syntheticContextInstallArtifact = createMock(InstallArtifact.class);
File syntheticBundleDir = new File(
- "target/work/staging/nested-plan-1/bundle/nested-plan-1-synthetic.context/1.0.0/nested-plan-1-synthetic.context.jar").getAbsoluteFile();
+ "target/work/staging/nested-plan-1/bundle/nested-plan-1-synthetic.context/1.0.0/0/nested-plan-1-synthetic.context.jar").getAbsoluteFile();
expect(
this.installArtifactGraphFactory.constructInstallArtifactGraph(eq(new ArtifactIdentity("bundle", "nested-plan-1-synthetic.context",
new Version(1, 0, 0), ScopeNameFactory.createScopeName("nested-plan", new Version(1, 0, 0)))), isA(ArtifactStorage.class),
diff --git a/org.eclipse.virgo.kernel.dmfragment/.classpath b/org.eclipse.virgo.kernel.dmfragment/.classpath
index 59781261..9a464853 100644
--- a/org.eclipse.virgo.kernel.dmfragment/.classpath
+++ b/org.eclipse.virgo.kernel.dmfragment/.classpath
@@ -30,7 +30,7 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.blueprint.io/1.0.0.RELEASE/org.eclipse.gemini.blueprint.io-1.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.blueprint.io/1.0.0.RELEASE/org.eclipse.gemini.blueprint.io-sources-1.0.0.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi/3.8.0.v20120508-2119/org.eclipse.osgi-3.8.0.v20120508-2119.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.5.0.200809221524/org.eclipse.osgi-3.5.0.200809221524.jar"/>
<classpathentry kind="con" path="org.eclipse.ajdt.core.ASPECTJRT_CONTAINER"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20120711093918/org.eclipse.virgo.medic-3.6.0.D-20120711093918.jar">
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20120717201225/org.eclipse.virgo.medic-3.6.0.D-20120717201225.jar">
<attributes>
<attribute name="org.eclipse.ajdt.aspectpath" value="org.eclipse.ajdt.aspectpath"/>
</attributes>
@@ -38,7 +38,7 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.slf4j.api/1.6.4.v20120130-2120/org.slf4j.api-1.6.4.v20120130-2120.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.osgi"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.agent.dm"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.kernel.core/3.6.0.D-20120711095111/org.eclipse.virgo.kernel.core-3.6.0.D-20120711095111.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.kernel.core/3.6.0.D-20120727121316/org.eclipse.virgo.kernel.core-3.6.0.D-20120727121316.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.apache.commons/com.springsource.org.apache.commons.logging/1.1.1/com.springsource.org.apache.commons.logging-1.1.1.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.kerneldmfragment/.classpath b/org.eclipse.virgo.kernel.kerneldmfragment/.classpath
index e0b3d9fb..38ca13a3 100644
--- a/org.eclipse.virgo.kernel.kerneldmfragment/.classpath
+++ b/org.eclipse.virgo.kernel.kerneldmfragment/.classpath
@@ -29,7 +29,7 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.blueprint.extender/1.0.0.RELEASE/org.eclipse.gemini.blueprint.extender-1.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.blueprint.extender/1.0.0.RELEASE/org.eclipse.gemini.blueprint.extender-sources-1.0.0.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.blueprint.io/1.0.0.RELEASE/org.eclipse.gemini.blueprint.io-1.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.blueprint.io/1.0.0.RELEASE/org.eclipse.gemini.blueprint.io-sources-1.0.0.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi/3.8.0.v20120508-2119/org.eclipse.osgi-3.8.0.v20120508-2119.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.5.0.200809221524/org.eclipse.osgi-3.5.0.200809221524.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20120711093918/org.eclipse.virgo.medic-3.6.0.D-20120711093918.jar">
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20120717201225/org.eclipse.virgo.medic-3.6.0.D-20120717201225.jar">
<attributes>
<attribute name="org.eclipse.ajdt.aspectpath" value="org.eclipse.ajdt.aspectpath"/>
</attributes>
diff --git a/org.eclipse.virgo.kernel.model/.classpath b/org.eclipse.virgo.kernel.model/.classpath
index 75b1456d..ebbaf5db 100644
--- a/org.eclipse.virgo.kernel.model/.classpath
+++ b/org.eclipse.virgo.kernel.model/.classpath
@@ -25,7 +25,7 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.slf4j.api/1.6.4.v20120130-2120/org.slf4j.api-1.6.4.v20120130-2120.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-sources-1.6.1.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20120711093918/org.eclipse.virgo.medic-3.6.0.D-20120711093918.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/1.0.0.CI-B20/org.eclipse.virgo.medic-sources-1.0.0.CI-B20.jar">
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20120717201225/org.eclipse.virgo.medic-3.6.0.D-20120717201225.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/1.0.0.CI-B20/org.eclipse.virgo.medic-sources-1.0.0.CI-B20.jar">
<attributes>
<attribute name="org.eclipse.ajdt.aspectpath" value="org.eclipse.ajdt.aspectpath"/>
</attributes>
@@ -33,16 +33,16 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi/3.8.0.v20120508-2119/org.eclipse.osgi-3.8.0.v20120508-2119.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.1.R37x_v20110808-1106/org.eclipse.osgi-sources-3.7.1.R37x_v20110808-1106.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-sources-2.3.0.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.6.0.D-20120711092322/org.eclipse.virgo.teststubs.osgi-3.6.0.D-20120711092322.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.6.0.D-20120711092322/org.eclipse.virgo.teststubs.osgi-sources-3.6.0.D-20120711092322.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.6.0.D-20120711093140/org.eclipse.virgo.util.osgi-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.5.0.D-20120615065828/org.eclipse.virgo.util.osgi-sources-3.5.0.D-20120615065828.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.6.0.D-20120711093140/org.eclipse.virgo.util.common-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.5.0.D-20120615065828/org.eclipse.virgo.util.common-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.6.0.D-20120717181632/org.eclipse.virgo.util.osgi-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.5.0.D-20120615065828/org.eclipse.virgo.util.osgi-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.6.0.D-20120717181632/org.eclipse.virgo.util.common-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.5.0.D-20120615065828/org.eclipse.virgo.util.common-sources-3.5.0.D-20120615065828.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.osgi"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.artifact"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.deployer"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.stubs"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.5.RELEASE/org.springframework.context-3.0.5.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.5.RELEASE/org.springframework.context-sources-3.0.5.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.equinox.region/1.1.0.v20120319-1602/org.eclipse.equinox.region-1.1.0.v20120319-1602.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.kernel.core/3.6.0.D-20120711095111/org.eclipse.virgo.kernel.core-3.6.0.D-20120711095111.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.deployer.api/3.6.0.D-20120711095111/org.eclipse.virgo.deployer.api-3.6.0.D-20120711095111.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.kernel.core/3.6.0.D-20120727121316/org.eclipse.virgo.kernel.core-3.6.0.D-20120727121316.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.deployer.api/3.6.0.D-20120727121316/org.eclipse.virgo.deployer.api-3.6.0.D-20120727121316.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi.services/3.3.0.v20120307-2102/org.eclipse.osgi.services-3.3.0.v20120307-2102.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20110513/org.eclipse.osgi.services-sources-3.3.0.v20110513.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.osgi/.classpath b/org.eclipse.virgo.kernel.osgi/.classpath
index 9ddd27d0..73d96603 100644
--- a/org.eclipse.virgo.kernel.osgi/.classpath
+++ b/org.eclipse.virgo.kernel.osgi/.classpath
@@ -22,29 +22,29 @@
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20120711093918/org.eclipse.virgo.medic-3.6.0.D-20120711093918.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/1.0.0.CI-B20/org.eclipse.virgo.medic-sources-1.0.0.CI-B20.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20120717201225/org.eclipse.virgo.medic-3.6.0.D-20120717201225.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/1.0.0.CI-B20/org.eclipse.virgo.medic-sources-1.0.0.CI-B20.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi/3.8.0.v20120508-2119/org.eclipse.osgi-3.8.0.v20120508-2119.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.1.R37x_v20110808-1106/org.eclipse.osgi-sources-3.7.1.R37x_v20110808-1106.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.slf4j.api/1.6.4.v20120130-2120/org.slf4j.api-1.6.4.v20120130-2120.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-sources-1.6.1.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.12.RELEASE/com.springsource.org.aspectj.runtime-1.6.12.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.12.RELEASE/com.springsource.org.aspectj.runtime-1.6.12.RELEASE.jar"/>
<classpathentry kind="con" path="org.eclipse.ajdt.core.ASPECTJRT_CONTAINER"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.6.0.D-20120711094540/org.eclipse.virgo.repository-3.6.0.D-20120711094540.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.5.0.D-20120615071313/org.eclipse.virgo.repository-sources-3.5.0.D-20120615071313.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.6.0.D-20120711093140/org.eclipse.virgo.util.osgi.manifest-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.5.0.D-20120615065828/org.eclipse.virgo.util.osgi.manifest-sources-3.5.0.D-20120615065828.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.6.0.D-20120711093140/org.eclipse.virgo.util.common-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.5.0.D-20120615065828/org.eclipse.virgo.util.common-sources-3.5.0.D-20120615065828.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.6.0.D-20120711093140/org.eclipse.virgo.util.math-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.5.0.D-20120615065828/org.eclipse.virgo.util.math-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.6.0.D-20120717202028/org.eclipse.virgo.repository-3.6.0.D-20120717202028.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.5.0.D-20120615071313/org.eclipse.virgo.repository-sources-3.5.0.D-20120615071313.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.6.0.D-20120717181632/org.eclipse.virgo.util.osgi.manifest-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.5.0.D-20120615065828/org.eclipse.virgo.util.osgi.manifest-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.6.0.D-20120717181632/org.eclipse.virgo.util.common-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.5.0.D-20120615065828/org.eclipse.virgo.util.common-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.6.0.D-20120717181632/org.eclipse.virgo.util.math-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.5.0.D-20120615065828/org.eclipse.virgo.util.math-sources-3.5.0.D-20120615065828.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.extensions.equinox/3.6.0.D-20120711092707/org.eclipse.virgo.osgi.extensions.equinox-3.6.0.D-20120711092707.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.extensions.equinox/2.0.0.D-20090921150251/org.eclipse.virgo.osgi.extensions.equinox-sources-2.0.0.D-20090921150251.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.D-20120711093140/org.eclipse.virgo.util.io-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.5.0.D-20120615065828/org.eclipse.virgo.util.io-sources-3.5.0.D-20120615065828.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.6.0.D-20120711093140/org.eclipse.virgo.util.parser.manifest-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.5.0.D-20120615065828/org.eclipse.virgo.util.parser.manifest-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.D-20120717181632/org.eclipse.virgo.util.io-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.5.0.D-20120615065828/org.eclipse.virgo.util.io-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.6.0.D-20120717181632/org.eclipse.virgo.util.parser.manifest-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.5.0.D-20120615065828/org.eclipse.virgo.util.parser.manifest-sources-3.5.0.D-20120615065828.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.services"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-sources-2.3.0.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.6.0.D-20120711092322/org.eclipse.virgo.teststubs.osgi-3.6.0.D-20120711092322.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.6.0.D-20120711092322/org.eclipse.virgo.teststubs.osgi-sources-3.6.0.D-20120711092322.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.6.0.D-20120711093918/org.eclipse.virgo.medic.test-3.6.0.D-20120711093918.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.5.0.D-20120615070622/org.eclipse.virgo.medic.test-sources-3.5.0.D-20120615070622.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.6.0.D-20120717201225/org.eclipse.virgo.medic.test-3.6.0.D-20120717201225.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.5.0.D-20120615070622/org.eclipse.virgo.medic.test-sources-3.5.0.D-20120615070622.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.5.RELEASE/org.springframework.beans-3.0.5.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.5.RELEASE/org.springframework.beans-sources-3.0.5.RELEASE.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.artifact"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.launcher/3.6.0.D-20120711092707/org.eclipse.virgo.osgi.launcher-3.6.0.D-20120711092707.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.launcher/3.5.0.D-20120615065435/org.eclipse.virgo.osgi.launcher-sources-3.5.0.D-20120615065435.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi.services/3.3.0.v20120307-2102/org.eclipse.osgi.services-3.3.0.v20120307-2102.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20110513/org.eclipse.osgi.services-sources-3.3.0.v20110513.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.equinox.event/1.2.100.v20111010-1614/org.eclipse.equinox.event-1.2.100.v20111010-1614.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.equinox.region/1.1.0.v20120319-1602/org.eclipse.equinox.region-1.1.0.v20120319-1602.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.kernel.core/3.6.0.D-20120711095111/org.eclipse.virgo.kernel.core-3.6.0.D-20120711095111.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.kernel.core/3.6.0.D-20120727121316/org.eclipse.virgo.kernel.core-3.6.0.D-20120727121316.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/framework/OsgiFramework.java b/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/framework/OsgiFramework.java
index 44574754..d924cc52 100644
--- a/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/framework/OsgiFramework.java
+++ b/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/framework/OsgiFramework.java
@@ -11,6 +11,7 @@
package org.eclipse.virgo.kernel.osgi.framework;
+import java.io.File;
import java.util.jar.Manifest;
import org.osgi.framework.Bundle;
@@ -20,7 +21,8 @@ import org.osgi.service.packageadmin.PackageAdmin;
/**
* <code>OsgiFramework</code> defines a basic abstraction for interacting with various OSGi implementations in a
- * server-independent manner. <p/>
+ * server-independent manner.
+ * <p/>
*
* Implementations <strong>must</strong> make themselves available in the OSGi service registry under the
* <code>OsgiFramework</code> class names.
@@ -39,7 +41,7 @@ public interface OsgiFramework {
*
* @return the system <code>BundleContext</code>.
*/
- BundleContext getBundleContext();
+ BundleContext getBundleContext();
/**
* Gets the {@link ClassLoader} for the supplied {@link Bundle}.
@@ -72,8 +74,8 @@ public interface OsgiFramework {
* imports have been wired.
*
* @param bundle The bundle for which the direct dependencies are required
- * @param includeFragments <code>true</code> if fragments of bundles to which package imports have been wired
- * should be included in the returned array
+ * @param includeFragments <code>true</code> if fragments of bundles to which package imports have been wired should
+ * be included in the returned array
* @return the supplied bundle's direct dependencies
*/
Bundle[] getDirectDependencies(Bundle bundle, boolean includeFragments);
@@ -86,16 +88,16 @@ public interface OsgiFramework {
* @see PackageAdmin#refreshPackages(Bundle[])
*/
void refresh(Bundle bundle) throws BundleException;
-
+
/**
- * Updates the supplied <code>Bundle</code> using the supplied <code>ManifestTransformer</code>
- * to transformer the <code>Bundle</code>'s manifest as it is updated.
+ * Updates the supplied <code>Bundle</code> from the supplied file or directory using the supplied
+ * <code>ManifestTransformer</code> to transformer the <code>Bundle</code>'s manifest as it is updated.
*
* @param bundle the bundle to update
* @param manifestTransformer the manifest transformer to apply to the bundle's manifest
+ * @param location the file or directory containing the updated bundle contents
*
* @throws BundleException if the bundle fails to update
*/
- void update(Bundle bundle, ManifestTransformer manifestTransformer) throws BundleException;
-
+ void update(Bundle bundle, ManifestTransformer manifestTransformer, File location) throws BundleException;
}
diff --git a/org.eclipse.virgo.kernel.osgicommand/.classpath b/org.eclipse.virgo.kernel.osgicommand/.classpath
index cadac0e6..f5364817 100644
--- a/org.eclipse.virgo.kernel.osgicommand/.classpath
+++ b/org.eclipse.virgo.kernel.osgicommand/.classpath
@@ -10,11 +10,11 @@
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.services"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.shell"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi/3.8.0.v20120508-2119/org.eclipse.osgi-3.8.0.v20120508-2119.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.1.R37x_v20110808-1106/org.eclipse.osgi-sources-3.7.1.R37x_v20110808-1106.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.D-20120711093140/org.eclipse.virgo.util.io-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.5.0.D-20120615065828/org.eclipse.virgo.util.osgi-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.D-20120717181632/org.eclipse.virgo.util.io-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.5.0.D-20120615065828/org.eclipse.virgo.util.osgi-sources-3.5.0.D-20120615065828.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-sources-2.3.0.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.felix.gogo.runtime/0.8.0.v201108120515/org.apache.felix.gogo.runtime-0.8.0.v201108120515.jar" sourcepath="/KERNEL_IVY_CACHE/org.apache.felix/org.apache.felix.gogo.runtime/0.8.0.v201107131313/org.apache.felix.gogo.runtime-sources-0.8.0.v201107131313.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.felix.gogo.shell/0.8.0.v201110170705/org.apache.felix.gogo.shell-0.8.0.v201110170705.jar" sourcepath="/KERNEL_IVY_CACHE/org.apache.felix/org.apache.felix.gogo.shell/0.8.0.v201107131313/org.apache.felix.gogo.shell-sources-0.8.0.v201107131313.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.apache.felix.gogo.command/0.8.0.v201108120515/org.apache.felix.gogo.command-0.8.0.v201108120515.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.6.0.D-20120711093140/org.eclipse.virgo.util.osgi-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.1.0.M01/org.eclipse.virgo.util.osgi-sources-3.1.0.M01.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.6.0.D-20120717181632/org.eclipse.virgo.util.osgi-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.1.0.M01/org.eclipse.virgo.util.osgi-sources-3.1.0.M01.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.services/.classpath b/org.eclipse.virgo.kernel.services/.classpath
index 6cd0d8f5..b71ab024 100644
--- a/org.eclipse.virgo.kernel.services/.classpath
+++ b/org.eclipse.virgo.kernel.services/.classpath
@@ -24,25 +24,25 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-sources-2.3.0.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.12.RELEASE/com.springsource.org.aspectj.runtime-1.6.12.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.12.RELEASE/com.springsource.org.aspectj.runtime-1.6.12.RELEASE.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.6.0.D-20120711093140/org.eclipse.virgo.util.common-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.5.0.D-20120615065828/org.eclipse.virgo.util.common-sources-3.5.0.D-20120615065828.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.D-20120711093140/org.eclipse.virgo.util.io-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.5.0.D-20120615065828/org.eclipse.virgo.util.io-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.6.0.D-20120717181632/org.eclipse.virgo.util.common-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.5.0.D-20120615065828/org.eclipse.virgo.util.common-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.D-20120717181632/org.eclipse.virgo.util.io-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.5.0.D-20120615065828/org.eclipse.virgo.util.io-sources-3.5.0.D-20120615065828.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi/3.8.0.v20120508-2119/org.eclipse.osgi-3.8.0.v20120508-2119.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.1.R37x_v20110808-1106/org.eclipse.osgi-sources-3.7.1.R37x_v20110808-1106.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.5.RELEASE/org.springframework.beans-3.0.5.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.5.RELEASE/org.springframework.beans-sources-3.0.5.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.5.RELEASE/org.springframework.core-3.0.5.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.5.RELEASE/org.springframework.core-sources-3.0.5.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.5.RELEASE/org.springframework.context-3.0.5.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.5.RELEASE/org.springframework.context-sources-3.0.5.RELEASE.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.6.0.D-20120711094540/org.eclipse.virgo.repository-3.6.0.D-20120711094540.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.5.0.D-20120615071313/org.eclipse.virgo.repository-sources-3.5.0.D-20120615071313.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.6.0.D-20120717202028/org.eclipse.virgo.repository-3.6.0.D-20120717202028.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.5.0.D-20120615071313/org.eclipse.virgo.repository-sources-3.5.0.D-20120615071313.jar"/>
<classpathentry kind="con" path="org.eclipse.ajdt.core.ASPECTJRT_CONTAINER"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/3.6.0.D-20120711093918/org.eclipse.virgo.medic.core-3.6.0.D-20120711093918.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/1.0.0.CI-B20/org.eclipse.virgo.medic.core-sources-1.0.0.CI-B20.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/3.6.0.D-20120717201225/org.eclipse.virgo.medic.core-3.6.0.D-20120717201225.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/1.0.0.CI-B20/org.eclipse.virgo.medic.core-sources-1.0.0.CI-B20.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.slf4j.api/1.6.4.v20120130-2120/org.slf4j.api-1.6.4.v20120130-2120.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-sources-1.6.1.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.6.0.D-20120711092322/org.eclipse.virgo.teststubs.osgi-3.6.0.D-20120711092322.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.6.0.D-20120711092322/org.eclipse.virgo.teststubs.osgi-sources-3.6.0.D-20120711092322.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.6.0.D-20120711093140/org.eclipse.virgo.util.math-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.5.0.D-20120615065828/org.eclipse.virgo.util.math-sources-3.5.0.D-20120615065828.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.6.0.D-20120711093140/org.eclipse.virgo.util.parser.manifest-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.5.0.D-20120615065828/org.eclipse.virgo.util.parser.manifest-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.6.0.D-20120717181632/org.eclipse.virgo.util.math-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.5.0.D-20120615065828/org.eclipse.virgo.util.math-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.6.0.D-20120717181632/org.eclipse.virgo.util.parser.manifest-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.5.0.D-20120615065828/org.eclipse.virgo.util.parser.manifest-sources-3.5.0.D-20120615065828.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.blueprint.core/1.0.0.RELEASE/org.eclipse.gemini.blueprint.core-1.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.blueprint.core/1.0.0.RELEASE/org.eclipse.gemini.blueprint.core-sources-1.0.0.RELEASE.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20120711093918/org.eclipse.virgo.medic-3.6.0.D-20120711093918.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.5.0.D-20120615070622/org.eclipse.virgo.medic.test-sources-3.5.0.D-20120615070622.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20120717201225/org.eclipse.virgo.medic-3.6.0.D-20120717201225.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.5.0.D-20120615070622/org.eclipse.virgo.medic.test-sources-3.5.0.D-20120615070622.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.artifact"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.6.0.D-20120711093140/org.eclipse.virgo.util.osgi.manifest-3.6.0.D-20120711093140.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.kernel.core/3.6.0.D-20120711095111/org.eclipse.virgo.kernel.core-3.6.0.D-20120711095111.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.6.0.D-20120711093918/org.eclipse.virgo.medic.test-3.6.0.D-20120711093918.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.5.0.D-20120615070622/org.eclipse.virgo.medic.test-sources-3.5.0.D-20120615070622.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.6.0.D-20120717181632/org.eclipse.virgo.util.osgi.manifest-3.6.0.D-20120717181632.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.kernel.core/3.6.0.D-20120727121316/org.eclipse.virgo.kernel.core-3.6.0.D-20120727121316.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.6.0.D-20120717201225/org.eclipse.virgo.medic.test-3.6.0.D-20120717201225.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.5.0.D-20120615070622/org.eclipse.virgo.medic.test-sources-3.5.0.D-20120615070622.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.shell/.classpath b/org.eclipse.virgo.kernel.shell/.classpath
index cca28663..970abc1d 100644
--- a/org.eclipse.virgo.kernel.shell/.classpath
+++ b/org.eclipse.virgo.kernel.shell/.classpath
@@ -25,31 +25,31 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.4.0/com.springsource.org.junit-sources-4.4.0.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-sources-2.3.0.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.12.RELEASE/com.springsource.org.aspectj.runtime-1.6.12.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.12.RELEASE/com.springsource.org.aspectj.runtime-1.6.12.RELEASE.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.6.0.D-20120711093140/org.eclipse.virgo.util.common-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.5.0.D-20120615065828/org.eclipse.virgo.util.common-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.6.0.D-20120717181632/org.eclipse.virgo.util.common-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.5.0.D-20120615065828/org.eclipse.virgo.util.common-sources-3.5.0.D-20120615065828.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi/3.8.0.v20120508-2119/org.eclipse.osgi-3.8.0.v20120508-2119.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.1.R37x_v20110808-1106/org.eclipse.osgi-sources-3.7.1.R37x_v20110808-1106.jar"/>
<classpathentry kind="con" path="org.eclipse.ajdt.core.ASPECTJRT_CONTAINER"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20120711093918/org.eclipse.virgo.medic-3.6.0.D-20120711093918.jar">
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20120717201225/org.eclipse.virgo.medic-3.6.0.D-20120717201225.jar">
<attributes>
<attribute name="org.eclipse.ajdt.aspectpath" value="org.eclipse.ajdt.aspectpath"/>
</attributes>
</classpathentry>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.6.0.D-20120711093918/org.eclipse.virgo.medic.test-3.6.0.D-20120711093918.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/1.0.0.CI-B20/org.eclipse.virgo.medic.core-sources-1.0.0.CI-B20.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.6.0.D-20120717201225/org.eclipse.virgo.medic.test-3.6.0.D-20120717201225.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/1.0.0.CI-B20/org.eclipse.virgo.medic.core-sources-1.0.0.CI-B20.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.osgi"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.6.0.D-20120711092322/org.eclipse.virgo.teststubs.osgi-3.6.0.D-20120711092322.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.6.0.D-20120711092322/org.eclipse.virgo.teststubs.osgi-sources-3.6.0.D-20120711092322.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.5.RELEASE/org.springframework.context-3.0.5.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.5.RELEASE/org.springframework.context-sources-3.0.5.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.5.RELEASE/org.springframework.beans-3.0.5.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.5.RELEASE/org.springframework.beans-sources-3.0.5.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.5.RELEASE/org.springframework.core-3.0.5.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.5.RELEASE/org.springframework.core-sources-3.0.5.RELEASE.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.D-20120711093140/org.eclipse.virgo.util.io-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.5.0.D-20120615065828/org.eclipse.virgo.util.io-sources-3.5.0.D-20120615065828.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/3.6.0.D-20120711093918/org.eclipse.virgo.medic.core-3.6.0.D-20120711093918.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.5.0.D-20120615070622/org.eclipse.virgo.medic.test-sources-3.5.0.D-20120615070622.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.D-20120717181632/org.eclipse.virgo.util.io-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.5.0.D-20120615065828/org.eclipse.virgo.util.io-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/3.6.0.D-20120717201225/org.eclipse.virgo.medic.core-3.6.0.D-20120717201225.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.5.0.D-20120615070622/org.eclipse.virgo.medic.test-sources-3.5.0.D-20120615070622.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.deployer"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.6.0.D-20120711094540/org.eclipse.virgo.repository-3.6.0.D-20120711094540.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.5.0.D-20120615071313/org.eclipse.virgo.repository-sources-3.5.0.D-20120615071313.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.6.0.D-20120717202028/org.eclipse.virgo.repository-3.6.0.D-20120717202028.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.5.0.D-20120615071313/org.eclipse.virgo.repository-sources-3.5.0.D-20120615071313.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.model"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.equinox.event/1.2.100.v20111010-1614/org.eclipse.equinox.event-1.2.100.v20111010-1614.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.equinox.region/1.1.0.v20120319-1602/org.eclipse.equinox.region-1.1.0.v20120319-1602.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.6.0.D-20120711093140/org.eclipse.virgo.util.osgi.manifest-3.6.0.D-20120711093140.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.6.0.D-20120717181632/org.eclipse.virgo.util.osgi.manifest-3.6.0.D-20120717181632.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.artifact"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.deployer.api/3.6.0.D-20120711095111/org.eclipse.virgo.deployer.api-3.6.0.D-20120711095111.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.deployer.api/3.6.0.D-20120727121316/org.eclipse.virgo.deployer.api-3.6.0.D-20120727121316.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.slf4j.jcl/1.6.4.v20120130-2120/org.slf4j.jcl-1.6.4.v20120130-2120.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.shell/src/test/java/org/eclipse/virgo/kernel/shell/internal/AnnotationBasedCommandResolverTests.java b/org.eclipse.virgo.kernel.shell/src/test/java/org/eclipse/virgo/kernel/shell/internal/AnnotationBasedCommandResolverTests.java
index 5cad18b7..33ddece2 100644
--- a/org.eclipse.virgo.kernel.shell/src/test/java/org/eclipse/virgo/kernel/shell/internal/AnnotationBasedCommandResolverTests.java
+++ b/org.eclipse.virgo.kernel.shell/src/test/java/org/eclipse/virgo/kernel/shell/internal/AnnotationBasedCommandResolverTests.java
@@ -12,6 +12,7 @@
package org.eclipse.virgo.kernel.shell.internal;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
import java.lang.reflect.Method;
import java.util.List;
@@ -21,68 +22,74 @@ import org.eclipse.virgo.kernel.shell.internal.AnnotationBasedCommandResolver;
import org.eclipse.virgo.kernel.shell.internal.CommandDescriptor;
import org.junit.Test;
-
/**
*/
public class AnnotationBasedCommandResolverTests {
-
+
private final AnnotationBasedCommandResolver resolver = new AnnotationBasedCommandResolver();
-
+
@Test
public void basicAnnotations() throws SecurityException, NoSuchMethodException {
List<CommandDescriptor> commands = resolver.resolveCommands(null, new TestCommands());
assertEquals(2, commands.size());
-
- assertCommandEquals("test", "one", TestCommands.class.getMethod("foo"), commands.get(0));
- assertCommandEquals("test", "two", TestCommands.class.getMethod("bar"), commands.get(1));
+
+ assertCommandEquals(TestCommands.class.getMethod("foo"), "test", "one", commands);
+ assertCommandEquals(TestCommands.class.getMethod("bar"), "test", "two", commands);
}
-
+
@Test
public void inheritedAnnotations() throws SecurityException, NoSuchMethodException {
List<CommandDescriptor> commands = resolver.resolveCommands(null, new SubTestCommands());
assertEquals(4, commands.size());
-
- assertCommandEquals("test-sub", "three", SubTestCommands.class.getMethod("alpha"), commands.get(0));
- assertCommandEquals("test-sub", "four", SubTestCommands.class.getMethod("bravo"), commands.get(1));
- assertCommandEquals("test-sub", "one", SubTestCommands.class.getMethod("foo"), commands.get(2));
- assertCommandEquals("test-sub", "two", SubTestCommands.class.getMethod("bar"), commands.get(3));
+
+ assertCommandEquals(SubTestCommands.class.getMethod("alpha"), "test-sub", "three", commands);
+ assertCommandEquals(SubTestCommands.class.getMethod("bravo"), "test-sub", "four", commands);
+ assertCommandEquals(SubTestCommands.class.getMethod("foo"), "test-sub", "one", commands);
+ assertCommandEquals(SubTestCommands.class.getMethod("bar"), "test-sub", "two", commands);
}
-
- private void assertCommandEquals(String expectedCommandName, String expectedSubCommandName, Method expectedMethod, CommandDescriptor commandDescriptor) {
- assertEquals(expectedCommandName, commandDescriptor.getCommandName());
- assertEquals(expectedSubCommandName, commandDescriptor.getSubCommandName());
- assertEquals(expectedMethod, commandDescriptor.getMethod());
+
+ private void assertCommandEquals(Method expectedMethod, String expectedCommandName, String expectedSubCommandName,
+ List<CommandDescriptor> commands) {
+ boolean found = false;
+ for (CommandDescriptor commandDescriptor : commands) {
+ if (expectedMethod.equals(commandDescriptor.getMethod())) {
+ found = true;
+ assertEquals(expectedCommandName, commandDescriptor.getCommandName());
+ assertEquals(expectedSubCommandName, commandDescriptor.getSubCommandName());
+ }
+ }
+ assertTrue("Method not found '" + expectedMethod + "'", found);
}
-
+
@Command("test")
private static class TestCommands {
-
+
@SuppressWarnings("unused")
@Command("one")
public void foo() {
-
+
}
-
+
@SuppressWarnings("unused")
@Command("two")
public void bar() {
-
+
}
}
-
+
@Command("test-sub")
private static final class SubTestCommands extends TestCommands {
-
+
@SuppressWarnings("unused")
@Command("three")
public void alpha() {
-
+
}
-
+
@SuppressWarnings("unused")
@Command("four")
public void bravo() {
-
+
}
}
}
diff --git a/org.eclipse.virgo.kernel.smoketest/.classpath b/org.eclipse.virgo.kernel.smoketest/.classpath
index 09cb2b88..a4346cd0 100644
--- a/org.eclipse.virgo.kernel.smoketest/.classpath
+++ b/org.eclipse.virgo.kernel.smoketest/.classpath
@@ -5,6 +5,6 @@
<classpathentry kind="src" path="src/test/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.D-20120711093140/org.eclipse.virgo.util.io-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.5.0.D-20120615065828/org.eclipse.virgo.util.io-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.D-20120717181632/org.eclipse.virgo.util.io-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.5.0.D-20120615065828/org.eclipse.virgo.util.io-sources-3.5.0.D-20120615065828.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.stubs/.classpath b/org.eclipse.virgo.kernel.stubs/.classpath
index cf1208d8..2050df0f 100644
--- a/org.eclipse.virgo.kernel.stubs/.classpath
+++ b/org.eclipse.virgo.kernel.stubs/.classpath
@@ -23,11 +23,11 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.deployer"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.1.R37x_v20110808-1106/org.eclipse.osgi-3.7.1.R37x_v20110808-1106.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.1.R37x_v20110808-1106/org.eclipse.osgi-sources-3.7.1.R37x_v20110808-1106.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.6.0.D-20120711093140/org.eclipse.virgo.util.osgi.manifest-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.5.0.D-20120615065828/org.eclipse.virgo.util.osgi.manifest-sources-3.5.0.D-20120615065828.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.6.0.D-20120711093140/org.eclipse.virgo.util.common-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.5.0.D-20120615065828/org.eclipse.virgo.util.common-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.6.0.D-20120717181632/org.eclipse.virgo.util.osgi.manifest-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.5.0.D-20120615065828/org.eclipse.virgo.util.osgi.manifest-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.6.0.D-20120717181632/org.eclipse.virgo.util.common-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.5.0.D-20120615065828/org.eclipse.virgo.util.common-sources-3.5.0.D-20120615065828.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.artifact"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.osgi"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.kernel.core/3.6.0.D-20120711095111/org.eclipse.virgo.kernel.core-3.6.0.D-20120711095111.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.deployer.api/3.6.0.D-20120711095111/org.eclipse.virgo.deployer.api-3.6.0.D-20120711095111.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.kernel.core/3.6.0.D-20120727121316/org.eclipse.virgo.kernel.core-3.6.0.D-20120727121316.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.deployer.api/3.6.0.D-20120727121316/org.eclipse.virgo.deployer.api-3.6.0.D-20120727121316.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.test/.classpath b/org.eclipse.virgo.kernel.test/.classpath
index 3087e025..31ac1f5b 100644
--- a/org.eclipse.virgo.kernel.test/.classpath
+++ b/org.eclipse.virgo.kernel.test/.classpath
@@ -9,19 +9,19 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.deployer"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.osgi"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.test/org.eclipse.virgo.test.framework/3.6.0.D-20120711093701/org.eclipse.virgo.test.framework-3.6.0.D-20120711093701.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.test/org.eclipse.virgo.test.framework/3.5.0.D-20120301131734/org.eclipse.virgo.test.framework-sources-3.5.0.D-20120301131734.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.D-20120711093140/org.eclipse.virgo.util.io-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.5.0.D-20120615065828/org.eclipse.virgo.util.io-sources-3.5.0.D-20120615065828.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.6.0.D-20120711093140/org.eclipse.virgo.util.osgi.manifest-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.5.0.D-20120615065828/org.eclipse.virgo.util.osgi.manifest-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.test/org.eclipse.virgo.test.framework/3.6.0.D-20120717182335/org.eclipse.virgo.test.framework-3.6.0.D-20120717182335.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.test/org.eclipse.virgo.test.framework/3.5.0.D-20120301131734/org.eclipse.virgo.test.framework-sources-3.5.0.D-20120301131734.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.D-20120717181632/org.eclipse.virgo.util.io-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.5.0.D-20120615065828/org.eclipse.virgo.util.io-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.6.0.D-20120717181632/org.eclipse.virgo.util.osgi.manifest-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.5.0.D-20120615065828/org.eclipse.virgo.util.osgi.manifest-sources-3.5.0.D-20120615065828.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.blueprint.core/1.0.0.RELEASE/org.eclipse.gemini.blueprint.core-1.0.0.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.gemini/org.eclipse.gemini.blueprint.core/1.0.0.RELEASE/org.eclipse.gemini.blueprint.core-sources-1.0.0.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.5.RELEASE/org.springframework.context-3.0.5.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.5.RELEASE/org.springframework.context-sources-3.0.5.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.5.RELEASE/org.springframework.core-3.0.5.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.5.RELEASE/org.springframework.core-sources-3.0.5.RELEASE.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.launcher/3.6.0.D-20120711092707/org.eclipse.virgo.osgi.launcher-3.6.0.D-20120711092707.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.5.RELEASE/org.springframework.beans-3.0.5.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.5.RELEASE/org.springframework.beans-sources-3.0.5.RELEASE.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.6.0.D-20120711093140/org.eclipse.virgo.util.parser.manifest-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.5.0.D-20120615065828/org.eclipse.virgo.util.parser.manifest-sources-3.5.0.D-20120615065828.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20120711093918/org.eclipse.virgo.medic-3.6.0.D-20120711093918.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/1.0.0.CI-B20/org.eclipse.virgo.medic-sources-1.0.0.CI-B20.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.6.0.D-20120717181632/org.eclipse.virgo.util.parser.manifest-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.5.0.D-20120615065828/org.eclipse.virgo.util.parser.manifest-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20120717201225/org.eclipse.virgo.medic-3.6.0.D-20120717201225.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/1.0.0.CI-B20/org.eclipse.virgo.medic-sources-1.0.0.CI-B20.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.osgicommand"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.equinox.region/1.1.0.v20120319-1602/org.eclipse.equinox.region-1.1.0.v20120319-1602.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.kernel.core/3.6.0.D-20120711095111/org.eclipse.virgo.kernel.core-3.6.0.D-20120711095111.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.deployer.api/3.6.0.D-20120711095111/org.eclipse.virgo.deployer.api-3.6.0.D-20120711095111.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.kernel.core/3.6.0.D-20120727121316/org.eclipse.virgo.kernel.core-3.6.0.D-20120727121316.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.deployer.api/3.6.0.D-20120727121316/org.eclipse.virgo.deployer.api-3.6.0.D-20120727121316.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/osgi/test/QuasiFrameworkIntegrationTests.java b/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/osgi/test/QuasiFrameworkIntegrationTests.java
index 774067a1..a52010fb 100644
--- a/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/osgi/test/QuasiFrameworkIntegrationTests.java
+++ b/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/osgi/test/QuasiFrameworkIntegrationTests.java
@@ -250,6 +250,10 @@ public class QuasiFrameworkIntegrationTests extends AbstractKernelIntegrationTes
Bundle exporterBundle = exporterQuasiBundle.getBundle();
Assert.assertNotNull(exporterBundle);
Assert.assertEquals(EXPORTER_BSN, exporterBundle.getSymbolicName());
+
+ // Tidy up since test methods may run in any order in Java 7
+ importerBundle.uninstall();
+ exporterBundle.uninstall();
}
private QuasiBundle installExporterBundle() throws BundleException, URISyntaxException {
diff --git a/org.eclipse.virgo.kernel.userregion/.classpath b/org.eclipse.virgo.kernel.userregion/.classpath
index db05e618..539b5d0c 100644
--- a/org.eclipse.virgo.kernel.userregion/.classpath
+++ b/org.eclipse.virgo.kernel.userregion/.classpath
@@ -22,30 +22,30 @@
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20120711093918/org.eclipse.virgo.medic-3.6.0.D-20120711093918.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/1.0.0.CI-B20/org.eclipse.virgo.medic-sources-1.0.0.CI-B20.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20120717201225/org.eclipse.virgo.medic-3.6.0.D-20120717201225.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/1.0.0.CI-B20/org.eclipse.virgo.medic-sources-1.0.0.CI-B20.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi/3.8.0.v20120508-2119/org.eclipse.osgi-3.8.0.v20120508-2119.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.1.R37x_v20110808-1106/org.eclipse.osgi-sources-3.7.1.R37x_v20110808-1106.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.slf4j.api/1.6.4.v20120130-2120/org.slf4j.api-1.6.4.v20120130-2120.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-sources-1.6.1.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.12.RELEASE/com.springsource.org.aspectj.runtime-1.6.12.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.12.RELEASE/com.springsource.org.aspectj.runtime-1.6.12.RELEASE.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.6.0.D-20120711094540/org.eclipse.virgo.repository-3.6.0.D-20120711094540.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.5.0.D-20120615071313/org.eclipse.virgo.repository-sources-3.5.0.D-20120615071313.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.6.0.D-20120711093140/org.eclipse.virgo.util.osgi-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.5.0.D-20120615065828/org.eclipse.virgo.util.osgi-sources-3.5.0.D-20120615065828.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.6.0.D-20120711093140/org.eclipse.virgo.util.osgi.manifest-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.5.0.D-20120615065828/org.eclipse.virgo.util.osgi.manifest-sources-3.5.0.D-20120615065828.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.6.0.D-20120711093140/org.eclipse.virgo.util.common-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.5.0.D-20120615065828/org.eclipse.virgo.util.common-sources-3.5.0.D-20120615065828.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.6.0.D-20120711093140/org.eclipse.virgo.util.math-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.5.0.D-20120615065828/org.eclipse.virgo.util.math-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.6.0.D-20120717202028/org.eclipse.virgo.repository-3.6.0.D-20120717202028.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.5.0.D-20120615071313/org.eclipse.virgo.repository-sources-3.5.0.D-20120615071313.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.6.0.D-20120717181632/org.eclipse.virgo.util.osgi-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.5.0.D-20120615065828/org.eclipse.virgo.util.osgi-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.6.0.D-20120717181632/org.eclipse.virgo.util.osgi.manifest-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.5.0.D-20120615065828/org.eclipse.virgo.util.osgi.manifest-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.6.0.D-20120717181632/org.eclipse.virgo.util.common-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.5.0.D-20120615065828/org.eclipse.virgo.util.common-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.6.0.D-20120717181632/org.eclipse.virgo.util.math-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.5.0.D-20120615065828/org.eclipse.virgo.util.math-sources-3.5.0.D-20120615065828.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.extensions.equinox/3.6.0.D-20120711092707/org.eclipse.virgo.osgi.extensions.equinox-3.6.0.D-20120711092707.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.extensions.equinox/2.0.0.D-20090913205430/org.eclipse.virgo.osgi.extensions.equinox-sources-2.0.0.D-20090913205430.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.D-20120711093140/org.eclipse.virgo.util.io-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.5.0.D-20120615065828/org.eclipse.virgo.util.io-sources-3.5.0.D-20120615065828.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.6.0.D-20120711093140/org.eclipse.virgo.util.parser.manifest-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.5.0.D-20120615065828/org.eclipse.virgo.util.parser.manifest-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.6.0.D-20120717181632/org.eclipse.virgo.util.io-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.5.0.D-20120615065828/org.eclipse.virgo.util.io-sources-3.5.0.D-20120615065828.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.6.0.D-20120717181632/org.eclipse.virgo.util.parser.manifest-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.5.0.D-20120615065828/org.eclipse.virgo.util.parser.manifest-sources-3.5.0.D-20120615065828.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.services"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-sources-2.3.0.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.6.0.D-20120711092322/org.eclipse.virgo.teststubs.osgi-3.6.0.D-20120711092322.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/1.0.0.CI-B39/org.eclipse.virgo.teststubs.osgi-sources-1.0.0.CI-B39.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.6.0.D-20120711093918/org.eclipse.virgo.medic.test-3.6.0.D-20120711093918.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.5.0.D-20120615070622/org.eclipse.virgo.medic.test-sources-3.5.0.D-20120615070622.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.6.0.D-20120717201225/org.eclipse.virgo.medic.test-3.6.0.D-20120717201225.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.5.0.D-20120615070622/org.eclipse.virgo.medic.test-sources-3.5.0.D-20120615070622.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.artifact"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.osgi"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.deployer"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi.services/3.3.0.v20120307-2102/org.eclipse.osgi.services-3.3.0.v20120307-2102.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20110513/org.eclipse.osgi.services-sources-3.3.0.v20110513.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.equinox.event/1.2.100.v20111010-1614/org.eclipse.equinox.event-1.2.100.v20111010-1614.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.equinox.region/1.1.0.v20120319-1602/org.eclipse.equinox.region-1.1.0.v20120319-1602.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.kernel.core/3.6.0.D-20120711095111/org.eclipse.virgo.kernel.core-3.6.0.D-20120711095111.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.deployer.api/3.6.0.D-20120711095111/org.eclipse.virgo.deployer.api-3.6.0.D-20120711095111.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.kernel.core/3.6.0.D-20120727121316/org.eclipse.virgo.kernel.core-3.6.0.D-20120727121316.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.deployer.api/3.6.0.D-20120727121316/org.eclipse.virgo.deployer.api-3.6.0.D-20120727121316.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/equinox/EquinoxOsgiFramework.java b/org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/equinox/EquinoxOsgiFramework.java
index 89e6df61..06efd766 100644
--- a/org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/equinox/EquinoxOsgiFramework.java
+++ b/org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/equinox/EquinoxOsgiFramework.java
@@ -11,6 +11,11 @@
package org.eclipse.virgo.kernel.userregion.internal.equinox;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
import java.util.ArrayList;
import java.util.List;
@@ -33,6 +38,10 @@ import org.osgi.service.packageadmin.PackageAdmin;
*/
@SuppressWarnings("deprecation")
public class EquinoxOsgiFramework extends AbstractOsgiFramework {
+
+ private static final String FILE_SCHEME = "file:";
+
+ private static final String REFERENCE_SCHEME = "reference:";
private final OsgiServiceHolder<PlatformAdmin> platformAdmin;
@@ -126,12 +135,30 @@ public class EquinoxOsgiFramework extends AbstractOsgiFramework {
/**
* {@inheritDoc}
*/
- public void update(Bundle bundle, ManifestTransformer manifestTransformer) throws BundleException {
+ public void update(Bundle bundle, ManifestTransformer manifestTransformer, File location) throws BundleException {
this.bundleTransformationHandler.pushManifestTransformer(manifestTransformer);
try {
- bundle.update();
+ bundle.update(openBundleStream(location));
} finally {
this.bundleTransformationHandler.popManifestTransformer();
}
}
+
+ private InputStream openBundleStream(File location) throws BundleException {
+ String absoluteBundleUriString = getAbsoluteUriString(location);
+
+ try {
+ // Use the reference: scheme to obtain an InputStream for either a file or a directory.
+ return new URL(REFERENCE_SCHEME + absoluteBundleUriString).openStream();
+
+ } catch (MalformedURLException e) {
+ throw new BundleException("Invalid bundle URI '" + absoluteBundleUriString + "'", e);
+ } catch (IOException e) {
+ throw new BundleException("Invalid bundle at URI '" + absoluteBundleUriString + "'", e);
+ }
+ }
+
+ private String getAbsoluteUriString(File location) throws BundleException {
+ return FILE_SCHEME + location.getAbsolutePath();
+ }
}
diff --git a/org.eclipse.virgo.kernel.userregionfactory/.classpath b/org.eclipse.virgo.kernel.userregionfactory/.classpath
index 3c60cec4..df3ad40f 100644
--- a/org.eclipse.virgo.kernel.userregionfactory/.classpath
+++ b/org.eclipse.virgo.kernel.userregionfactory/.classpath
@@ -9,18 +9,18 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi/3.8.0.v20120508-2119/org.eclipse.osgi-3.8.0.v20120508-2119.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.1.R37x_v20110808-1106/org.eclipse.osgi-sources-3.7.1.R37x_v20110808-1106.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-sources-2.3.0.jar"/>
<classpathentry kind="src" path="/org.eclipse.virgo.kernel.osgi"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20120711093918/org.eclipse.virgo.medic-3.6.0.D-20120711093918.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/1.0.0.CI-B20/org.eclipse.virgo.medic-sources-1.0.0.CI-B20.jar">
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.6.0.D-20120717201225/org.eclipse.virgo.medic-3.6.0.D-20120717201225.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/1.0.0.CI-B20/org.eclipse.virgo.medic-sources-1.0.0.CI-B20.jar">
<attributes>
<attribute name="org.eclipse.ajdt.aspectpath" value="org.eclipse.ajdt.aspectpath"/>
</attributes>
</classpathentry>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.launcher/3.6.0.D-20120711092707/org.eclipse.virgo.osgi.launcher-3.6.0.D-20120711092707.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.launcher/2.2.0.D-20101207145732/org.eclipse.virgo.osgi.launcher-sources-2.2.0.D-20101207145732.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.6.0.D-20120711093140/org.eclipse.virgo.util.osgi-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.6.0.D-20120711093140/org.eclipse.virgo.util.osgi.manifest-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi.manifest-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.6.0.D-20120711093140/org.eclipse.virgo.util.parser.manifest-3.6.0.D-20120711093140.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/2.2.0.D-20101207150035/org.eclipse.virgo.util.parser.manifest-sources-2.2.0.D-20101207150035.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.6.0.D-20120717181632/org.eclipse.virgo.util.osgi-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi-sources-2.2.0.D-20101207150035.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/3.6.0.D-20120717181632/org.eclipse.virgo.util.osgi.manifest-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi.manifest/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi.manifest-sources-2.2.0.D-20101207150035.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.6.0.D-20120717181632/org.eclipse.virgo.util.parser.manifest-3.6.0.D-20120717181632.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/2.2.0.D-20101207150035/org.eclipse.virgo.util.parser.manifest-sources-2.2.0.D-20101207150035.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.6.0.D-20120711092322/org.eclipse.virgo.teststubs.osgi-3.6.0.D-20120711092322.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.equinox.region/1.1.0.v20120319-1602/org.eclipse.equinox.region-1.1.0.v20120319-1602.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.kernel.core/3.6.0.D-20120711095111/org.eclipse.virgo.kernel.core-3.6.0.D-20120711095111.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.nano/org.eclipse.virgo.kernel.core/3.6.0.D-20120727121316/org.eclipse.virgo.kernel.core-3.6.0.D-20120727121316.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.mirrored/org.eclipse.osgi.services/3.3.0.v20120307-2102/org.eclipse.osgi.services-3.3.0.v20120307-2102.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20110513/org.eclipse.osgi.services-sources-3.3.0.v20110513.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

Back to the top