commit 015fc6e1af923d62db5da6bf5dea34b37e8995bb Author: Mikolaj Izdebski mizdebsk@redhat.com Date: Thu Dec 4 16:23:54 2014 +0100
fedoraproject-p2: Add support for installation into SCLs
- Bootstrap build
sources | 2 +- tycho-use-custom-resolver.patch | 44 +++++++++----------------------------- tycho.spec | 10 ++++++-- 3 files changed, 19 insertions(+), 37 deletions(-) --- diff --git a/sources b/sources index a390e80..a02b871 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -3c1629e532861686aa3b01eb55b17575 fedoraproject-p2-9a996d.tar.xz +ba9972227309c76bed00c6ea8feed61d fedoraproject-p2-723f1b.tar.xz d7ee912e8da240c8d87892ed876960ae org.eclipse.tycho-tycho-0.22.0.tar.bz2 c600a5115f29962c974b75b4b25e74f1 eclipse-bootstrap.tar.xz diff --git a/tycho-use-custom-resolver.patch b/tycho-use-custom-resolver.patch index 738c954..e7f3c9d 100644 --- a/tycho-use-custom-resolver.patch +++ b/tycho-use-custom-resolver.patch @@ -1,4 +1,4 @@ -From a79c7771631f3bccbf5625c85ed99796b187ae9c Mon Sep 17 00:00:00 2001 +From e7e3560e189c22711de33ce662e2312a3c2dddcb Mon Sep 17 00:00:00 2001 From: Roland Grunberg rgrunber@redhat.com Date: Tue, 12 Jun 2012 10:38:51 -0400 Subject: [PATCH] Implement a custom resolver for Tycho in local mode. @@ -41,8 +41,8 @@ Change-Id: Ia1ece07ece2412bc4a88901631f3f651ad2b634b .../tycho/core/osgitools/OsgiBundleProject.java | 5 ++- .../DefaultTargetPlatformConfigurationReader.java | 6 ++- tycho-p2/tycho-p2-facade/pom.xml | 5 +++ - .../tycho/p2/resolver/P2DependencyResolver.java | 23 +++++++++++ - 15 files changed, 222 insertions(+), 32 deletions(-) + .../tycho/p2/resolver/P2DependencyResolver.java | 8 ++++ + 15 files changed, 207 insertions(+), 32 deletions(-)
diff --git a/sisu-equinox/sisu-equinox-embedder/src/main/java/org/eclipse/sisu/equinox/embedder/internal/DefaultEquinoxEmbedder.java b/sisu-equinox/sisu-equinox-embedder/src/main/java/org/eclipse/sisu/equinox/embedder/internal/DefaultEquinoxEmbedder.java index ed01c2d..759f005 100644 @@ -343,10 +343,10 @@ index 22cca24..670f013 100644
// convenience method for tests diff --git a/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product b/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product -index 7c99168..28ad59f 100644 +index 76516e5..47d937c 100644 --- a/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product +++ b/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product -@@ -76,6 +76,7 @@ +@@ -77,6 +77,7 @@ <plugin id="org.eclipse.tycho.noopsecurity"/> <plugin id="org.sat4j.core"/> <plugin id="org.sat4j.pb"/> @@ -402,7 +402,7 @@ index 86253bd..cef15d2 100644 throw new RuntimeException(e); } catch (IOException e) { diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/maven/TychoMavenLifecycleParticipant.java b/tycho-core/src/main/java/org/eclipse/tycho/core/maven/TychoMavenLifecycleParticipant.java -index 1160f6c..acb2a1d 100644 +index b71b858..ef92336 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/core/maven/TychoMavenLifecycleParticipant.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/core/maven/TychoMavenLifecycleParticipant.java @@ -29,6 +29,7 @@ import org.apache.maven.project.MavenProject; @@ -544,18 +544,10 @@ index b567d50..34baa1a 100644
<build> diff --git a/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolver/P2DependencyResolver.java b/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolver/P2DependencyResolver.java -index ae2dc38..d7a76c1 100644 +index ae2dc38..a0c9969 100644 --- a/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolver/P2DependencyResolver.java +++ b/tycho-p2/tycho-p2-facade/src/main/java/org/eclipse/tycho/p2/resolver/P2DependencyResolver.java -@@ -15,6 +15,7 @@ import java.net.MalformedURLException; - import java.net.URI; - import java.net.URISyntaxException; - import java.net.URL; -+import java.nio.file.Paths; - import java.util.ArrayList; - import java.util.Collection; - import java.util.HashMap; -@@ -86,6 +87,7 @@ import org.eclipse.tycho.p2.resolver.facade.P2ResolverFactory; +@@ -86,6 +86,7 @@ import org.eclipse.tycho.p2.resolver.facade.P2ResolverFactory; import org.eclipse.tycho.p2.target.facade.PomDependencyCollector; import org.eclipse.tycho.p2.target.facade.TargetPlatformConfigurationStub; import org.eclipse.tycho.repository.registry.facade.ReactorRepositoryManagerFacade; @@ -563,28 +555,14 @@ index ae2dc38..d7a76c1 100644
@Component(role = DependencyResolver.class, hint = P2DependencyResolver.ROLE_HINT, instantiationStrategy = "per-lookup") public class P2DependencyResolver extends AbstractLogEnabled implements DependencyResolver, Initializable { -@@ -206,6 +208,27 @@ public class P2DependencyResolver extends AbstractLogEnabled implements Dependen +@@ -206,6 +207,13 @@ public class P2DependencyResolver extends AbstractLogEnabled implements Dependen pomDependencies.setProjectLocation(project.getBasedir()); }
+ // Add Fedora Local P2 Repository when running in local mode + if (System.getProperty("TYCHO_MVN_LOCAL") != null || System.getProperty("TYCHO_MVN_RPMBUILD") != null) { -+ -+ Set<String> allLocations = new HashSet<String>(); -+ final Set<String> roots = EclipseSystemLayout.getSCLRoots(); -+ for (String root : roots) { -+ EclipseSystemLayout.initLocations(Paths.get(root), allLocations, allLocations, allLocations, false); -+ } -+ -+ allLocations.addAll(EclipseSystemLayout.getUserDefinedBundleLocations()); -+ -+ for (String loc : allLocations) { -+ String uri = "fedora:" + loc; -+ try { -+ tpConfiguration.addP2Repository(new MavenRepositoryLocation(uri, new URI(uri))); -+ } catch (URISyntaxException e) { -+ getLogger().warn("Unable to resolve repository URI : " + uri, e); -+ } ++ for (URI uri : EclipseSystemLayout.getRepositories()) { ++ tpConfiguration.addP2Repository(new MavenRepositoryLocation(uri.getPath(), uri)); + } + } + diff --git a/tycho.spec b/tycho.spec index eb243b2..4c18643 100644 --- a/tycho.spec +++ b/tycho.spec @@ -6,7 +6,7 @@ # This basically uses javac + xmvn to build only the Tycho components # required to perform a full Tycho build # Most common usage : A library (in Fedora) used by Tycho's runtime broke API -%global tycho_bootstrap 0 +%global tycho_bootstrap 1 # Set 'eclipse_bootstrap' if Eclipse from buildroot cannot help build Tycho # This basically provides a location for usage of pre-bundled Eclipse # Possible uses : Need to build Tycho before Eclipse in fresh buildroot @@ -15,7 +15,7 @@ # %%global snap -SNAPSHOT %global snap %{nil}
-%global fp_p2_sha 9a996d +%global fp_p2_sha 723f1b %global fp_p2_version 0.0.1 %global fp_p2_snap -SNAPSHOT
@@ -23,7 +23,7 @@
Name: tycho Version: 0.22.0 -Release: 2%{?dist} +Release: 2.1%{?dist} Summary: Plugins and extensions for building Eclipse plugins and OSGI bundles with Maven
Group: Development/Libraries @@ -409,6 +409,10 @@ ln -s %{_javadir}/tycho/org.fedoraproject.p2.jar %{buildroot}%{_datadir}/xmvn/li %{_javadocdir}/tycho
%changelog +* Thu Dec 4 2014 Mikolaj Izdebski mizdebsk@redhat.com - 0.22.0-2.1 +- fedoraproject-p2: Add support for installation into SCLs +- Bootstrap build + * Thu Dec 04 2014 Mat Booth mat.booth@redhat.com - 0.22.0-2 - Fix osgi.jar symlink when in eclipse-bootstrap mode - Remove no longer needed workaround for rhbz#1139180