[tycho] Add support for XMvn 2.0
Mikolaj Izdebski
mizdebsk at fedoraproject.org
Fri May 16 12:59:52 UTC 2014
commit 88f2d95ad8c6de6415b7188def3123a9fe651392
Author: Mikolaj Izdebski <mizdebsk at redhat.com>
Date: Fri May 16 10:44:32 2014 +0200
Add support for XMvn 2.0
tycho-use-custom-resolver.patch | 40 ++++++++++++++++++++------------------
tycho.spec | 5 +++-
2 files changed, 25 insertions(+), 20 deletions(-)
---
diff --git a/tycho-use-custom-resolver.patch b/tycho-use-custom-resolver.patch
index 6ded629..003d1a1 100644
--- a/tycho-use-custom-resolver.patch
+++ b/tycho-use-custom-resolver.patch
@@ -1,4 +1,4 @@
-From 8b467aea2d3b7b5baeafe249eded81ba9817d174 Mon Sep 17 00:00:00 2001
+From bd811da6f7d638ffc6aaae5ed4d46946fd145932 Mon Sep 17 00:00:00 2001
From: Roland Grunberg <rgrunber at redhat.com>
Date: Tue, 12 Jun 2012 10:38:51 -0400
Subject: [PATCH] Implement a custom resolver for Tycho in local mode.
@@ -28,19 +28,19 @@ reactor cache, resolution should be attempted using the XMvn Resolver.
Change-Id: Ia1ece07ece2412bc4a88901631f3f651ad2b634b
---
.../tycho/p2/target/TargetDefinitionResolver.java | 12 ++++--
- .../p2/target/TargetPlatformBundlePublisher.java | 15 ++------
- .../tycho/p2/target/TargetPlatformFactoryImpl.java | 43 +++++++++++++++++++--
+ .../p2/target/TargetPlatformBundlePublisher.java | 15 ++-----
+ .../tycho/p2/target/TargetPlatformFactoryImpl.java | 43 ++++++++++++++++++--
.../tycho/p2/repository/LocalRepositoryReader.java | 34 +++++++++++++++-
.../facade/TargetPlatformConfigurationStub.java | 5 ++-
tycho-core/pom.xml | 5 +++
- .../eclipse/tycho/core/locking/FileLockerImpl.java | 26 ++++++++++---
- .../core/maven/TychoMavenLifecycleParticipant.java | 45 ++++++++++++++++++++++
- .../tycho/core/osgitools/AbstractTychoProject.java | 24 ++++++++++++
- .../tycho/core/osgitools/OsgiBundleProject.java | 29 +++++++++++++-
+ .../eclipse/tycho/core/locking/FileLockerImpl.java | 26 +++++++++---
+ .../core/maven/TychoMavenLifecycleParticipant.java | 47 ++++++++++++++++++++++
+ .../tycho/core/osgitools/AbstractTychoProject.java | 24 +++++++++++
+ .../tycho/core/osgitools/OsgiBundleProject.java | 29 ++++++++++++-
.../DefaultTargetPlatformConfigurationReader.java | 6 ++-
.../osgi/runtime/TychoOsgiRuntimeLocator.java | 17 ++++++++
.../p2/resolver/P2TargetPlatformResolver.java | 10 +++++
- 13 files changed, 243 insertions(+), 28 deletions(-)
+ 13 files changed, 245 insertions(+), 28 deletions(-)
diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetDefinitionResolver.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/TargetDefinitionResolver.java
index d3c5ed9..027a884 100644
@@ -304,7 +304,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 d003619..ce3ef89 100644
+index 08daf3c..8b5bbc6 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
@@ -11,6 +11,8 @@
@@ -324,20 +324,22 @@ index d003619..ce3ef89 100644
import org.codehaus.plexus.logging.Logger;
import org.eclipse.tycho.ReactorProject;
import org.eclipse.tycho.core.osgitools.BundleReader;
-@@ -66,6 +69,48 @@ public class TychoMavenLifecycleParticipant extends AbstractMavenLifecyclePartic
+@@ -66,6 +69,50 @@ public class TychoMavenLifecycleParticipant extends AbstractMavenLifecyclePartic
validate(projects);
configureComponents(session);
-+ try {
-+ if (plexus.lookup("org.fedoraproject.maven.resolver.Resolver") != null) {
-+ if (session.isOffline()) {
-+ System.setProperty("TYCHO_MVN_RPMBUILD", "");
-+ } else {
-+ System.setProperty("TYCHO_MVN_LOCAL", "");
++ for (String clazz : Arrays.asList("org.fedoraproject.xmvn.resolver.Resolver", "org.fedoraproject.maven.resolver.Resolver")) {
++ try {
++ if (plexus.lookup(clazz) != null) {
++ if (session.isOffline()) {
++ System.setProperty("TYCHO_MVN_RPMBUILD", "");
++ } else {
++ System.setProperty("TYCHO_MVN_LOCAL", "");
++ }
+ }
++ } catch (ComponentLookupException e) {
++ // No XMvn (Upstream Maven in use)
+ }
-+ } catch (ComponentLookupException e) {
-+ // No XMvn (Upstream Maven in use)
+ }
+
+ // Create a system p2 repository for local dependency resolution
@@ -562,5 +564,5 @@ index 5bc5dfa..52e8200 100644
addEntireP2RepositoryToTargetPlatform(repository, tpConfiguration);
}
--
-1.8.5.3
+1.9.0
diff --git a/tycho.spec b/tycho.spec
index 265de6a..e444d9e 100644
--- a/tycho.spec
+++ b/tycho.spec
@@ -19,7 +19,7 @@
Name: tycho
Version: 0.20.0
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: Plugins and extensions for building Eclipse plugins and OSGI bundles with Maven
Group: Development/Libraries
@@ -350,6 +350,9 @@ install -m 644 $osgiStateJarPath $RPM_BUILD_ROOT%{_javadir}/%{name}/osgi.compati
%{_javadocdir}/%{name}
%changelog
+* Fri May 16 2014 Mikolaj Izdebski <mizdebsk at redhat.com> - 0.20.0-7
+- Add support for XMvn 2.0
+
* Tue May 13 2014 Alexander Kurtakov <akurtako at redhat.com> 0.20.0-6
- Make tycho copy licence feature to the system repo.
More information about the scm-commits
mailing list