Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1803717D5A for ; Mon, 13 Apr 2015 03:24:01 +0000 (UTC) Received: (qmail 89535 invoked by uid 500); 13 Apr 2015 03:24:01 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 89341 invoked by uid 500); 13 Apr 2015 03:24:00 -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 89058 invoked by uid 99); 13 Apr 2015 03:24:00 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Apr 2015 03:24:00 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 4D2DCE0551; Mon, 13 Apr 2015 03:24:00 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ningjiang@apache.org To: commits@cxf.apache.org Date: Mon, 13 Apr 2015 03:24:03 -0000 Message-Id: <7cced7ceb80e4025ae20f21e864e8c14@git.apache.org> In-Reply-To: <8ec5927035a047c5b5c2916f10b961ee@git.apache.org> References: <8ec5927035a047c5b5c2916f10b961ee@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [4/5] cxf git commit: Simplify test Simplify test Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/66502264 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/66502264 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/66502264 Branch: refs/heads/3.0.x-fixes Commit: 66502264aa200f761182f7e2465794b10a8cad3f Parents: c2a4dd4 Author: Christian Schneider Authored: Thu Nov 27 15:55:12 2014 +0100 Committer: Willem Jiang Committed: Mon Apr 13 11:14:55 2015 +0800 ---------------------------------------------------------------------- .../cxf/osgi/itests/NoAriesBlueprintTest.java | 35 +++++++++++--------- .../apache/cxf/osgi/itests/OSGiTestSupport.java | 5 +++ 2 files changed, 25 insertions(+), 15 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/66502264/osgi/itests-felix/src/test/java/org/apache/cxf/osgi/itests/NoAriesBlueprintTest.java ---------------------------------------------------------------------- diff --git a/osgi/itests-felix/src/test/java/org/apache/cxf/osgi/itests/NoAriesBlueprintTest.java b/osgi/itests-felix/src/test/java/org/apache/cxf/osgi/itests/NoAriesBlueprintTest.java index 58f5e22..1bf2ae5 100644 --- a/osgi/itests-felix/src/test/java/org/apache/cxf/osgi/itests/NoAriesBlueprintTest.java +++ b/osgi/itests-felix/src/test/java/org/apache/cxf/osgi/itests/NoAriesBlueprintTest.java @@ -18,9 +18,9 @@ */ package org.apache.cxf.osgi.itests; + import org.junit.Test; import org.junit.runner.RunWith; - import org.ops4j.pax.exam.Configuration; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.PaxExam; @@ -28,8 +28,9 @@ import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy; import org.ops4j.pax.exam.spi.reactors.PerClass; import static org.ops4j.pax.exam.CoreOptions.junitBundles; -import static org.ops4j.pax.exam.CoreOptions.mavenBundle; import static org.ops4j.pax.exam.CoreOptions.systemProperty; +import static org.ops4j.pax.exam.CoreOptions.when; + @RunWith(PaxExam.class) @ExamReactorStrategy(PerClass.class) @@ -48,21 +49,25 @@ public class NoAriesBlueprintTest extends OSGiTestSupport { @Configuration public Option[] config() { + String localRepo = System.getProperty("localRepository"); + if (localRepo == null) { + localRepo = ""; + } + return new Option[]{ systemProperty("java.awt.headless").value("true"), - systemProperty("org.ops4j.pax.url.mvn.localRepository") - .value(System.getProperty("localRepository")), - mavenBundle().groupId("org.apache.ws.xmlschema").artifactId("xmlschema-core").versionAsInProject(), - mavenBundle().groupId("org.apache.cxf").artifactId("cxf-core").versionAsInProject(), - mavenBundle().groupId("org.apache.servicemix.bundles") - .artifactId("org.apache.servicemix.bundles.wsdl4j").versionAsInProject(), - mavenBundle().groupId("org.apache.cxf").artifactId("cxf-rt-wsdl").versionAsInProject(), - mavenBundle().groupId("org.apache.cxf").artifactId("cxf-rt-databinding-jaxb").versionAsInProject(), - mavenBundle().groupId("org.apache.cxf").artifactId("cxf-rt-bindings-xml").versionAsInProject(), - mavenBundle().groupId("org.apache.cxf").artifactId("cxf-rt-bindings-soap").versionAsInProject(), - mavenBundle().groupId("org.apache.cxf").artifactId("cxf-rt-frontend-simple").versionAsInProject(), - mavenBundle().groupId("org.apache.cxf").artifactId("cxf-rt-transports-http").versionAsInProject(), - mavenBundle().groupId("org.apache.cxf").artifactId("cxf-rt-frontend-jaxws").versionAsInProject(), + when(!"".equals(localRepo)) + .useOptions(systemProperty("org.ops4j.pax.url.mvn.localRepository").value(localRepo)), + mvnBundle("org.apache.ws.xmlschema", "xmlschema-core"), + mvnBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.wsdl4j"), + mvnBundle("org.apache.cxf", "cxf-core"), + mvnBundle("org.apache.cxf", "cxf-rt-wsdl"), + mvnBundle("org.apache.cxf", "cxf-rt-databinding-jaxb"), + mvnBundle("org.apache.cxf", "cxf-rt-bindings-xml"), + mvnBundle("org.apache.cxf", "cxf-rt-bindings-soap"), + mvnBundle("org.apache.cxf", "cxf-rt-frontend-simple"), + mvnBundle("org.apache.cxf", "cxf-rt-transports-http"), + mvnBundle("org.apache.cxf", "cxf-rt-frontend-jaxws"), junitBundles() }; } http://git-wip-us.apache.org/repos/asf/cxf/blob/66502264/osgi/itests-felix/src/test/java/org/apache/cxf/osgi/itests/OSGiTestSupport.java ---------------------------------------------------------------------- diff --git a/osgi/itests-felix/src/test/java/org/apache/cxf/osgi/itests/OSGiTestSupport.java b/osgi/itests-felix/src/test/java/org/apache/cxf/osgi/itests/OSGiTestSupport.java index 933348a..5d842ff 100644 --- a/osgi/itests-felix/src/test/java/org/apache/cxf/osgi/itests/OSGiTestSupport.java +++ b/osgi/itests-felix/src/test/java/org/apache/cxf/osgi/itests/OSGiTestSupport.java @@ -23,6 +23,8 @@ package org.apache.cxf.osgi.itests; import javax.inject.Inject; import org.junit.Assert; +import org.ops4j.pax.exam.CoreOptions; +import org.ops4j.pax.exam.options.MavenArtifactProvisionOption; import org.osgi.framework.Bundle; import org.osgi.framework.BundleContext; @@ -49,4 +51,7 @@ public class OSGiTestSupport { return null; } + public MavenArtifactProvisionOption mvnBundle(String groupId, String artifactId) { + return CoreOptions.mavenBundle().groupId(groupId).artifactId(artifactId).versionAsInProject(); + } }