incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1519732 - in /sling/whiteboard/bdelacretaz/launchpad-test-support: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/sling/ src/main/java/org/apache/sling/launchpad/ src/main/java/org/ap...
Date Tue, 03 Sep 2013 15:57:59 GMT
Author: bdelacretaz
Date: Tue Sep  3 15:57:59 2013
New Revision: 1519732

URL: http://svn.apache.org/r1519732
Log:
sling-junit-launchpad - forgot to commit this, work in progress

Added:
    sling/whiteboard/bdelacretaz/launchpad-test-support/   (with props)
    sling/whiteboard/bdelacretaz/launchpad-test-support/pom.xml
    sling/whiteboard/bdelacretaz/launchpad-test-support/src/
    sling/whiteboard/bdelacretaz/launchpad-test-support/src/main/
    sling/whiteboard/bdelacretaz/launchpad-test-support/src/main/java/
    sling/whiteboard/bdelacretaz/launchpad-test-support/src/main/java/org/
    sling/whiteboard/bdelacretaz/launchpad-test-support/src/main/java/org/apache/
    sling/whiteboard/bdelacretaz/launchpad-test-support/src/main/java/org/apache/sling/
    sling/whiteboard/bdelacretaz/launchpad-test-support/src/main/java/org/apache/sling/launchpad/
    sling/whiteboard/bdelacretaz/launchpad-test-support/src/main/java/org/apache/sling/launchpad/testsupport/
    sling/whiteboard/bdelacretaz/launchpad-test-support/src/main/java/org/apache/sling/launchpad/testsupport/Activator.java

Propchange: sling/whiteboard/bdelacretaz/launchpad-test-support/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Sep  3 15:57:59 2013
@@ -0,0 +1,14 @@
+target
+bin
+*.iml
+*.ipr
+*.iws
+.settings
+.project
+.classpath
+.externalToolBuilders
+maven-eclipse.xml
+derby.log
+jackrabbit
+sling
+

Added: sling/whiteboard/bdelacretaz/launchpad-test-support/pom.xml
URL: http://svn.apache.org/viewvc/sling/whiteboard/bdelacretaz/launchpad-test-support/pom.xml?rev=1519732&view=auto
==============================================================================
--- sling/whiteboard/bdelacretaz/launchpad-test-support/pom.xml (added)
+++ sling/whiteboard/bdelacretaz/launchpad-test-support/pom.xml Tue Sep  3 15:57:59 2013
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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.sling</groupId>
+        <artifactId>sling</artifactId>
+        <version>16</version>
+    </parent>
+    
+    <groupId>org.apache.sling</groupId>
+    <artifactId>org.apache.sling.launchpad.testsupport</artifactId>
+    <version>0.9.9-SNAPSHOT</version>
+    <packaging>bundle</packaging>
+    <name>Apache Sling Launchpad Test Support Bundle</name>
+    
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Private-Package>org.apache.sling.launchpad.*</Private-Package>
+                        <Bundle-Activator>org.apache.sling.launchpad.testsupport.Activator</Bundle-Activator>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+</project>

Added: sling/whiteboard/bdelacretaz/launchpad-test-support/src/main/java/org/apache/sling/launchpad/testsupport/Activator.java
URL: http://svn.apache.org/viewvc/sling/whiteboard/bdelacretaz/launchpad-test-support/src/main/java/org/apache/sling/launchpad/testsupport/Activator.java?rev=1519732&view=auto
==============================================================================
--- sling/whiteboard/bdelacretaz/launchpad-test-support/src/main/java/org/apache/sling/launchpad/testsupport/Activator.java
(added)
+++ sling/whiteboard/bdelacretaz/launchpad-test-support/src/main/java/org/apache/sling/launchpad/testsupport/Activator.java
Tue Sep  3 15:57:59 2013
@@ -0,0 +1,39 @@
+/*
+ * 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.sling.launchpad.testsupport;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class Activator implements BundleActivator {
+
+    private final Logger log = LoggerFactory.getLogger(getClass());
+    
+    public static final String BUNDLE_CONTEXT_PROP_NAME = "org.apache.sling.launchpad.testsupport.BundleContext";
+
+    public void start(BundleContext ctx) throws Exception {
+        System.getProperties().put(BUNDLE_CONTEXT_PROP_NAME, ctx);
+        log.info("BundleContext exported in system properties as " + BUNDLE_CONTEXT_PROP_NAME);
+    }
+
+    public void stop(BundleContext ctx) throws Exception {
+        System.getProperties().remove(BUNDLE_CONTEXT_PROP_NAME);
+        log.info("BundleContext removed from system properties");
+    }
+}



Mime
View raw message