incubator-aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lin...@apache.org
Subject svn commit: r1022212 - in /incubator/aries/trunk/subsystem/subsystem-scope-itests: ./ src/ src/test/ src/test/java/ src/test/java/org/ src/test/java/org/apache/ src/test/java/org/apache/aries/ src/test/java/org/apache/aries/subsystem/ src/test/java/org...
Date Wed, 13 Oct 2010 17:43:48 GMT
Author: linsun
Date: Wed Oct 13 17:43:44 2010
New Revision: 1022212

URL: http://svn.apache.org/viewvc?rev=1022212&view=rev
Log:
ARIES-456 Provide scope API & Impl & itests to evaluate the new RFC 138 (Framework hooks) for subsystem

Added:
    incubator/aries/trunk/subsystem/subsystem-scope-itests/
    incubator/aries/trunk/subsystem/subsystem-scope-itests/README
    incubator/aries/trunk/subsystem/subsystem-scope-itests/pom.xml   (with props)
    incubator/aries/trunk/subsystem/subsystem-scope-itests/src/
    incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/
    incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/
    incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/
    incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/apache/
    incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/apache/aries/
    incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/apache/aries/subsystem/
    incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/apache/aries/subsystem/itests/
    incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/apache/aries/subsystem/itests/AbstractIntegrationTest.java   (with props)
    incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/apache/aries/subsystem/itests/JarCreator.java   (with props)
    incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/apache/aries/subsystem/itests/ScopeAdminTest.java   (with props)
    incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/ops4j/
    incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/ops4j/pax/
    incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/ops4j/pax/runner/
    incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/ops4j/pax/runner/platform/
    incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/ops4j/pax/runner/platform/equinox/
    incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/ops4j/pax/runner/platform/equinox/internal/
    incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/ops4j/pax/runner/platform/equinox/internal/SsActivator.java   (with props)
    incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/resources/
    incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/resources/META-INF/
    incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/resources/META-INF/platform-equinox/
    incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/resources/META-INF/platform-equinox/definition-3.7.0.V20100910.xml   (with props)
    incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/resources/META-INF/platform-equinox/definition-V43PROTOTYPE-3.6.0.201003231329.xml   (with props)
    incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/resources/ss-runner.properties   (with props)

Added: incubator/aries/trunk/subsystem/subsystem-scope-itests/README
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/subsystem/subsystem-scope-itests/README?rev=1022212&view=auto
==============================================================================
--- incubator/aries/trunk/subsystem/subsystem-scope-itests/README (added)
+++ incubator/aries/trunk/subsystem/subsystem-scope-itests/README Wed Oct 13 17:43:44 2010
@@ -0,0 +1,5 @@
+Follow the following steps to run the itests -
+
+1. Build scope-api, scope-impl & subsystem-example
+2. Run org.apache.aries.subsystem.itests.JarCreator as java application, which will install helloIsolation and helloIsolationRef 1.0.0 & 2.0.0 jar in your local maven 2 repo.  This is needed for the itests
+3. Execute the itests using mvn clean install

