From 15d879a19f9704b823d38dfc390ba23ef666a422 Mon Sep 17 00:00:00 2001 From: Roland Grunberg Date: Tue, 29 May 2012 14:27:27 -0400 Subject: [PATCH 2/4] Resolve all necessary dependencies for Tycho Surefire. When running an Eclipse bundle's tests, Tycho Surefire resolves its runtime dependencies using a class loader, which is in fact just looking through Bundle-ClassPath. As a result, it must copy over and include system jars in its Bundle-ClassPath. We use Fedora system jars to satisfy these dependencies but even these jars differ slightly in terms of provided classes. This patch addresses this issue. Basically, the jars added to the Bundle-ClassPath in this patch, provide the additional classes that are in the original jars used upstream. Change-Id: I678a961226d5ca27542a2b79a069b995cd3613eb --- pom.xml | 2 +- .../org.eclipse.tycho.surefire.junit/META-INF/MANIFEST.MF | 5 +++-- .../org.eclipse.tycho.surefire.junit/build.properties | 2 +- tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml | 5 +++++ .../org.eclipse.tycho.surefire.junit4/META-INF/MANIFEST.MF | 4 +++- .../org.eclipse.tycho.surefire.junit4/build.properties | 2 +- tycho-surefire/org.eclipse.tycho.surefire.junit4/pom.xml | 10 ++++++++++ .../org.eclipse.tycho.surefire.junit47/META-INF/MANIFEST.MF | 4 +++- .../org.eclipse.tycho.surefire.junit47/build.properties | 2 ++ tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml | 10 ++++++++++ .../org.eclipse.tycho.surefire.osgibooter/META-INF/MANIFEST.MF | 3 ++- tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml | 5 +++++ 12 files changed, 46 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 1868f9a..3a27718 100644 --- a/pom.xml +++ b/pom.xml @@ -79,7 +79,7 @@ 3.8.2 1.5.5 1.14 - 2.0.4 + 3.0 1.4.2 1.0-beta-6 1.3 diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit/META-INF/MANIFEST.MF b/tycho-surefire/org.eclipse.tycho.surefire.junit/META-INF/MANIFEST.MF index c9281d6..c7767ba 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.junit/META-INF/MANIFEST.MF +++ b/tycho-surefire/org.eclipse.tycho.surefire.junit/META-INF/MANIFEST.MF @@ -6,6 +6,7 @@ Bundle-Version: 0.16.0.qualifier Fragment-Host: org.eclipse.tycho.surefire.osgibooter;bundle-version="0.14.0" Bundle-RequiredExecutionEnvironment: J2SE-1.5, JavaSE-1.6 -Require-Bundle: org.junit;bundle-version="[3.8.0,4.0.0)" -Bundle-ClassPath: jars/surefire-junit3-2.10.jar +Require-Bundle: org.junit;bundle-version="[3.8.0,4.9.0)" +Bundle-ClassPath: jars/surefire-junit3-2.10.jar, + jars/common-junit3-2.10.jar Bundle-Vendor: %providerName diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit/build.properties b/tycho-surefire/org.eclipse.tycho.surefire.junit/build.properties index 499ce76..fe88b19 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.junit/build.properties +++ b/tycho-surefire/org.eclipse.tycho.surefire.junit/build.properties @@ -9,5 +9,5 @@ # Sonatype Inc. - initial API and implementation ############################################################################### bin.includes = META-INF/,\ - jars/surefire-junit3-2.10.jar,\ + jars/,\ plugin.properties diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml b/tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml index f9feec9..188c45c 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml +++ b/tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml @@ -44,6 +44,11 @@ surefire-junit3 ${surefire-version} + + org.apache.maven.surefire + common-junit3 + ${surefire-version} + diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit4/META-INF/MANIFEST.MF b/tycho-surefire/org.eclipse.tycho.surefire.junit4/META-INF/MANIFEST.MF index c2e019c..632039f 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.junit4/META-INF/MANIFEST.MF +++ b/tycho-surefire/org.eclipse.tycho.surefire.junit4/META-INF/MANIFEST.MF @@ -6,7 +6,9 @@ Bundle-Version: 0.16.0.qualifier Fragment-Host: org.eclipse.tycho.surefire.osgibooter;bundle-version="0.14.0" Bundle-RequiredExecutionEnvironment: J2SE-1.5, JavaSE-1.6 -Bundle-ClassPath: jars/surefire-junit4-2.10.jar +Bundle-ClassPath: jars/surefire-junit4-2.10.jar, + jars/common-junit3-2.10.jar, + jars/common-junit4-2.10.jar Import-Package: junit.framework;version="4.0.0", org.junit;version="4.0.0", org.junit.runner;version="4.0.0", diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit4/build.properties b/tycho-surefire/org.eclipse.tycho.surefire.junit4/build.properties index b787149..fe88b19 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.junit4/build.properties +++ b/tycho-surefire/org.eclipse.tycho.surefire.junit4/build.properties @@ -9,5 +9,5 @@ # Sonatype Inc. - initial API and implementation ############################################################################### bin.includes = META-INF/,\ - jars/surefire-junit4-2.10.jar,\ + jars/,\ plugin.properties diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit4/pom.xml b/tycho-surefire/org.eclipse.tycho.surefire.junit4/pom.xml index f1f821e..f7e6791 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.junit4/pom.xml +++ b/tycho-surefire/org.eclipse.tycho.surefire.junit4/pom.xml @@ -44,6 +44,16 @@ surefire-junit4 ${surefire-version} + + org.apache.maven.surefire + common-junit3 + ${surefire-version} + + + org.apache.maven.surefire + common-junit4 + ${surefire-version} + diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit47/META-INF/MANIFEST.MF b/tycho-surefire/org.eclipse.tycho.surefire.junit47/META-INF/MANIFEST.MF index 59d4c36..50d53dd 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.junit47/META-INF/MANIFEST.MF +++ b/tycho-surefire/org.eclipse.tycho.surefire.junit47/META-INF/MANIFEST.MF @@ -6,7 +6,9 @@ Bundle-Version: 0.16.0.qualifier Fragment-Host: org.eclipse.tycho.surefire.osgibooter;bundle-version="0.16.0" Bundle-RequiredExecutionEnvironment: J2SE-1.5 Bundle-ClassPath: ., - jars/surefire-junit47-2.10.jar + jars/surefire-junit47-2.10.jar, + jars/common-junit3-2.10.jar, + jars/common-junit4-2.10.jar Import-Package: junit.framework;version="[4.7,5)", org.junit;version="[4.7,5)", org.junit.runner;version="[4.7,5)", diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit47/build.properties b/tycho-surefire/org.eclipse.tycho.surefire.junit47/build.properties index 716961d..ad4ed57 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.junit47/build.properties +++ b/tycho-surefire/org.eclipse.tycho.surefire.junit47/build.properties @@ -11,6 +11,8 @@ bin.includes = .,\ META-INF/,\ jars/surefire-junit47-2.10.jar,\ + jars/common-junit3-2.10.jar,\ + jars/common-junit4-2.10.jar,\ plugin.properties,\ about.html,\ about_files/ diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml b/tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml index 61beabb..9be536a 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml +++ b/tycho-surefire/org.eclipse.tycho.surefire.junit47/pom.xml @@ -44,6 +44,16 @@ surefire-junit47 ${surefire-version} + + org.apache.maven.surefire + common-junit4 + ${surefire-version} + + + org.apache.maven.surefire + common-junit3 + ${surefire-version} + diff --git a/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/META-INF/MANIFEST.MF b/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/META-INF/MANIFEST.MF index 9c418b3..1bdb8cb 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/META-INF/MANIFEST.MF +++ b/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/META-INF/MANIFEST.MF @@ -5,7 +5,8 @@ Require-Bundle: org.eclipse.osgi;bundle-version="3.2.2", Eclipse-AutoStart: true Bundle-ClassPath: ., jars/surefire-booter-2.10.jar, - jars/surefire-api-2.10.jar + jars/surefire-api-2.10.jar, + jars/plexus-utils-3.0.jar Bundle-Version: 0.16.0.qualifier Bundle-Name: Tycho Surefire OSGi Booter Eclipse Application (Incubation) Bundle-ManifestVersion: 2 diff --git a/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml b/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml index 9582aef..87f1f23 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml +++ b/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml @@ -52,6 +52,11 @@ surefire-booter ${surefire-version} + + org.codehaus.plexus + plexus-utils + ${plexusUtilsVersion} + -- 1.7.11.2