aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tjwat...@apache.org
Subject svn commit: r1606837 [5/27] - in /aries/branches/subsystemsR6: ./ application/ application/application-api/ application/application-bundle/ application/application-converters/ application/application-default-local-platform/ application/application-depl...
Date Mon, 30 Jun 2014 16:55:06 GMT
Modified: aries/branches/subsystemsR6/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverTest.java
URL: http://svn.apache.org/viewvc/aries/branches/subsystemsR6/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverTest.java?rev=1606837&r1=1606836&r2=1606837&view=diff
==============================================================================
--- aries/branches/subsystemsR6/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverTest.java (original)
+++ aries/branches/subsystemsR6/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/OBRResolverTest.java Mon Jun 30 16:54:57 2014
@@ -18,9 +18,6 @@
  */
 package org.apache.aries.application.runtime.itests;
 
-import static org.apache.aries.itest.ExtraOptions.mavenBundle;
-import static org.apache.aries.itest.ExtraOptions.paxLogging;
-import static org.apache.aries.itest.ExtraOptions.testOptions;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 import static org.osgi.framework.Constants.BUNDLE_MANIFESTVERSION;
@@ -28,6 +25,7 @@ import static org.osgi.framework.Constan
 import static org.osgi.framework.Constants.BUNDLE_VERSION;
 import static org.osgi.framework.Constants.EXPORT_PACKAGE;
 import static org.osgi.framework.Constants.IMPORT_PACKAGE;
+import static org.ops4j.pax.exam.CoreOptions.*;
 
 import java.io.File;
 import java.io.FileInputStream;
@@ -63,297 +61,289 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
 import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.container.def.PaxRunnerOptions;
-import org.ops4j.pax.exam.junit.MavenConfiguredJUnit4TestRunner;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
 import org.osgi.framework.Bundle;
 
