Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 9521 invoked from network); 3 Apr 2009 11:16:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Apr 2009 11:16:24 -0000 Received: (qmail 47302 invoked by uid 500); 3 Apr 2009 11:16:24 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 47238 invoked by uid 500); 3 Apr 2009 11:16:24 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 47229 invoked by uid 99); 3 Apr 2009 11:16:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Apr 2009 11:16:24 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Apr 2009 11:16:13 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A66A023889BA; Fri, 3 Apr 2009 11:15:51 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r761619 - in /cxf/dosgi/trunk: distribution/multi-bundle/src/main/resources/ parent/ systests/ systests/common/src/main/java/org/apache/cxf/dosgi/systests/common/ systests/equinox_libs/ systests/multi_bundle_distro/ systests/single_bundle_d... Date: Fri, 03 Apr 2009 11:15:51 -0000 To: commits@cxf.apache.org From: davidb@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090403111551.A66A023889BA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: davidb Date: Fri Apr 3 11:15:51 2009 New Revision: 761619 URL: http://svn.apache.org/viewvc?rev=761619&view=rev Log: Changed system tests to use Felix 1.4.1 instead of Equinox 3.5M4 Removed the checked-in Equinox jar. Currently using Spring-DM 1.2.0-RC2-SNAPSHOT. Spring DM 1.2.0 is due out very soon, so we should be able to get rid of the 'SNAPSHOT' over the next couple of days. Once Equinox 3.5 is released we should consider running the system tests under Equinox as well. Updated the Spring version from 2.5.5 to 2.5.6 (was needed for Spring DM 1.2.0) Removed: cxf/dosgi/trunk/systests/equinox_libs/ Modified: cxf/dosgi/trunk/distribution/multi-bundle/src/main/resources/distro_bundles.xml cxf/dosgi/trunk/parent/pom.xml cxf/dosgi/trunk/systests/common/src/main/java/org/apache/cxf/dosgi/systests/common/AbstractDosgiSystemTest.java cxf/dosgi/trunk/systests/multi_bundle_distro/pom.xml cxf/dosgi/trunk/systests/pom.xml cxf/dosgi/trunk/systests/single_bundle_distro/pom.xml Modified: cxf/dosgi/trunk/distribution/multi-bundle/src/main/resources/distro_bundles.xml URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/distribution/multi-bundle/src/main/resources/distro_bundles.xml?rev=761619&r1=761618&r2=761619&view=diff ============================================================================== --- cxf/dosgi/trunk/distribution/multi-bundle/src/main/resources/distro_bundles.xml (original) +++ cxf/dosgi/trunk/distribution/multi-bundle/src/main/resources/distro_bundles.xml Fri Apr 3 11:15:51 2009 @@ -6,14 +6,14 @@ cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT.dir/dosgi_bundles/geronimo-ws-metadata_2.0_spec-1.1.2.jar cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT.dir/dosgi_bundles/com.springsource.org.apache.commons.logging-1.1.1.jar cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT.dir/dosgi_bundles/com.springsource.org.jdom-1.0.0.jar - cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT.dir/dosgi_bundles/spring-core-2.5.5.jar - cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT.dir/dosgi_bundles/spring-beans-2.5.5.jar - cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT.dir/dosgi_bundles/spring-context-2.5.5.jar + cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT.dir/dosgi_bundles/spring-core-2.5.6.jar + cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT.dir/dosgi_bundles/spring-beans-2.5.6.jar + cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT.dir/dosgi_bundles/spring-context-2.5.6.jar cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT.dir/dosgi_bundles/com.springsource.org.aopalliance-1.0.0.jar - cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT.dir/dosgi_bundles/spring-aop-2.5.5.jar - cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT.dir/dosgi_bundles/spring-osgi-io-1.1.2.jar - cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT.dir/dosgi_bundles/spring-osgi-core-1.1.2.jar - cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT.dir/dosgi_bundles/spring-osgi-extender-1.1.2.jar + cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT.dir/dosgi_bundles/spring-aop-2.5.6.jar + cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT.dir/dosgi_bundles/spring-osgi-io-1.2.0-rc2-SNAPSHOT.jar + cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT.dir/dosgi_bundles/spring-osgi-core-1.2.0-rc2-SNAPSHOT.jar + cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT.dir/dosgi_bundles/spring-osgi-extender-1.2.0-rc2-SNAPSHOT.jar cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT.dir/dosgi_bundles/pax-web-service-0.5.1.jar cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT.dir/dosgi_bundles/org.apache.servicemix.bundles.jaxb-impl-2.1.6_1.jar cxf-dosgi-ri-multibundle-distribution-1.0-SNAPSHOT.dir/dosgi_bundles/org.apache.servicemix.bundles.wsdl4j-1.6.1_1.jar Modified: cxf/dosgi/trunk/parent/pom.xml URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/parent/pom.xml?rev=761619&r1=761618&r2=761619&view=diff ============================================================================== --- cxf/dosgi/trunk/parent/pom.xml (original) +++ cxf/dosgi/trunk/parent/pom.xml Fri Apr 3 11:15:51 2009 @@ -17,8 +17,8 @@ 2.2 1.4.1 - 2.5.5 - 1.1.2 + 2.5.6 + 1.2.0-rc2-SNAPSHOT 1.1.1 @@ -255,6 +255,15 @@ false + + + + true + + springframework.org + Springframework Maven SNAPSHOT Repository + http://s3.amazonaws.com/maven.springframework.org/snapshot + Modified: cxf/dosgi/trunk/systests/common/src/main/java/org/apache/cxf/dosgi/systests/common/AbstractDosgiSystemTest.java URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests/common/src/main/java/org/apache/cxf/dosgi/systests/common/AbstractDosgiSystemTest.java?rev=761619&r1=761618&r2=761619&view=diff ============================================================================== --- cxf/dosgi/trunk/systests/common/src/main/java/org/apache/cxf/dosgi/systests/common/AbstractDosgiSystemTest.java (original) +++ cxf/dosgi/trunk/systests/common/src/main/java/org/apache/cxf/dosgi/systests/common/AbstractDosgiSystemTest.java Fri Apr 3 11:15:51 2009 @@ -19,17 +19,97 @@ package org.apache.cxf.dosgi.systests.common; import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import java.util.Properties; import java.util.jar.Manifest; -import org.apache.servicemix.kernel.testing.support.AbstractIntegrationTest; +import org.osgi.framework.Bundle; import org.osgi.framework.Constants; import org.springframework.core.io.FileSystemResource; import org.springframework.core.io.Resource; +import org.springframework.osgi.test.AbstractConfigurableBundleCreatorTests; + +public abstract class AbstractDosgiSystemTest extends AbstractConfigurableBundleCreatorTests { + private Properties dependencies; + + // ------------------------------------------------------------------- + // These methods are copied from the SMX Kernel Testing component. They + // are copied from the + // org.apache.servicemix.kernel.testing.support.AbstractIntegrationTest + // class. SMX Kernel 1.0 doesn't seem to work with Spring-DM 1.2, so + // thats why these methods are duplicated here for the moment... + // ------------------------------------------------------------------- + protected String getBundle(String groupId, String artifactId) { + return groupId + "," + artifactId + "," + getBundleVersion(groupId, artifactId); + } + + protected String getBundleVersion(String groupId, String artifactId) { + if (dependencies == null) { + try { + File f = new File(System.getProperty("basedir"), "target/classes/META-INF/maven/dependencies.properties"); + Properties prop = new Properties(); + prop.load(new FileInputStream(f)); + dependencies = prop; + } catch (IOException e) { + throw new IllegalStateException("Unable to load dependencies informations", e); + } + } + String version = dependencies.getProperty(groupId + "/" + artifactId + "/version"); + if (version == null) { + throw new IllegalStateException("Unable to find dependency information for: " + groupId + "/" + artifactId + "/version"); + } + return version; + } + + protected File localMavenBundle(String groupId, String artifact, String version, String classifier, String type) { + String defaultHome = new File(new File(System.getProperty("user.home")), ".m2/repository").getAbsolutePath(); + File repositoryHome = new File(System.getProperty("localRepository", defaultHome)); + + StringBuffer location = new StringBuffer(groupId.replace('.', '/')); + location.append('/'); + location.append(artifact); + location.append('/'); + location.append(getSnapshot(version)); + location.append('/'); + location.append(artifact); + location.append('-'); + location.append(version); + if (classifier != null) { + location.append('-'); + location.append(classifier); + } + location.append("."); + location.append(type); + + return new File(repositoryHome, location.toString()); + } + + protected static boolean isTimestamped(String version) { + return version.matches(".+-\\d\\d\\d\\d\\d\\d\\d\\d\\.\\d\\d\\d\\d\\d\\d-\\d+"); + } + + protected static String getSnapshot(String version) { + if (isTimestamped(version)) { + return version.substring(0, version.lastIndexOf('-', version.lastIndexOf('-') - 1)) + "-SNAPSHOT"; + } + return version; + } + + protected void installBundle(String groupId, String artifactId, String classifier, String type) throws Exception { + String version = getBundleVersion(groupId, artifactId); + File loc = localMavenBundle(groupId, artifactId, version, classifier, type); + Bundle bundle = bundleContext.installBundle(loc.toURI().toString()); + bundle.start(); + } + // ------------------------------------------------------------------- + // End of SMX Kernel methods. + // ------------------------------------------------------------------- + -public abstract class AbstractDosgiSystemTest extends AbstractIntegrationTest { protected Manifest getManifest() { // let the testing framework create/load the manifest Manifest mf = super.getManifest(); @@ -39,7 +119,14 @@ return mf; } - + + @Override + protected String[] getTestFrameworkBundlesNames() { + List names = new ArrayList(Arrays.asList(super.getTestFrameworkBundlesNames())); + names.add(getBundle("org.apache.felix", "org.osgi.compendium")); + return names.toArray(new String [names.size()]); + } + @Override protected Resource[] getTestBundles() { // Return the bundles for the current distribution, filtering out the Modified: cxf/dosgi/trunk/systests/multi_bundle_distro/pom.xml URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests/multi_bundle_distro/pom.xml?rev=761619&r1=761618&r2=761619&view=diff ============================================================================== --- cxf/dosgi/trunk/systests/multi_bundle_distro/pom.xml (original) +++ cxf/dosgi/trunk/systests/multi_bundle_distro/pom.xml Fri Apr 3 11:15:51 2009 @@ -54,26 +54,6 @@ - org.apache.servicemix.kernel.testing - org.apache.servicemix.kernel.testing.support - 1.0.0 - - - org.apache.felix - org.apache.felix.framework - - - org.apache.felix - org.apache.felix.main - - - org.apache.felix - org.osgi.core - - - - - org.apache.cxf.dosgi cxf-dosgi-ri-dsw-cxf ${project.version} @@ -84,17 +64,7 @@ - - org.apache.cxf - cxf-bundle-minimal - ${cxf.version} - - - xalan - xalan - - - + org.springframework spring-core @@ -114,6 +84,12 @@ test + org.springframework + spring-test + ${spring.version} + test + + org.springframework.osgi spring-osgi-test ${spring.osgi.version} @@ -143,130 +119,6 @@ ${spring.osgi.version} test - - org.apache.commons - com.springsource.org.apache.commons.logging - 1.1.1 - - - org.mortbay.jetty - jetty - ${jetty.version} - - - org.mortbay.jetty - jetty-util - ${jetty.version} - - - - org.apache.servicemix.specs - org.apache.servicemix.specs.stax-api-1.0 - ${servicemix.specs.version} - - - org.apache.servicemix.specs - org.apache.servicemix.specs.jaxb-api-2.1 - ${servicemix.specs.version} - - - org.apache.servicemix.specs - org.apache.servicemix.specs.jaxws-api-2.1 - ${servicemix.specs.version} - - - org.apache.servicemix.specs - org.apache.servicemix.specs.saaj-api-1.3 - ${servicemix.specs.version} - - - - org.apache.geronimo.specs - geronimo-javamail_1.4_spec - 1.2 - - - org.apache.geronimo.specs - geronimo-activation_1.1_spec - 1.0.2 - - - org.apache.geronimo.specs - geronimo-ws-metadata_2.0_spec - 1.1.2 - - - org.apache.geronimo.specs - geronimo-servlet_2.5_spec - 1.1.2 - - - - org.apache.geronimo.specs - geronimo-annotation_1.0_spec - 1.1.1 - - - - org.apache.servicemix.bundles - org.apache.servicemix.bundles.xmlschema - ${xmlschema.bundle.version} - - - org.apache.servicemix.bundles - org.apache.servicemix.bundles.xmlresolver - ${xmlresolver.bundle.version} - - - org.apache.servicemix.bundles - org.apache.servicemix.bundles.neethi - ${neethi.bundle.version} - - - org.apache.servicemix.bundles - org.apache.servicemix.bundles.wsdl4j - ${wsdl4j.bundle.version} - - - - org.apache.servicemix.bundles - org.apache.servicemix.bundles.xmlsec - ${xmlsec.bundle.version} - - - - org.apache.servicemix.bundles - org.apache.servicemix.bundles.wss4j - ${wss4j.bundle.version} - - - xalan - xalan - - - xerces - xercesImpl - - - - - - org.apache.servicemix.bundles - org.apache.servicemix.bundles.jaxb-impl - ${jaxbimpl.bundle.version} - - - - org.apache.servicemix.bundles - org.apache.servicemix.bundles.asm - ${asm.bundle.version} - - - - org.apache.servicemix.bundles - org.apache.servicemix.bundles.woodstox - ${woodstox.bundle.version} - junit Modified: cxf/dosgi/trunk/systests/pom.xml URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests/pom.xml?rev=761619&r1=761618&r2=761619&view=diff ============================================================================== --- cxf/dosgi/trunk/systests/pom.xml (original) +++ cxf/dosgi/trunk/systests/pom.xml Fri Apr 3 11:15:51 2009 @@ -35,25 +35,16 @@ .. - org.springframework.osgi.test.platform.EquinoxPlatform + org.springframework.osgi.test.platform.FelixPlatform 1.0.0 1.0.0-rc1 - org.eclipse.osgi - org.eclipse.osgi - 3.5m4 - system - ${basedir}/${topDirectoryLocation}/systests/equinox_libs/3.5m4/org.eclipse.osgi_3.5.0.v20081201-1815.jar - - - + @@ -107,32 +98,22 @@ - org.apache.cxf.spring.validation.mode - VALIDATION_NONE + felix.fragment.validation + warning + + + + org.apache.cxf.spring.validation.mode + VALIDATION_NONE org.apache.cxf.nofastinfoset true - - - - - Modified: cxf/dosgi/trunk/systests/single_bundle_distro/pom.xml URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/systests/single_bundle_distro/pom.xml?rev=761619&r1=761618&r2=761619&view=diff ============================================================================== --- cxf/dosgi/trunk/systests/single_bundle_distro/pom.xml (original) +++ cxf/dosgi/trunk/systests/single_bundle_distro/pom.xml Fri Apr 3 11:15:51 2009 @@ -54,48 +54,60 @@ - org.apache.servicemix.kernel.testing - org.apache.servicemix.kernel.testing.support - 1.0.0 - - - org.apache.felix - org.apache.felix.framework - - - org.apache.felix - org.apache.felix.main - - - org.apache.felix - org.osgi.core - - + org.springframework + spring-core + ${spring.version} + test - - org.apache.cxf.dosgi - cxf-dosgi-ri-singlebundle-distribution - ${project.version} - - - org.apache.felix - org.apache.felix.framework - - - xalan - xalan - - - xml-apis - xml-apis - - - xerces - xercesImpl - - + org.springframework + spring-context + ${spring.version} + test + + + org.springframework + spring-beans + ${spring.version} + test + + + org.springframework + spring-test + ${spring.version} + test + + + org.springframework.osgi + spring-osgi-test + ${spring.osgi.version} + test + + + org.springframework.osgi + spring-osgi-core + ${spring.osgi.version} + test + + + org.springframework.osgi + spring-osgi-io + ${spring.osgi.version} + test + + org.springframework.osgi + spring-osgi-extender + ${spring.osgi.version} + test + + + org.springframework.osgi + spring-osgi-annotation + ${spring.osgi.version} + test + + junit