[java-sig-commits] [tycho] - Update to 0.14.1 upstream tag. - Allow building against maven-surefire 2.12 (instead of 2.10).

Roland Grunberg rgrunber at fedoraproject.org
Fri Mar 9 21:59:14 UTC 2012


commit 6ac9cc0acf7ba5318b22d6a273965cd0be20956e
Author: Roland Grunberg <rgrunber at redhat.com>
Date:   Fri Mar 9 16:40:39 2012 -0500

    - Update to 0.14.1 upstream tag.
    - Allow building against maven-surefire 2.12 (instead of 2.10).

 .gitignore                 |    1 +
 sources                    |    2 +-
 tycho-maven-surefire.patch |   86 ++++++++++++++++++++++++++++++++++++++++++++
 tycho.spec                 |   22 ++++++-----
 4 files changed, 100 insertions(+), 11 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 526c781..29f39f9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
 maven-repo.tar.xz
 tycho-0.14.0-6391f1dafb35cbef48753e89c743ee9664a1c79d.tar.xz
 tycho-0.14.0.tar.bz2
+/tycho-0.14.x.tar.bz2
diff --git a/sources b/sources
index 9ee347f..10f7576 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
+819980acb31e0c06dca4fdd8320c39c1  tycho-0.14.x.tar.bz2
 08dd3f86350287dbb7a57b9c48c3fab1  maven-repo.tar.xz