-@RunWith(MavenConfiguredJUnit4TestRunner.class)
-public class OBRResolverTest extends AbstractIntegrationTest 
-{
-  public static final String CORE_BUNDLE_BY_VALUE = "core.bundle.by.value";
-  public static final String CORE_BUNDLE_BY_REFERENCE = "core.bundle.by.reference";
-  public static final String TRANSITIVE_BUNDLE_BY_VALUE = "transitive.bundle.by.value";
-  public static final String TRANSITIVE_BUNDLE_BY_REFERENCE = "transitive.bundle.by.reference";
-  public static final String BUNDLE_IN_FRAMEWORK = "org.apache.aries.util";
-  
-  
-  /* Use @Before not @BeforeClass so as to ensure that these resources
-   * are created in the paxweb temp directory, and not in the svn tree
-   */
-  @Before
-  public static void createApplications() throws Exception 
-  {
-    ZipFixture bundle = ArchiveFixture.newJar().manifest()
-                            .attribute(BUNDLE_SYMBOLICNAME, CORE_BUNDLE_BY_VALUE)
-                            .attribute(BUNDLE_MANIFESTVERSION, "2")
-                            .attribute(IMPORT_PACKAGE, "p.q.r, x.y.z, javax.naming, " + BUNDLE_IN_FRAMEWORK)
-                            .attribute(BUNDLE_VERSION, "1.0.0").end();
-
-    
-    FileOutputStream fout = new FileOutputStream(CORE_BUNDLE_BY_VALUE + ".jar");
-    bundle.writeOut(fout);
-    fout.close();
-
-    bundle = ArchiveFixture.newJar().manifest()
-                            .attribute(BUNDLE_SYMBOLICNAME, TRANSITIVE_BUNDLE_BY_VALUE)
-                            .attribute(BUNDLE_MANIFESTVERSION, "2")
-                            .attribute(EXPORT_PACKAGE, "p.q.r")
-                            .attribute(BUNDLE_VERSION, "1.0.0").end();
-
-    fout = new FileOutputStream(TRANSITIVE_BUNDLE_BY_VALUE + ".jar");
-    bundle.writeOut(fout);
-    fout.close();
-
-    bundle = ArchiveFixture.newJar().manifest()
-                            .attribute(BUNDLE_SYMBOLICNAME, TRANSITIVE_BUNDLE_BY_REFERENCE)
-                            .attribute(BUNDLE_MANIFESTVERSION, "2")
-                            .attribute(EXPORT_PACKAGE, "x.y.z")
-                            .attribute(BUNDLE_VERSION, "1.0.0").end();
-    
-    fout = new FileOutputStream(TRANSITIVE_BUNDLE_BY_REFERENCE + ".jar");
-    bundle.writeOut(fout);
-    fout.close();
-
-    bundle = ArchiveFixture.newJar().manifest()
-                            .attribute(BUNDLE_SYMBOLICNAME, CORE_BUNDLE_BY_REFERENCE)
-                            .attribute(BUNDLE_MANIFESTVERSION, "2")
-                            .attribute(EXPORT_PACKAGE, "d.e.f")
-                            .attribute(BUNDLE_VERSION, "1.0.0").end();
-    
-    fout = new FileOutputStream(CORE_BUNDLE_BY_REFERENCE + ".jar");
-    bundle.writeOut(fout);
-    fout.close();
-
-    bundle = ArchiveFixture.newJar().manifest()
-                            .attribute(BUNDLE_SYMBOLICNAME, CORE_BUNDLE_BY_REFERENCE)
-                            .attribute(BUNDLE_MANIFESTVERSION, "2")
-                            .attribute(EXPORT_PACKAGE, "d.e.f").end();
-
-    fout = new FileOutputStream(CORE_BUNDLE_BY_REFERENCE + "_0.0.0.jar");
-    bundle.writeOut(fout);
-    fout.close();
-    
-    ZipFixture testEba = ArchiveFixture.newZip()
-     .binary("META-INF/APPLICATION.MF",
-        OBRResolverTest.class.getClassLoader().getResourceAsStream("obr/APPLICATION.MF"))
-        .end()
-      .binary(CORE_BUNDLE_BY_VALUE + ".jar", new FileInputStream(CORE_BUNDLE_BY_VALUE + ".jar")).end()
-      .binary(TRANSITIVE_BUNDLE_BY_VALUE + ".jar", new FileInputStream(TRANSITIVE_BUNDLE_BY_VALUE + ".jar")).end();
-
-    fout = new FileOutputStream("blog.eba");
-    testEba.writeOut(fout);
-    fout.close();
-  }
-
-  @After
-  public void clearRepository() {
-	  RepositoryAdmin repositoryAdmin = context().getService(RepositoryAdmin.class);
-	  Repository[] repos = repositoryAdmin.listRepositories();
-	  if ((repos != null) && (repos.length >0)) {
-		  for (Repository repo : repos) {
-			  repositoryAdmin.removeRepository(repo.getURI());
-		  }
-	  }
-  }
-  @Test(expected=ResolverException.class)
-  public void testBlogAppResolveFail() throws ResolverException, Exception
-  {
-    //  provision against the local runtime
-    System.setProperty(AppConstants.PROVISON_EXCLUDE_LOCAL_REPO_SYSPROP, "false");
-    generateOBRRepoXML(TRANSITIVE_BUNDLE_BY_REFERENCE + ".jar", CORE_BUNDLE_BY_REFERENCE + "_0.0.0.jar");
-    
-    RepositoryAdmin repositoryAdmin = context().getService(RepositoryAdmin.class);
-    
-    Repository[] repos = repositoryAdmin.listRepositories();
-    for (Repository repo : repos) {
-      repositoryAdmin.removeRepository(repo.getURI());
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
+public class OBRResolverTest extends AbstractIntegrationTest {
+
+    public static final String CORE_BUNDLE_BY_VALUE = "core.bundle.by.value";
+    public static final String CORE_BUNDLE_BY_REFERENCE = "core.bundle.by.reference";
+    public static final String TRANSITIVE_BUNDLE_BY_VALUE = "transitive.bundle.by.value";
+    public static final String TRANSITIVE_BUNDLE_BY_REFERENCE = "transitive.bundle.by.reference";
+    public static final String BUNDLE_IN_FRAMEWORK = "org.apache.aries.util";
+
+
+    /* Use @Before not @BeforeClass so as to ensure that these resources
+     * are created in the paxweb temp directory, and not in the svn tree
+     */
+    @Before
+    public void createApplications() throws Exception {
+        ZipFixture bundle = ArchiveFixture.newJar().manifest()
+                .attribute(BUNDLE_SYMBOLICNAME, CORE_BUNDLE_BY_VALUE)
+                .attribute(BUNDLE_MANIFESTVERSION, "2")
+                .attribute(IMPORT_PACKAGE, "p.q.r, x.y.z, javax.naming, " + BUNDLE_IN_FRAMEWORK)
+                .attribute(BUNDLE_VERSION, "1.0.0").end();
+
+
+        FileOutputStream fout = new FileOutputStream(CORE_BUNDLE_BY_VALUE + ".jar");
+        bundle.writeOut(fout);
+        fout.close();
+
+        bundle = ArchiveFixture.newJar().manifest()
+                .attribute(BUNDLE_SYMBOLICNAME, TRANSITIVE_BUNDLE_BY_VALUE)
+                .attribute(BUNDLE_MANIFESTVERSION, "2")
+                .attribute(EXPORT_PACKAGE, "p.q.r")
+                .attribute(BUNDLE_VERSION, "1.0.0").end();
+
+        fout = new FileOutputStream(TRANSITIVE_BUNDLE_BY_VALUE + ".jar");
+        bundle.writeOut(fout);
+        fout.close();
+
+        bundle = ArchiveFixture.newJar().manifest()
+                .attribute(BUNDLE_SYMBOLICNAME, TRANSITIVE_BUNDLE_BY_REFERENCE)
+                .attribute(BUNDLE_MANIFESTVERSION, "2")
+                .attribute(EXPORT_PACKAGE, "x.y.z")
+                .attribute(BUNDLE_VERSION, "1.0.0").end();
+
+        fout = new FileOutputStream(TRANSITIVE_BUNDLE_BY_REFERENCE + ".jar");
+        bundle.writeOut(fout);
+        fout.close();
+
+        bundle = ArchiveFixture.newJar().manifest()
+                .attribute(BUNDLE_SYMBOLICNAME, CORE_BUNDLE_BY_REFERENCE)
+                .attribute(BUNDLE_MANIFESTVERSION, "2")
+                .attribute(EXPORT_PACKAGE, "d.e.f")
+                .attribute(BUNDLE_VERSION, "1.0.0").end();
+
+        fout = new FileOutputStream(CORE_BUNDLE_BY_REFERENCE + ".jar");
+        bundle.writeOut(fout);
+        fout.close();
+
+        bundle = ArchiveFixture.newJar().manifest()
+                .attribute(BUNDLE_SYMBOLICNAME, CORE_BUNDLE_BY_REFERENCE)
+                .attribute(BUNDLE_MANIFESTVERSION, "2")
+                .attribute(EXPORT_PACKAGE, "d.e.f").end();
+
+        fout = new FileOutputStream(CORE_BUNDLE_BY_REFERENCE + "_0.0.0.jar");
+        bundle.writeOut(fout);
+        fout.close();
+
+        ZipFixture testEba = ArchiveFixture.newZip()
+                .binary("META-INF/APPLICATION.MF",
+                        OBRResolverTest.class.getClassLoader().getResourceAsStream("obr/APPLICATION.MF"))
+                .end()
+                .binary(CORE_BUNDLE_BY_VALUE + ".jar", new FileInputStream(CORE_BUNDLE_BY_VALUE + ".jar")).end()
+                .binary(TRANSITIVE_BUNDLE_BY_VALUE + ".jar", new FileInputStream(TRANSITIVE_BUNDLE_BY_VALUE + ".jar")).end();
+
+        fout = new FileOutputStream("blog.eba");
+        testEba.writeOut(fout);
+        fout.close();
     }
-    
-    repositoryAdmin.addRepository(new File("repository.xml").toURI().toURL());
 
-    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
-    AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("blog.eba")));
-    //installing requires a valid url for the bundle in repository.xml.
-    
-    app = manager.resolve(app);
-  }
-  /**
-   * Test the resolution should fail because the required package org.apache.aries.util is provided by the local runtime, 
-   * which is not included when provisioning.
-   *  
-   * @throws Exception
-   */
-  @Test(expected=ResolverException.class)
-  public void testProvisionExcludeLocalRepo() throws Exception {
-    // do not provision against the local runtime
-    System.setProperty(AppConstants.PROVISON_EXCLUDE_LOCAL_REPO_SYSPROP, "true");
-    generateOBRRepoXML(TRANSITIVE_BUNDLE_BY_REFERENCE + ".jar", CORE_BUNDLE_BY_REFERENCE + ".jar");
-    
-    RepositoryAdmin repositoryAdmin = context().getService(RepositoryAdmin.class);
-    
-    Repository[] repos = repositoryAdmin.listRepositories();
-    for (Repository repo : repos) {
-      repositoryAdmin.removeRepository(repo.getURI());
+    @After
+    public void clearRepository() {
+        RepositoryAdmin repositoryAdmin = context().getService(RepositoryAdmin.class);
+        Repository[] repos = repositoryAdmin.listRepositories();
+        if ((repos != null) && (repos.length > 0)) {
+            for (Repository repo : repos) {
+                repositoryAdmin.removeRepository(repo.getURI());
+            }
+        }
     }
-    
-    repositoryAdmin.addRepository(new File("repository.xml").toURI().toURL());
 
-    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
-    AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("blog.eba")));
-    //installing requires a valid url for the bundle in repository.xml.
-    
-    app = manager.resolve(app);
-  }
-  
-  @Test
-  public void test_resolve_self_contained_app_in_isolation() throws Exception {
-      assertEquals(2, createAndResolveSelfContainedApp("org.osgi.framework").size());
-  }
-  
-  @Test(expected=ResolverException.class)
-  public void test_resolve_non_self_contained_app_in_isolation() throws Exception {
-      createAndResolveSelfContainedApp("org.osgi.service.blueprint");
-  }
-  
-  private Collection<ModelledResource> createAndResolveSelfContainedApp(String extraImport) throws Exception {
-      FileOutputStream fout = new FileOutputStream(new File("a.bundle.jar"));
-      ArchiveFixture.newJar()
-              .manifest()
-                  .attribute(BUNDLE_SYMBOLICNAME, "a.bundle")
-                  .attribute(BUNDLE_VERSION, "1.0.0")
-                  .attribute(BUNDLE_MANIFESTVERSION, "2")
-                  .attribute(IMPORT_PACKAGE, "a.pack.age")
-              .end().writeOut(fout);
-      fout.close();
-          
-      fout = new FileOutputStream(new File("b.bundle.jar"));
-      ArchiveFixture.newJar()
-              .manifest()
-                  .attribute(BUNDLE_SYMBOLICNAME, "b.bundle")
-                  .attribute(BUNDLE_VERSION, "1.0.0")
-                  .attribute(BUNDLE_MANIFESTVERSION, "2")
-                  .attribute(IMPORT_PACKAGE, extraImport)
-                  .attribute(EXPORT_PACKAGE, "a.pack.age")
-              .end().writeOut(fout);
-      fout.close();      
-      
-      ModelledResourceManager mrm = context().getService(ModelledResourceManager.class);
-      ModelledResource aBundle = mrm.getModelledResource(FileSystem.getFSRoot(new File("a.bundle.jar")));
-      ModelledResource bBundle = mrm.getModelledResource(FileSystem.getFSRoot(new File("b.bundle.jar")));
-      
-      AriesApplicationResolver resolver = context().getService(AriesApplicationResolver.class);
-      return resolver.resolveInIsolation("test.app", "1.0.0", 
-              Arrays.asList(aBundle, bBundle), 
-              Arrays.<Content>asList(ContentFactory.parseContent("a.bundle", "1.0.0"), ContentFactory.parseContent("b.bundle", "1.0.0")));
-  }
-  
-  @Test
-  public void testBlogApp() throws Exception 
-  {
-    //  provision against the local runtime
-    System.setProperty(AppConstants.PROVISON_EXCLUDE_LOCAL_REPO_SYSPROP, "false");
-    generateOBRRepoXML(TRANSITIVE_BUNDLE_BY_REFERENCE + ".jar", CORE_BUNDLE_BY_REFERENCE + ".jar");
-    
-    RepositoryAdmin repositoryAdmin = context().getService(RepositoryAdmin.class);
-    
-    Repository[] repos = repositoryAdmin.listRepositories();
-    for (Repository repo : repos) {
-      repositoryAdmin.removeRepository(repo.getURI());
+    @Test(expected = ResolverException.class)
+    public void testBlogAppResolveFail() throws ResolverException, Exception {
+        //  provision against the local runtime
+        System.setProperty(AppConstants.PROVISON_EXCLUDE_LOCAL_REPO_SYSPROP, "false");
+        generateOBRRepoXML(TRANSITIVE_BUNDLE_BY_REFERENCE + ".jar", CORE_BUNDLE_BY_REFERENCE + "_0.0.0.jar");
+
+        RepositoryAdmin repositoryAdmin = context().getService(RepositoryAdmin.class);
+
+        Repository[] repos = repositoryAdmin.listRepositories();
+        for (Repository repo : repos) {
+            repositoryAdmin.removeRepository(repo.getURI());
+        }
+
+        repositoryAdmin.addRepository(new File("repository.xml").toURI().toURL());
+
+        AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
+        AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("blog.eba")));
+        //installing requires a valid url for the bundle in repository.xml.
+
+        app = manager.resolve(app);
+    }
+
+    /**
+     * Test the resolution should fail because the required package org.apache.aries.util is provided by the local runtime,
+     * which is not included when provisioning.
+     *
+     * @throws Exception
+     */
+    @Test(expected = ResolverException.class)
+    public void testProvisionExcludeLocalRepo() throws Exception {
+        // do not provision against the local runtime
+        System.setProperty(AppConstants.PROVISON_EXCLUDE_LOCAL_REPO_SYSPROP, "true");
+        generateOBRRepoXML(TRANSITIVE_BUNDLE_BY_REFERENCE + ".jar", CORE_BUNDLE_BY_REFERENCE + ".jar");
+
+        RepositoryAdmin repositoryAdmin = context().getService(RepositoryAdmin.class);
+
+        Repository[] repos = repositoryAdmin.listRepositories();
+        for (Repository repo : repos) {
+            repositoryAdmin.removeRepository(repo.getURI());
+        }
+
+        repositoryAdmin.addRepository(new File("repository.xml").toURI().toURL());
+
+        AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
+        AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("blog.eba")));
+        //installing requires a valid url for the bundle in repository.xml.
+
+        app = manager.resolve(app);
     }