Added: incubator/aries/trunk/subsystem/subsystem-scope-itests/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/subsystem/subsystem-scope-itests/pom.xml?rev=1022212&view=auto
==============================================================================
--- incubator/aries/trunk/subsystem/subsystem-scope-itests/pom.xml (added)
+++ incubator/aries/trunk/subsystem/subsystem-scope-itests/pom.xml Wed Oct 13 17:43:44 2010
@@ -0,0 +1,207 @@
+
+    <!--
+        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.subsystem</groupId>
+        <artifactId>subsystem</artifactId>
+        <version>0.3-incubating-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>org.apache.aries.subsystem.scope.itests</artifactId>
+    <name>Apache Aries Subsystem iTests</name>
+    <description>
+        Integration tests using the subsystem scope api, impl for the implementation
+        and subsystem-example helloIsolation and helloIsolationRef for the subsysem to be tested.
+    </description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse</groupId>
+            <artifactId>osgi</artifactId>
+            <version>3.7.0.v20100910</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.subsystem</groupId>
+            <artifactId>org.apache.aries.subsystem.api</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.subsystem</groupId>
+            <artifactId>org.apache.aries.subsystem.scope.api</artifactId>
+            <version>${version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.subsystem</groupId>
+            <artifactId>org.apache.aries.subsystem.scope.impl</artifactId>
+            <version>${version}</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.testsupport</groupId>
+            <artifactId>org.apache.aries.testsupport.unit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries</groupId>
+            <artifactId>org.apache.aries.util</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam</artifactId>
+            <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-junit-extender-impl</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.runner</groupId>
+            <artifactId>pax-runner-no-jcl</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.configadmin</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.logging</groupId>
+            <artifactId>pax-logging-api</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.logging</groupId>
+            <artifactId>pax-logging-service</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.url</groupId>
+            <artifactId>pax-url-mvn</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.osgi.service.obr</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.bundlerepository</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.application</groupId>
+            <artifactId>org.apache.aries.application.utils</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.subsystem.example</groupId>
+            <artifactId>org.apache.aries.subsystem.example.helloIsolation</artifactId>
+            <version>${version}</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <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>
+            <plugin>
+                <groupId>org.ops4j.pax.exam</groupId>
+                <artifactId>maven-paxexam-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>generate-config</id>
+                        <goals>
+                            <goal>generate-depends-file</goal>
+                        </goals>
+                        <configuration>
+                            <outputFile>${project.build.directory}/test-classes/META-INF/maven/dependencies.properties</outputFile>
+                        </configuration>
+                    </execution>
+                </executions>
+            </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>

Propchange: incubator/aries/trunk/subsystem/subsystem-scope-itests/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/aries/trunk/subsystem/subsystem-scope-itests/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/aries/trunk/subsystem/subsystem-scope-itests/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/apache/aries/subsystem/itests/AbstractIntegrationTest.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/apache/aries/subsystem/itests/AbstractIntegrationTest.java?rev=1022212&view=auto
==============================================================================
--- incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/apache/aries/subsystem/itests/AbstractIntegrationTest.java (added)
+++ incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/apache/aries/subsystem/itests/AbstractIntegrationTest.java Wed Oct 13 17:43:44 2010
@@ -0,0 +1,209 @@
+/*
+ * 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.subsystem.itests;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.*;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Currency;
+import java.util.List;
+import java.util.Properties;
+
+import org.junit.After;
+import org.junit.Before;
+import org.ops4j.pax.exam.CoreOptions;
+import static org.ops4j.pax.exam.CoreOptions.options;
+import static org.ops4j.pax.exam.CoreOptions.wrappedBundle;
+import org.ops4j.pax.exam.Inject;
+import org.ops4j.pax.exam.Option;
+import static org.ops4j.pax.exam.OptionUtils.combine;
+import org.ops4j.pax.exam.options.MavenArtifactProvisionOption;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.framework.Filter;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.service.blueprint.container.BlueprintContainer;
+import org.osgi.util.tracker.ServiceTracker;
+
+public abstract class AbstractIntegrationTest {
+
+    public static final long DEFAULT_TIMEOUT = 10000;
+
+    private List<ServiceTracker> srs;
+
+    @Before
+    public void setUp() {
+        srs = new ArrayList<ServiceTracker>();
+    }
+    
+    @After
+    public void tearDown() throws Exception{
+        for (ServiceTracker st : srs) {
+            if (st != null) {
+                st.close();
+            }  
+        }
+    }
+    
+    @Inject
+    protected BundleContext bundleContext;
+
+    protected <T> T getOsgiService(Class<T> type, long timeout) {
+        return getOsgiService(type, null, timeout);
+    }
+
+    protected <T> T getOsgiService(Class<T> type) {
+        return getOsgiService(type, null, DEFAULT_TIMEOUT);
+    }
+    
+    protected <T> T getOsgiService(BundleContext bc, Class<T> type, String filter, long timeout) {
+        ServiceTracker tracker = null;
+        try {
+            String flt;
+            if (filter != null) {
+                if (filter.startsWith("(")) {
+                    flt = "(&(" + Constants.OBJECTCLASS + "=" + type.getName() + ")" + filter + ")";
+                } else {
+                    flt = "(&(" + Constants.OBJECTCLASS + "=" + type.getName() + ")(" + filter + "))";
+                }
+            } else {
+                flt = "(" + Constants.OBJECTCLASS + "=" + type.getName() + ")";
+            }
+            Filter osgiFilter = FrameworkUtil.createFilter(flt);
+            tracker = new ServiceTracker(bc == null ? bundleContext : bc, osgiFilter, null);
+            tracker.open();
+            
+            // add tracker to the list of trackers we close at tear down
+            srs.add(tracker);
+            Object svc = type.cast(tracker.waitForService(timeout));
+            if (svc == null) {
+                throw new RuntimeException("Gave up waiting for service " + flt);
+            }
+            return type.cast(svc);
+        } catch (InvalidSyntaxException e) {
+            throw new IllegalArgumentException("Invalid filter", e);
+        } catch (InterruptedException e) {
+            throw new RuntimeException(e);
+        }
+    }
+    
+    protected <T> T getOsgiService(Class<T> type, String filter, long timeout) {
+        return getOsgiService(null, type, filter, timeout);
+    }
+
+    protected Bundle installBundle(String groupId, String artifactId) throws Exception {
+        MavenArtifactProvisionOption mvnUrl = mavenBundle(groupId, artifactId);
+        return bundleContext.installBundle(mvnUrl.getURL());
+    }
+
+    protected Bundle getInstalledBundle(String symbolicName) {
+        for (Bundle b : bundleContext.getBundles()) {
+            if (b.getSymbolicName().equals(symbolicName)) {
+                return b;
+            }
+        }
+        return null;
+    }
+
+    public static MavenArtifactProvisionOption mavenBundle(String groupId, String artifactId) {
+        return CoreOptions.mavenBundle().groupId(groupId).artifactId(artifactId).versionAsInProject();
+    }
+    
+    public static MavenArtifactProvisionOption mavenBundleInTest(String groupId, String artifactId) {
+        return CoreOptions.mavenBundle().groupId(groupId).artifactId(artifactId).version(getArtifactVersion(groupId, artifactId));
+    }
+
+    //TODO getArtifactVersion and getFileFromClasspath are borrowed and modified from pax-exam.  They should be moved back ASAP.
+    public static String getArtifactVersion( final String groupId,
+                                             final String artifactId )
+    {
+        final Properties dependencies = new Properties();
+        try
+        {
+            InputStream in = getFileFromClasspath("META-INF/maven/dependencies.properties");
+            try {
+                dependencies.load(in);
+            } finally {
+                in.close();
+            }
+            final String version = dependencies.getProperty( groupId + "/" + artifactId + "/version" );
+            if( version == null )
+            {
+                throw new RuntimeException(
+                    "Could not resolve version. Do you have a dependency for " + groupId + "/" + artifactId
+                    + " in your maven project?"
+                );
+            }
+            return version;
+        }
+        catch( IOException e )
+        {
+            // TODO throw a better exception
+            throw new RuntimeException(
+                "Could not resolve version. Did you configured the plugin in your maven project?"
+                + "Or maybe you did not run the maven build and you are using an IDE?"
+            );
+        }
+    }
+
+    private static InputStream getFileFromClasspath( final String filePath )
+        throws FileNotFoundException
+    {
+        try
+        {
+            URL fileURL = AbstractIntegrationTest.class.getClassLoader().getResource( filePath );
+            if( fileURL == null )
+            {
+                throw new FileNotFoundException( "File [" + filePath + "] could not be found in classpath" );
+            }
+            return fileURL.openStream();
+        }
+        catch (IOException e)
+        {
+            throw new FileNotFoundException( "File [" + filePath + "] could not be found: " + e.getMessage() );
+        }
+    }
+
+
+    protected static Option[] updateOptions(Option[] options) {
+        // We need to add pax-exam-junit here when running with the ibm
+        // jdk to avoid the following exception during the test run:
+        // ClassNotFoundException: org.ops4j.pax.exam.junit.Configuration
+        if ("IBM Corporation".equals(System.getProperty("java.vendor"))) {
+            Option[] ibmOptions = options(
+                wrappedBundle(mavenBundle("org.ops4j.pax.exam", "pax-exam-junit"))
+            );
+            options = combine(ibmOptions, options);
+        }
+
+        return options;
+    }
+    
+}

Propchange: incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/apache/aries/subsystem/itests/AbstractIntegrationTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/apache/aries/subsystem/itests/AbstractIntegrationTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/apache/aries/subsystem/itests/AbstractIntegrationTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/apache/aries/subsystem/itests/JarCreator.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/apache/aries/subsystem/itests/JarCreator.java?rev=1022212&view=auto
==============================================================================
--- incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/apache/aries/subsystem/itests/JarCreator.java (added)
+++ incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/apache/aries/subsystem/itests/JarCreator.java Wed Oct 13 17:43:44 2010
@@ -0,0 +1,106 @@
+/*
+ * 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.subsystem.itests;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.util.jar.Attributes;
+import java.util.jar.JarInputStream;
+import java.util.jar.JarOutputStream;
+import java.util.jar.Manifest;
+import java.util.zip.ZipEntry;
+
+import org.osgi.framework.Constants;
+
+/**
+ * create multiple version of the same jars for testing purpose 
+ * as OSGi require install bundles have unique jar by symbolicname and version.
+ *
+ */
+public class JarCreator
+{
+  public static void main(String[] args) throws Exception{
+    createJar("1.0.0");
+    createJar("2.0.0");
+  }
+
+  private static void createJar(String version) throws Exception {
+    createJarFromFile("../subsystem-example/subsystem-helloIsolation/target/org.apache.aries.subsystem.example.helloIsolation-0.3-incubating-SNAPSHOT.jar", version);
+    createJarFromFile("../subsystem-example/subsystem-helloIsolationRef/target/org.apache.aries.subsystem.example.helloIsolationRef-0.3-incubating-SNAPSHOT.jar", version);
+  }
+  private static void createJarFromFile(String fileName, String version) throws Exception {
+    JarOutputStream jos = null;
+    FileOutputStream fos = null;
+    ZipEntry entry = null;
+    try {
+      // let's get hold of jars on disk
+      File jarFile = new File(fileName);
+      JarInputStream jarInput = new JarInputStream(jarFile.toURL().openStream());
+      Manifest manifest = jarInput.getManifest();
+      
+      //update manifest, Bundle-Version
+      Attributes attr = manifest.getMainAttributes();
+      attr.putValue(Constants.BUNDLE_VERSION, version);
+      if (fileName.indexOf("helloIsolationRef") < 0) {
+          attr.putValue(Constants.EXPORT_PACKAGE, "org.apache.aries.subsystem.example.helloIsolation;uses:=\"org.osgi.util.tracker,org.osgi.framework\";version=" + version);
+      }
+      
+      int lastSlash = fileName.lastIndexOf("/");
+      // trim the path
+      fileName = fileName.substring(lastSlash + 1);
+      int loc = fileName.indexOf("-");
+      String jarFilePath = fileName.substring(0, loc + 1) + version + ".jar";
+      
+      if (fileName.indexOf("helloIsolationRef") < 0) {
+          File directory = new File(System.getProperty("user.home") + "/.m2/repository/org/apache/aries/subsystem/example/org.apache.aries.subsystem.example.helloIsolation/" + version + "/");
+          if (!directory.exists()) {
+              directory.mkdir();
+          }
+          fos = new FileOutputStream(directory.getAbsolutePath() + "/" + jarFilePath);
+      } else {
+          File directory = new File(System.getProperty("user.home") + "/.m2/repository/org/apache/aries/subsystem/example/org.apache.aries.subsystem.example.helloIsolationRef/" + version + "/");
+          if (!directory.exists()) {
+              directory.mkdir();
+          }
+          fos = new FileOutputStream(directory.getAbsolutePath() + "/" + jarFilePath);  
+      }
+      jos = new JarOutputStream(fos, manifest);
+      
+      //Copy across all entries from the original jar
+      int val;
+      while ((entry = jarInput.getNextEntry()) != null) {
+        jos.putNextEntry(entry);
+        byte[] buffer = new byte[4096];
+        while ((val = jarInput.read(buffer)) != -1)
+          jos.write(buffer, 0, val);
+      }
+      
+      jos.closeEntry();
+      jos.finish();
+      System.out.println("finishing creating jar file: " + jarFilePath + " in local m2 repo");
+    } finally {
+      if (jos != null) {
+        jos.close();
+      }
+      if (fos != null) {
+        fos.close();
+      }
+    }
+  }
+}

Propchange: incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/apache/aries/subsystem/itests/JarCreator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/apache/aries/subsystem/itests/JarCreator.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/apache/aries/subsystem/itests/JarCreator.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/apache/aries/subsystem/itests/ScopeAdminTest.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/apache/aries/subsystem/itests/ScopeAdminTest.java?rev=1022212&view=auto
==============================================================================
--- incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/apache/aries/subsystem/itests/ScopeAdminTest.java (added)
+++ incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/apache/aries/subsystem/itests/ScopeAdminTest.java Wed Oct 13 17:43:44 2010
@@ -0,0 +1,646 @@
+/*
+ * 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.subsystem.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.junit.Assert.fail;
+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.FileOutputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.aries.subsystem.example.helloIsolation.HelloIsolation;
+import org.apache.aries.subsystem.scope.InstallInfo;
+import org.apache.aries.subsystem.scope.Scope;
+import org.apache.aries.subsystem.scope.ScopeAdmin;
+import org.apache.aries.subsystem.scope.ScopeUpdate;
+import org.apache.aries.subsystem.scope.SharePolicy;
+import org.apache.aries.subsystem.scope.impl.ScopeAdminServiceFactory;
+import org.apache.aries.unittest.fixture.ArchiveFixture;
+import org.apache.aries.unittest.fixture.ArchiveFixture.ZipFixture;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.container.def.PaxRunnerOptions;
+import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleEvent;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.Filter;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.wiring.Capability;
+import org.osgi.util.tracker.BundleTracker;
+import org.osgi.util.tracker.BundleTrackerCustomizer;
+
+
+@RunWith(JUnit4TestRunner.class)
+public class ScopeAdminTest extends AbstractIntegrationTest {
+
+    /* 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;
+    BundleTracker bt;
+    int addEventCount;
+    int modifyEventCount;
+    int removeEventCount;
+    
+    @After
+    public void tearDown() throws Exception {
+        if (bt != null) {
+            bt.close();
+        }
+    }
+    
+    @Test
+    public void testBundleServiceIsolation() throws Exception {
+        // make sure we are using a framework that provides composite admin service
+        ScopeAdmin scopeAdmin = getOsgiService(ScopeAdmin.class);
+        assertNotNull("scope admin should not be null", scopeAdmin);
+        System.out.println("able to get scope admin service");
+
+        bt = new BundleTracker(bundleContext, Bundle.INSTALLED | Bundle.UNINSTALLED | Bundle.ACTIVE, new BundleTrackerCustomizer() {
+
+            public synchronized Object addingBundle(Bundle bundle, BundleEvent event) {
+                if (event == null) {
+                    System.out.println("ScopeAdminTest - adding Bundle: " + bundle.getSymbolicName() + " event: null");
+                } else {
+                    System.out.println("ScopeAdminTest - adding Bundle: " + bundle.getSymbolicName() + " event: " + event.getType());
+                    addEventCount++;
+                }
+                return bundle;
+            }
+
+            public synchronized void modifiedBundle(Bundle bundle, BundleEvent event,
+                    Object object) {
+                if (event == null) {
+                    System.out.println("ScopeAdminTest - modifying Bundle: " + bundle.getSymbolicName() + " event: null");
+                } else {
+                    System.out.println("ScopeAdminTest - modifying Bundle: " + bundle.getSymbolicName() + " event: " + event.getType());
+                    modifyEventCount++;
+                }
+                
+                
+            }
+
+            public synchronized void removedBundle(Bundle bundle, BundleEvent event,
+                    Object object) {
+                if (event == null) {
+                    System.out.println("ScopeAdminTest - removing Bundle: " + bundle.getSymbolicName() + " event: null");
+                } else {
+                    System.out.println("ScopeAdminTest - removing Bundle: " + bundle.getSymbolicName() + " event: " + event.getType());
+                    removeEventCount++;
+                }
+            }
+            
+        });
+        bt.open();
+        
+        ScopeUpdate su = scopeAdmin.newScopeUpdate();
+        
+        ScopeUpdate childScopeUpdate = su.newChild("scope_test1");
+        
+        // build up installInfo object for the scope
+        InstallInfo info1 = new InstallInfo(new URL("mvn:org.apache.aries.subsystem.example/org.apache.aries.subsystem.example.helloIsolation/0.3-incubating-SNAPSHOT"), "helloIsolation");
+        InstallInfo info2 = new InstallInfo(new URL("mvn:org.apache.aries.subsystem.example/org.apache.aries.subsystem.example.helloIsolationRef/0.3-incubating-SNAPSHOT"), "helloIsolationRef");
+
+        List<InstallInfo> bundlesToInstall = childScopeUpdate.getBundlesToInstall();
+        bundlesToInstall.add(info1);
+        bundlesToInstall.add(info2);
+        
+        // add bundles to be installed, based on subsystem content
+        su.commit();
+        
+        assertEquals("add event count should be 0 since 0 bundles are installed in root scope", 0, addEventCount);
+        assertEquals("modify event count should be 0", 0, modifyEventCount);
+        assertEquals("remove event count should be 0", 0, removeEventCount);
+        // start all bundles in the scope scope_test1
+        Collection<Bundle> bundlesToStart = childScopeUpdate.getBundles();
+        for (Bundle b : bundlesToStart) {
+            b.start();
+            
+        }
+        
+        assertEquals("add event count should be 0 since 0 bundles are installed in root scope", 0, addEventCount);
+        assertEquals("modify event count should be 0", 0, modifyEventCount);
+        assertEquals("remove event count should be 0", 0, removeEventCount);
+        
+        try {
+            ServiceReference sr = bundleContext.getServiceReference(HelloIsolation.class.getName());
+            fail("should not be able to get the sr for HelloIsolation service");
+        } catch (Exception ex) {
+            // expected 
+        } catch (Error er) {
+            // expected
+        }
+        
+        // test bundle find hooks
+        Bundle[] bundles = bundleContext.getBundles();
+        for (Bundle b : bundles) {
+            System.out.println("Bundle is " + b.getBundleId() + ": " + b.getSymbolicName());
+            if (b.getSymbolicName().indexOf("org.apache.aries.subsystem.example.helloIsolation") > -1) {
+                fail("bundles with name starts with org.apache.aries.subsystem.example.helloIsolation should be in a different scope");
+            }
+        }
+        
+        // test bundle service find hook
+        //ServiceReference sr = bundleContext.getServiceReference(HelloIsolation.class.getName());
+        //assertNull("sr should be null", sr);
+        Collection<Scope> children = scopeAdmin.getScope().getChildren();
+        assertEquals(1, children.size());
+        
+        for (Scope child : children) {
+            if (child.getName().equals("scope_test1")) {
+                Collection<Bundle> buns = child.getBundles();
+                assertEquals(2, buns.size());
+                assertEquals(0, child.getChildren().size());
+                for (Bundle b : buns) {
+                    assertTrue(b.getSymbolicName().indexOf("org.apache.aries.subsystem.example.helloIsolation") > -1);
+                }
+                
+            }
+        }
+        
+        // install a test bundle in the root scope
+        URL url = new URL("mvn:org.apache.felix/org.apache.felix.fileinstall/2.0.8");
+        bundleContext.installBundle("org.apache.felix.fileinstall-rootScope", url.openStream());
+        assertEquals("add event count should be 1 since 1 bundles are installed", 1, addEventCount);
+        assertEquals("modify event count should be 0", 0, modifyEventCount);
+        assertEquals("remove event count should be 0", 0, removeEventCount);
+        
+        
+        // remove child scope
+        su = scopeAdmin.newScopeUpdate();
+        Collection<Scope> scopes = su.getToBeRemovedChildren();
+        
+        // obtain child scope admin from service registry
+        String filter = "ScopeName=scope_test1";
+        ScopeAdmin childScopeAdmin = getOsgiService(ScopeAdmin.class, filter, DEFAULT_TIMEOUT);
+        assertEquals(scopeAdmin.getScope(), childScopeAdmin.getParentScope());
+        scopes.add(childScopeAdmin.getScope());
+        su.commit();
+        
+        childScopeAdmin = null;
+        try {
+            childScopeAdmin = getOsgiService(ScopeAdmin.class, filter, DEFAULT_TIMEOUT);
+        } catch (Exception ex) {
+            // ignore
+        }
+        assertNull("scope admin service for the scope should be unregistered", childScopeAdmin);
+        
+    }
+    
+    @Test
+    public void testPackageIsolation() throws Exception {
+        // make sure we are using a framework that provides composite admin service
+        ScopeAdmin scopeAdmin = getOsgiService(ScopeAdmin.class);
+        assertNotNull("scope admin should not be null", scopeAdmin);
+        System.out.println("able to get scope admin service");
+
+        ScopeUpdate su = scopeAdmin.newScopeUpdate();
+        
+        ScopeUpdate childScopeUpdate = su.newChild("scope_test1");
+        
+        // build up installInfo object for the scope
+        InstallInfo info1 = new InstallInfo(new URL("mvn:org.apache.aries.subsystem.example/org.apache.aries.subsystem.example.helloIsolation/0.3-incubating-SNAPSHOT"), "helloIsolation");
+        InstallInfo info2 = new InstallInfo(new URL("mvn:org.apache.aries.subsystem.example/org.apache.aries.subsystem.example.helloIsolationRef/0.3-incubating-SNAPSHOT"), "helloIsolationRef");
+
+        List<InstallInfo> bundlesToInstall = childScopeUpdate.getBundlesToInstall();
+        bundlesToInstall.add(info1);
+        bundlesToInstall.add(info2);
+        
+        // add bundles to be installed, based on subsystem content
+        su.commit();
+        
+        // start all bundles in the scope scope_test1
+        Collection<Bundle> bundlesToStart = childScopeUpdate.getBundles();
+        for (Bundle b : bundlesToStart) {
+            b.start();
+            
+        }
+        
+        // install helloIsolationRef1 bundle in the root scope
+        URL url1 = new URL("mvn:org.apache.aries.subsystem.example/org.apache.aries.subsystem.example.helloIsolationRef/1.0.0");
+        Bundle helloIsolationRef = bundleContext.installBundle("helloIsolationRef1-rootScope", url1.openStream());
+   
+        try {
+            helloIsolationRef.start();
+            fail("should not be able to start helloIsolationRef since missing import packages");
+        } catch (Exception ex) {
+            // expect resolving error
+        }
+        
+        URL url2 = new URL("mvn:org.apache.aries.subsystem.example/org.apache.aries.subsystem.example.helloIsolation/1.0.0");
+        Bundle helloIsolation = bundleContext.installBundle("helloIsolation1-rootScope", url2.openStream());
+ 
+        helloIsolation.start();
+        
+        // should be able to start the bundle now.
+        helloIsolationRef.start();
+               
+        // remove helloIsolationRef & helloIsolation
+        helloIsolationRef.uninstall();
+        helloIsolation.uninstall();
+        
+        // remove child scope
+        su = scopeAdmin.newScopeUpdate();
+        Collection<Scope> scopes = su.getToBeRemovedChildren();
+        
+        // obtain child scope admin from service registry
+        String filter = "ScopeName=scope_test1";
+        ScopeAdmin childScopeAdmin = getOsgiService(ScopeAdmin.class, filter, DEFAULT_TIMEOUT);
+        assertEquals(scopeAdmin.getScope(), childScopeAdmin.getParentScope());
+        scopes.add(childScopeAdmin.getScope());
+        su.commit();
+        
+        childScopeAdmin = null;
+        try {
+            childScopeAdmin = getOsgiService(ScopeAdmin.class, filter, DEFAULT_TIMEOUT);
+        } catch (Exception ex) {
+            // ignore
+        }
+        assertNull("scope admin service for the scope should be unregistered", childScopeAdmin);
+        
+    }
+    
+    // test sharing the helloIsolation package from the test scope.
+    @Test
+    public void testPackageSharingFromTestScope() throws Exception {
+        // make sure we are using a framework that provides composite admin service
+        ScopeAdmin scopeAdmin = getOsgiService(ScopeAdmin.class);
+        assertNotNull("scope admin should not be null", scopeAdmin);
+        System.out.println("able to get scope admin service");
+
+        ScopeUpdate su = scopeAdmin.newScopeUpdate();
+        
+        ScopeUpdate childScopeUpdate = su.newChild("scope_test1");
+        
+        Map<String, List<SharePolicy>> sharePolicies = childScopeUpdate.getSharePolicies(SharePolicy.TYPE_EXPORT);
+        final Filter filter1 = FrameworkUtil.createFilter(
+                "(&" + 
+                  "(osgi.package=org.apache.aries.subsystem.example.helloIsolation)" +
+                ")");
+        final Filter filter2 = FrameworkUtil.createFilter(
+                "(&" + 
+                  "(osgi.service=org.apache.aries.subsystem.example.helloIsolation.HelloIsolation)" +
+                ")");
+        List<SharePolicy> packagePolicies = sharePolicies.get(Capability.PACKAGE_CAPABILITY);
+        if (packagePolicies == null) {
+            packagePolicies = new ArrayList<SharePolicy>();
+            sharePolicies.put(Capability.PACKAGE_CAPABILITY, packagePolicies);
+        }
+        packagePolicies.add(new SharePolicy(SharePolicy.TYPE_EXPORT, Capability.PACKAGE_CAPABILITY, filter1));
+        List<SharePolicy> servicePolicies = sharePolicies.get(ScopeAdminServiceFactory.SERVICE_CAPABILITY);
+        if (servicePolicies == null) {
+            servicePolicies = new ArrayList<SharePolicy>();
+            sharePolicies.put(ScopeAdminServiceFactory.SERVICE_CAPABILITY, servicePolicies);
+        }
+        servicePolicies.add(new SharePolicy(SharePolicy.TYPE_EXPORT, ScopeAdminServiceFactory.SERVICE_CAPABILITY, filter2));
+
+
+        // build up installInfo object for the scope
+        InstallInfo info1 = new InstallInfo(new URL("mvn:org.apache.aries.subsystem.example/org.apache.aries.subsystem.example.helloIsolation/0.3-incubating-SNAPSHOT"), "helloIsolation");
+        InstallInfo info2 = new InstallInfo(new URL("mvn:org.apache.aries.subsystem.example/org.apache.aries.subsystem.example.helloIsolationRef/0.3-incubating-SNAPSHOT"), "helloIsolationRef");
+
+        List<InstallInfo> bundlesToInstall = childScopeUpdate.getBundlesToInstall();
+        bundlesToInstall.add(info1);
+        bundlesToInstall.add(info2);
+        
+        // add bundles to be installed, based on subsystem content
+        su.commit();
+        
+        // start all bundles in the scope scope_test1
+        Collection<Bundle> bundlesToStart = childScopeUpdate.getBundles();
+        for (Bundle b : bundlesToStart) {
+            b.start();
+            
+        }
+        
+        // install helloIsolationRef1 bundle in the root scope
+        URL url1 = new URL("mvn:org.apache.aries.subsystem.example/org.apache.aries.subsystem.example.helloIsolationRef/1.0.0");
+        Bundle helloIsolationRef = bundleContext.installBundle("helloIsolationRef1-rootScope", url1.openStream());
+   
+        try {
+            helloIsolationRef.start();
+        } catch (Exception ex) {
+            fail("should be able to start helloIsolationRef by import packages from scope_test1");
+        }
+        
+        // remove helloIsolationRef
+        helloIsolationRef.uninstall();
+        // remove child scope
+        su = scopeAdmin.newScopeUpdate();
+        Collection<Scope> scopes = su.getToBeRemovedChildren();
+        
+        // obtain child scope admin from service registry
+        String filter = "ScopeName=scope_test1";
+        ScopeAdmin childScopeAdmin = getOsgiService(ScopeAdmin.class, filter, DEFAULT_TIMEOUT);
+        assertEquals(scopeAdmin.getScope(), childScopeAdmin.getParentScope());
+        scopes.add(childScopeAdmin.getScope());
+        su.commit();
+        
+        childScopeAdmin = null;
+        try {
+            childScopeAdmin = getOsgiService(ScopeAdmin.class, filter, DEFAULT_TIMEOUT);
+        } catch (Exception ex) {
+            // ignore
+        }
+        assertNull("scope admin service for the scope should be unregistered", childScopeAdmin);
+        
+    }
+
+    // test sharing the helloIsolation package & service from the root scope.
+    @Test
+    public void testPackageSharingFromRootScope() throws Exception {
+        // install helloIsolationRef1 bundle in the root scope
+        URL url1 = new URL("mvn:org.apache.aries.subsystem.example/org.apache.aries.subsystem.example.helloIsolation/1.0.0");
+        Bundle helloIsolation = bundleContext.installBundle("helloIsolation1-rootScope", url1.openStream());
+   
+        try {
+            helloIsolation.start();
+        } catch (Exception ex) {
+            fail("should be able to start helloIsolation");
+        }
+        
+        // make sure we are using a framework that provides composite admin service
+        ScopeAdmin scopeAdmin = getOsgiService(ScopeAdmin.class);
+        assertNotNull("scope admin should not be null", scopeAdmin);
+        System.out.println("able to get scope admin service");
+
+        ScopeUpdate su = scopeAdmin.newScopeUpdate();
+        
+        ScopeUpdate childScopeUpdate = su.newChild("scope_test1");
+        
+        Map<String, List<SharePolicy>> sharePolicies = childScopeUpdate.getSharePolicies(SharePolicy.TYPE_IMPORT);
+        final Filter filter1 = FrameworkUtil.createFilter(
+                "(&" + 
+                  "(osgi.package=org.apache.aries.subsystem.example.helloIsolation)" +
+                ")");
+        final Filter filter2 = FrameworkUtil.createFilter(
+                "(&" + 
+                  "(osgi.service=org.apache.aries.subsystem.example.helloIsolation.HelloIsolation)" +
+                ")");
+        List<SharePolicy> packagePolicies = sharePolicies.get(Capability.PACKAGE_CAPABILITY);
+        if (packagePolicies == null) {
+            packagePolicies = new ArrayList<SharePolicy>();
+            sharePolicies.put(Capability.PACKAGE_CAPABILITY,packagePolicies);
+        }
+        packagePolicies.add(new SharePolicy(SharePolicy.TYPE_IMPORT, Capability.PACKAGE_CAPABILITY, filter1));
+        List<SharePolicy> servicePolicies = sharePolicies.get(ScopeAdminServiceFactory.SERVICE_CAPABILITY);
+        if (servicePolicies == null) {
+            servicePolicies = new ArrayList<SharePolicy>();
+            sharePolicies.put(ScopeAdminServiceFactory.SERVICE_CAPABILITY, servicePolicies);
+        }
+        servicePolicies.add(new SharePolicy(SharePolicy.TYPE_IMPORT, ScopeAdminServiceFactory.SERVICE_CAPABILITY, filter2));
+
+
+        // build up installInfo object for the scope
+        InstallInfo info2 = new InstallInfo(new URL("mvn:org.apache.aries.subsystem.example/org.apache.aries.subsystem.example.helloIsolationRef/0.3-incubating-SNAPSHOT"), "helloIsolationRef");
+
+        List<InstallInfo> bundlesToInstall = childScopeUpdate.getBundlesToInstall();
+        bundlesToInstall.add(info2);
+        
+        // add bundles to be installed, based on subsystem content
+        su.commit();
+        
+        // start all bundles in the scope scope_test1
+        Collection<Bundle> bundlesToStart = childScopeUpdate.getBundles();
+        for (Bundle b : bundlesToStart) {
+            try {
+                b.start();
+            } catch (Exception ex) {
+                fail("should be able to start helloIsolationRef in scope_test1");
+            }
+            
+        }
+ 
+        // remove helloIsolation in root scope
+        helloIsolation.uninstall();
+        
+        // remove child scope
+        su = scopeAdmin.newScopeUpdate();
+        Collection<Scope> scopes = su.getToBeRemovedChildren();
+        
+        // obtain child scope admin from service registry
+        String filter = "ScopeName=scope_test1";
+        ScopeAdmin childScopeAdmin = getOsgiService(ScopeAdmin.class, filter, DEFAULT_TIMEOUT);
+        assertEquals(scopeAdmin.getScope(), childScopeAdmin.getParentScope());
+        scopes.add(childScopeAdmin.getScope());
+        su.commit();
+        
+        childScopeAdmin = null;
+        try {
+            childScopeAdmin = getOsgiService(ScopeAdmin.class, filter, DEFAULT_TIMEOUT);
+        } catch (Exception ex) {
+            // ignore
+        }
+        assertNull("scope admin service for the scope should be unregistered", childScopeAdmin);
+    }
+    
+    // test ability to select the helloIsolation package from which scope it wants to use
+    // not necessarily the highest version one by default.
+    @Test
+    public void testScopeAffinity() throws Exception {
+        // make sure we are using a framework that provides composite admin service
+        ScopeAdmin scopeAdmin = getOsgiService(ScopeAdmin.class);
+        assertNotNull("scope admin should not be null", scopeAdmin);
+        System.out.println("able to get scope admin service");
+
+        // install helloIsolation 0.3 in scope_test1
+        Scope scope1 = createScope(scopeAdmin, "scope_test1", 
+                "mvn:org.apache.aries.subsystem.example/org.apache.aries.subsystem.example.helloIsolation/0.3-incubating-SNAPSHOT",
+                "0.3");
+        
+        // install helloIsolation 2.0 in scope_test2
+        Scope scope2 = createScope(scopeAdmin, "scope_test2", 
+                "mvn:org.apache.aries.subsystem.example/org.apache.aries.subsystem.example.helloIsolation/2.0.0",
+                "2.0");
+        
+        // install helloIsolationRef 2.0 in scope_test3
+        ScopeUpdate su = scopeAdmin.newScopeUpdate();
+        
+        ScopeUpdate childScopeUpdate = su.newChild("scope_test3");
+        Scope scope3 = childScopeUpdate.getScope();
+        
+        Map<String, List<SharePolicy>> sharePolicies = childScopeUpdate.getSharePolicies(SharePolicy.TYPE_IMPORT);
+        /*final Filter filter1 = FrameworkUtil.createFilter(
+                "(&" + 
+                  "(osgi.package=org.apache.aries.subsystem.example.helloIsolation)" +
+                  "(bundle-symbolic-name=org.apache.aries.subsystem.example.helloIsolation)" + 
+                  "(bundle-version<=1.1)" + 
+                ")");*/
+        final Filter filter1 = FrameworkUtil.createFilter(
+                "(&" + 
+                  "(osgi.package=org.apache.aries.subsystem.example.helloIsolation)" +
+                  //"(scopeName=scope_test1)" +  
+                ")");
+        final Filter filter2 = FrameworkUtil.createFilter(
+                "(&" + 
+                  "(osgi.service=org.apache.aries.subsystem.example.helloIsolation.HelloIsolation)" +
+                ")");
+        List<SharePolicy> packagePolicies = sharePolicies.get(Capability.PACKAGE_CAPABILITY);
+        if (packagePolicies == null) {
+            packagePolicies = new ArrayList<SharePolicy>();
+            sharePolicies.put(Capability.PACKAGE_CAPABILITY,packagePolicies);
+        }
+        packagePolicies.add(new SharePolicy(SharePolicy.TYPE_IMPORT, Capability.PACKAGE_CAPABILITY, filter1));
+        List<SharePolicy> servicePolicies = sharePolicies.get(ScopeAdminServiceFactory.SERVICE_CAPABILITY);
+        if (servicePolicies == null) {
+            servicePolicies = new ArrayList<SharePolicy>();
+            sharePolicies.put(ScopeAdminServiceFactory.SERVICE_CAPABILITY, servicePolicies);
+        }
+        servicePolicies.add(new SharePolicy(SharePolicy.TYPE_IMPORT, ScopeAdminServiceFactory.SERVICE_CAPABILITY, filter2));
+
+
+        // build up installInfo object for the scope
+        InstallInfo info2 = new InstallInfo(new URL("mvn:org.apache.aries.subsystem.example/org.apache.aries.subsystem.example.helloIsolationRef/0.3-incubating-SNAPSHOT"), "helloIsolationRef");
+
+        List<InstallInfo> bundlesToInstall = childScopeUpdate.getBundlesToInstall();
+        bundlesToInstall.add(info2);
+        
+        // add bundles to be installed, based on subsystem content
+        su.commit();
+        
+        // start all bundles in the scope scope_test3
+        Collection<Bundle> bundlesToStart = childScopeUpdate.getBundles();
+        for (Bundle b : bundlesToStart) {
+            try {
+                b.start();
+            } catch (Exception ex) {
+                fail("should be able to start helloIsolationRef in scope_test1");
+            }
+            
+        }
+        
+        /*  // install helloIsolationRef in root scope
+        URL url1 = new URL("mvn:org.apache.aries.subsystem.example/org.apache.aries.subsystem.example.helloIsolationRef/1.0.0");
+        Bundle helloIsolationRef = bundleContext.installBundle("helloIsolationRef1-rootScope", url1.openStream());
+   
+        try {
+            helloIsolationRef.start();
+        } catch (Exception ex) {
+            fail("should be able to start helloIsolationRef");
+        }*/
+        
+        // remove child scope - cleanup
+        su = scopeAdmin.newScopeUpdate();
+        Collection<Scope> scopes = su.getToBeRemovedChildren();
+        scopes.add(scope1);
+        scopes.add(scope2);
+        scopes.add(scope3);
+        su.commit();
+        
+    }
+    
+    @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"),
+
+            // Bundles
+            mavenBundle("org.apache.aries.testsupport", "org.apache.aries.testsupport.unit"),
+            mavenBundle("org.apache.aries.application", "org.apache.aries.application.api"),
+            mavenBundle("org.apache.aries", "org.apache.aries.util"),
+            mavenBundle("org.apache.aries.application", "org.apache.aries.application.utils"),
+            mavenBundle("org.apache.felix", "org.apache.felix.bundlerepository"),
+            mavenBundle("org.apache.aries.subsystem", "org.apache.aries.subsystem.api"),
+            mavenBundle("org.apache.aries.subsystem", "org.apache.aries.subsystem.scope.api"),
+            mavenBundle("org.apache.aries.subsystem", "org.apache.aries.subsystem.scope.impl"),
+
+            //org.ops4j.pax.exam.container.def.PaxRunnerOptions.vmOption("-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"),
+
+            PaxRunnerOptions.rawPaxRunnerOption("config", "classpath:ss-runner.properties"),
+
+            equinox().version("3.7.0.v20100910")
+        );
+        options = updateOptions(options);
+        return options;
+    }
+
+    private Scope createScope(ScopeAdmin scopeAdmin, String scopeName, String loc, String version) throws MalformedURLException, InvalidSyntaxException, BundleException {
+        ScopeUpdate su = scopeAdmin.newScopeUpdate();
+        
+        ScopeUpdate childScopeUpdate = su.newChild(scopeName);
+        
+        Map<String, List<SharePolicy>> sharePolicies = childScopeUpdate.getSharePolicies(SharePolicy.TYPE_EXPORT);
+        final Filter filter1 = FrameworkUtil.createFilter(
+                "(&" + 
+                  "(osgi.package=org.apache.aries.subsystem.example.helloIsolation)" +
+                  "(version=" + version + ")" +
+                ")");
+        final Filter filter2 = FrameworkUtil.createFilter(
+                "(&" + 
+                  "(osgi.service=org.apache.aries.subsystem.example.helloIsolation.HelloIsolation)" +
+                ")");
+        List<SharePolicy> packagePolicies = sharePolicies.get(Capability.PACKAGE_CAPABILITY);
+        if (packagePolicies == null) {
+            packagePolicies = new ArrayList<SharePolicy>();
+            sharePolicies.put(Capability.PACKAGE_CAPABILITY, packagePolicies);
+        }
+        packagePolicies.add(new SharePolicy(SharePolicy.TYPE_EXPORT, Capability.PACKAGE_CAPABILITY, filter1));
+        List<SharePolicy> servicePolicies = sharePolicies.get(ScopeAdminServiceFactory.SERVICE_CAPABILITY);
+        if (servicePolicies == null) {
+            servicePolicies = new ArrayList<SharePolicy>();
+            sharePolicies.put(ScopeAdminServiceFactory.SERVICE_CAPABILITY, servicePolicies);
+        }
+        servicePolicies.add(new SharePolicy(SharePolicy.TYPE_EXPORT, ScopeAdminServiceFactory.SERVICE_CAPABILITY, filter2));
+
+
+        // build up installInfo object for the scope
+        InstallInfo info1 = new InstallInfo(new URL(loc), "helloIsolation_" + scopeName);
+
+        List<InstallInfo> bundlesToInstall = childScopeUpdate.getBundlesToInstall();
+        bundlesToInstall.add(info1);
+        
+        // add bundles to be installed, based on subsystem content
+        su.commit();
+        
+        // start all bundles in the scope scope_test1
+        Collection<Bundle> bundlesToStart = childScopeUpdate.getBundles();
+        for (Bundle b : bundlesToStart) {
+            b.start();
+        }
+        
+        return childScopeUpdate.getScope();
+    }
+}