-a3295a852335596f703a54ab154585f0  tycho-0.14.0.tar.bz2
diff --git a/tycho-maven-surefire.patch b/tycho-maven-surefire.patch
new file mode 100644
index 0000000..bf808cf
--- /dev/null
+++ b/tycho-maven-surefire.patch
@@ -0,0 +1,86 @@
+--- ./tycho-0.14.x.old/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/TestMojo.java	2012-02-24 06:40:15.000000000 -0500
++++ ./tycho-0.14.x/tycho-surefire/tycho-surefire-plugin/src/main/java/org/eclipse/tycho/surefire/TestMojo.java	2012-03-09 15:52:27.000000000 -0500
+@@ -594,7 +594,7 @@
+         case 0:
+             getLog().info("All tests passed!");
+             break;
+-        case RunResult.NO_TESTS:
++        case 254:
+             String message = "No tests found.";
+             if (failIfNoTests) {
+                 throw new MojoFailureException(message);
+--- ./tycho-0.14.x.old/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/META-INF/MANIFEST.MF	2012-02-24 06:40:15.000000000 -0500
++++ ./tycho-0.14.x/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/META-INF/MANIFEST.MF	2012-03-09 14:53:53.000000000 -0500
+@@ -5,7 +5,8 @@
+ Eclipse-AutoStart: true
+ Bundle-ClassPath: .,
+  jars/surefire-booter-2.10.jar,
+- jars/surefire-api-2.10.jar
++ jars/surefire-api-2.10.jar,
++ jars/maven-surefire-common-2.10.jar
+ Bundle-Version: 0.14.1
+ Bundle-Name: Tycho Surefire OSGi Booter Eclipse Application (Incubation)
+ Bundle-ManifestVersion: 2
+--- ./tycho-0.14.x.old/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/OsgiSurefireBooter.java	2012-02-24 06:40:15.000000000 -0500
++++ ./tycho-0.14.x/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/src/main/java/org/eclipse/tycho/surefire/osgibooter/OsgiSurefireBooter.java	2012-03-09 15:44:34.000000000 -0500
+@@ -26,13 +26,14 @@
+ import org.apache.maven.surefire.booter.ClassLoaderConfiguration;
+ import org.apache.maven.surefire.booter.ProviderConfiguration;
+ import org.apache.maven.surefire.booter.StartupConfiguration;
+-import org.apache.maven.surefire.booter.StartupReportConfiguration;
+-import org.apache.maven.surefire.booter.SurefireStarter;
++import org.apache.maven.plugin.surefire.StartupReportConfiguration;
++import org.apache.maven.plugin.surefire.InPluginVMSurefireStarter;
+ import org.apache.maven.surefire.report.ReporterConfiguration;
+ import org.apache.maven.surefire.suite.RunResult;
+ import org.apache.maven.surefire.testset.DirectoryScannerParameters;
+ import org.apache.maven.surefire.testset.TestRequest;
+ import org.apache.maven.surefire.util.RunOrder;
++import org.apache.maven.surefire.testset.RunOrderParameters;
+ import org.eclipse.core.runtime.CoreException;
+ import org.eclipse.core.runtime.IStatus;
+ import org.eclipse.core.runtime.Status;
+@@ -63,22 +64,22 @@
+         boolean printSummary = true;
+         boolean disableXmlReport = false;
+         ClassLoader testClassLoader = getBundleClassLoader(plugin);
+-        ClassLoader surefireClassLoader = SurefireStarter.class.getClassLoader();
++        ClassLoader surefireClassLoader = InPluginVMSurefireStarter.class.getClassLoader();
+ 
+         TychoClasspathConfiguration classPathConfig = new TychoClasspathConfiguration(testClassLoader,
+                 surefireClassLoader);
+         StartupConfiguration startupConfiguration = new StartupConfiguration(provider, classPathConfig,
+                 new ClassLoaderConfiguration(useSystemClassloader, useManifestOnlyJar), forkMode, inForkedVM);
+         DirectoryScannerParameters dirScannerParams = new DirectoryScannerParameters(testClassesDir, includes,
+-                excludes, failIfNoTests, RunOrder.FILESYSTEM);
++                excludes, null, failIfNoTests, RunOrder.FILESYSTEM.name());
+         ReporterConfiguration reporterConfig = new ReporterConfiguration(reportsDir, trimStacktrace);
+         TestRequest testRequest = new TestRequest(null, testClassesDir, null);
+-        ProviderConfiguration providerConfiguration = new ProviderConfiguration(dirScannerParams, failIfNoTests,
++        ProviderConfiguration providerConfiguration = new ProviderConfiguration(dirScannerParams, RunOrderParameters.DEFAULT(), failIfNoTests,
+                 reporterConfig, null, testRequest, new Properties(), null);
+         StartupReportConfiguration startupReportConfig = new StartupReportConfiguration(useFile, printSummary,
+                 StartupReportConfiguration.PLAIN_REPORT_FORMAT, redirectTestOutputToFile, disableXmlReport, reportsDir,
+-                trimStacktrace);
+-        SurefireStarter surefireStarter = new SurefireStarter(startupConfiguration, providerConfiguration,
++                trimStacktrace, null, "TESTHASH", false);
++        InPluginVMSurefireStarter surefireStarter = new InPluginVMSurefireStarter(startupConfiguration, providerConfiguration,
+                 startupReportConfig);
+ 
+         RunResult result = surefireStarter.runSuitesInProcess();
+--- ./tycho-0.14.x.old/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml	2012-02-24 06:40:15.000000000 -0500
++++ ./tycho-0.14.x/tycho-surefire/org.eclipse.tycho.surefire.osgibooter/pom.xml	2012-03-09 14:45:54.987999986 -0500
+@@ -51,6 +51,13 @@
+ 									<groupId>org.apache.maven.surefire</groupId>
+ 									<artifactId>surefire-booter</artifactId>
+ 									<version>${surefire-version}</version>
++
++								</artifactItem>
++								<artifactItem>
++									<groupId>org.apache.maven.surefire</groupId>
++									<artifactId>maven-surefire-common</artifactId>
++									<version>${surefire-version}</version>
++
+ 								</artifactItem>
+ 							</artifactItems>
+ 						</configuration>
diff --git a/tycho.spec b/tycho.spec
index 71d2b05..b8b0ddb 100644
--- a/tycho.spec
+++ b/tycho.spec
@@ -1,4 +1,4 @@
-%global bootstrap 1
+%global bootstrap 0
 
 %global eclipsedir %{_libdir}/eclipse
 
@@ -9,16 +9,16 @@
 %endif
 
 Name:           tycho
-Version:        0.14.0
-Release:        4.1%{?dist}
+Version:        0.14.1
+Release:        1%{?dist}
 Summary:        Plugins and extensions for building Eclipse plugins and OSGI bundles with Maven
 
 Group:          Development/Libraries
 # license file is missing but all files having some licensing information are ASL 2.0
 License:        ASL 2.0
 URL:            http://tycho.sonatype.org/
-# http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/snapshot/tycho-0.14.0.tar.bz2
-Source0:        %{name}-%{version}.tar.bz2
+# http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/snapshot/tycho-0.14.x.tar.bz2
+Source0:        %{name}-0.14.x.tar.bz2
 
 # this is a workaround for maven-plugin-plugin changes that happened after
 # version 2.4.3 (impossible to have empty mojo created as aggregate). This
@@ -37,6 +37,8 @@ Patch0:	%{name}-fix-build.patch
 # be cyclic dependencies.
 Patch1:	%{name}-%{version}-bootstrap.patch
 %endif
+# Upstream builds against maven-surefire 2.10 but in rawhide we have 2.12
+Patch2:	%{name}-maven-surefire.patch
 
 BuildArch:      noarch
 
@@ -108,12 +110,13 @@ Requires:       jpackage-utils
 This package contains the API documentation for %{name}.
 
 %prep
-%setup -q
+%setup -q -n %{name}-0.14.x
 
 %patch0 -p2
 %if %{bootstrap}
 %patch1 -p1
 %endif
+%patch2 -p2
 
 find tycho-core -iname '*html' -delete
 
@@ -125,9 +128,6 @@ popd
 
 %if %{bootstrap}
 tar xf %{SOURCE3}
-%else
-mkdir -p .m2/org/eclipse/%{name}/%{name}-bundles-external/%{version}
-unzip -d .m2/org/eclipse/%{name}/%{name}-bundles-external/%{version} %{_javadir}/%{name}/%{name}-bundles-external.zip
 %endif
 
 %build
@@ -200,7 +200,9 @@ cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}
 %{_javadocdir}/%{name}
 
 %changelog
-* Thu Feb 23 2012 Roland Grunberg <rgrunber at redhat.com> 0.14.0-4.1
+* Fri Mar 9 2012 Roland Grunberg <rgrunber at redhat.com> 0.14.1-1
+- Update to 0.14.1 upstream tag.
+- Allow building against maven-surefire 2.12 (instead of 2.10).
 - Stop symlinking o.e.osgi and o.e.jdt.core into the m2 cache.
 
 * Thu Feb 16 2012 Roland Grunberg <rgrunber at redhat.com> 0.14.0-4


More information about the java-sig-commits mailing list