commit 8520b94c739bf4815bc39091f0971bb267ba872d
Author: Roland Grunberg <rgrunber(a)redhat.com>
Date: Tue Jul 31 15:15:40 2012 -0400
Ignore defined environments in local mode.
When running Tycho in local mode, dependencies will be resolved for all
environments defined in target-platform-configuration. Only the running
environment should be used.
tycho-use-custom-resolver.patch | 24 ++++++++++++++++++++++--
tycho.spec | 7 +++++--
2 files changed, 27 insertions(+), 4 deletions(-)
---
diff --git a/tycho-use-custom-resolver.patch b/tycho-use-custom-resolver.patch
index e44de14..3a03e75 100644
--- a/tycho-use-custom-resolver.patch
+++ b/tycho-use-custom-resolver.patch
@@ -1,4 +1,4 @@
-From 6f332ba550f5d0b29a929503b0d7ca386d337f9c Mon Sep 17 00:00:00 2001
+From 9a323780512a16b0ed3e095d4b0954ed2780fe3d Mon Sep 17 00:00:00 2001
From: Roland Grunberg <rgrunber(a)redhat.com>
Date: Tue, 12 Jun 2012 10:38:51 -0400
Subject: [PATCH] Implement a custom resolver for Tycho in local mode.
@@ -16,6 +16,9 @@ for Eclipse bundles. Eclipse Juno platform bundles depend on
javax.annotation. In Fedora this is provided by geronimo-annotation, but
has a dependency on javax.lang.model (since 1.6).
+Ignore all environments defined in target-platform-configuration when
+running in local mode.
+
Change-Id: Ia1ece07ece2412bc4a88901631f3f651ad2b634b
---
.../tycho/p2/target/TargetDefinitionResolver.java | 8 +++--
@@ -23,9 +26,10 @@ Change-Id: Ia1ece07ece2412bc4a88901631f3f651ad2b634b
.../core/maven/TychoMavenLifecycleParticipant.java | 16 +++++++++
.../core/osgitools/EclipseFeatureProject.java | 22 +++++++++++++
.../tycho/core/osgitools/OsgiBundleProject.java | 38 +++++++++++++++++++++-
+ .../DefaultTargetPlatformConfigurationReader.java | 5 ++-
.../tycho/osgi/runtime/TychoP2RuntimeLocator.java | 17 ++++++++++
.../p2/resolver/P2TargetPlatformResolver.java | 10 ++++++
- 7 files changed, 114 insertions(+), 3 deletions(-)
+ 8 files changed, 118 insertions(+), 4 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 6a85c49..d9d6055 100644
@@ -198,6 +202,22 @@ index fe6383f..d037faf 100644
} catch (UnknownEnvironmentException e) {
throw new RuntimeException("Unknown execution environment specified in build.properties of project "
+ project, e);
+diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/resolver/DefaultTargetPlatformConfigurationReader.java b/tycho-core/src/main/java/org/eclipse/tycho/core/resolver/DefaultTargetPlatformConfigurationReader.java
+index aad664a..87fe760 100644
+--- a/tycho-core/src/main/java/org/eclipse/tycho/core/resolver/DefaultTargetPlatformConfigurationReader.java
++++ b/tycho-core/src/main/java/org/eclipse/tycho/core/resolver/DefaultTargetPlatformConfigurationReader.java
+@@ -66,7 +66,10 @@ public class DefaultTargetPlatformConfigurationReader {
+ + configuration.toString());
+ }
+
+- addTargetEnvironments(result, project, configuration);
++ // Ignore defined environments in local mode
++ if (System.getProperty("maven.local.mode") == null) {
++ addTargetEnvironments(result, project, configuration);
++ }
+
+ setTargetPlatformResolver(result, configuration);
+
diff --git a/tycho-core/src/main/java/org/eclipse/tycho/osgi/runtime/TychoP2RuntimeLocator.java b/tycho-core/src/main/java/org/eclipse/tycho/osgi/runtime/TychoP2RuntimeLocator.java
index 15b3fff..c8f14df 100644
--- a/tycho-core/src/main/java/org/eclipse/tycho/osgi/runtime/TychoP2RuntimeLocator.java
diff --git a/tycho.spec b/tycho.spec
index 7f3b3e2..34b3555 100644
--- a/tycho.spec
+++ b/tycho.spec
@@ -1,5 +1,5 @@
%global eclipsedir %{_libdir}/eclipse
-%global bootstrap 0
+%global bootstrap 1
%if %{bootstrap}
%global snap -SNAPSHOT
@@ -9,7 +9,7 @@
Name: tycho
Version: 0.15.0
-Release: 2%{?dist}
+Release: 2.1%{?dist}
Summary: Plugins and extensions for building Eclipse plugins and OSGI bundles with Maven
Group: Development/Libraries
@@ -194,6 +194,9 @@ install -pm 755 %{SOURCE3} %{buildroot}%{_javadir}/%{name}/copy-platform-all
%{_javadocdir}/%{name}
%changelog
+* Tue Jul 31 2012 Roland Grunberg <rgrunber(a)redhat.com> 0.15.0-2.1
+- Ignore defined environments in local mode.
+
* Mon Jul 30 2012 Roland Grunberg <rgrunber(a)redhat.com> 0.15.0-2
- Non-bootstrap build.