Return-Path: Delivered-To: apmail-felix-commits-archive@www.apache.org Received: (qmail 476 invoked from network); 12 Oct 2009 07:16:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Oct 2009 07:16:32 -0000 Received: (qmail 39828 invoked by uid 500); 12 Oct 2009 07:16:32 -0000 Delivered-To: apmail-felix-commits-archive@felix.apache.org Received: (qmail 39780 invoked by uid 500); 12 Oct 2009 07:16:31 -0000 Mailing-List: contact commits-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list commits@felix.apache.org Received: (qmail 39771 invoked by uid 99); 12 Oct 2009 07:16:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Oct 2009 07:16:31 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 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; Mon, 12 Oct 2009 07:16:29 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id EEA922388897; Mon, 12 Oct 2009 07:16:08 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r824244 - in /felix/trunk/scr: pom.xml src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java Date: Mon, 12 Oct 2009 07:16:08 -0000 To: commits@felix.apache.org From: fmeschbe@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091012071608.EEA922388897@eris.apache.org> Author: fmeschbe Date: Mon Oct 12 07:16:08 2009 New Revision: 824244 URL: http://svn.apache.org/viewvc?rev=824244&view=rev Log: FELIX-1735 provide bundle jar file name to the integration tests with a system property and fall back to fixed name "target/scr.jar" if the property is not set. Add "ide" build profile to generate the target/scr.jar file in the package phase to run the integration tests from within the IDE. Modified: felix/trunk/scr/pom.xml felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java Modified: felix/trunk/scr/pom.xml URL: http://svn.apache.org/viewvc/felix/trunk/scr/pom.xml?rev=824244&r1=824243&r2=824244&view=diff ============================================================================== --- felix/trunk/scr/pom.xml (original) +++ felix/trunk/scr/pom.xml Mon Oct 12 07:16:08 2009 @@ -36,6 +36,34 @@ scm:svn:https://svn.apache.org/repos/asf/felix/trunk/scr scm:svn:https://svn.apache.org/repos/asf/felix/trunk/scr + + + org.osgi @@ -180,38 +208,6 @@ - - - maven-antrun-plugin - 1.3 - - - configadmin-file-create - pre-integration-test - - run - - - - - - - - - configadmin-file-remove - post-integration-test - - run - - - - - - - - - - + + ide + + + + maven-antrun-plugin + 1.3 + + + scr-file-create + package + + run + + + + + + + + + + + + + + Modified: felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java?rev=824244&r1=824243&r2=824244&view=diff ============================================================================== --- felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java (original) +++ felix/trunk/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java Mon Oct 12 07:16:08 2009 @@ -67,6 +67,12 @@ protected ServiceTracker configAdminTracker; + // the name of the system property providing the bundle file to be installed and tested + protected static final String BUNDLE_JAR_SYS_PROP = "project.bundle.file"; + + // the default bundle jar file name + protected static final String BUNDLE_JAR_DEFAULT = "target/scr.jar"; + protected static final String PROP_NAME = "theValue"; protected static final Dictionary theConfig; @@ -91,9 +97,17 @@ @Configuration public static Option[] configuration() { + final String bundleFileName = System.getProperty( BUNDLE_JAR_SYS_PROP, BUNDLE_JAR_DEFAULT ); + final File bundleFile = new File( bundleFileName ); + if ( !bundleFile.canRead() ) + { + throw new IllegalArgumentException( "Cannot read from bundle file " + bundleFileName + " specified in the " + + BUNDLE_JAR_SYS_PROP + " system property" ); + } + final Option[] base = options( provision( - CoreOptions.bundle( new File("target/scr.jar").toURI().toString() ), + CoreOptions.bundle( bundleFile.toURI().toString() ), mavenBundle( "org.ops4j.pax.swissbox", "pax-swissbox-tinybundles", "1.0.0" ), mavenBundle( "org.apache.felix", "org.apache.felix.configadmin", "1.0.10" ) )