You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2009/08/11 15:20:42 UTC
svn commit: r803109 - in /sling/trunk/installer: ./ osgi/installer/ osgi/it/
osgi/it/src/test/java/org/apache/sling/jcr/jcrinstall/it/ test/
Author: bdelacretaz
Date: Tue Aug 11 13:20:42 2009
New Revision: 803109
URL: http://svn.apache.org/viewvc?rev=803109&view=rev
Log:
SLING-1078 - adjust names, all tests pass now
Added:
sling/trunk/installer/pom.xml (with props)
Removed:
sling/trunk/installer/test/
Modified:
sling/trunk/installer/ (props changed)
sling/trunk/installer/osgi/installer/pom.xml
sling/trunk/installer/osgi/it/pom.xml
sling/trunk/installer/osgi/it/src/test/java/org/apache/sling/jcr/jcrinstall/it/OsgiControllerTest.java
sling/trunk/installer/osgi/it/src/test/java/org/apache/sling/jcr/jcrinstall/it/SimpleFileInstallableData.java
Propchange: sling/trunk/installer/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Aug 11 13:20:42 2009
@@ -0,0 +1,3 @@
+target
+cachedir
+sling
Modified: sling/trunk/installer/osgi/installer/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/installer/osgi/installer/pom.xml?rev=803109&r1=803108&r2=803109&view=diff
==============================================================================
--- sling/trunk/installer/osgi/installer/pom.xml (original)
+++ sling/trunk/installer/osgi/installer/pom.xml Tue Aug 11 13:20:42 2009
@@ -24,23 +24,23 @@
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
<version>6</version>
- <relativePath>../../../../parent/pom.xml</relativePath>
+ <relativePath>../../../parent/pom.xml</relativePath>
</parent>
<artifactId>org.apache.sling.osgi.installer</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>3.0.0-SNAPSHOT</version>
<packaging>bundle</packaging>
- <name>Apache Sling OSGi installer</name>
+ <name>Apache Sling OSGi Installer</name>
<description>
Provides services to install OSGi bundles and configurations
by supplying input streams and dictionaries.
</description>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/jcrinstall/osgi</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/jcrinstall/osgi</developerConnection>
- <url>http://svn.apache.org/viewvc/sling/whiteboard/jcrinstall</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/installer/osgi/installer</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/installer/osgi/installer</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/installer/osgi/installer</url>
</scm>
<build>
Modified: sling/trunk/installer/osgi/it/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/installer/osgi/it/pom.xml?rev=803109&r1=803108&r2=803109&view=diff
==============================================================================
--- sling/trunk/installer/osgi/it/pom.xml (original)
+++ sling/trunk/installer/osgi/it/pom.xml Tue Aug 11 13:20:42 2009
@@ -23,28 +23,26 @@
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
<version>6</version>
- <relativePath>../../../../parent/pom.xml</relativePath>
+ <relativePath>../../../parent/pom.xml</relativePath>
</parent>
- <artifactId>org.apache.sling.jcr.jcrinstall.it</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <artifactId>org.apache.sling.osgi.installer.it</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
- <name>Apache Sling Jcrinstall Integration Tests</name>
- <description>
- Test the jcrinstall bundles in the OSGi framework.
- </description>
+ <name>Apache Sling OSGi Installer Integration Tests</name>
+ <description>Integration tests of the Sling OSGi installer bundle</description>
<properties>
<!-- This can be set to activate remote debugging of the Pax Exam tests -->
<pax.exam.debug.port></pax.exam.debug.port>
</properties>
- <scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/jcrinstall/it</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/jcrinstall/it</developerConnection>
- <url>http://svn.apache.org/viewvc/sling/whiteboard/jcrinstall</url>
- </scm>
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/installer/osgi/it</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/installer/osgi/it</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/installer/osgi/it</url>
+ </scm>
<repositories>
<repository>
@@ -241,7 +239,7 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.osgi.installer</artifactId>
- <version>2.0.3-SNAPSHOT</version>
+ <version>3.0.0-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
Modified: sling/trunk/installer/osgi/it/src/test/java/org/apache/sling/jcr/jcrinstall/it/OsgiControllerTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/osgi/it/src/test/java/org/apache/sling/jcr/jcrinstall/it/OsgiControllerTest.java?rev=803109&r1=803108&r2=803109&view=diff
==============================================================================
--- sling/trunk/installer/osgi/it/src/test/java/org/apache/sling/jcr/jcrinstall/it/OsgiControllerTest.java (original)
+++ sling/trunk/installer/osgi/it/src/test/java/org/apache/sling/jcr/jcrinstall/it/OsgiControllerTest.java Tue Aug 11 13:20:42 2009
@@ -80,7 +80,7 @@
protected void generateBundleEvent() throws Exception {
// install a bundle manually to generate a bundle event
- final File f = getTestBundle("org.apache.sling.jcr.jcrinstall.it-" + POM_VERSION + "-testbundle-1.0.jar");
+ final File f = getTestBundle("org.apache.sling.osgi.installer.it-" + POM_VERSION + "-testbundle-1.0.jar");
final InputStream is = new FileInputStream(f);
Bundle b = null;
try {
@@ -249,19 +249,19 @@
long bundleId = 0;
final OsgiController c = getService(OsgiController.class);
{
- c.scheduleInstallOrUpdate(uri, new SimpleFileInstallableData(getTestBundle("org.apache.sling.jcr.jcrinstall.it-" + POM_VERSION + "-testbundle-1.1.jar")));
+ c.scheduleInstallOrUpdate(uri, new SimpleFileInstallableData(getTestBundle("org.apache.sling.osgi.installer.it-" + POM_VERSION + "-testbundle-1.1.jar")));
assertNull("Test bundle must be absent right after scheduleInstallOrUpdate", findBundle(symbolicName));
c.executeScheduledOperations();
final Bundle b = findBundle(symbolicName);
- bundleId = b.getBundleId();
assertNotNull("Test bundle 1.1 must be found after executeScheduledOperations", b);
+ bundleId = b.getBundleId();
assertEquals("Installed bundle must be started", Bundle.ACTIVE, b.getState());
assertEquals("Version must be 1.1", "1.1", b.getHeaders().get(BUNDLE_VERSION));
}
// Upgrade to later version, verify
{
- c.scheduleInstallOrUpdate(uri, new SimpleFileInstallableData(getTestBundle("org.apache.sling.jcr.jcrinstall.it-" + POM_VERSION + "-testbundle-1.2.jar")));
+ c.scheduleInstallOrUpdate(uri, new SimpleFileInstallableData(getTestBundle("org.apache.sling.osgi.installer.it-" + POM_VERSION + "-testbundle-1.2.jar")));
c.executeScheduledOperations();
final Bundle b = findBundle(symbolicName);
assertNotNull("Test bundle 1.2 must be found after executeScheduledOperations", b);
@@ -272,7 +272,7 @@
// Downgrade to lower version, installed bundle must not change
{
- c.scheduleInstallOrUpdate(uri, new SimpleFileInstallableData(getTestBundle("org.apache.sling.jcr.jcrinstall.it-" + POM_VERSION + "-testbundle-1.0.jar")));
+ c.scheduleInstallOrUpdate(uri, new SimpleFileInstallableData(getTestBundle("org.apache.sling.osgi.installer.it-" + POM_VERSION + "-testbundle-1.0.jar")));
c.executeScheduledOperations();
final Bundle b = findBundle(symbolicName);
assertNotNull("Test bundle 1.2 must be found after executeScheduledOperations", b);
@@ -291,7 +291,7 @@
// Install lower version, must work
{
- c.scheduleInstallOrUpdate(uri, new SimpleFileInstallableData(getTestBundle("org.apache.sling.jcr.jcrinstall.it-" + POM_VERSION + "-testbundle-1.0.jar")));
+ c.scheduleInstallOrUpdate(uri, new SimpleFileInstallableData(getTestBundle("org.apache.sling.osgi.installer.it-" + POM_VERSION + "-testbundle-1.0.jar")));
c.executeScheduledOperations();
final Bundle b = findBundle(symbolicName);
assertNotNull("Test bundle 1.0 must be found after executeScheduledOperations", b);
@@ -308,14 +308,16 @@
// Install two bundles, one started, one stopped
{
c.scheduleInstallOrUpdate("otherBundleA.jar",
- new SimpleFileInstallableData(getTestBundle("org.apache.sling.jcr.jcrinstall.it-" + POM_VERSION + "-testA-1.0.jar")));
+ new SimpleFileInstallableData(getTestBundle("org.apache.sling.osgi.installer.it-" + POM_VERSION + "-testA-1.0.jar")));
c.executeScheduledOperations();
}
{
c.scheduleInstallOrUpdate("testB.jar",
- new SimpleFileInstallableData(getTestBundle("org.apache.sling.jcr.jcrinstall.it-" + POM_VERSION + "-testB-1.0.jar")));
+ new SimpleFileInstallableData(getTestBundle("org.apache.sling.osgi.installer.it-" + POM_VERSION + "-testB-1.0.jar")));
c.executeScheduledOperations();
- findBundle("jcrinstall-testB").stop();
+ final Bundle b = findBundle("jcrinstall-testB");
+ assertNotNull("Test bundle must be found", b);
+ b.stop();
}
assertEquals("Bundle A must be started", Bundle.ACTIVE, findBundle("jcrinstall-testA").getState());
@@ -326,13 +328,13 @@
final String uri = symbolicName + JAR_EXT;
final String BUNDLE_VERSION = "Bundle-Version";
c.scheduleInstallOrUpdate(uri,
- new SimpleFileInstallableData(getTestBundle("org.apache.sling.jcr.jcrinstall.it-" + POM_VERSION + "-testbundle-1.1.jar")));
+ new SimpleFileInstallableData(getTestBundle("org.apache.sling.osgi.installer.it-" + POM_VERSION + "-testbundle-1.1.jar")));
c.executeScheduledOperations();
c.scheduleInstallOrUpdate(uri,
- new SimpleFileInstallableData(getTestBundle("org.apache.sling.jcr.jcrinstall.it-" + POM_VERSION + "-testbundle-1.2.jar")));
+ new SimpleFileInstallableData(getTestBundle("org.apache.sling.osgi.installer.it-" + POM_VERSION + "-testbundle-1.2.jar")));
c.executeScheduledOperations();
c.scheduleInstallOrUpdate(uri,
- new SimpleFileInstallableData(getTestBundle("org.apache.sling.jcr.jcrinstall.it-" + POM_VERSION + "-testbundle-1.0.jar")));
+ new SimpleFileInstallableData(getTestBundle("org.apache.sling.osgi.installer.it-" + POM_VERSION + "-testbundle-1.0.jar")));
c.executeScheduledOperations();
final Bundle b = findBundle(symbolicName);
assertNotNull("Installed bundle must be found", b);
@@ -366,7 +368,7 @@
// without testB, needsB must not start
{
c.scheduleInstallOrUpdate(needsB + JAR_EXT,
- new SimpleFileInstallableData(getTestBundle("org.apache.sling.jcr.jcrinstall.it-" + POM_VERSION + "-needsB.jar")));
+ new SimpleFileInstallableData(getTestBundle("org.apache.sling.osgi.installer.it-" + POM_VERSION + "-needsB.jar")));
c.executeScheduledOperations();
final Bundle b = findBundle(needsB);
assertNotNull(needsB + " must be installed", b);
@@ -420,7 +422,7 @@
// now install testB -> needsB must start
{
c.scheduleInstallOrUpdate(testB + JAR_EXT,
- new SimpleFileInstallableData(getTestBundle("org.apache.sling.jcr.jcrinstall.it-" + POM_VERSION + "-testB-1.0.jar")));
+ new SimpleFileInstallableData(getTestBundle("org.apache.sling.osgi.installer.it-" + POM_VERSION + "-testB-1.0.jar")));
c.executeScheduledOperations();
final Bundle b = findBundle(needsB);
assertNotNull(needsB + " must be installed", b);
Modified: sling/trunk/installer/osgi/it/src/test/java/org/apache/sling/jcr/jcrinstall/it/SimpleFileInstallableData.java
URL: http://svn.apache.org/viewvc/sling/trunk/installer/osgi/it/src/test/java/org/apache/sling/jcr/jcrinstall/it/SimpleFileInstallableData.java?rev=803109&r1=803108&r2=803109&view=diff
==============================================================================
--- sling/trunk/installer/osgi/it/src/test/java/org/apache/sling/jcr/jcrinstall/it/SimpleFileInstallableData.java (original)
+++ sling/trunk/installer/osgi/it/src/test/java/org/apache/sling/jcr/jcrinstall/it/SimpleFileInstallableData.java Tue Aug 11 13:20:42 2009
@@ -28,8 +28,11 @@
private final File testBundle;
private final String digest;
- SimpleFileInstallableData(File testBundle) {
+ SimpleFileInstallableData(File testBundle) throws IOException {
this.testBundle = testBundle;
+ if(!this.testBundle.exists()) {
+ throw new IOException("Test bundle not found: " + this.testBundle.getAbsolutePath());
+ }
digest = testBundle.getAbsolutePath() + System.currentTimeMillis();
}
Added: sling/trunk/installer/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/installer/pom.xml?rev=803109&view=auto
==============================================================================
--- sling/trunk/installer/pom.xml (added)
+++ sling/trunk/installer/pom.xml Tue Aug 11 13:20:42 2009
@@ -0,0 +1,37 @@
+<?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.
+-->
+<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>
+
+ <groupId>org.apache.sling</groupId>
+ <artifactId>org.apache.sling.installer.reactor</artifactId>
+ <version>1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <name>Apache Sling Installer Reactor</name>
+ <description>Reactor pom for the the Sling installer modules</description>
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/installer</connection>
+ <developerConnection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/installer</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/trunk/installer</url>
+ </scm>
+
+ <modules>
+ <module>osgi/installer</module>
+ <module>osgi/it</module>
+ </modules>
+</project>
Propchange: sling/trunk/installer/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native