You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by zo...@apache.org on 2011/02/27 21:20:30 UTC
svn commit: r1075132 [7/18] - in /aries/tags/application-0.3: ./
application-api/ application-api/src/ application-api/src/main/
application-api/src/main/java/ application-api/src/main/java/org/
application-api/src/main/java/org/apache/ application-api...
Added: aries/tags/application-0.3/application-itests/src/test/java/org/apache/aries/application/runtime/itests/UpdateAppTest.java
URL: http://svn.apache.org/viewvc/aries/tags/application-0.3/application-itests/src/test/java/org/apache/aries/application/runtime/itests/UpdateAppTest.java?rev=1075132&view=auto
==============================================================================
--- aries/tags/application-0.3/application-itests/src/test/java/org/apache/aries/application/runtime/itests/UpdateAppTest.java (added)
+++ aries/tags/application-0.3/application-itests/src/test/java/org/apache/aries/application/runtime/itests/UpdateAppTest.java Sun Feb 27 20:20:13 2011
@@ -0,0 +1,296 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.aries.application.runtime.itests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.ops4j.pax.exam.CoreOptions.equinox;
+import static org.ops4j.pax.exam.CoreOptions.options;
+import static org.ops4j.pax.exam.CoreOptions.systemProperty;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.util.Hashtable;
+import java.util.Map;
+
+import org.apache.aries.application.DeploymentContent;
+import org.apache.aries.application.DeploymentMetadata;
+import org.apache.aries.application.VersionRange;
+import org.apache.aries.application.management.AriesApplication;
+import org.apache.aries.application.management.AriesApplicationContext;
+import org.apache.aries.application.management.AriesApplicationManager;
+import org.apache.aries.application.management.ResolveConstraint;
+import org.apache.aries.application.management.UpdateException;
+import org.apache.aries.application.management.spi.framework.BundleFramework;
+import org.apache.aries.application.management.spi.repository.RepositoryGenerator;
+import org.apache.aries.application.management.spi.repository.BundleRepository.BundleSuggestion;
+import org.apache.aries.application.management.spi.update.UpdateStrategy;
+import org.apache.aries.application.modelling.ModellingManager;
+import org.apache.aries.application.runtime.itests.util.IsolationTestUtils;
+import org.apache.aries.application.utils.AppConstants;
+import org.apache.aries.application.utils.filesystem.FileSystem;
+import org.apache.aries.application.utils.manifest.ManifestHeaderProcessor;
+import org.apache.aries.isolated.sample.HelloWorld;
+import org.apache.aries.unittest.fixture.ArchiveFixture;
+import org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture;
+import org.apache.felix.bundlerepository.RepositoryAdmin;
+import org.junit.Before;
+import org.junit.Test;
+import org.ops4j.pax.exam.Option;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+
+public class UpdateAppTest extends AbstractIntegrationTest {
+ private static final String SAMPLE_APP_NAME = "org.apache.aries.sample2";
+ /* Use @Before not @BeforeClass so as to ensure that these resources
+ * are created in the paxweb temp directory, and not in the svn tree
+ */
+ static boolean createdApplications = false;
+ @Before
+ public static void createApplications() throws Exception {
+
+ if (createdApplications) {
+ return;
+ }
+
+ ZipFixture testEba = ArchiveFixture.newZip()
+ .binary("META-INF/APPLICATION.MF",
+ UpdateAppTest.class.getClassLoader().getResourceAsStream("isolated/APPLICATION.MF"))
+ .jar("sample.jar")
+ .manifest().symbolicName("org.apache.aries.isolated.sample")
+ .attribute("Bundle-Version", "1.0.0")
+ .end()
+ .binary("org/apache/aries/isolated/sample/HelloWorld.class",
+ UpdateAppTest.class.getClassLoader().getResourceAsStream("org/apache/aries/isolated/sample/HelloWorld.class"))
+ .binary("org/apache/aries/isolated/sample/HelloWorldImpl.class",
+ UpdateAppTest.class.getClassLoader().getResourceAsStream("org/apache/aries/isolated/sample/HelloWorldImpl.class"))
+ .binary("OSGI-INF/blueprint/aries.xml",
+ UpdateAppTest.class.getClassLoader().getResourceAsStream("isolated/sample-blueprint.xml"))
+ .end();
+
+ FileOutputStream fout = new FileOutputStream("test.eba");
+ testEba.writeOut(fout);
+ fout.close();
+
+ ZipFixture sample2 = ArchiveFixture.newJar()
+ .manifest().symbolicName("org.apache.aries.isolated.sample")
+ .attribute("Bundle-Version", "2.0.0")
+ .end()
+ .binary("org/apache/aries/isolated/sample/HelloWorld.class",
+ IsolatedRuntimeTest.class.getClassLoader().getResourceAsStream("org/apache/aries/isolated/sample/HelloWorld.class"))
+ .binary("org/apache/aries/isolated/sample/HelloWorldImpl.class",
+ IsolatedRuntimeTest.class.getClassLoader().getResourceAsStream("org/apache/aries/isolated/sample/HelloWorldImpl.class"))
+ .binary("OSGI-INF/blueprint/aries.xml",
+ IsolatedRuntimeTest.class.getClassLoader().getResourceAsStream("isolated/sample2-blueprint.xml"))
+ .end();
+
+ fout = new FileOutputStream("sample_2.0.0.jar");
+ sample2.writeOut(fout);
+ fout.close();
+
+ createdApplications = true;
+ }
+
+ @Test
+ public void testFullUpdate() throws Exception {
+ AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
+ AriesApplication app = setupApp();
+
+ updateApp(manager, app);
+
+ assertAppMessage("hello brave new world");
+ }
+
+ @Test
+ public void testFineUpdate() throws Exception {
+ AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
+ AriesApplication app = setupApp();
+
+ BundleContext oldCtx = IsolationTestUtils.findIsolatedAppBundleContext(bundleContext, SAMPLE_APP_NAME);
+
+ installMockUpdateStrategy();
+ updateApp(manager, app);
+
+ BundleContext newCtx = IsolationTestUtils.findIsolatedAppBundleContext(bundleContext, SAMPLE_APP_NAME);
+ assertAppMessage("hello brave new world");
+
+ assertTrue("We bounced the app where the update was supposed to do an update in place", oldCtx == newCtx);
+ }
+
+ @Test
+ public void testUpdateThenStart() throws Exception
+ {
+ AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
+ AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("test.eba")));
+ AriesApplicationContext ctx = manager.install(app);
+ app = ctx.getApplication();
+
+ BundleContext oldCtx = IsolationTestUtils.findIsolatedAppBundleContext(bundleContext, SAMPLE_APP_NAME);
+
+ installMockUpdateStrategy();
+ ctx = updateApp(manager, app);
+
+ BundleContext newCtx = IsolationTestUtils.findIsolatedAppBundleContext(bundleContext, SAMPLE_APP_NAME);
+
+ assertNull("App is not started yet but HelloWorld service is already there",
+ IsolationTestUtils.findHelloWorldService(bundleContext, SAMPLE_APP_NAME));
+
+ ctx.start();
+
+ assertAppMessage("hello brave new world");
+
+ assertTrue("We bounced the app where the update was supposed to do an update in place", oldCtx == newCtx);
+ }
+
+ private void installMockUpdateStrategy()
+ {
+ bundleContext.registerService(UpdateStrategy.class.getName(), new UpdateStrategy() {
+
+ public boolean allowsUpdate(DeploymentMetadata newMetadata, DeploymentMetadata oldMetadata) {
+ return true;
+ }
+
+ public void update(UpdateInfo info) throws UpdateException {
+ BundleFramework fwk = info.getAppFramework();
+
+ Bundle old = null;
+ for (Bundle b : fwk.getBundles()) {
+ if (b.getSymbolicName().equals("org.apache.aries.isolated.sample")) {
+ old = b;
+ break;
+ }
+ }
+
+ if (old == null) throw new RuntimeException("Could not find old bundle");
+
+ try {
+ info.unregister(old);
+ fwk.uninstall(old);
+
+ // only contains one element at most
+ Map<DeploymentContent, BundleSuggestion> suggestions =
+ info.suggestBundle(info.getNewMetadata().getApplicationDeploymentContents());
+
+ BundleSuggestion toInstall = suggestions.values().iterator().next();
+
+ Bundle newBundle = fwk.install(toInstall, info.getApplication());
+ info.register(newBundle);
+ if (info.startBundles()) fwk.start(newBundle);
+
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ }, new Hashtable<String, String>());
+ }
+
+ private AriesApplication setupApp() throws Exception {
+ AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
+ AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("test.eba")));
+ AriesApplicationContext ctx = manager.install(app);
+ app = ctx.getApplication();
+
+ ctx.start();
+ assertAppMessage("hello world");
+
+ return app;
+ }
+
+ private AriesApplicationContext updateApp(AriesApplicationManager manager, AriesApplication app) throws Exception {
+ IsolationTestUtils.prepareSampleBundleV2(bundleContext,
+ getOsgiService(RepositoryGenerator.class),
+ getOsgiService(RepositoryAdmin.class),
+ getOsgiService(ModellingManager.class));
+
+ AriesApplication newApp = manager.resolve(app, new ResolveConstraint() {
+ public String getBundleName() {
+ return "org.apache.aries.isolated.sample";
+ }
+
+ public VersionRange getVersionRange() {
+ return ManifestHeaderProcessor.parseVersionRange("[2.0.0,2.0.0]", true);
+ }
+ });
+
+ return manager.update(app, newApp.getDeploymentMetadata());
+ }
+
+ private void assertAppMessage(String message) throws Exception {
+ HelloWorld hw = IsolationTestUtils.findHelloWorldService(bundleContext, SAMPLE_APP_NAME);
+ assertNotNull(hw);
+ assertEquals(message, hw.getMessage());
+ }
+
+ @org.ops4j.pax.exam.junit.Configuration
+ public static Option[] configuration() {
+ Option[] options = options(
+ // Log
+ mavenBundle("org.ops4j.pax.logging", "pax-logging-api"),
+ mavenBundle("org.ops4j.pax.logging", "pax-logging-service"),
+ // Felix Config Admin
+ mavenBundle("org.apache.felix", "org.apache.felix.configadmin"),
+ // Felix mvn url handler
+ mavenBundle("org.ops4j.pax.url", "pax-url-mvn"),
+
+ // this is how you set the default log level when using pax
+ // logging (logProfile)
+ systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("DEBUG"),
+
+ // do not provision against the local runtime
+ systemProperty(AppConstants.PROVISON_EXCLUDE_LOCAL_REPO_SYSPROP).value("true"),
+ // Bundles
+
+ mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint"),
+ mavenBundle("asm", "asm-all"),
+ mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
+ mavenBundle("org.apache.aries.transaction", "org.apache.aries.transaction.blueprint"),
+ mavenBundle("org.apache.aries", "org.apache.aries.util"),
+ mavenBundle("org.apache.aries.application", "org.apache.aries.application.api"),
+ mavenBundle("org.apache.aries.application", "org.apache.aries.application.utils"),
+ mavenBundle("org.apache.aries.application", "org.apache.aries.application.modeller"),
+ mavenBundle("org.apache.aries.application", "org.apache.aries.application.default.local.platform"),
+ mavenBundle("org.apache.aries.application", "org.apache.aries.application.noop.platform.repo"),
+ mavenBundle("org.apache.aries.application", "org.apache.aries.application.noop.postresolve.process"),
+ mavenBundle("org.apache.felix", "org.apache.felix.bundlerepository"),
+ mavenBundle("org.apache.aries.application", "org.apache.aries.application.resolver.obr"),
+ mavenBundle("org.apache.aries.application", "org.apache.aries.application.deployment.management"),
+ mavenBundle("org.apache.aries.application", "org.apache.aries.application.management"),
+ mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime.framework"),
+ mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime.framework.management"),
+ mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime.repository"),
+ mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime.isolated"),
+ mavenBundle("org.osgi", "org.osgi.compendium"),
+ mavenBundle("org.apache.geronimo.specs","geronimo-jta_1.1_spec"),
+ mavenBundle("org.apache.aries.testsupport", "org.apache.aries.testsupport.unit"),
+
+ // new VMOption("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5011"),
+
+ /*
+ * and add these imports:
+ import static org.ops4j.pax.exam.CoreOptions.waitForFrameworkStartup;
+ import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption;
+ */
+ equinox().version("3.5.0"));
+ options = updateOptions(options);
+ return options;
+ }
+}
Added: aries/tags/application-0.3/application-itests/src/test/java/org/apache/aries/application/runtime/itests/util/IsolationTestUtils.java
URL: http://svn.apache.org/viewvc/aries/tags/application-0.3/application-itests/src/test/java/org/apache/aries/application/runtime/itests/util/IsolationTestUtils.java?rev=1075132&view=auto
==============================================================================
--- aries/tags/application-0.3/application-itests/src/test/java/org/apache/aries/application/runtime/itests/util/IsolationTestUtils.java (added)
+++ aries/tags/application-0.3/application-itests/src/test/java/org/apache/aries/application/runtime/itests/util/IsolationTestUtils.java Sun Feb 27 20:20:13 2011
@@ -0,0 +1,189 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.aries.application.runtime.itests.util;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Hashtable;
+import java.util.Set;
+import java.util.jar.Attributes;
+
+import org.apache.aries.application.Content;
+import org.apache.aries.application.DeploymentContent;
+import org.apache.aries.application.management.AriesApplication;
+import org.apache.aries.application.management.spi.framework.BundleFramework;
+import org.apache.aries.application.management.spi.repository.BundleRepository;
+import org.apache.aries.application.management.spi.repository.RepositoryGenerator;
+import org.apache.aries.application.modelling.ModelledResource;
+import org.apache.aries.application.modelling.ModellingManager;
+import org.apache.aries.isolated.sample.HelloWorld;
+import org.apache.felix.bundlerepository.RepositoryAdmin;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.Constants;
+import org.osgi.framework.Filter;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.Version;
+import org.osgi.service.framework.CompositeBundle;
+import org.osgi.util.tracker.ServiceTracker;
+
+public class IsolationTestUtils {
+ public static final long DEFAULT_TIMEOUT = 10000;
+
+ /**
+ * Retrieve the bundle context for an isolated application framework
+ */
+ public static BundleContext findIsolatedAppBundleContext(BundleContext runtimeCtx, String appName)
+ {
+ for (Bundle sharedBundle : runtimeCtx.getBundles())
+ {
+ if (sharedBundle.getSymbolicName().equals("shared.bundle.framework"))
+ {
+ BundleContext sharedContext = ((CompositeBundle)sharedBundle).getCompositeFramework().getBundleContext();
+ for (Bundle appBundle : sharedContext.getBundles())
+ {
+ if (appBundle.getSymbolicName().equals(appName))
+ {
+ return ((CompositeBundle)appBundle).getCompositeFramework().getBundleContext();
+ }
+ }
+ break;
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Set up the necessary resources for installing version 2 of the org.apache.aries.isolated.sample sample bundle,
+ * which returns the message "hello brave new world" rather than "hello world"
+ *
+ * This means setting up a global bundle repository as well as a global OBR repository
+ */
+ public static void prepareSampleBundleV2(BundleContext runtimeCtx,
+ RepositoryGenerator repoGen, RepositoryAdmin repoAdmin,
+ ModellingManager modellingManager)
+ throws Exception
+ {
+ BundleRepository repo = new BundleRepository() {
+ public int getCost() {
+ return 1;
+ }
+
+ public BundleSuggestion suggestBundleToUse(DeploymentContent content) {
+ if (content.getContentName().equals("org.apache.aries.isolated.sample")) {
+ return new BundleSuggestion() {
+
+ public Bundle install(BundleFramework framework, AriesApplication app) throws BundleException {
+ File f = new File("sample_2.0.0.jar");
+ try {
+ return framework.getIsolatedBundleContext().installBundle(f.toURL().toString());
+ } catch (MalformedURLException mue) {
+ throw new RuntimeException(mue);
+ }
+ }
+
+ public Version getVersion() {
+ return new Version("2.0.0");
+ }
+
+ public Set<Content> getImportPackage() {
+ return Collections.emptySet();
+ }
+
+ public Set<Content> getExportPackage() {
+ return Collections.emptySet();
+ }
+
+ public int getCost() {
+ return 1;
+ }
+ };
+ } else {
+ return null;
+ }
+ }
+ };
+
+ Hashtable<String, String> props = new Hashtable<String,String>();
+ props.put(BundleRepository.REPOSITORY_SCOPE, BundleRepository.GLOBAL_SCOPE);
+
+ runtimeCtx.registerService(BundleRepository.class.getName(), repo, props);
+
+ Attributes attrs = new Attributes();
+ attrs.putValue("Bundle-ManifestVersion", "2");
+ attrs.putValue("Bundle-Version", "2.0.0");
+ attrs.putValue("Bundle-SymbolicName", "org.apache.aries.isolated.sample");
+ attrs.putValue("Manifest-Version", "1");
+
+ ModelledResource res = modellingManager.getModelledResource(
+ new File("sample_2.0.0.jar").toURI().toString(),
+ attrs,
+ Collections.EMPTY_LIST, Collections.EMPTY_LIST);
+
+ repoGen.generateRepository("repo.xml", Arrays.asList(res), new FileOutputStream("repo.xml"));
+ repoAdmin.addRepository(new File("repo.xml").toURI().toString());
+ }
+
+ /**
+ * Find the {@link HelloWorld} service for the isolated app
+ * @return the service object, suitably proxied so that it can be actually used, or null if the service is not present
+ * @throws IllegalStateException if the isolated app is not installed
+ */
+ public static HelloWorld findHelloWorldService(BundleContext runtimeCtx, String appName) throws Exception
+ {
+ BundleContext appContext = IsolationTestUtils.findIsolatedAppBundleContext(runtimeCtx, appName);
+
+ if (appContext != null) {
+ // Dive into the context and pull out the composite bundle for the app
+ Filter osgiFilter = FrameworkUtil.createFilter("(" + Constants.OBJECTCLASS + "=" + HelloWorld.class.getName() + ")");
+ ServiceTracker tracker = new ServiceTracker(appContext,
+ osgiFilter,
+ null);
+
+ tracker.open();
+ final Object hw = tracker.waitForService(DEFAULT_TIMEOUT);
+ tracker.close();
+
+ if (hw != null) {
+ // proxy because the class space between the sample app and the test bundle is not consistent
+ return new HelloWorld() {
+ public String getMessage() {
+ try {
+ Method m = hw.getClass().getMethod("getMessage");
+ return (String) m.invoke(hw);
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+ };
+ } else {
+ return null;
+ }
+
+ } else {
+ throw new IllegalStateException("Expected to find isolated app ctx, but didn't");
+ }
+ }
+}
Added: aries/tags/application-0.3/application-itests/src/test/java/org/apache/aries/application/sample/appmgrclient/AppMgrClient.java
URL: http://svn.apache.org/viewvc/aries/tags/application-0.3/application-itests/src/test/java/org/apache/aries/application/sample/appmgrclient/AppMgrClient.java?rev=1075132&view=auto
==============================================================================
--- aries/tags/application-0.3/application-itests/src/test/java/org/apache/aries/application/sample/appmgrclient/AppMgrClient.java (added)
+++ aries/tags/application-0.3/application-itests/src/test/java/org/apache/aries/application/sample/appmgrclient/AppMgrClient.java Sun Feb 27 20:20:13 2011
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIESOR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.aries.application.sample.appmgrclient;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.apache.aries.application.management.AriesApplicationManager;
+import org.apache.aries.application.management.ManagementException;
+
+public class AppMgrClient
+{
+ private AriesApplicationManager applicationManager;
+
+ public AriesApplicationManager getApplicationManager()
+ {
+ return applicationManager;
+ }
+
+ public void setApplicationManager(AriesApplicationManager applicationManager)
+ {
+ this.applicationManager = applicationManager;
+ }
+
+ public void doSomething() throws MalformedURLException, ManagementException
+ {
+ applicationManager.createApplication(new URL("foo"));
+ }
+
+}
Added: aries/tags/application-0.3/application-itests/src/test/java/org/apache/aries/isolated/sample/HelloWorld.java
URL: http://svn.apache.org/viewvc/aries/tags/application-0.3/application-itests/src/test/java/org/apache/aries/isolated/sample/HelloWorld.java?rev=1075132&view=auto
==============================================================================
--- aries/tags/application-0.3/application-itests/src/test/java/org/apache/aries/isolated/sample/HelloWorld.java (added)
+++ aries/tags/application-0.3/application-itests/src/test/java/org/apache/aries/isolated/sample/HelloWorld.java Sun Feb 27 20:20:13 2011
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.aries.isolated.sample;
+
+public interface HelloWorld {
+
+ public String getMessage();
+}
Added: aries/tags/application-0.3/application-itests/src/test/java/org/apache/aries/isolated/sample/HelloWorldImpl.java
URL: http://svn.apache.org/viewvc/aries/tags/application-0.3/application-itests/src/test/java/org/apache/aries/isolated/sample/HelloWorldImpl.java?rev=1075132&view=auto
==============================================================================
--- aries/tags/application-0.3/application-itests/src/test/java/org/apache/aries/isolated/sample/HelloWorldImpl.java (added)
+++ aries/tags/application-0.3/application-itests/src/test/java/org/apache/aries/isolated/sample/HelloWorldImpl.java Sun Feb 27 20:20:13 2011
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.aries.isolated.sample;
+
+import org.apache.aries.isolated.sample.HelloWorld;
+
+public class HelloWorldImpl implements HelloWorld {
+ private String msg = "hello world";
+
+ public void setMessage(String msg) {
+ this.msg = msg;
+ }
+
+ public String getMessage() {
+ return msg;
+ }
+
+}
Added: aries/tags/application-0.3/application-itests/src/test/java/org/apache/aries/sample/impl/HelloWorldImpl.java
URL: http://svn.apache.org/viewvc/aries/tags/application-0.3/application-itests/src/test/java/org/apache/aries/sample/impl/HelloWorldImpl.java?rev=1075132&view=auto
==============================================================================
--- aries/tags/application-0.3/application-itests/src/test/java/org/apache/aries/sample/impl/HelloWorldImpl.java (added)
+++ aries/tags/application-0.3/application-itests/src/test/java/org/apache/aries/sample/impl/HelloWorldImpl.java Sun Feb 27 20:20:13 2011
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.aries.sample.impl;
+
+import org.apache.aries.sample.HelloWorld;
+
+public class HelloWorldImpl implements HelloWorld {
+
+ public String getMessage() {
+ return "hello world";
+ }
+
+}
Added: aries/tags/application-0.3/application-itests/src/test/resources/app-mgr-client.xml
URL: http://svn.apache.org/viewvc/aries/tags/application-0.3/application-itests/src/test/resources/app-mgr-client.xml?rev=1075132&view=auto
==============================================================================
--- aries/tags/application-0.3/application-itests/src/test/resources/app-mgr-client.xml (added)
+++ aries/tags/application-0.3/application-itests/src/test/resources/app-mgr-client.xml Sun Feb 27 20:20:13 2011
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+
+ <reference id="app-manager" interface="org.apache.aries.application.management.AriesApplicationManager"/>
+
+ <bean id="app-mgr-client" class="org.apache.aries.application.sample.appmgrclient.AppMgrClient" scope="singleton" activation="lazy">
+ <property name="applicationManager" ref="app-manager"/>
+ </bean>
+
+</blueprint>
Added: aries/tags/application-0.3/application-itests/src/test/resources/basic/APPLICATION.MF
URL: http://svn.apache.org/viewvc/aries/tags/application-0.3/application-itests/src/test/resources/basic/APPLICATION.MF?rev=1075132&view=auto
==============================================================================
--- aries/tags/application-0.3/application-itests/src/test/resources/basic/APPLICATION.MF (added)
+++ aries/tags/application-0.3/application-itests/src/test/resources/basic/APPLICATION.MF Sun Feb 27 20:20:13 2011
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Application-ManifestVersion: 1.0
+Application-Name: test application 2
+Application-SymbolicName: org.apache.aries.sample2
+Application-Version: 1.0
+Application-Content: org.apache.aries.sample; version=1.0.0
+
Added: aries/tags/application-0.3/application-itests/src/test/resources/basic/fakeAppMgrServiceRepo.xml
URL: http://svn.apache.org/viewvc/aries/tags/application-0.3/application-itests/src/test/resources/basic/fakeAppMgrServiceRepo.xml?rev=1075132&view=auto
==============================================================================
--- aries/tags/application-0.3/application-itests/src/test/resources/basic/fakeAppMgrServiceRepo.xml (added)
+++ aries/tags/application-0.3/application-itests/src/test/resources/basic/fakeAppMgrServiceRepo.xml Sun Feb 27 20:20:13 2011
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?><repository name="app.manager.service">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resource id="appManagerService/1.0.0" presentationname="application.management.fake" symbolicname="application.management.fake" uri="bundle_location" version="1.0.0">
+<capability name="bundle">
+<p n="version" t="version" v="1.0.0"/>
+<p n="symbolicname" v="application.management.fake"/>
+<p n="Bundle-ManifestVersion" v="2"/>
+<p n="mandatory" v=""/>
+</capability>
+<capability name="service">
+<p n="service" v="service"/>
+<p n="osgi.service.blueprint.compname" v="app-manager"/>
+<p n="objectClass" t="set" v="org.apache.aries.application.management.AriesApplicationManager"/>
+<p n="service.ranking" v="0"/>
+<p n="mandatory" v=""/>
+</capability>
+</resource>
+</repository>
Added: aries/tags/application-0.3/application-itests/src/test/resources/basic/sample-blueprint.xml
URL: http://svn.apache.org/viewvc/aries/tags/application-0.3/application-itests/src/test/resources/basic/sample-blueprint.xml?rev=1075132&view=auto
==============================================================================
--- aries/tags/application-0.3/application-itests/src/test/resources/basic/sample-blueprint.xml (added)
+++ aries/tags/application-0.3/application-itests/src/test/resources/basic/sample-blueprint.xml Sun Feb 27 20:20:13 2011
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+
+ <bean id="hello" class="org.apache.aries.sample.impl.HelloWorldImpl"/>
+ <service interface="org.apache.aries.sample.HelloWorld" ref="hello" />
+
+</blueprint>
Added: aries/tags/application-0.3/application-itests/src/test/resources/isolated/APPLICATION.MF
URL: http://svn.apache.org/viewvc/aries/tags/application-0.3/application-itests/src/test/resources/isolated/APPLICATION.MF?rev=1075132&view=auto
==============================================================================
--- aries/tags/application-0.3/application-itests/src/test/resources/isolated/APPLICATION.MF (added)
+++ aries/tags/application-0.3/application-itests/src/test/resources/isolated/APPLICATION.MF Sun Feb 27 20:20:13 2011
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Application-ManifestVersion: 1.0
+Application-Name: test application 2
+Application-SymbolicName: org.apache.aries.sample2
+Application-Version: 1.0
+Application-Content: org.apache.aries.isolated.sample; version=1.0.0
+
Added: aries/tags/application-0.3/application-itests/src/test/resources/isolated/sample-blueprint.xml
URL: http://svn.apache.org/viewvc/aries/tags/application-0.3/application-itests/src/test/resources/isolated/sample-blueprint.xml?rev=1075132&view=auto
==============================================================================
--- aries/tags/application-0.3/application-itests/src/test/resources/isolated/sample-blueprint.xml (added)
+++ aries/tags/application-0.3/application-itests/src/test/resources/isolated/sample-blueprint.xml Sun Feb 27 20:20:13 2011
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+
+ <bean id="hello" class="org.apache.aries.isolated.sample.HelloWorldImpl">
+ <property name="message" value="hello world" />
+ </bean>
+ <service interface="org.apache.aries.isolated.sample.HelloWorld" ref="hello" />
+
+</blueprint>
Added: aries/tags/application-0.3/application-itests/src/test/resources/isolated/sample2-blueprint.xml
URL: http://svn.apache.org/viewvc/aries/tags/application-0.3/application-itests/src/test/resources/isolated/sample2-blueprint.xml?rev=1075132&view=auto
==============================================================================
--- aries/tags/application-0.3/application-itests/src/test/resources/isolated/sample2-blueprint.xml (added)
+++ aries/tags/application-0.3/application-itests/src/test/resources/isolated/sample2-blueprint.xml Sun Feb 27 20:20:13 2011
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+
+ <bean id="hello" class="org.apache.aries.isolated.sample.HelloWorldImpl">
+ <property name="message" value="hello brave new world" />
+ </bean>
+ <service interface="org.apache.aries.isolated.sample.HelloWorld" ref="hello" />
+
+</blueprint>
Added: aries/tags/application-0.3/application-itests/src/test/resources/obr/APPLICATION-UseBundle.MF
URL: http://svn.apache.org/viewvc/aries/tags/application-0.3/application-itests/src/test/resources/obr/APPLICATION-UseBundle.MF?rev=1075132&view=auto
==============================================================================
--- aries/tags/application-0.3/application-itests/src/test/resources/obr/APPLICATION-UseBundle.MF (added)
+++ aries/tags/application-0.3/application-itests/src/test/resources/obr/APPLICATION-UseBundle.MF Sun Feb 27 20:20:13 2011
@@ -0,0 +1,8 @@
+Manifest-Version: 1.0
+Application-ManifestVersion: 1.0
+Application-Name: test application 2
+Application-SymbolicName: org.apache.obr.resolver.test.app
+Application-Version: 1.0
+Application-Content: core.bundle.by.value; version=1.0.0,
+ core.bundle.by.reference; version=1.0.0
+Use-Bundle: use.bundle.by.reference;version="1.0.0"
Added: aries/tags/application-0.3/application-itests/src/test/resources/obr/APPLICATION.MF
URL: http://svn.apache.org/viewvc/aries/tags/application-0.3/application-itests/src/test/resources/obr/APPLICATION.MF?rev=1075132&view=auto
==============================================================================
--- aries/tags/application-0.3/application-itests/src/test/resources/obr/APPLICATION.MF (added)
+++ aries/tags/application-0.3/application-itests/src/test/resources/obr/APPLICATION.MF Sun Feb 27 20:20:13 2011
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Application-ManifestVersion: 1.0
+Application-Name: test application 2
+Application-SymbolicName: org.apache.obr.resolver.test.app
+Application-Version: 1.0
+Application-Content: core.bundle.by.value; version=1.0.0,
+ core.bundle.by.reference; version=1.0.0
Added: aries/tags/application-0.3/application-itests/src/test/resources/obr/aries.bundle1/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/aries/tags/application-0.3/application-itests/src/test/resources/obr/aries.bundle1/META-INF/MANIFEST.MF?rev=1075132&view=auto
==============================================================================
--- aries/tags/application-0.3/application-itests/src/test/resources/obr/aries.bundle1/META-INF/MANIFEST.MF (added)
+++ aries/tags/application-0.3/application-itests/src/test/resources/obr/aries.bundle1/META-INF/MANIFEST.MF Sun Feb 27 20:20:13 2011
@@ -0,0 +1,25 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Test Bundle
+Bundle-SymbolicName: aries.ws.eba.bundle1;singleton:=true;fragment-attachment:=always
+Bundle-Version: 2.0.0
+Bundle-Vendor: IBM
+Import-Package: aries.ejs.ras,
+ aries.ws.app.framework.plugin;version="[1,2)",
+ aries.ws.event;version="1.0.0",
+ aries.ws.ffdc;resolution:=optional,
+ aries.ws.kernel.file;resolution:=mandatory,
+ aries.wsspi.app.container.aries;bundle-symbolic-name=B;bundle-version="[1.2.0,2.2.0)",
+ aries.wsspi.application.aries;company=yang;security:=haha,
+ org.osgi.framework;version="1.3.0"
+DynamicImport-Package: *;vendor=acmen, *,aries.ws.eba.bla,aries.ws.eba.launcher;
+ version="[1,2]"
+Export-Package: aries.ws.eba.bundle1; version=2.2.0;company=dodo;
+ security=false;mandatory:="company,security"
+Require-Bundle: com.acme.facade;visibility:=reexport,
+ com.acme.bar; visibility:=reexport;resolution:=optional,
+ com.ab.de; visibility:=private,
+ com.de.ba; resolution:=mandatory
+Import-Service: aries.ws.eba.import
+Export-Service: aries.ws.eba.export
+Fragment-Host: aries.ws.eba.framework;bundle-version="[3.0,4.0]"
Added: aries/tags/application-0.3/application-itests/src/test/resources/obr/aries.bundle1/expectedRepository.xml
URL: http://svn.apache.org/viewvc/aries/tags/application-0.3/application-itests/src/test/resources/obr/aries.bundle1/expectedRepository.xml?rev=1075132&view=auto
==============================================================================
--- aries/tags/application-0.3/application-itests/src/test/resources/obr/aries.bundle1/expectedRepository.xml (added)
+++ aries/tags/application-0.3/application-itests/src/test/resources/obr/aries.bundle1/expectedRepository.xml Sun Feb 27 20:20:13 2011
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?><repository name="Test repo description">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resource id="aries.ws.eba.bundle1/2.0.0" presentationname="Test Bundle" symbolicname="aries.ws.eba.bundle1" uri="" version="2.0.0">
+<capability name="bundle">
+<p n="presentationname" v="Test Bundle"/>
+<p n="Fragment-Host" v="aries.ws.eba.framework;bundle-version="[3.0,4.0]""/>
+<p n="version" t="version" v="2.0.0"/>
+<p n="fragment-attachment:" v="always"/>
+<p n="symbolicname" v="aries.ws.eba.bundle1"/>
+<p n="Bundle-ManifestVersion" v="2"/>
+<p n="singleton:" v="true"/>
+</capability>
+<capability name="package">
+<p n="security" v="false"/>
+<p n="mandatory:" t="set" v="company,security"/>
+<p n="package" v="aries.ws.eba.bundle1"/>
+<p n="version" t="version" v="2.2.0"/>
+<p n="bundle-symbolic-name" v="aries.ws.eba.bundle1"/>
+<p n="company" v="dodo"/>
+<p n="bundle-version" t="version" v="2.0.0"/>
+</capability>
+<capability name="service">
+<p n="service" v="service"/>
+<p n="osgi.service.blueprint.compname" v="helloWorldManager"/>
+<p n="objectClass" t="set" v="org.apache.aries.sample.HelloWorldManager"/>
+<p n="service.ranking" v="0"/>
+</capability>
+<capability name="service">
+<p n="service" v="service"/>
+<p n="objectClass" t="set" v="aries.ws.eba.export"/>
+<p n="service.ranking" v="0"/>
+</capability>
+<require extend="false" filter="(&(package=org.osgi.framework)(version>=1.3.0))" multiple="false" name="package" optional="false">Requires package with attributes {package=org.osgi.framework, version=1.3.0}</require>
+<require extend="false" filter="(&(package=aries.ws.event)(version>=1.0.0))" multiple="false" name="package" optional="false">Requires package with attributes {package=aries.ws.event, version=1.0.0}</require>
+<require extend="false" filter="(&(package=aries.wsspi.application.aries)(version>=0.0.0)(company=yang)(mandatory:<*company))" multiple="false" name="package" optional="false">Requires package with attributes {package=aries.wsspi.application.aries, version=0.0.0, company=yang}</require>
+<require extend="false" filter="(&(package=aries.ws.kernel.file)(version>=0.0.0))" multiple="false" name="package" optional="false">Requires package with attributes {package=aries.ws.kernel.file, version=0.0.0}</require>
+<require extend="false" filter="(&(package=aries.wsspi.app.container.aries)(version>=0.0.0)(bundle-symbolic-name=B)(bundle-version>=1.2.0)(bundle-version<=2.2.0)(!(bundle-version=2.2.0)))" multiple="false" name="package" optional="false">Requires package with attributes {package=aries.wsspi.app.container.aries, version=0.0.0, bundle-symbolic-name=B, bundle-version=[1.2.0,2.2.0)}</require>
+<require extend="false" filter="(&(package=aries.ws.ffdc)(version>=0.0.0))" multiple="false" name="package" optional="true">Requires package with attributes {package=aries.ws.ffdc, version=0.0.0}</require>
+<require extend="false" filter="(&(package=aries.ws.app.framework.plugin)(version>=1.0.0)(version<=2.0.0)(!(version=2.0.0)))" multiple="false" name="package" optional="false">Requires package with attributes {package=aries.ws.app.framework.plugin, version=[1.0.0,2.0.0)}</require>
+<require extend="false" filter="(&(package=aries.ejs.ras)(version>=0.0.0))" multiple="false" name="package" optional="false">Requires package with attributes {package=aries.ejs.ras, version=0.0.0}</require>
+<require extend="false" filter="(&(package=aries.ws.eba.bla)(version>=0.0.0))" multiple="false" name="package" optional="true">Requires package with attributes {package=aries.ws.eba.bla, version=0.0.0}</require>
+<require extend="false" filter="(&(package=aries.ws.eba.launcher)(version>=1.0.0)(version<=2.0.0))" multiple="false" name="package" optional="true">Requires package with attributes {package=aries.ws.eba.launcher, version=[1.0.0,2.0.0]}</require>
+<require extend="false" filter="(&(service=service)(objectClass=org.apache.aries.sample.HelloWorld)(mandatory:<*service))" multiple="true" name="service" optional="false">Requires service with attributes {service=service, objectClass=org.apache.aries.sample.HelloWorld}</require>
+<require extend="false" filter="(&(service=service)(objectClass=aries.ws.eba.import)(mandatory:<*service))" multiple="false" name="service" optional="false">Requires service with attributes {service=service, objectClass=aries.ws.eba.import}</require>
+<require extend="false" filter="(symbolicname=com.ab.de)" multiple="false" name="bundle" optional="false">Requires bundle with attributes {symbolicname=com.ab.de}</require>
+<require extend="false" filter="(symbolicname=com.acme.facade)" multiple="false" name="bundle" optional="false">Requires bundle with attributes {symbolicname=com.acme.facade}</require>
+<require extend="false" filter="(symbolicname=com.acme.bar)" multiple="false" name="bundle" optional="true">Requires bundle with attributes {symbolicname=com.acme.bar}</require>
+<require extend="false" filter="(symbolicname=com.de.ba)" multiple="false" name="bundle" optional="false">Requires bundle with attributes {symbolicname=com.de.ba}</require>
+<require extend="false" filter="(&(version>=3.0.0)(version<=4.0.0)(symbolicname=aries.ws.eba.framework)(mandatory:<*symbolicname))" multiple="false" name="bundle" optional="false">Requires bundle with attributes {version=[3.0.0,4.0.0], symbolicname=aries.ws.eba.framework}</require>
+</resource>
+</repository>
Added: aries/tags/application-0.3/application-itests/src/test/resources/obr/hello-world-client.xml
URL: http://svn.apache.org/viewvc/aries/tags/application-0.3/application-itests/src/test/resources/obr/hello-world-client.xml?rev=1075132&view=auto
==============================================================================
--- aries/tags/application-0.3/application-itests/src/test/resources/obr/hello-world-client.xml (added)
+++ aries/tags/application-0.3/application-itests/src/test/resources/obr/hello-world-client.xml Sun Feb 27 20:20:13 2011
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+
+
+ <bean id="helloWorldManager" class="org.apache.aries.application.helloworld.client.HelloWorldClientImpl" scope="singleton" activation="lazy">
+ <property name="helloWorldServices" ref="hello-world-service"/>
+ </bean>
+
+<reference-list id="hello-world-service" interface="org.apache.aries.sample.HelloWorld"/>
+
+<service id ="helloWorldManagerService" ref="helloWorldManager" interface="org.apache.aries.sample.HelloWorldManager"/>
+</blueprint>
Added: aries/tags/application-0.3/application-itests/src/test/resources/obr/repository.xml
URL: http://svn.apache.org/viewvc/aries/tags/application-0.3/application-itests/src/test/resources/obr/repository.xml?rev=1075132&view=auto
==============================================================================
--- aries/tags/application-0.3/application-itests/src/test/resources/obr/repository.xml (added)
+++ aries/tags/application-0.3/application-itests/src/test/resources/obr/repository.xml Sun Feb 27 20:20:13 2011
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<repository name="Geronimo Framework, Configs :: J2EE System">
+ <resource version="1.3.0.3" uri="bundle_location"
+ symbolicname="org.apache.aries.sample.bundle"
+ presentationname="org.apache.aries.sample.bundle" id="1266103855623">
+ <description>sample</description>
+ <license>http://www.apache.org/licenses/LICENSE-2.0.txt</license>
+ <capability name="bundle">
+ <p v="org.apache.aries.sample.bundle" n="symbolicname"/>
+ <p v="1.3.0" t="version" n="version"/>
+ <p v="2" t="version" n="manifestversion"/>
+ </capability>
+ <capability name="package">
+ <p v="org.apache.aries.sample.impl" n="package"/>
+ <p v="1.0" t="version" n="version"/>
+ </capability>
+ </resource>
+
+</repository>
\ No newline at end of file
Added: aries/tags/application-0.3/application-itests/src/test/resources/obr/twitter/TwitterRepository.xml
URL: http://svn.apache.org/viewvc/aries/tags/application-0.3/application-itests/src/test/resources/obr/twitter/TwitterRepository.xml?rev=1075132&view=auto
==============================================================================
--- aries/tags/application-0.3/application-itests/src/test/resources/obr/twitter/TwitterRepository.xml (added)
+++ aries/tags/application-0.3/application-itests/src/test/resources/obr/twitter/TwitterRepository.xml Sun Feb 27 20:20:13 2011
@@ -0,0 +1,151 @@
+<?xml version='1.0' encoding='utf-8'?>
+<?xml-stylesheet type='text/xsl' href='http://www2.osgi.org/www/obr2html.xsl'?>
+
+<repository lastmodified='20101105121848.125' name='Untitled'>
+ <resource id='org.apache.commons.lang/2.4.0' presentationname='Commons Lang' symbolicname='org.apache.commons.lang' uri='commons.lang.location' version='2.4.0'>
+ <description>
+ Commons Lang, a package of Java utility classes for the
+ classes that are in java.lang's hierarchy, or are considered
+ to be so standard as to justify existence in java.lang.
+ </description>
+ <size>
+ 261809
+ </size>
+ <license>
+ http://www.apache.org/licenses/LICENSE-2.0.txt
+ </license>
+ <documentation>
+ http://commons.apache.org/lang/
+ </documentation>
+ <capability name='bundle'>
+ <p n='manifestversion' v='2'/>
+ <p n='presentationname' v='Commons Lang'/>
+ <p n='symbolicname' v='org.apache.commons.lang'/>
+ <p n='version' t='version' v='2.4.0'/>
+ </capability>
+ <capability name='package'>
+ <p n='package' v='org.apache.commons.lang.math'/>
+ <p n='version' t='version' v='2.4.0'/>
+ </capability>
+ <capability name='package'>
+ <p n='package' v='org.apache.commons.lang.enums'/>
+ <p n='version' t='version' v='2.4.0'/>
+ </capability>
+ <capability name='package'>
+ <p n='package' v='org.apache.commons.lang.builder'/>
+ <p n='version' t='version' v='2.4.0'/>
+ </capability>
+ <capability name='package'>
+ <p n='package' v='org.apache.commons.lang.exception'/>
+ <p n='version' t='version' v='2.4.0'/>
+ </capability>
+ <capability name='package'>
+ <p n='package' v='org.apache.commons.lang.enum'/>
+ <p n='version' t='version' v='2.4.0'/>
+ </capability>
+ <capability name='package'>
+ <p n='package' v='org.apache.commons.lang.mutable'/>
+ <p n='version' t='version' v='2.4.0'/>
+ </capability>
+ <capability name='package'>
+ <p n='package' v='org.apache.commons.lang.text'/>
+ <p n='version' t='version' v='2.4.0'/>
+ </capability>
+ <capability name='package'>
+ <p n='package' v='org.apache.commons.lang.time'/>
+ <p n='version' t='version' v='2.4.0'/>
+ </capability>
+ <capability name='package'>
+ <p n='package' v='org.apache.commons.lang'/>
+ <p n='version' t='version' v='2.4.0'/>
+ </capability>
+ <require extend='false' filter='(&(package=org.apache.commons.lang)(version>=2.4.0))' multiple='false' name='package' optional='false'>
+ Import package org.apache.commons.lang ;version=2.4.0
+ </require>
+ <require extend='false' filter='(&(package=org.apache.commons.lang.builder)(version>=2.4.0))' multiple='false' name='package' optional='false'>
+ Import package org.apache.commons.lang.builder ;version=2.4.0
+ </require>
+ <require extend='false' filter='(&(package=org.apache.commons.lang.enum)(version>=2.4.0))' multiple='false' name='package' optional='false'>
+ Import package org.apache.commons.lang.enum ;version=2.4.0
+ </require>
+ <require extend='false' filter='(&(package=org.apache.commons.lang.enums)(version>=2.4.0))' multiple='false' name='package' optional='false'>
+ Import package org.apache.commons.lang.enums ;version=2.4.0
+ </require>
+ <require extend='false' filter='(&(package=org.apache.commons.lang.exception)(version>=2.4.0))' multiple='false' name='package' optional='false'>
+ Import package org.apache.commons.lang.exception ;version=2.4.0
+ </require>
+ <require extend='false' filter='(&(package=org.apache.commons.lang.math)(version>=2.4.0))' multiple='false' name='package' optional='false'>
+ Import package org.apache.commons.lang.math ;version=2.4.0
+ </require>
+ <require extend='false' filter='(&(package=org.apache.commons.lang.mutable)(version>=2.4.0))' multiple='false' name='package' optional='false'>
+ Import package org.apache.commons.lang.mutable ;version=2.4.0
+ </require>
+ <require extend='false' filter='(&(package=org.apache.commons.lang.text)(version>=2.4.0))' multiple='false' name='package' optional='false'>
+ Import package org.apache.commons.lang.text ;version=2.4.0
+ </require>
+ <require extend='false' filter='(&(package=org.apache.commons.lang.time)(version>=2.4.0))' multiple='false' name='package' optional='false'>
+ Import package org.apache.commons.lang.time ;version=2.4.0
+ </require>
+ </resource>
+ <resource id='twitter4j/2.0.8' presentationname='Apache Aries Application Bundlise Twitter4j' symbolicname='twitter4j' uri='twitter4j.location' version='2.0.8'>
+ <description>
+ Application used to bundlelise twitter4j
+ </description>
+ <size>
+ 257233
+ </size>
+ <license>
+ http://www.apache.org/licenses/LICENSE-2.0.txt
+ </license>
+ <documentation>
+ http://www.apache.org
+ </documentation>
+ <capability name='bundle'>
+ <p n='manifestversion' v='2'/>
+ <p n='presentationname' v='Apache Aries Application Bundlise Twitter4j'/>
+ <p n='symbolicname' v='twitter4j'/>
+ <p n='version' t='version' v='2.0.8'/>
+ </capability>
+ <capability name='package'>
+ <p n='package' v='twitter4j'/>
+ <p n='uses' v='javax.xml.transform.dom,javax.xml.transform.stream,org.w3c.dom,javax.xml.transform'/>
+ <p n='version' t='version' v='2.0.8'/>
+ </capability>
+ <require extend='false' filter='(&(package=com.sun.syndication.feed.synd)(version>=0.0.0))' multiple='false' name='package' optional='true'>
+ Import package com.sun.syndication.feed.synd
+ </require>
+ <require extend='false' filter='(&(package=com.sun.syndication.io)(version>=0.0.0))' multiple='false' name='package' optional='true'>
+ Import package com.sun.syndication.io
+ </require>
+ <require extend='false' filter='(&(package=javax.crypto)(version>=0.0.0))' multiple='false' name='package' optional='false'>
+ Import package javax.crypto
+ </require>
+ <require extend='false' filter='(&(package=javax.crypto.spec)(version>=0.0.0))' multiple='false' name='package' optional='false'>
+ Import package javax.crypto.spec
+ </require>
+ <require extend='false' filter='(&(package=javax.xml.parsers)(version>=0.0.0))' multiple='false' name='package' optional='false'>
+ Import package javax.xml.parsers
+ </require>
+ <require extend='false' filter='(&(package=javax.xml.transform)(version>=0.0.0))' multiple='false' name='package' optional='false'>
+ Import package javax.xml.transform
+ </require>
+ <require extend='false' filter='(&(package=javax.xml.transform.dom)(version>=0.0.0))' multiple='false' name='package' optional='false'>
+ Import package javax.xml.transform.dom
+ </require>
+ <require extend='false' filter='(&(package=javax.xml.transform.stream)(version>=0.0.0))' multiple='false' name='package' optional='false'>
+ Import package javax.xml.transform.stream
+ </require>
+ <require extend='false' filter='(&(package=org.slf4j)(version>=0.0.0))' multiple='false' name='package' optional='false'>
+ Import package org.slf4j
+ </require>
+ <require extend='false' filter='(&(package=org.w3c.dom)(version>=0.0.0))' multiple='false' name='package' optional='false'>
+ Import package org.w3c.dom
+ </require>
+ <require extend='false' filter='(&(package=org.xml.sax)(version>=0.0.0))' multiple='false' name='package' optional='false'>
+ Import package org.xml.sax
+ </require>
+ <require extend='false' filter='(&(package=twitter4j)(version>=2.0.8))' multiple='false' name='package' optional='false'>
+ Import package twitter4j ;version=2.0.8
+ </require>
+ </resource>
+</repository>
\ No newline at end of file
Added: aries/tags/application-0.3/application-management/pom.xml
URL: http://svn.apache.org/viewvc/aries/tags/application-0.3/application-management/pom.xml?rev=1075132&view=auto
==============================================================================
--- aries/tags/application-0.3/application-management/pom.xml (added)
+++ aries/tags/application-0.3/application-management/pom.xml Sun Feb 27 20:20:13 2011
@@ -0,0 +1,85 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.aries.application</groupId>
+ <artifactId>application</artifactId>
+ <version>0.3</version>
+ </parent>
+
+ <artifactId>org.apache.aries.application.management</artifactId>
+ <packaging>bundle</packaging>
+ <name>Apache Aries Application Management</name>
+ <description>
+ Implementation of the application management API
+ </description>
+
+ <properties>
+ <aries.osgi.export.pkg>
+ </aries.osgi.export.pkg>
+ <aries.osgi.private.pkg>
+ org.apache.aries.application.management.impl;
+ org.apache.aries.application.management.internal;
+ org.apache.aries.application.management.repository
+ </aries.osgi.private.pkg>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.application</groupId>
+ <artifactId>org.apache.aries.application.utils</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.application</groupId>
+ <artifactId>org.apache.aries.application.deployment.management</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.aries.testsupport</groupId>
+ <artifactId>org.apache.aries.testsupport.unit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.compendium</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
Added: aries/tags/application-0.3/application-management/src/main/java/org/apache/aries/application/management/impl/AriesApplicationImpl.java
URL: http://svn.apache.org/viewvc/aries/tags/application-0.3/application-management/src/main/java/org/apache/aries/application/management/impl/AriesApplicationImpl.java?rev=1075132&view=auto
==============================================================================
--- aries/tags/application-0.3/application-management/src/main/java/org/apache/aries/application/management/impl/AriesApplicationImpl.java (added)
+++ aries/tags/application-0.3/application-management/src/main/java/org/apache/aries/application/management/impl/AriesApplicationImpl.java Sun Feb 27 20:20:13 2011
@@ -0,0 +1,191 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIESOR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.aries.application.management.impl;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.aries.application.ApplicationMetadata;
+import org.apache.aries.application.Content;
+import org.apache.aries.application.DeploymentMetadata;
+import org.apache.aries.application.management.AriesApplication;
+import org.apache.aries.application.management.BundleInfo;
+import org.apache.aries.application.management.spi.convert.BundleConversion;
+import org.apache.aries.application.management.spi.runtime.LocalPlatform;
+import org.apache.aries.application.utils.AppConstants;
+import org.apache.aries.application.utils.filesystem.IOUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AriesApplicationImpl implements AriesApplication {
+
+ private static final Logger _logger = LoggerFactory.getLogger("org.apache.aries.application.management");
+
+ private Set<BundleInfo> _bundleInfo;
+ private ApplicationMetadata _applicationMetadata;
+ private DeploymentMetadata _deploymentMetadata;
+ private LocalPlatform _localPlatform;
+
+ // Placeholders for information we'll need for store()
+ private Map<String, BundleConversion> _modifiedBundles = null;
+
+ public AriesApplicationImpl(ApplicationMetadata meta, Set<BundleInfo> bundleInfo,
+ LocalPlatform lp) {
+ _applicationMetadata = meta;
+ _bundleInfo = bundleInfo;
+ _deploymentMetadata = null;
+ _localPlatform = lp;
+
+ }
+
+ public AriesApplicationImpl(ApplicationMetadata meta, DeploymentMetadata dep,
+ Set<BundleInfo> bundleInfo, LocalPlatform lp) {
+ _applicationMetadata = meta;
+ _bundleInfo = bundleInfo;
+ _deploymentMetadata = dep;
+ _localPlatform = lp;
+
+ }
+
+ public ApplicationMetadata getApplicationMetadata() {
+ return _applicationMetadata;
+ }
+
+ public Set<BundleInfo> getBundleInfo() {
+ return _bundleInfo;
+ }
+
+ public DeploymentMetadata getDeploymentMetadata() {
+ return _deploymentMetadata;
+ }
+
+ public void setDeploymentMetadata (DeploymentMetadata dm) {
+ _deploymentMetadata = dm;
+ }
+
+ public Map<String, BundleConversion> getModifiedBundles() {
+ return _modifiedBundles;
+ }
+
+ public void setModifiedBundles (Map<String, BundleConversion> modifiedBundles) {
+ _modifiedBundles = modifiedBundles;
+ }
+
+ public void setLocalPlatform (LocalPlatform lp) {
+ _localPlatform = lp;
+ }
+
+ public boolean isResolved() {
+ return getDeploymentMetadata() != null;
+ }
+
+ public void store(File f) throws FileNotFoundException, IOException {
+ if (f.isDirectory()) {
+ storeInDirectory(f);
+ } else {
+ OutputStream os = new FileOutputStream (f);
+ store(os);
+ os.close();
+ }
+ }
+
+ /**
+ * Construct an eba in a temporary directory
+ * Copy the eba to the target output stream
+ * Delete the temporary directory.
+ * Leave target output stream open
+ */
+ public void store(OutputStream targetStream) throws FileNotFoundException, IOException {
+
+ //
+ // This code will be run on various application server platforms, each of which
+ // will have its own policy about where to create temporary directories. We
+ // can't just ask the local filesystem for a temporary directory since it may
+ // be quite large: the app server implementation will be better able to select
+ // an appropriate location.
+ File tempDir = _localPlatform.getTemporaryDirectory();
+ storeInDirectory(tempDir);
+ // We now have an exploded eba in tempDir which we need to copy into targetStream
+ IOUtils.zipUp(tempDir, targetStream);
+ if (!IOUtils.deleteRecursive(tempDir))
+ {
+ _logger.warn("APPMANAGEMENT0001E", tempDir);
+ }
+ }
+
+ private void storeInDirectory(File dir) throws IOException, MalformedURLException {
+ OutputStream out = null;
+ InputStream in = null;
+ try {
+ out = IOUtils.getOutputStream(dir, AppConstants.APPLICATION_MF);
+ _applicationMetadata.store(out);
+
+ } finally {
+ IOUtils.close(out);
+ }
+ if (_deploymentMetadata != null) {
+ try {
+ out = IOUtils.getOutputStream(dir, AppConstants.DEPLOYMENT_MF);
+ _deploymentMetadata.store(out);
+ } finally {
+ IOUtils.close(out);
+ }
+ }
+
+ // Write the by-value eba files out
+ for (BundleInfo bi : _bundleInfo) {
+ // bi.getLocation() will return a URL to the source bundle. It may be of the form
+ // file:/path/to/my/file.jar, or
+ // jar:file:/my/path/to/eba.jar!/myBundle.jar
+ String bundleLocation = bi.getLocation();
+ String bundleFileName = bundleLocation.substring(bundleLocation.lastIndexOf('/') + 1);
+ try {
+ out = IOUtils.getOutputStream(dir, bundleFileName);
+ URL bundleURL = new URL (bundleLocation);
+ InputStream is = bundleURL.openStream();
+ IOUtils.copy(is, out);
+ } finally {
+ IOUtils.close(out);
+ IOUtils.close(in);
+ }
+ }
+
+ // Write the migrated bundles out
+ if (_modifiedBundles != null) {
+ for (Map.Entry<String, BundleConversion> modifiedBundle : _modifiedBundles.entrySet()) {
+ try {
+ out = IOUtils.getOutputStream(dir, modifiedBundle.getKey());
+ IOUtils.copy(modifiedBundle.getValue().getInputStream(), out);
+ } finally {
+ IOUtils.close(out);
+ }
+ }
+ }
+ }
+}