Propchange: incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/apache/aries/subsystem/itests/ScopeAdminTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/apache/aries/subsystem/itests/ScopeAdminTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/apache/aries/subsystem/itests/ScopeAdminTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/ops4j/pax/runner/platform/equinox/internal/SsActivator.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/ops4j/pax/runner/platform/equinox/internal/SsActivator.java?rev=1022212&view=auto
==============================================================================
--- incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/ops4j/pax/runner/platform/equinox/internal/SsActivator.java (added)
+++ incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/ops4j/pax/runner/platform/equinox/internal/SsActivator.java Wed Oct 13 17:43:44 2010
@@ -0,0 +1,51 @@
+/*
+ * 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.ops4j.pax.runner.platform.equinox.internal;
+
+import org.ops4j.pax.runner.platform.PlatformBuilder;
+import org.ops4j.pax.runner.platform.builder.AbstractPlatformBuilderActivator;
+import org.osgi.framework.BundleContext;
+
+public class SsActivator extends AbstractPlatformBuilderActivator
+{
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected PlatformBuilder[] createPlatformBuilders( final BundleContext bundleContext )
+    {
+        return new PlatformBuilder[]{
+            new EquinoxPlatformBuilder( bundleContext, "3.2.1" ),
+            new EquinoxPlatformBuilder( bundleContext, "3.3.0" ),
+            new EquinoxPlatformBuilder( bundleContext, "3.3.1" ),
+            new EquinoxPlatformBuilder( bundleContext, "3.3.2" ),
+            new EquinoxPlatformBuilder( bundleContext, "3.4.0" ),
+            new EquinoxPlatformBuilder( bundleContext, "3.4.1" ),
+            new EquinoxPlatformBuilder( bundleContext, "3.4.2" ),
+            new EquinoxPlatformBuilder( bundleContext, "3.5.0" ),
+            new EquinoxPlatformBuilder( bundleContext, "3.5.1" ),
+            new EquinoxPlatformBuilder( bundleContext, "3.6.0" ),
+            new EquinoxPlatformBuilder( bundleContext, "V43PROTOTYPE-3.6.0.201003231329" ),
+            new EquinoxPlatformBuilder( bundleContext, "3.7.0.V20100910" ),
+            new EquinoxPlatformBuilderSnapshot( bundleContext )
+        };
+    }
+
+}
\ No newline at end of file

Propchange: incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/ops4j/pax/runner/platform/equinox/internal/SsActivator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/ops4j/pax/runner/platform/equinox/internal/SsActivator.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/java/org/ops4j/pax/runner/platform/equinox/internal/SsActivator.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/resources/META-INF/platform-equinox/definition-3.7.0.V20100910.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/resources/META-INF/platform-equinox/definition-3.7.0.V20100910.xml?rev=1022212&view=auto
==============================================================================
--- incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/resources/META-INF/platform-equinox/definition-3.7.0.V20100910.xml (added)
+++ incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/resources/META-INF/platform-equinox/definition-3.7.0.V20100910.xml Wed Oct 13 17:43:44 2010
@@ -0,0 +1,8 @@
+<platform>
+
+  <name>Equinox 3.7.0</name>
+  <system>mvn:org.eclipse/osgi/3.7.0.v20100910</system>
+
+  <profile name="minimal" default="true"/>
+
+</platform>
\ No newline at end of file

Propchange: incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/resources/META-INF/platform-equinox/definition-3.7.0.V20100910.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/resources/META-INF/platform-equinox/definition-3.7.0.V20100910.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/resources/META-INF/platform-equinox/definition-3.7.0.V20100910.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/resources/META-INF/platform-equinox/definition-V43PROTOTYPE-3.6.0.201003231329.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/resources/META-INF/platform-equinox/definition-V43PROTOTYPE-3.6.0.201003231329.xml?rev=1022212&view=auto
==============================================================================
--- incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/resources/META-INF/platform-equinox/definition-V43PROTOTYPE-3.6.0.201003231329.xml (added)
+++ incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/resources/META-INF/platform-equinox/definition-V43PROTOTYPE-3.6.0.201003231329.xml Wed Oct 13 17:43:44 2010
@@ -0,0 +1,8 @@
+<platform>
+
+  <name>Equinox V43 Prototype 3.6.0</name>
+  <system>mvn:org.eclipse/osgi/v43prototype-3.6.0.201003231329</system>
+
+  <profile name="minimal" default="true"/>
+
+</platform>
\ No newline at end of file

Propchange: incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/resources/META-INF/platform-equinox/definition-V43PROTOTYPE-3.6.0.201003231329.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/resources/META-INF/platform-equinox/definition-V43PROTOTYPE-3.6.0.201003231329.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/resources/META-INF/platform-equinox/definition-V43PROTOTYPE-3.6.0.201003231329.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/resources/ss-runner.properties
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/resources/ss-runner.properties?rev=1022212&view=auto
==============================================================================
--- incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/resources/ss-runner.properties (added)
+++ incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/resources/ss-runner.properties Wed Oct 13 17:43:44 2010
@@ -0,0 +1,225 @@
+# --------------------------------------------------------------------------------------------------------------------
+# The following bundles will always be instantiated
+# --------------------------------------------------------------------------------------------------------------------
+# handler service (extender for url stream handlers)
+handler.service=org.ops4j.pax.runner.handler.internal.Activator
+# provision service (extender for scanners)
+provision.service=org.ops4j.pax.scanner.internal.Activator
+# platform service (extender for platforms)
+platform.service=org.ops4j.pax.runner.platform.internal.Activator
+
+# --------------------------------------------------------------------------------------------------------------------
+# Known handlers
+# --------------------------------------------------------------------------------------------------------------------
+# assembly protocol handler
+handler.assembly=org.ops4j.pax.url.assembly.internal.Activator
+# cache protocol handler
+handler.cache=org.ops4j.pax.url.cache.internal.Activator
+# classpath protocol handler
+handler.classpath=org.ops4j.pax.url.classpath.internal.Activator
+# dir protocol handler
+handler.dir=org.ops4j.pax.url.dir.internal.Activator
+# mvn protocol handler
+handler.mvn=org.ops4j.pax.url.mvn.internal.Activator
+# link protocol handler
+handler.link=org.ops4j.pax.url.link.internal.Activator
+# obr protocol handler
+handler.obr=org.ops4j.pax.url.obr.internal.Activator
+# war protocol handler
+handler.war=org.ops4j.pax.url.war.internal.Activator
+# wrap protocol handler
+handler.wrap=org.ops4j.pax.url.wrap.internal.Activator
+
+# --------------------------------------------------------------------------------------------------------------------
+# Known scanners
+# --------------------------------------------------------------------------------------------------------------------
+# scan-bundle
+scanner.bundle=org.ops4j.pax.scanner.bundle.internal.Activator
+# scan-composite
+scanner.composite=org.ops4j.pax.scanner.composite.internal.Activator
+# scan-dir
+scanner.dir=org.ops4j.pax.scanner.dir.internal.Activator
+# scan-file
+scanner.features=org.ops4j.pax.scanner.features.internal.Activator
+# scan-file
+scanner.file=org.ops4j.pax.scanner.file.internal.Activator
+# scan-obr
+scanner.obr=org.ops4j.pax.scanner.obr.internal.Activator
+# scan-pom
+scanner.pom=org.ops4j.pax.scanner.pom.internal.Activator
+
+# --------------------------------------------------------------------------------------------------------------------
+# Known platforms
+# --------------------------------------------------------------------------------------------------------------------
+## Equinox
+platform.equinox.3.2.1=org.ops4j.pax.runner.platform.equinox.internal.SsActivator
+platform.equinox.3.3.0=org.ops4j.pax.runner.platform.equinox.internal.SsActivator
+platform.equinox.3.3.1=org.ops4j.pax.runner.platform.equinox.internal.SsActivator
+platform.equinox.3.3.2=org.ops4j.pax.runner.platform.equinox.internal.SsActivator
+platform.equinox.3.4.0=org.ops4j.pax.runner.platform.equinox.internal.SsActivator
+platform.equinox.3.4.1=org.ops4j.pax.runner.platform.equinox.internal.SsActivator
+platform.equinox.3.4.2=org.ops4j.pax.runner.platform.equinox.internal.SsActivator
+platform.equinox.3.5.0=org.ops4j.pax.runner.platform.equinox.internal.SsActivator
+platform.equinox.3.5.1=org.ops4j.pax.runner.platform.equinox.internal.SsActivator
+platform.equinox.3.6.0=org.ops4j.pax.runner.platform.equinox.internal.SsActivator
+platform.equinox.SNAPSHOT=org.ops4j.pax.runner.platform.equinox.internal.SsActivator
+platform.equinox.V43PROTOTYPE-3.6.0.201003231329=org.ops4j.pax.runner.platform.equinox.internal.SsActivator
+platform.equinox.3.7.0.V20100910=org.ops4j.pax.runner.platform.equinox.internal.SsActivator
+# Felix
+platform.felix.1.0.0=org.ops4j.pax.runner.platform.felix.internal.Activator
+platform.felix.1.0.1=org.ops4j.pax.runner.platform.felix.internal.Activator
+platform.felix.1.0.3=org.ops4j.pax.runner.platform.felix.internal.Activator
+platform.felix.1.0.4=org.ops4j.pax.runner.platform.felix.internal.Activator
+platform.felix.1.2.0=org.ops4j.pax.runner.platform.felix.internal.Activator
+platform.felix.1.2.1=org.ops4j.pax.runner.platform.felix.internal.Activator
+platform.felix.1.2.2=org.ops4j.pax.runner.platform.felix.internal.Activator
+platform.felix.1.4.0=org.ops4j.pax.runner.platform.felix.internal.Activator
+platform.felix.1.4.1=org.ops4j.pax.runner.platform.felix.internal.Activator
+platform.felix.1.6.0=org.ops4j.pax.runner.platform.felix.internal.Activator
+platform.felix.1.6.1=org.ops4j.pax.runner.platform.felix.internal.Activator
+platform.felix.1.8.0=org.ops4j.pax.runner.platform.felix.internal.Activator
+platform.felix.1.8.1=org.ops4j.pax.runner.platform.felix.internal.Activator
+platform.felix.2.0.0=org.ops4j.pax.runner.platform.felix.internal.Activator
+platform.felix.2.0.1=org.ops4j.pax.runner.platform.felix.internal.Activator
+platform.felix.2.0.2=org.ops4j.pax.runner.platform.felix.internal.Activator
+platform.felix.SNAPSHOT=org.ops4j.pax.runner.platform.felix.internal.Activator
+# Knopflerfish
+platform.knopflerfish.2.0.0=org.ops4j.pax.runner.platform.knopflerfish.internal.Activator
+platform.knopflerfish.2.0.1=org.ops4j.pax.runner.platform.knopflerfish.internal.Activator
+platform.knopflerfish.2.0.2=org.ops4j.pax.runner.platform.knopflerfish.internal.Activator
+platform.knopflerfish.2.0.3=org.ops4j.pax.runner.platform.knopflerfish.internal.Activator
+platform.knopflerfish.2.0.4=org.ops4j.pax.runner.platform.knopflerfish.internal.Activator
+platform.knopflerfish.2.0.5=org.ops4j.pax.runner.platform.knopflerfish.internal.Activator
+platform.knopflerfish.2.1.0=org.ops4j.pax.runner.platform.knopflerfish.internal.Activator
+platform.knopflerfish.2.1.1=org.ops4j.pax.runner.platform.knopflerfish.internal.Activator
+platform.knopflerfish.2.2.0=org.ops4j.pax.runner.platform.knopflerfish.internal.Activator
+platform.knopflerfish.2.3.0=org.ops4j.pax.runner.platform.knopflerfish.internal.Activator
+platform.knopflerfish.2.3.1=org.ops4j.pax.runner.platform.knopflerfish.internal.Activator
+platform.knopflerfish.2.3.2=org.ops4j.pax.runner.platform.knopflerfish.internal.Activator
+platform.knopflerfish.2.3.3=org.ops4j.pax.runner.platform.knopflerfish.internal.Activator
+platform.knopflerfish.3.0.0=org.ops4j.pax.runner.platform.knopflerfish.internal.Activator
+platform.knopflerfish.SNAPSHOT=org.ops4j.pax.runner.platform.knopflerfish.internal.Activator
+#Concierge
+platform.concierge.1.0.0=org.ops4j.pax.runner.platform.concierge.internal.Activator
+platform.concierge.SNAPSHOT=org.ops4j.pax.runner.platform.concierge.internal.Activator
+
+# --------------------------------------------------------------------------------------------------------------------
+# Aditional Services
+# --------------------------------------------------------------------------------------------------------------------
+service.obr=org.apache.felix.bundlerepository.Activator
+
+# --------------------------------------------------------------------------------------------------------------------
+# Default values.
+# Default values are used in case that an option / configuration property is not set.
+# --------------------------------------------------------------------------------------------------------------------
+# defaults for runner options
+# default list of handlers
+default.handlers=handler.mvn,handler.classpath,handler.war,handler.wrap,handler.obr,handler.link,handler.cache,handler.assembly,handler.dir
+# default list of scanners
+default.scanners=scanner.bundle,scanner.composite,scanner.dir,scanner.features,scanner.file,scanner.obr,scanner.pom
+# default platfom
+default.platform=platform.felix
+# default felix platform version
+default.platform.felix.version=2.0.2
+# default equinox platform version
+default.platform.equinox.version=3.5.1
+# default knopflerfish platform version
+default.platform.knopflerfish.version=2.3.3
+# default concierge platform version
+default.platform.concierge.version=1.0.0
+# default list of additional services
+default.services=service.obr
+# default obr repositories
+default.obr.repository.url=http://bundles.osgi.org/obr/browse?_xml=1&cmd=repository
+# default profiles repository
+default.profilesRepositories=http://scm.ops4j.org/repos/ops4j/projects/pax/runner-repository
+# default group id
+default.profilesGroupId=org.ops4j.pax.runner.profiles
+# default "snapshot" platform definition repository
+default.snapshotsRepository=http://scm.ops4j.org/repos/ops4j/projects/pax/runner-repository
+# default "snapshot" Felix platform definition URL
+default.felix.snapshot.definition.url=mvn:${snapshotsRepository}!org.ops4j.pax.runner.platforms/felix//xml
+# default "snapshot" Equinox platform definition URL
+default.equinox.snapshot.definition.url=mvn:${snapshotsRepository}!org.ops4j.pax.runner.platforms/equinox//xml
+# default "snapshot" Knopflerfish platform definition URL
+default.knopflerfish.snapshot.definition.url=mvn:${snapshotsRepository}!org.ops4j.pax.runner.platforms/knopflerfish//xml
+# default "snapshot" Concierge platform definition URL
+default.concierge.snapshot.definition.url=mvn:${snapshotsRepository}!org.ops4j.pax.runner.platforms/concierge//xml
+# default working directory
+default.workingDirectory=runner
+# default caching directory
+default.org.ops4j.pax.url.cache.workingDirectory=${workingDirectory}/cache
+# default platform working directory
+default.org.ops4j.pax.runner.platform.workingDirectory=${workingDirectory}
+
+
+# --------------------------------------------------------------------------------------------------------------------
+# Configuration properties alias
+# Alias are used to transform configuration properties from the fully qualified ones to simple option name or
+# to convert simple values from start arguments to the actual ones.
+# --------------------------------------------------------------------------------------------------------------------
+# aliases for runner options
+alias.platform=p
+alias.platform.equinox=platform.equinox
+alias.platform.e=platform.equinox
+alias.platform.eq=platform.equinox
+alias.platform.felix=platform.felix
+alias.platform.f=platform.felix
+alias.platform.knopflerfish=platform.knopflerfish
+alias.platform.k=platform.knopflerfish
+alias.platform.kf=platform.knopflerfish
+alias.platform.concierge=platform.concierge
+alias.platform.c=platform.concierge
+alias.version=v
+alias.snapshot=s
+alias.workingDirectory=dir
+
+# aliases for handlers
+alias.org.ops4j.pax.url.mvn.certificateCheck=certificateCheck
+alias.org.ops4j.pax.url.mvn.defaultRepositories=defaultRepositories,dr
+alias.org.ops4j.pax.url.mvn.localRepository=localRepository,lr,maven.repo.local
+alias.org.ops4j.pax.url.mvn.repositories=repositories,repos
+alias.org.ops4j.pax.url.mvn.settings=settings
+alias.org.ops4j.pax.url.mvn.useFallbackRepositories=useFallbackRepositories,ufr
+alias.org.ops4j.pax.url.obr.certificateCheck=certificateCheck
+alias.org.ops4j.pax.url.war.certificateCheck=certificateCheck
+alias.org.ops4j.pax.url.wrap.certificateCheck=certificateCheck
+alias.org.ops4j.pax.scanner.composite.certificateCheck=certificateCheck
+alias.org.ops4j.pax.scanner.features.certificateCheck=certificateCheck
+
+# aliases for platform options
+alias.org.ops4j.pax.runner.platform.bootDelegation=bootDelegation,bd
+alias.org.ops4j.pax.runner.platform.bundleStartLevel=bundleStartLevel,bsl
+alias.org.ops4j.pax.runner.platform.classpath=classPath,cp
+alias.org.ops4j.pax.runner.platform.console=console
+alias.org.ops4j.pax.runner.platform.definitionURL=definitionURL
+alias.org.ops4j.pax.runner.platform.frameworkProfile=frameworkProfile,fp
+alias.org.ops4j.pax.runner.platform.ee=ee
+alias.org.ops4j.pax.runner.platform.javaHome=javaHome,home
+alias.org.ops4j.pax.runner.platform.overwrite=overwrite
+alias.org.ops4j.pax.runner.platform.overwriteUserBundles=overwriteUserBundles
+alias.org.ops4j.pax.runner.platform.overwriteSystemBundles=overwriteSystemBundles
+alias.org.ops4j.pax.runner.platform.profileStartLevel=profileStartLevel,psl
+alias.org.ops4j.pax.runner.platform.startLevel=startLevel,sl
+alias.org.ops4j.pax.runner.platform.systemPackages=systemPackages,sp
+alias.org.ops4j.pax.runner.platform.usePersistedState=usePersistedState,ups
+alias.org.ops4j.pax.runner.platform.vmOptions=vmOptions,vmo
+alias.org.ops4j.pax.runner.platform.debugClassLoading=debugClassLoading,dcl
+alias.org.ops4j.pax.runner.platform.downloadFeedback=downloadFeedback,df
+alias.org.ops4j.pax.runner.platform.autoWrap=autoWrap
+alias.org.ops4j.pax.runner.platform.keepOriginalUrls=keepOriginalUrls,kou
+alias.org.ops4j.pax.runner.platform.bundleValidation=bundleValidation
+alias.org.ops4j.pax.runner.platform.skipInvalidBundles=skipInvalidBundles,sib
+alias.org.ops4j.pax.runner.platform.useAbsoluteFilePaths=useAbsoluteFilePaths,absoluteFilePaths,uafp
+
+# aliases for scanners
+alias.org.ops4j.pax.scanner.bundle.start=start
+alias.org.ops4j.pax.scanner.composite.start=start
+alias.org.ops4j.pax.scanner.dir.start=start
+alias.org.ops4j.pax.scanner.features.start=start
+alias.org.ops4j.pax.scanner.file.start=start
+alias.org.ops4j.pax.scanner.obr.start=start
+alias.org.ops4j.pax.scanner.pom.start=start
+
+# aliases for additional services
+alias.obr.repository.url=obrRepositories|obrRepos

Propchange: incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/resources/ss-runner.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/resources/ss-runner.properties
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/aries/trunk/subsystem/subsystem-scope-itests/src/test/resources/ss-runner.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message