From 5fbccbb15de2a0dd5f31c3d2ed25a6c5f14353c7 Mon Sep 17 00:00:00 2001 From: Mat Booth Date: Mar 21 2020 11:33:26 +0000 Subject: Add missing resolver patch for eclipserun plugin --- diff --git a/0001-Fix-the-Tycho-build-to-work-on-Fedora.patch b/0001-Fix-the-Tycho-build-to-work-on-Fedora.patch index c05cefe..8098d11 100644 --- a/0001-Fix-the-Tycho-build-to-work-on-Fedora.patch +++ b/0001-Fix-the-Tycho-build-to-work-on-Fedora.patch @@ -1,7 +1,7 @@ -From 9d0948d16255cea14183669d31e4faa8c7eeed6b Mon Sep 17 00:00:00 2001 +From a09c1b1a9068d53d83b84948fb1a5b1379b01bcc Mon Sep 17 00:00:00 2001 From: Roland Grunberg Date: Tue, 12 Jun 2012 09:56:38 -0400 -Subject: [PATCH 1/7] Fix the Tycho build to work on Fedora. +Subject: [PATCH 1/8] Fix the Tycho build to work on Fedora. Minor fixes of limited scope needed to have Tycho building on Fedora. diff --git a/0002-Implement-a-custom-resolver-for-Tycho-in-local-mode.patch b/0002-Implement-a-custom-resolver-for-Tycho-in-local-mode.patch index 4014e8a..80492d4 100644 --- a/0002-Implement-a-custom-resolver-for-Tycho-in-local-mode.patch +++ b/0002-Implement-a-custom-resolver-for-Tycho-in-local-mode.patch @@ -1,7 +1,7 @@ -From d364d99b2f4bbf1023a62d17be9312fd4a2c57e3 Mon Sep 17 00:00:00 2001 +From 35decf21d5582e6009f88dcbbcd81b1ab8709d04 Mon Sep 17 00:00:00 2001 From: Roland Grunberg Date: Tue, 12 Jun 2012 10:38:51 -0400 -Subject: [PATCH 2/7] Implement a custom resolver for Tycho in local mode. +Subject: [PATCH 2/8] Implement a custom resolver for Tycho in local mode. When running in local mode, dependencies should be resolved by looking on the local system. Remote repositories should be ignored unless diff --git a/0003-Tycho-should-always-delegate-artifact-resolution-to-.patch b/0003-Tycho-should-always-delegate-artifact-resolution-to-.patch index 7dfe8d1..a0482ad 100644 --- a/0003-Tycho-should-always-delegate-artifact-resolution-to-.patch +++ b/0003-Tycho-should-always-delegate-artifact-resolution-to-.patch @@ -1,7 +1,7 @@ -From 740046ec4ee55686fd7cf18edd54ccd2de58400c Mon Sep 17 00:00:00 2001 +From a212725a6c4cad9d29db41b37ed6d101c2c7cb72 Mon Sep 17 00:00:00 2001 From: Roland Grunberg Date: Wed, 18 Jun 2014 13:01:31 -0400 -Subject: [PATCH 3/7] Tycho should always delegate artifact resolution to +Subject: [PATCH 3/8] Tycho should always delegate artifact resolution to Maven. Maven resolves dependencies from the following locations in the diff --git a/0004-Bug-537963-Make-the-default-EE-Java-1.8.patch b/0004-Bug-537963-Make-the-default-EE-Java-1.8.patch index 2087abc..d5faa61 100644 --- a/0004-Bug-537963-Make-the-default-EE-Java-1.8.patch +++ b/0004-Bug-537963-Make-the-default-EE-Java-1.8.patch @@ -1,7 +1,7 @@ -From 8630bc5eaac0d3c13b214d30c4f95e949dc2c4fd Mon Sep 17 00:00:00 2001 +From 2bafd02390adb77ef65c2d706b364cf42eb598cb Mon Sep 17 00:00:00 2001 From: Mat Booth Date: Wed, 15 Aug 2018 15:58:10 +0100 -Subject: [PATCH 4/7] Bug 537963 - Make the default EE Java 1.8 +Subject: [PATCH 4/8] Bug 537963 - Make the default EE Java 1.8 This allows bundles that don't otherwise specify an EE (for example if the bundle contains only a plugin.xml, or is a documentation only diff --git a/0005-Fix-uncaught-exception.patch b/0005-Fix-uncaught-exception.patch index d132e10..df834ac 100644 --- a/0005-Fix-uncaught-exception.patch +++ b/0005-Fix-uncaught-exception.patch @@ -1,7 +1,7 @@ -From e6bd4bbb2a5810ed618aa404c8b1f3477a439da0 Mon Sep 17 00:00:00 2001 +From 18bf98457aa55468fc9800eab5b4f78f95f546c9 Mon Sep 17 00:00:00 2001 From: Mat Booth Date: Thu, 20 Feb 2020 16:08:00 +0000 -Subject: [PATCH 5/7] Fix uncaught exception +Subject: [PATCH 5/8] Fix uncaught exception "unreported exception org.codehaus.plexus.configuration.PlexusConfigurationException; must be caught or declared to be thrown" --- diff --git a/0006-Mockito-does-not-have-test-scope.patch b/0006-Mockito-does-not-have-test-scope.patch index 309abba..6b2b955 100644 --- a/0006-Mockito-does-not-have-test-scope.patch +++ b/0006-Mockito-does-not-have-test-scope.patch @@ -1,7 +1,7 @@ -From c53dc6c2ec6ac1799529569cf4bbae64fdaf0866 Mon Sep 17 00:00:00 2001 +From eed86a7fefb12f21a9076293dccb1a3c84e051fd Mon Sep 17 00:00:00 2001 From: Mat Booth Date: Fri, 21 Feb 2020 10:08:13 +0000 -Subject: [PATCH 6/7] Mockito does not have test scope +Subject: [PATCH 6/8] Mockito does not have test scope Change-Id: Ia0554670d27f1f05dc0d5c72f9afbbbc32e7fdbb Signed-off-by: Mat Booth diff --git a/0007-Fix-dependency-problems-when-bootstrapping-with-extr.patch b/0007-Fix-dependency-problems-when-bootstrapping-with-extr.patch index ca30160..16df9f4 100644 --- a/0007-Fix-dependency-problems-when-bootstrapping-with-extr.patch +++ b/0007-Fix-dependency-problems-when-bootstrapping-with-extr.patch @@ -1,7 +1,7 @@ -From 5e0dc0f5b442a224a86aa1ff048c4f4e91caa4f0 Mon Sep 17 00:00:00 2001 +From bf0f458e2cd41ad24ff212014a416c788477bfc4 Mon Sep 17 00:00:00 2001 From: Mat Booth Date: Fri, 20 Mar 2020 02:35:02 +0000 -Subject: [PATCH 7/7] Fix dependency problems when bootstrapping with extras +Subject: [PATCH 7/8] Fix dependency problems when bootstrapping with extras --- tycho-extras/pack200/tycho-pack200b-plugin/pom.xml | 4 ++-- diff --git a/0008-Use-custom-resolver-for-tycho-eclipserun-plugin.patch b/0008-Use-custom-resolver-for-tycho-eclipserun-plugin.patch new file mode 100644 index 0000000..c58f9ce --- /dev/null +++ b/0008-Use-custom-resolver-for-tycho-eclipserun-plugin.patch @@ -0,0 +1,51 @@ +From a19db9367faa7e88cb243b78c3a4a17069c6ea52 Mon Sep 17 00:00:00 2001 +From: Roland Grunberg +Date: Mon, 6 May 2013 14:20:58 -0400 +Subject: [PATCH 8/8] Use custom resolver for tycho-eclipserun-plugin. + +Add various system local OSGi bundle locations to the target platform +used by tycho-eclipserun-plugin. + +Change-Id: Ifd0aae3f32c8077cd0ae33e70f40698c1129788d +--- + .../tycho/extras/eclipserun/EclipseRunMojo.java | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/tycho-extras/tycho-eclipserun-plugin/src/main/java/org/eclipse/tycho/extras/eclipserun/EclipseRunMojo.java b/tycho-extras/tycho-eclipserun-plugin/src/main/java/org/eclipse/tycho/extras/eclipserun/EclipseRunMojo.java +index b93e651..4032d10 100644 +--- a/tycho-extras/tycho-eclipserun-plugin/src/main/java/org/eclipse/tycho/extras/eclipserun/EclipseRunMojo.java ++++ b/tycho-extras/tycho-eclipserun-plugin/src/main/java/org/eclipse/tycho/extras/eclipserun/EclipseRunMojo.java +@@ -13,6 +13,7 @@ package org.eclipse.tycho.extras.eclipserun; + + import java.io.File; + import java.net.MalformedURLException; ++import java.net.URI; + import java.util.ArrayList; + import java.util.List; + import java.util.Map; +@@ -52,6 +53,7 @@ import org.eclipse.tycho.p2.resolver.facade.P2Resolver; + import org.eclipse.tycho.p2.resolver.facade.P2ResolverFactory; + import org.eclipse.tycho.p2.target.facade.TargetPlatformConfigurationStub; + import org.eclipse.tycho.plugins.p2.extras.Repository; ++import org.fedoraproject.p2.EclipseSystemLayout; + + /** + * Launch an eclipse process with arbitrary commandline arguments. The eclipse installation is +@@ -225,6 +227,14 @@ public class EclipseRunMojo extends AbstractMojo { + TargetPlatformConfigurationStub tpConfiguration = new TargetPlatformConfigurationStub(); + // we want to resolve from remote repos only + tpConfiguration.setForceIgnoreLocalArtifacts(true); ++ ++ // Add Fedora Local P2 Repository when running in local mode ++ if (System.getProperty("TYCHO_MVN_LOCAL") != null || System.getProperty("TYCHO_MVN_RPMBUILD") != null) { ++ for (URI uri : EclipseSystemLayout.getRepositories()) { ++ tpConfiguration.addP2Repository(new MavenRepositoryLocation(uri.getPath(), uri)); ++ } ++ } ++ + for (Repository repository : repositories) { + tpConfiguration.addP2Repository(new MavenRepositoryLocation(repository.getId(), repository.getLocation())); + } +-- +2.21.1 + diff --git a/tycho.spec b/tycho.spec index 5d639c6..f829fc0 100644 --- a/tycho.spec +++ b/tycho.spec @@ -28,7 +28,7 @@ Name: tycho Version: 1.6.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Plugins and extensions for building Eclipse plugins and OSGI bundles with Maven # license file is missing but all files having some licensing information are ASL 2.0 @@ -61,6 +61,7 @@ Source10: eclipse-bootstrap-2019-12.tar.xz Patch0: 0001-Fix-the-Tycho-build-to-work-on-Fedora.patch Patch1: 0002-Implement-a-custom-resolver-for-Tycho-in-local-mode.patch Patch2: 0003-Tycho-should-always-delegate-artifact-resolution-to-.patch +Patch7: 0008-Use-custom-resolver-for-tycho-eclipserun-plugin.patch # Submitted upstream: https://bugs.eclipse.org/bugs/show_bug.cgi?id=537963 Patch3: 0004-Bug-537963-Make-the-default-EE-Java-1.8.patch # Fix compile error with uncaught exception @@ -198,6 +199,7 @@ mv fedoraproject-p2-%{fp_p2_git_tag} fedoraproject-p2 %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 # Unneeded for RPM builds %pom_remove_plugin :maven-site-plugin @@ -423,6 +425,9 @@ ln -s %{_javadir}/tycho/org.fedoraproject.p2.jar %{buildroot}%{xmvn_libdir}/inst %files javadoc -f .mfiles-javadoc %changelog +* Sat Mar 21 2020 Mat Booth - 1.6.0-3 +- Add missing resolver patch for eclipserun plugin + * Fri Mar 20 2020 Mat Booth - 1.6.0-2 - Add obsoletes/provides for extras javadoc package