diff --git a/tycho-bootstrap.patch b/tycho-bootstrap.patch index ab5718d..0ab1b14 100644 --- a/tycho-bootstrap.patch +++ b/tycho-bootstrap.patch @@ -805,8 +805,8 @@ index 1b5ac72..9e484b1 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 @@ -8,7 +8,7 @@ Bundle-ClassPath: ., - jars/surefire-api-2.13.jar, - jars/maven-surefire-common-2.13.jar, + jars/surefire-api-2.15.jar, + jars/maven-surefire-common-2.15.jar, jars/plexus-utils-3.0.jar -Bundle-Version: 0.18.0 +Bundle-Version: 0.18.0.qualifier diff --git a/tycho-fix-surefire.patch b/tycho-fix-surefire.patch index 6da0668..da47e66 100644 --- a/tycho-fix-surefire.patch +++ b/tycho-fix-surefire.patch @@ -1,4 +1,4 @@ -From 249113f725b6f00ff69f5e681a6b8c85cdd7cc13 Mon Sep 17 00:00:00 2001 +From cd532f2b9fede237bdd35177658f26247e282c74 Mon Sep 17 00:00:00 2001 From: Roland Grunberg Date: Fri, 21 Sep 2012 10:58:09 -0400 Subject: [PATCH] Resolve all necessary dependencies for Tycho Surefire. @@ -24,7 +24,7 @@ Change-Id: I9ef0239eed887fa47c380efcdce968934c788c9f 6 files changed, 34 insertions(+), 4 deletions(-) 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 af80319..2f14f0f 100644 +index 35bc312..1d18a6d 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.18.0 @@ -32,10 +32,10 @@ index af80319..2f14f0f 100644 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.13.jar +-Bundle-ClassPath: jars/surefire-junit3-2.15.jar +Require-Bundle: org.junit;bundle-version="[3.8.0,5.0.0)" -+Bundle-ClassPath: jars/surefire-junit3-2.13.jar, -+ jars/common-junit3-2.13.jar ++Bundle-ClassPath: jars/surefire-junit3-2.15.jar, ++ jars/common-junit3-2.15.jar Bundle-Vendor: %providerName diff --git a/tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml b/tycho-surefire/org.eclipse.tycho.surefire.junit/pom.xml index 3d0f7c1..1115be2 100644 @@ -54,17 +54,17 @@ index 3d0f7c1..1115be2 100644 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 3b15d2b..e830991 100644 +index 19c7ebb..26c9084 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.18.0 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.13.jar -+Bundle-ClassPath: jars/surefire-junit4-2.13.jar, -+ jars/common-junit3-2.13.jar, -+ jars/common-junit4-2.13.jar +-Bundle-ClassPath: jars/surefire-junit4-2.15.jar ++Bundle-ClassPath: jars/surefire-junit4-2.15.jar, ++ jars/common-junit3-2.15.jar, ++ jars/common-junit4-2.15.jar Import-Package: junit.framework;version="3.0.0", org.junit;version="4.0.0", org.junit.runner;version="4.0.0", @@ -90,17 +90,17 @@ index caa77d2..32c45fc 100644 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 b4d02aa..c49f2da 100644 +index 33d777b..ff58223 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 @@ -8,7 +8,9 @@ Bundle-RequiredExecutionEnvironment: J2SE-1.5 Bundle-ClassPath: ., - jars/surefire-junit47-2.13.jar, - jars/common-junit48-2.13.jar, -- jars/surefire-grouper-2.13.jar -+ jars/surefire-grouper-2.13.jar, -+ jars/common-junit3-2.13.jar, -+ jars/common-junit4-2.13.jar + jars/surefire-junit47-2.15.jar, + jars/common-junit48-2.15.jar, +- jars/surefire-grouper-2.15.jar ++ jars/surefire-grouper-2.15.jar, ++ jars/common-junit3-2.15.jar, ++ jars/common-junit4-2.15.jar Import-Package: junit.framework;version="3.0.0", org.junit;version="[4.7,5)", org.junit.runner;version="[4.7,5)", diff --git a/tycho-maven-surefire.patch b/tycho-maven-surefire.patch index 665f697..5a21d7c 100644 --- a/tycho-maven-surefire.patch +++ b/tycho-maven-surefire.patch @@ -1,7 +1,7 @@ -From c92d9ba25cf61652ddece8602dec1e67eeb4971a Mon Sep 17 00:00:00 2001 +From 9fd0241b1ceb623332f8827df99270b54763efc8 Mon Sep 17 00:00:00 2001 From: Jan Sievers Date: Tue, 4 Sep 2012 16:02:52 +0200 -Subject: [PATCH] POC 386481 update maven surefire to latest version 2.13 +Subject: [PATCH] POC 386481 update maven surefire to latest version 2.15 while SUREFIRE-825 and SUREFIRE-876 are fixed, there are several new problems: @@ -33,16 +33,17 @@ Change-Id: Ibcb439a24add880c4cdafe67b42e29ca3cb14ff1 .../META-INF/MANIFEST.MF | 6 +- .../org.eclipse.tycho.surefire.osgibooter/pom.xml | 10 ++ .../surefire/osgibooter/OsgiSurefireBooter.java | 36 +++--- + .../osgibooter/TychoClasspathConfiguration.java | 35 ++++-- tycho-surefire/pom.xml | 2 +- tycho-surefire/tycho-surefire-plugin/pom.xml | 5 + .../java/org/eclipse/tycho/surefire/TestMojo.java | 29 ++++- .../surefire/provider/impl/JUnit47Provider.java | 2 +- - 16 files changed, 90 insertions(+), 254 deletions(-) + 17 files changed, 116 insertions(+), 263 deletions(-) delete mode 100644 tycho-surefire/org.eclipse.tycho.surefire.junit47/src/org/apache/maven/surefire/junitcore/OsgiEnabledJUnitCoreProvider.java delete mode 100644 tycho-surefire/org.eclipse.tycho.surefire.junit47/src/org/apache/maven/surefire/junitcore/OsgiEnabledJUnitCoreRunListener.java 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 dbe883b..af80319 100644 +index dbe883b..35bc312 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 @@ -7,5 +7,5 @@ Fragment-Host: org.eclipse.tycho.surefire.osgibooter;bundle-version="0.14.0" @@ -50,7 +51,7 @@ index dbe883b..af80319 100644 JavaSE-1.6 Require-Bundle: org.junit;bundle-version="[3.8.0,4.0.0)" -Bundle-ClassPath: jars/surefire-junit3-2.10.jar -+Bundle-ClassPath: jars/surefire-junit3-2.13.jar ++Bundle-ClassPath: jars/surefire-junit3-2.15.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 @@ -64,7 +65,7 @@ index 499ce76..fe88b19 100644 + jars/,\ plugin.properties 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 7498728..3b15d2b 100644 +index 7498728..19c7ebb 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,7 @@ Bundle-Version: 0.18.0 @@ -72,7 +73,7 @@ index 7498728..3b15d2b 100644 Bundle-RequiredExecutionEnvironment: J2SE-1.5, JavaSE-1.6 -Bundle-ClassPath: jars/surefire-junit4-2.10.jar -+Bundle-ClassPath: jars/surefire-junit4-2.13.jar ++Bundle-ClassPath: jars/surefire-junit4-2.15.jar Import-Package: junit.framework;version="3.0.0", org.junit;version="4.0.0", org.junit.runner;version="4.0.0", @@ -88,7 +89,7 @@ index b787149..fe88b19 100644 + jars/,\ plugin.properties 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 024acb7..b4d02aa 100644 +index 024acb7..33d777b 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,11 +6,14 @@ Bundle-Version: 0.18.0 @@ -96,9 +97,9 @@ index 024acb7..b4d02aa 100644 Bundle-RequiredExecutionEnvironment: J2SE-1.5 Bundle-ClassPath: ., - jars/surefire-junit47-2.10.jar -+ jars/surefire-junit47-2.13.jar, -+ jars/common-junit48-2.13.jar, -+ jars/surefire-grouper-2.13.jar ++ jars/surefire-junit47-2.15.jar, ++ jars/common-junit48-2.15.jar, ++ jars/surefire-grouper-2.15.jar Import-Package: junit.framework;version="3.0.0", org.junit;version="[4.7,5)", org.junit.runner;version="[4.7,5)", @@ -382,7 +383,7 @@ index fb6bede..0000000 - -} 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 e75a51f..1b5ac72 100644 +index e75a51f..1c12e19 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 @@ -4,8 +4,10 @@ Require-Bundle: org.eclipse.osgi;bundle-version="3.2.2", @@ -391,9 +392,9 @@ index e75a51f..1b5ac72 100644 Bundle-ClassPath: ., - jars/surefire-booter-2.10.jar, - jars/surefire-api-2.10.jar -+ jars/surefire-booter-2.13.jar, -+ jars/surefire-api-2.13.jar, -+ jars/maven-surefire-common-2.13.jar, ++ jars/surefire-booter-2.15.jar, ++ jars/surefire-api-2.15.jar, ++ jars/maven-surefire-common-2.15.jar, + jars/plexus-utils-3.0.jar Bundle-Version: 0.18.0 Bundle-Name: Tycho Surefire OSGi Booter Eclipse Application (Incubation) @@ -420,7 +421,7 @@ index 20d5b39..651282f 100644 diff --git a/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/OsgiSurefireBooter.java b/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/OsgiSurefireBooter.java -index 791221b..72a5f75 100644 +index 791221b..09bf329 100644 --- a/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/OsgiSurefireBooter.java +++ b/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/OsgiSurefireBooter.java @@ -18,20 +18,25 @@ import java.io.IOException; @@ -480,7 +481,7 @@ index 791221b..72a5f75 100644 - ProviderConfiguration providerConfiguration = new ProviderConfiguration(dirScannerParams, failIfNoTests, - reporterConfig, null, testRequest, extractProviderProperties(testProps), null); + ProviderConfiguration providerConfiguration = new ProviderConfiguration(dirScannerParams, -+ RunOrderParameters.DEFAULT(), failIfNoTests, reporterConfig, null, testRequest, ++ new RunOrderParameters((String) null, null), failIfNoTests, reporterConfig, null, testRequest, + extractProviderProperties(testProps), null, false); StartupReportConfiguration startupReportConfig = new StartupReportConfiguration(useFile, printSummary, StartupReportConfiguration.PLAIN_REPORT_FORMAT, redirectTestOutputToFile, disableXmlReport, reportsDir, @@ -491,7 +492,7 @@ index 791221b..72a5f75 100644 - RunResult result = surefireStarter.runSuitesInProcess(); - return result.getForkedProcessCode(); -+ RunResult result = ProviderFactory.invokeProvider(null, testClassLoader, surefireClassLoader, ++ RunResult result = ProviderFactory.invokeProvider(null, classPathConfig.createMergedClassLoader(), + createReporterFactory(startupReportConfig), providerConfiguration, false, startupConfiguration, true); + + return result.getFailsafeCode() == null ? 0 : result.getFailsafeCode(); @@ -502,8 +503,57 @@ index 791221b..72a5f75 100644 } /* +diff --git a/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/TychoClasspathConfiguration.java b/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/TychoClasspathConfiguration.java +index c94d3ea..fc606b0 100644 +--- a/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/TychoClasspathConfiguration.java ++++ b/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/TychoClasspathConfiguration.java +@@ -25,18 +25,35 @@ public class TychoClasspathConfiguration extends ClasspathConfiguration { + } + + @Override +- public ClassLoader createSurefireClassLoader(ClassLoader parent) throws SurefireExecutionException { +- return surefireClassLoader; ++ public ClassLoader createMergedClassLoader() throws SurefireExecutionException { ++ return new MergedClassLoader(null, new ClassLoader[] { testClassLoader, surefireClassLoader }); + } + +- @Override +- public ClassLoader createTestClassLoader() throws SurefireExecutionException { +- return testClassLoader; +- } ++ private class MergedClassLoader extends ClassLoader { ++ ++ private ClassLoader[] delegateClassLoaders; ++ ++ public MergedClassLoader(ClassLoader parent, ClassLoader[] delegateClassLoaders) { ++ super(parent); ++ this.delegateClassLoaders = delegateClassLoaders; ++ } ++ ++ @Override ++ public Class loadClass(String name) throws ClassNotFoundException { ++ return findClass(name); ++ } ++ ++ @Override ++ protected Class findClass(String name) throws ClassNotFoundException { ++ for (ClassLoader delegate : delegateClassLoaders) { ++ try { ++ return delegate.loadClass(name); ++ } catch (ClassNotFoundException e) { ++ } ++ } ++ throw new ClassNotFoundException(); ++ } + +- @Override +- public ClassLoader createTestClassLoader(boolean childDelegation) throws SurefireExecutionException { +- return testClassLoader; + } + + } diff --git a/tycho-surefire/pom.xml b/tycho-surefire/pom.xml -index 7dd7c41..18db932 100644 +index 7dd7c41..1945406 100644 --- a/tycho-surefire/pom.xml +++ b/tycho-surefire/pom.xml @@ -26,7 +26,7 @@ @@ -511,7 +561,7 @@ index 7dd7c41..18db932 100644 - 2.10 -+ 2.13 ++ 2.15 diff --git a/tycho.spec b/tycho.spec index ec12e78..7c58566 100644 --- a/tycho.spec +++ b/tycho.spec @@ -9,7 +9,7 @@ Name: tycho Version: 0.18.0 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Plugins and extensions for building Eclipse plugins and OSGI bundles with Maven Group: Development/Libraries @@ -284,6 +284,9 @@ install -m 644 $osgiJarPath $RPM_BUILD_ROOT%{_javadir}/%{name}/osgi.jar %{_javadocdir}/%{name} %changelog +* Tue Jul 9 2013 Roland Grunberg 0.18.0-4 +- Update to use maven-surefire 2.15 API. + * Fri Jul 5 2013 Alexander Kurtakov 0.18.0-3 - Use _jnidir too when building local p2 repo.