-    
-    repositoryAdmin.addRepository(new File("repository.xml").toURI().toURL());
 
-    AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
-    AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("blog.eba")));
-    //installing requires a valid url for the bundle in repository.xml.
-    
-    app = manager.resolve(app);
-    
-    DeploymentMetadata depMeta = app.getDeploymentMetadata();
-    
-    List<DeploymentContent> provision = depMeta.getApplicationProvisionBundles();
-    
-    assertEquals(provision.toString(), 3, provision.size());
-    
-    List<String> bundleSymbolicNames = new ArrayList<String>();
-    
-    for (DeploymentContent dep : provision) {
-      bundleSymbolicNames.add(dep.getContentName());
+    @Test
+    public void test_resolve_self_contained_app_in_isolation() throws Exception {
+        assertEquals(2, createAndResolveSelfContainedApp("org.osgi.framework").size());
     }
-    
-    assertTrue("Bundle " + TRANSITIVE_BUNDLE_BY_REFERENCE + " not found.", bundleSymbolicNames.contains(TRANSITIVE_BUNDLE_BY_REFERENCE));
-    assertTrue("Bundle " + TRANSITIVE_BUNDLE_BY_VALUE + " not found.", bundleSymbolicNames.contains(TRANSITIVE_BUNDLE_BY_VALUE));
-    assertTrue("Bundle " + BUNDLE_IN_FRAMEWORK + " not found.", bundleSymbolicNames.contains(BUNDLE_IN_FRAMEWORK));
-    
-    AriesApplicationContext ctx = manager.install(app);
-    ctx.start();
-
-    Set<Bundle> bundles = ctx.getApplicationContent();
-    
-    assertEquals("Number of bundles provisioned in the app", 4, bundles.size());
-    
-    ctx.stop();
-    manager.uninstall(ctx);
-  }
-
-
-  private void generateOBRRepoXML(String ... bundleFiles) throws Exception
-  {
-    Set<ModelledResource> mrs = new HashSet<ModelledResource>();
-    FileOutputStream fout = new FileOutputStream("repository.xml");
-    RepositoryGenerator repositoryGenerator = context().getService(RepositoryGenerator.class);
-    ModelledResourceManager modelledResourceManager = context().getService(ModelledResourceManager.class);
-    for (String fileName : bundleFiles) {
-      File bundleFile = new File(fileName);
-      IDirectory jarDir = FileSystem.getFSRoot(bundleFile);
-      mrs.add(modelledResourceManager.getModelledResource(bundleFile.toURI().toString(), jarDir));
+
+    @Test(expected = ResolverException.class)
+    public void test_resolve_non_self_contained_app_in_isolation() throws Exception {
+        createAndResolveSelfContainedApp("org.osgi.service.blueprint");
+    }
+
+    private Collection<ModelledResource> createAndResolveSelfContainedApp(String extraImport) throws Exception {
+        FileOutputStream fout = new FileOutputStream(new File("a.bundle.jar"));
+        ArchiveFixture.newJar()
+                .manifest()
+                .attribute(BUNDLE_SYMBOLICNAME, "a.bundle")
+                .attribute(BUNDLE_VERSION, "1.0.0")
+                .attribute(BUNDLE_MANIFESTVERSION, "2")
+                .attribute(IMPORT_PACKAGE, "a.pack.age")
+                .end().writeOut(fout);
+        fout.close();
+
+        fout = new FileOutputStream(new File("b.bundle.jar"));
+        ArchiveFixture.newJar()
+                .manifest()
+                .attribute(BUNDLE_SYMBOLICNAME, "b.bundle")
+                .attribute(BUNDLE_VERSION, "1.0.0")
+                .attribute(BUNDLE_MANIFESTVERSION, "2")
+                .attribute(IMPORT_PACKAGE, extraImport)
+                .attribute(EXPORT_PACKAGE, "a.pack.age")
+                .end().writeOut(fout);
+        fout.close();
+
+        ModelledResourceManager mrm = context().getService(ModelledResourceManager.class);
+        ModelledResource aBundle = mrm.getModelledResource(FileSystem.getFSRoot(new File("a.bundle.jar")));
+        ModelledResource bBundle = mrm.getModelledResource(FileSystem.getFSRoot(new File("b.bundle.jar")));
+
+        AriesApplicationResolver resolver = context().getService(AriesApplicationResolver.class);
+        return resolver.resolveInIsolation("test.app", "1.0.0",
+                Arrays.asList(aBundle, bBundle),
+                Arrays.<Content>asList(ContentFactory.parseContent("a.bundle", "1.0.0"), ContentFactory.parseContent("b.bundle", "1.0.0")));
     }
-    repositoryGenerator.generateRepository("Test repo description", mrs, fout);
-    fout.close();
+
+    @Test
+    public void testBlogApp() throws Exception {
+        //  provision against the local runtime
+        System.setProperty(AppConstants.PROVISON_EXCLUDE_LOCAL_REPO_SYSPROP, "false");
+        generateOBRRepoXML(TRANSITIVE_BUNDLE_BY_REFERENCE + ".jar", CORE_BUNDLE_BY_REFERENCE + ".jar");
+
+        RepositoryAdmin repositoryAdmin = context().getService(RepositoryAdmin.class);
+
+        Repository[] repos = repositoryAdmin.listRepositories();
+        for (Repository repo : repos) {
+            repositoryAdmin.removeRepository(repo.getURI());
+        }
+
+        repositoryAdmin.addRepository(new File("repository.xml").toURI().toURL());
+
+        AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
+        AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("blog.eba")));
+        //installing requires a valid url for the bundle in repository.xml.
+
+        app = manager.resolve(app);
+
+        DeploymentMetadata depMeta = app.getDeploymentMetadata();
+
+        List<DeploymentContent> provision = depMeta.getApplicationProvisionBundles();
+
+        assertEquals(provision.toString(), 3, provision.size());
+
+        List<String> bundleSymbolicNames = new ArrayList<String>();
+
+        for (DeploymentContent dep : provision) {
+            bundleSymbolicNames.add(dep.getContentName());
+        }
+
+        assertTrue("Bundle " + TRANSITIVE_BUNDLE_BY_REFERENCE + " not found.", bundleSymbolicNames.contains(TRANSITIVE_BUNDLE_BY_REFERENCE));
+        assertTrue("Bundle " + TRANSITIVE_BUNDLE_BY_VALUE + " not found.", bundleSymbolicNames.contains(TRANSITIVE_BUNDLE_BY_VALUE));
+        assertTrue("Bundle " + BUNDLE_IN_FRAMEWORK + " not found.", bundleSymbolicNames.contains(BUNDLE_IN_FRAMEWORK));
+
+        AriesApplicationContext ctx = manager.install(app);
+        ctx.start();
+
+        Set<Bundle> bundles = ctx.getApplicationContent();
+
+        assertEquals("Number of bundles provisioned in the app", 4, bundles.size());
+
+        ctx.stop();
+        manager.uninstall(ctx);
     }
 
 
-  private static Option[] generalConfiguration() {
-    return testOptions(
-        paxLogging("DEBUG"),
-        
-        // Bundles
-        mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint"),
-        mavenBundle("org.ow2.asm", "asm-all"),
-        mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy"),
-        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.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"),
-        mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime.itest.interfaces"),
-        mavenBundle("org.osgi", "org.osgi.compendium")
-
-        /* For debugging, uncomment the next two lines */
-        // vmOption ("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=7777"),
-        // waitForFrameworkStartup(),
-
-        /* For debugging, uncomment the next two lines and add these imports:
-        import static org.ops4j.pax.exam.CoreOptions.waitForFrameworkStartup;
-        import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption;
-        */
-
-        );
-  }
-  
-  @org.ops4j.pax.exam.junit.Configuration
-  public static Option[] configuration()
-  {
-	  return testOptions(
-			  generalConfiguration(),
-			  PaxRunnerOptions.rawPaxRunnerOption("config", "classpath:ss-runner.properties")        
-	          );
-  }
+    private void generateOBRRepoXML(String... bundleFiles) throws Exception {
+        Set<ModelledResource> mrs = new HashSet<ModelledResource>();
+        FileOutputStream fout = new FileOutputStream("repository.xml");
+        RepositoryGenerator repositoryGenerator = context().getService(RepositoryGenerator.class);
+        ModelledResourceManager modelledResourceManager = context().getService(ModelledResourceManager.class);
+        for (String fileName : bundleFiles) {
+            File bundleFile = new File(fileName);
+            IDirectory jarDir = FileSystem.getFSRoot(bundleFile);
+            mrs.add(modelledResourceManager.getModelledResource(bundleFile.toURI().toString(), jarDir));
+        }
+        repositoryGenerator.generateRepository("Test repo description", mrs, fout);
+        fout.close();
+    }
+
+    @Configuration
+    public static Option[] configuration() {
+        return options(
+
+                // framework / core bundles
+                mavenBundle("org.osgi", "org.osgi.core").versionAsInProject(),
+                mavenBundle("org.osgi", "org.osgi.compendium").versionAsInProject(),
+                mavenBundle("org.ops4j.pax.logging", "pax-logging-api").versionAsInProject(),
+                mavenBundle("org.ops4j.pax.logging", "pax-logging-service").versionAsInProject(),
+
+                // Logging
+                systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
+
+                // Bundles
+                junitBundles(),
+                mavenBundle("org.apache.aries.testsupport", "org.apache.aries.testsupport.unit").versionAsInProject(),
+
+                // Bundles
+                mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint").versionAsInProject(),
+                mavenBundle("org.ow2.asm", "asm-all").versionAsInProject(),
+                mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy").versionAsInProject(),
+                mavenBundle("org.apache.aries", "org.apache.aries.util").versionAsInProject(),
+                mavenBundle("org.apache.aries.application", "org.apache.aries.application.api").versionAsInProject(),
+                mavenBundle("org.apache.aries.application", "org.apache.aries.application.utils").versionAsInProject(),
+                mavenBundle("org.apache.aries.application", "org.apache.aries.application.modeller").versionAsInProject(),
+                mavenBundle("org.apache.aries.application", "org.apache.aries.application.default.local.platform").versionAsInProject(),
+                mavenBundle("org.apache.felix", "org.apache.felix.bundlerepository").versionAsInProject(),
+                mavenBundle("org.apache.aries.application", "org.apache.aries.application.resolver.obr").versionAsInProject(),
+                mavenBundle("org.apache.aries.application", "org.apache.aries.application.deployment.management").versionAsInProject(),
+                mavenBundle("org.apache.aries.application", "org.apache.aries.application.management").versionAsInProject(),
+                mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime").versionAsInProject(),
+                mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime.itest.interfaces").versionAsInProject());
+    }
 
 }
\ No newline at end of file

Modified: aries/branches/subsystemsR6/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/UpdateAppTest.java
URL: http://svn.apache.org/viewvc/aries/branches/subsystemsR6/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/UpdateAppTest.java?rev=1606837&r1=1606836&r2=1606837&view=diff
==============================================================================
--- aries/branches/subsystemsR6/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/UpdateAppTest.java (original)
+++ aries/branches/subsystemsR6/application/application-itests/src/test/java/org/apache/aries/application/runtime/itests/UpdateAppTest.java Mon Jun 30 16:54:57 2014
@@ -18,14 +18,11 @@
  */
 package org.apache.aries.application.runtime.itests;
 
-import static org.apache.aries.itest.ExtraOptions.mavenBundle;
-import static org.apache.aries.itest.ExtraOptions.paxLogging;
-import static org.apache.aries.itest.ExtraOptions.testOptions;
 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.systemProperty;
+import static org.ops4j.pax.exam.CoreOptions.*;
 
 import java.io.File;
 import java.io.FileOutputStream;
@@ -55,243 +52,241 @@ import org.apache.aries.util.filesystem.
 import org.apache.aries.util.manifest.ManifestHeaderProcessor;
 import org.apache.felix.bundlerepository.RepositoryAdmin;
 import org.junit.Before;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
 import org.ops4j.pax.exam.Option;
-import org.ops4j.pax.exam.container.def.PaxRunnerOptions;
-import org.ops4j.pax.exam.junit.MavenConfiguredJUnit4TestRunner;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 
-@RunWith(MavenConfiguredJUnit4TestRunner.class)
+@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
 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 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 = context().getService(AriesApplicationManager.class);
-    AriesApplication app = setupApp();
-    
-    updateApp(manager, app);
-
-    assertAppMessage("hello brave new world");
-  }
-  
-  @Test
-  public void testFineUpdate() throws Exception {
-    AriesApplicationManager manager = context().getService(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 = context().getService(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);
+
+    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 void createApplications() throws Exception {
+
+        if (createdApplications) {
+            return;
         }
-      }
-      
-    }, new Hashtable<String, String>());    
-  }
-  
-  private AriesApplication setupApp() throws Exception {
-    AriesApplicationManager manager = context().getService(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, 
-        context().getService(RepositoryGenerator.class), 
-        context().getService(RepositoryAdmin.class), 
-        context().getService(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());
-  }
-
-  private static Option[] generalConfiguration() {
-    return testOptions(
-        paxLogging("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("org.ow2.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.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")
-
-        // 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;
-         */
-        );
-  }
-  
-  @org.ops4j.pax.exam.junit.Configuration
-  public static Option[] configuration()
-  {
-	  return testOptions(
-			  generalConfiguration(),
-			  PaxRunnerOptions.rawPaxRunnerOption("config", "classpath:ss-runner.properties")        
-	          );
-  }
+
+        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
+    @Ignore
+    public void testFullUpdate() throws Exception {
+        AriesApplicationManager manager = context().getService(AriesApplicationManager.class);
+        AriesApplication app = setupApp();
+
+        updateApp(manager, app);
+
+        assertAppMessage("hello brave new world");
+    }
+
+    @Test
+    @Ignore
+    public void testFineUpdate() throws Exception {
+        AriesApplicationManager manager = context().getService(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
+    @Ignore
+    public void testUpdateThenStart() throws Exception {
+        AriesApplicationManager manager = context().getService(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 = context().getService(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,
+                context().getService(RepositoryGenerator.class),
+                context().getService(RepositoryAdmin.class),
+                context().getService(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());
+    }
+
+    @Configuration
+    public static Option[] configuration() {
+        return options(
+
+                // framework / core bundles
+                mavenBundle("org.osgi", "org.osgi.core").versionAsInProject(),
+                mavenBundle("org.osgi", "org.osgi.compendium").versionAsInProject(),
+                mavenBundle("org.ops4j.pax.logging", "pax-logging-api").versionAsInProject(),
+                mavenBundle("org.ops4j.pax.logging", "pax-logging-service").versionAsInProject(),
+
+                // Logging
+                systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
+
+                // do not provision against the local runtime
+                systemProperty(AppConstants.PROVISON_EXCLUDE_LOCAL_REPO_SYSPROP).value("true"),
+
+                // Bundles
+                junitBundles(),
+                mavenBundle("org.apache.aries.testsupport", "org.apache.aries.testsupport.unit").versionAsInProject(),
+                mavenBundle("org.apache.aries.blueprint", "org.apache.aries.blueprint").versionAsInProject(),
+                mavenBundle("org.ow2.asm", "asm-all").versionAsInProject(),
+                mavenBundle("org.apache.aries.proxy", "org.apache.aries.proxy").versionAsInProject(),
+                mavenBundle("org.apache.aries.transaction", "org.apache.aries.transaction.blueprint").versionAsInProject(),
+                mavenBundle("org.apache.aries", "org.apache.aries.util").versionAsInProject(),
+                mavenBundle("org.apache.aries.application", "org.apache.aries.application.api").versionAsInProject(),
+                mavenBundle("org.apache.aries.application", "org.apache.aries.application.utils").versionAsInProject(),
+                mavenBundle("org.apache.aries.application", "org.apache.aries.application.modeller").versionAsInProject(),
+                mavenBundle("org.apache.aries.application", "org.apache.aries.application.default.local.platform").versionAsInProject(),
+                mavenBundle("org.apache.felix", "org.apache.felix.bundlerepository").versionAsInProject(),
+                mavenBundle("org.apache.aries.application", "org.apache.aries.application.resolver.obr").versionAsInProject(),
+                mavenBundle("org.apache.aries.application", "org.apache.aries.application.deployment.management").versionAsInProject(),
+                mavenBundle("org.apache.aries.application", "org.apache.aries.application.management").versionAsInProject(),
+                mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime.framework").versionAsInProject(),
+                mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime.framework.management").versionAsInProject(),
+                mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime.repository").versionAsInProject(),
+                mavenBundle("org.apache.aries.application", "org.apache.aries.application.runtime.isolated").versionAsInProject(),
+                mavenBundle("org.apache.geronimo.specs", "geronimo-jta_1.1_spec").versionAsInProject());
+    }
 
 }

Modified: aries/branches/subsystemsR6/application/application-itests/src/test/java/org/apache/aries/isolated/config/HelloWorldManagedServiceImpl.java
URL: http://svn.apache.org/viewvc/aries/branches/subsystemsR6/application/application-itests/src/test/java/org/apache/aries/isolated/config/HelloWorldManagedServiceImpl.java?rev=1606837&r1=1606836&r2=1606837&view=diff
==============================================================================
--- aries/branches/subsystemsR6/application/application-itests/src/test/java/org/apache/aries/isolated/config/HelloWorldManagedServiceImpl.java (original)
+++ aries/branches/subsystemsR6/application/application-itests/src/test/java/org/apache/aries/isolated/config/HelloWorldManagedServiceImpl.java Mon Jun 30 16:54:57 2014
@@ -46,7 +46,7 @@ public class HelloWorldManagedServiceImp
 		Properties props = new Properties();
 		props.put(Constants.SERVICE_PID, "helloworld-mn");
 		this.context = context;
-		this.msRegistration = context.registerService(ManagedService.class.getName(), this, props);
+		this.msRegistration = context.registerService(ManagedService.class.getName(), this, (Dictionary) props);
 		this.hwRegistration = null;
 		
 		//manually call our update to make sure the HW service is exposed out

Modified: aries/branches/subsystemsR6/application/application-management/pom.xml
URL: http://svn.apache.org/viewvc/aries/branches/subsystemsR6/application/application-management/pom.xml?rev=1606837&r1=1606836&r2=1606837&view=diff
==============================================================================
--- aries/branches/subsystemsR6/application/application-management/pom.xml (original)
+++ aries/branches/subsystemsR6/application/application-management/pom.xml Mon Jun 30 16:54:57 2014
@@ -1,3 +1,4 @@
+<?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
@@ -17,12 +18,14 @@
  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</groupId>
-        <artifactId>java6-parent</artifactId>
-        <version>1.0.0</version>
-        <relativePath />
+        <artifactId>parent</artifactId>
+        <version>2.0.0-SNAPSHOT</version>
+        <relativePath>../../parent/pom.xml</relativePath>
     </parent>
 
     <groupId>org.apache.aries.application</groupId>
@@ -34,11 +37,11 @@
       Implementation of the application management API
     </description>
 
-     <scm>
-         <connection>scm:svn:http://svn.apache.org/repos/asf/aries/trunk/application/application-management</connection>
-         <developerConnection>scm:svn:https://svn.apache.org/repos/asf/aries/trunk/application/application-management</developerConnection>
-         <url>http://svn.apache.org/viewvc/aries/trunk/application/application-management</url>
-     </scm>
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/aries/trunk/application/application-management</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/aries/trunk/application/application-management</developerConnection>
+        <url>http://svn.apache.org/viewvc/aries/trunk/application/application-management</url>
+    </scm>
 
     <properties>
         <aries.osgi.export.pkg>
@@ -54,6 +57,7 @@
 			org.apache.aries.application.management.internal;
 			org.apache.aries.application.management.repository
         </aries.osgi.private.pkg>
+        <lastReleaseVersion>1.0.0</lastReleaseVersion>
     </properties>
 
     <dependencies>
@@ -99,12 +103,12 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
+
     <build>
         <plugins>
             <plugin>
                 <groupId>org.apache.aries.versioning</groupId>
                 <artifactId>org.apache.aries.versioning.plugin</artifactId>
-                <version>0.1.0</version>
                 <executions>
                     <execution>
                         <id>default-verify</id>
@@ -112,12 +116,10 @@
                         <goals>
                             <goal>version-check</goal>
                         </goals>
-                        <configuration>
-                            <oldArtifact>org.apache.aries.application:org.apache.aries.application.management:1.0.0</oldArtifact>
-                        </configuration>
                     </execution>
                 </executions>
             </plugin>
         </plugins>
     </build>
+
 </project>

Modified: aries/branches/subsystemsR6/application/application-modeller-common-test/pom.xml
URL: http://svn.apache.org/viewvc/aries/branches/subsystemsR6/application/application-modeller-common-test/pom.xml?rev=1606837&r1=1606836&r2=1606837&view=diff
==============================================================================
--- aries/branches/subsystemsR6/application/application-modeller-common-test/pom.xml (original)
+++ aries/branches/subsystemsR6/application/application-modeller-common-test/pom.xml Mon Jun 30 16:54:57 2014
@@ -1,3 +1,4 @@
+<?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
@@ -17,12 +18,14 @@
  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</groupId>
-        <artifactId>java5-parent</artifactId>
-        <version>1.0.0</version>
-        <relativePath />
+        <artifactId>parent</artifactId>
+        <version>2.0.0-SNAPSHOT</version>
+        <relativePath>../../parent/pom.xml</relativePath>
     </parent>
 
     <groupId>org.apache.aries.application</groupId>
@@ -34,11 +37,11 @@
       Modelling utilities for working with Aries Applications (distribution for offline use).
     </description>
 
-     <scm>
-         <connection>scm:svn:http://svn.apache.org/repos/asf/aries/trunk/application/application-modeller-common-test</connection>
-         <developerConnection>scm:svn:https://svn.apache.org/repos/asf/aries/trunk/application/application-modeller-common-test</developerConnection>
-         <url>http://svn.apache.org/viewvc/aries/trunk/application/application-modeller-common-test</url>
-     </scm>
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/aries/trunk/application/application-modeller-common-test</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/aries/trunk/application/application-modeller-common-test</developerConnection>
+        <url>http://svn.apache.org/viewvc/aries/trunk/application/application-modeller-common-test</url>
+    </scm>
 
     <dependencies>
         <dependency>

Modified: aries/branches/subsystemsR6/application/application-modeller-standalone/pom.xml
URL: http://svn.apache.org/viewvc/aries/branches/subsystemsR6/application/application-modeller-standalone/pom.xml?rev=1606837&r1=1606836&r2=1606837&view=diff
==============================================================================
--- aries/branches/subsystemsR6/application/application-modeller-standalone/pom.xml (original)
+++ aries/branches/subsystemsR6/application/application-modeller-standalone/pom.xml Mon Jun 30 16:54:57 2014
@@ -1,3 +1,4 @@
+<?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
@@ -17,12 +18,14 @@
  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</groupId>
-        <artifactId>java5-parent</artifactId>
-        <version>1.0.0</version>
-        <relativePath />
+        <artifactId>parent</artifactId>
+        <version>2.0.0-SNAPSHOT</version>
+        <relativePath>../../parent/pom.xml</relativePath>
     </parent>
 
     <groupId>org.apache.aries.application</groupId>
@@ -34,11 +37,11 @@
       Modelling utilities for working with Aries Applications (distribution for offline use).
     </description>
 
-     <scm>
-         <connection>scm:svn:http://svn.apache.org/repos/asf/aries/trunk/application/application-modeller-standalone</connection>
-         <developerConnection>scm:svn:https://svn.apache.org/repos/asf/aries/trunk/application/application-modeller-standalone</developerConnection>
-         <url>http://svn.apache.org/viewvc/aries/trunk/application/application-modeller-standalone</url>
-     </scm>
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/aries/trunk/application/application-modeller-standalone</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/aries/trunk/application/application-modeller-standalone</developerConnection>
+        <url>http://svn.apache.org/viewvc/aries/trunk/application/application-modeller-standalone</url>
+    </scm>
 
     <dependencies>
         <dependency>

Modified: aries/branches/subsystemsR6/application/application-modeller/pom.xml
URL: http://svn.apache.org/viewvc/aries/branches/subsystemsR6/application/application-modeller/pom.xml?rev=1606837&r1=1606836&r2=1606837&view=diff
==============================================================================
--- aries/branches/subsystemsR6/application/application-modeller/pom.xml (original)
+++ aries/branches/subsystemsR6/application/application-modeller/pom.xml Mon Jun 30 16:54:57 2014
@@ -1,3 +1,4 @@
+<?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
@@ -17,12 +18,14 @@
  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</groupId>
-        <artifactId>java5-parent</artifactId>
-        <version>1.0.0</version>
-        <relativePath />
+        <artifactId>parent</artifactId>
+        <version>2.0.0-SNAPSHOT</version>
+        <relativePath>../../parent/pom.xml</relativePath>
     </parent>
 
     <groupId>org.apache.aries.application</groupId>
@@ -34,11 +37,11 @@
       Modelling utilities for working with Aries Applications.
     </description>
 
-     <scm>
-         <connection>scm:svn:http://svn.apache.org/repos/asf/aries/trunk/application/application-modeller</connection>
-         <developerConnection>scm:svn:https://svn.apache.org/repos/asf/aries/trunk/application/application-modeller</developerConnection>
-         <url>http://svn.apache.org/viewvc/aries/trunk/application/application-modeller</url>
-     </scm>
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/aries/trunk/application/application-modeller</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/aries/trunk/application/application-modeller</developerConnection>
+        <url>http://svn.apache.org/viewvc/aries/trunk/application/application-modeller</url>
+    </scm>
 
     <properties>
     	<aries.osgi.private.pkg>
@@ -52,7 +55,7 @@
             org.apache.aries.application.modelling.utils;provide:=true,
             *
         </aries.osgi.import.pkg>
-    	
+        <lastReleaseVersion>1.0.0</lastReleaseVersion>
     </properties>
 
     <dependencies>
@@ -91,8 +94,7 @@
             <artifactId>org.apache.aries.blueprint.core</artifactId>
             <version>1.2.0</version>
         </dependency>
-        
-        
+
         <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.core</artifactId>
@@ -119,12 +121,12 @@
             <version>1.0.0</version>
         </dependency>
     </dependencies>
+
     <build>
         <plugins>
             <plugin>
                 <groupId>org.apache.aries.versioning</groupId>
                 <artifactId>org.apache.aries.versioning.plugin</artifactId>
-                <version>0.1.0</version>
                 <executions>
                     <execution>
                         <id>default-verify</id>
@@ -132,14 +134,10 @@
                         <goals>
                             <goal>version-check</goal>
                         </goals>
-                        <configuration>
-                            <oldArtifact>org.apache.aries.application:org.apache.aries.application.modeller:1.0.0</oldArtifact>
-                        </configuration>
                     </execution>
                 </executions>
             </plugin>
         </plugins>
     </build>
-    
 
 </project>

Modified: aries/branches/subsystemsR6/application/application-noop-resolver/pom.xml
URL: http://svn.apache.org/viewvc/aries/branches/subsystemsR6/application/application-noop-resolver/pom.xml?rev=1606837&r1=1606836&r2=1606837&view=diff
==============================================================================
--- aries/branches/subsystemsR6/application/application-noop-resolver/pom.xml (original)
+++ aries/branches/subsystemsR6/application/application-noop-resolver/pom.xml Mon Jun 30 16:54:57 2014
@@ -1,26 +1,31 @@
 <?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.
+ 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/xsd/maven-4.0.0.xsd">
+
     <modelVersion>4.0.0</modelVersion>
+
     <parent>
         <groupId>org.apache.aries</groupId>
-        <artifactId>java6-parent</artifactId>
-        <version>1.0.0</version>
-        <relativePath />
+        <artifactId>parent</artifactId>
+        <version>2.0.0-SNAPSHOT</version>
+        <relativePath>../../parent/pom.xml</relativePath>
     </parent>
 
     <groupId>org.apache.aries.application</groupId>
@@ -32,11 +37,11 @@
       Dummy implementation of the AriesApplicationResolver
     </description>
 
-     <scm>
-         <connection>scm:svn:http://svn.apache.org/repos/asf/aries/trunk/application/application-noop-resolver</connection>
-         <developerConnection>scm:svn:https://svn.apache.org/repos/asf/aries/trunk/application/application-noop-resolver</developerConnection>
-         <url>http://svn.apache.org/viewvc/aries/trunk/application/application-noop-resolver</url>
-     </scm>
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/aries/trunk/application/application-noop-resolver</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/aries/trunk/application/application-noop-resolver</developerConnection>
+        <url>http://svn.apache.org/viewvc/aries/trunk/application/application-noop-resolver</url>
+    </scm>
 
     <properties>
         <aries.osgi.export.pkg>
@@ -48,7 +53,9 @@
         <aries.osgi.private.pkg>
             org.apache.aries.application.resolver.noop.impl
         </aries.osgi.private.pkg>
+        <lastReleaseVersion>1.0.0</lastReleaseVersion>
     </properties>
+
     <dependencies>
         <dependency>
             <groupId>org.osgi</groupId>
@@ -61,12 +68,12 @@
             <version>1.0.0</version>
         </dependency>
     </dependencies>
+
     <build>
         <plugins>
             <plugin>
                 <groupId>org.apache.aries.versioning</groupId>
                 <artifactId>org.apache.aries.versioning.plugin</artifactId>
-                <version>0.1.0</version>
                 <executions>
                     <execution>
                         <id>default-verify</id>
@@ -74,9 +81,6 @@
                         <goals>
                             <goal>version-check</goal>
                         </goals>
-                        <configuration>
-                            <oldArtifact>org.apache.aries.application:org.apache.aries.application.resolver.noop:1.0.0</oldArtifact>
-                        </configuration>
                     </execution>
                 </executions>
             </plugin>

Modified: aries/branches/subsystemsR6/application/application-obr-resolver/pom.xml
URL: http://svn.apache.org/viewvc/aries/branches/subsystemsR6/application/application-obr-resolver/pom.xml?rev=1606837&r1=1606836&r2=1606837&view=diff
==============================================================================
--- aries/branches/subsystemsR6/application/application-obr-resolver/pom.xml (original)
+++ aries/branches/subsystemsR6/application/application-obr-resolver/pom.xml Mon Jun 30 16:54:57 2014
@@ -1,27 +1,33 @@
 <?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.
+ 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/xsd/maven-4.0.0.xsd">
+
     <modelVersion>4.0.0</modelVersion>
+
     <parent>
         <groupId>org.apache.aries</groupId>
-        <artifactId>java6-parent</artifactId>
-        <version>1.0.0</version>
-        <relativePath />
+        <artifactId>parent</artifactId>
+        <version>2.0.0-SNAPSHOT</version>
+        <relativePath>../../parent/pom.xml</relativePath>
     </parent>
+
     <groupId>org.apache.aries.application</groupId>
     <artifactId>org.apache.aries.application.resolver.obr</artifactId>
     <packaging>bundle</packaging>
@@ -31,15 +37,14 @@
       Implementation of the AriesApplicationResolver using OBR
     </description>
 
-     <scm>
-         <connection>scm:svn:http://svn.apache.org/repos/asf/aries/trunk/application/application-obr-resolver</connection>
-         <developerConnection>scm:svn:https://svn.apache.org/repos/asf/aries/trunk/application/application-obr-resolver</developerConnection>
-         <url>http://svn.apache.org/viewvc/aries/trunk/application/application-obr-resolver</url>
-     </scm>
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/aries/trunk/application/application-obr-resolver</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/aries/trunk/application/application-obr-resolver</developerConnection>
+        <url>http://svn.apache.org/viewvc/aries/trunk/application/application-obr-resolver</url>
+    </scm>
 
     <properties>
         <!-- Export package versions are maintained in packageinfo files -->
-
         <aries.osgi.export.pkg>
             org.apache.aries.application.resolver.obr.ext;
         </aries.osgi.export.pkg>
@@ -54,7 +59,9 @@
             org.apache.aries.application.resolver.obr.impl;
             org.apache.aries.application.resolver.internal;
         </aries.osgi.private.pkg>
+        <lastReleaseVersion>1.0.0</lastReleaseVersion>
     </properties>
+
     <dependencies>
         <dependency>
             <groupId>org.osgi</groupId>
@@ -98,12 +105,12 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
+
     <build>
         <plugins>
             <plugin>
                 <groupId>org.apache.aries.versioning</groupId>
                 <artifactId>org.apache.aries.versioning.plugin</artifactId>
-                <version>0.1.0</version>
                 <executions>
                     <execution>
                         <id>default-verify</id>
@@ -111,9 +118,6 @@
                         <goals>
                             <goal>version-check</goal>
                         </goals>
-                        <configuration>
-                            <oldArtifact>org.apache.aries.application:org.apache.aries.application.resolver.obr:1.0.0</oldArtifact>
-                        </configuration>
                     </execution>
                 </executions>
             </plugin>

Modified: aries/branches/subsystemsR6/application/application-obr-resolver/src/main/java/org/apache/aries/application/resolver/obr/impl/ApplicationResourceImpl.java
URL: http://svn.apache.org/viewvc/aries/branches/subsystemsR6/application/application-obr-resolver/src/main/java/org/apache/aries/application/resolver/obr/impl/ApplicationResourceImpl.java?rev=1606837&r1=1606836&r2=1606837&view=diff
==============================================================================
--- aries/branches/subsystemsR6/application/application-obr-resolver/src/main/java/org/apache/aries/application/resolver/obr/impl/ApplicationResourceImpl.java (original)
+++ aries/branches/subsystemsR6/application/application-obr-resolver/src/main/java/org/apache/aries/application/resolver/obr/impl/ApplicationResourceImpl.java Mon Jun 30 16:54:57 2014
@@ -66,6 +66,10 @@ public class ApplicationResourceImpl imp
     {
       return delgate.matchCase(dictionary);
     }
+
+    public boolean matches(Map<java.lang.String,?> map) {
+        return delgate.matches(map);
+    }
     
     public String toString()
     {

Modified: aries/branches/subsystemsR6/application/application-resolve-transform-cm-itests/pom.xml
URL: http://svn.apache.org/viewvc/aries/branches/subsystemsR6/application/application-resolve-transform-cm-itests/pom.xml?rev=1606837&r1=1606836&r2=1606837&view=diff
==============================================================================
--- aries/branches/subsystemsR6/application/application-resolve-transform-cm-itests/pom.xml (original)
+++ aries/branches/subsystemsR6/application/application-resolve-transform-cm-itests/pom.xml Mon Jun 30 16:54:57 2014
@@ -1,38 +1,46 @@
 <?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.
+ 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/xsd/maven-4.0.0.xsd">
+
     <modelVersion>4.0.0</modelVersion>
+
     <parent>
         <groupId>org.apache.aries</groupId>
-        <artifactId>java6-parent</artifactId>
-        <version>1.0.0</version>
-        <relativePath />
+        <artifactId>parent</artifactId>
+        <version>2.0.0-SNAPSHOT</version>
+        <relativePath>../../parent/pom.xml</relativePath>
     </parent>
+
     <groupId>org.apache.aries.application</groupId>
     <artifactId>org.apache.aries.application.resolve.transform.cm.itests</artifactId>
     <packaging>bundle</packaging>
     <version>1.0.1-SNAPSHOT</version>
     <name>Apache Aries Application Resolve CM Transform iTests</name>
     <description>Apache Aries Application Resolve CM Transformer iTests</description>
-     <scm>
-         <connection>scm:svn:http://svn.apache.org/repos/asf/aries/trunk/application/application-resolve-transform-cm-itests</connection>
-         <developerConnection>scm:svn:https://svn.apache.org/repos/asf/aries/trunk/application/application-resolve-transform-cm-itests</developerConnection>
-         <url>http://svn.apache.org/viewvc/aries/trunk/application/application-resolve-transform-cm-itests</url>
-     </scm>
+
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/aries/trunk/application/application-resolve-transform-cm-itests</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/aries/trunk/application/application-resolve-transform-cm-itests</developerConnection>
+        <url>http://svn.apache.org/viewvc/aries/trunk/application/application-resolve-transform-cm-itests</url>
+    </scm>
+
     <properties>
         <aries.osgi.export.pkg>
         </aries.osgi.export.pkg>
@@ -40,7 +48,9 @@
             org.apache.aries.application.resolve.transform.cm.itests;
         </aries.osgi.private.pkg>
     </properties>
+
     <dependencies>
+        <!-- application bundles -->
         <dependency>
 		    <groupId>org.apache.aries.application</groupId>
 		    <artifactId>org.apache.aries.application.resolve.transform.cm</artifactId>
@@ -56,12 +66,25 @@
             <artifactId>org.apache.aries.application.utils</artifactId>
             <version>1.0.0</version>
         </dependency>
+
+        <!-- framework and test bundles-->
         <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.core</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse</groupId>
+            <artifactId>org.eclipse.osgi</artifactId>
+            <version>3.8.0.v20120529-1548</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
 			<groupId>org.apache.aries</groupId>
 			<artifactId>org.apache.aries.util</artifactId>
             <version>1.0.0</version>
@@ -76,27 +99,17 @@
 		<dependency>
 			<groupId>org.apache.aries.proxy</groupId>
 			<artifactId>org.apache.aries.proxy</artifactId>
-            <version>1.0.0</version>
+            <version>1.0.2-SNAPSHOT</version>
 			<scope>test</scope>
 		</dependency>
 		<dependency>
 			<groupId>org.ow2.asm</groupId>
             <artifactId>asm-all</artifactId>
-            <version>4.0</version>
+            <version>5.0.3</version>
 			<scope>test</scope>
 		</dependency>
-        <dependency>
-            <groupId>org.osgi</groupId>
-            <artifactId>org.osgi.compendium</artifactId>
-            <scope>test</scope>
-        </dependency>       
-        <dependency>
-        	<groupId>org.eclipse</groupId>
-        	<artifactId>osgi</artifactId>
-        	<version>3.5.0.v20090520</version>
-        	<type>jar</type>
-        	<scope>test</scope>
-        </dependency>
+
+        <!-- logging -->
 		<dependency>
 			<groupId>org.ops4j.pax.logging</groupId>
 			<artifactId>pax-logging-api</artifactId>
@@ -107,28 +120,47 @@
 			<artifactId>pax-logging-service</artifactId>
 			<scope>test</scope>
 		</dependency>
+
+        <!-- pax exam -->
 		<dependency>
 			<groupId>org.ops4j.pax.exam</groupId>
 			<artifactId>pax-exam</artifactId>
+            <version>3.4.0</version>
 			<scope>test</scope>
 		</dependency>
-		<dependency>
-			<groupId>org.ops4j.pax.exam</groupId>
-			<artifactId>pax-exam-junit</artifactId>
-			<scope>test</scope>
-		</dependency>
-		<dependency>
-			<groupId>org.ops4j.pax.exam</groupId>
-			<artifactId>pax-exam-container-default</artifactId>
-			<scope>test</scope>
-		</dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-junit4</artifactId>
+            <version>3.4.0</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-container-forked</artifactId>
+            <version>3.4.0</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-link-mvn</artifactId>
+            <version>3.4.0</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.url</groupId>
+            <artifactId>pax-url-aether</artifactId>
+            <version>1.6.0</version>
+            <scope>test</scope>
+        </dependency>
+
         <dependency>
 	        <groupId>org.apache.aries.testsupport</groupId>
 	        <artifactId>org.apache.aries.testsupport.unit</artifactId>
-	        <version>1.0.0</version>
+	        <version>2.0.0-SNAPSHOT</version>
 	        <scope>test</scope>
         </dependency>
     </dependencies>
+
     <build>
         <plugins>
             <plugin>
@@ -150,18 +182,34 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
-                <configuration>
-                    <forkMode>pertest</forkMode>
-                    <excludes>
-                        <exclude>**/*$*</exclude>
-                        <exclude>**/Abstract*.java</exclude>
-                    </excludes>
-                    <includes>
-                        <include>**/Test*.java</include>
-                        <include>**/*Test.java</include>
-                    </includes>
-                </configuration>
             </plugin>
         </plugins>
     </build>
+    
+    <profiles>
+        <profile>
+            <id>ci-build-profile</id>
+            <activation>
+                <property>
+                    <name>maven.repo.local</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-surefire-plugin</artifactId>
+                        <configuration>
+                            <!--
+                                when the local repo location has been specified, we need to pass
+                                on this information to PAX mvn url
+                            -->
+                            <argLine>-Dorg.ops4j.pax.url.mvn.localRepository=${maven.repo.local}</argLine>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
 </project>



Mime
View raw message