commit bc9cc12ad6e6eecc6e710031146b3810d6479451
Author: Roland Grunberg <rgrunber(a)redhat.com>
Date: Thu Aug 9 12:05:14 2012 -0400
Add tycho.local.keepTarget flag to bypass ignoring environments.
By default a build in local mode should ignore the user-defined
environments and use the system's environment. In some cases it may be
necessary to bypass this functionality.
tycho-use-custom-resolver.patch | 12 ++++++------
tycho.spec | 7 +++++--
2 files changed, 11 insertions(+), 8 deletions(-)
---
diff --git a/tycho-use-custom-resolver.patch b/tycho-use-custom-resolver.patch
index bdff1c7..afbaa57 100644
--- a/tycho-use-custom-resolver.patch
+++ b/tycho-use-custom-resolver.patch
@@ -1,4 +1,4 @@
-From d5aa6d0a1a2ed5f56e2df61094a541fb92ada771 Mon Sep 17 00:00:00 2001
+From 204897532cb0a533634dc66faef31afb1822df03 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,8 +16,8 @@ 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.
+Use the defined target environments in local mode when the property
+tycho.local.keepTarget is set.
Change-Id: Ia1ece07ece2412bc4a88901631f3f651ad2b634b
---
@@ -206,7 +206,7 @@ index c4b783e..e83dd72 100644
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 c2997bc..9c1f5c8 100644
+index c2997bc..fafb77e 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 {
@@ -214,8 +214,8 @@ index c2997bc..9c1f5c8 100644
}
- addTargetEnvironments(result, project, configuration);
-+ // Ignore defined environments in local mode
-+ if (System.getProperty("maven.local.mode") == null) {
++ // Use the defined environments only in local mode with tycho.local.keepTarget
++ if (System.getProperty("maven.local.mode") == null || System.getProperty("tycho.local.keepTarget") != null) {
+ addTargetEnvironments(result, project, configuration);
+ }
diff --git a/tycho.spec b/tycho.spec
index afdef6f..c6f5229 100644
--- a/tycho.spec
+++ b/tycho.spec
@@ -1,4 +1,4 @@
-%global bootstrap 0
+%global bootstrap 1
%global sha df2c3591ae0e641a8d12c13ca9c1058eaf8439b2
%if %{bootstrap}
@@ -9,7 +9,7 @@
Name: tycho
Version: 0.16.0
-Release: 3.df2c35%{?dist}
+Release: 3.1.df2c35%{?dist}
Summary: Plugins and extensions for building Eclipse plugins and OSGI bundles with Maven
Group: Development/Libraries
@@ -205,6 +205,9 @@ install -pm 755 %{SOURCE3} %{buildroot}%{_javadir}/%{name}/copy-platform-all
%{_javadocdir}/%{name}
%changelog
+* Thu Aug 9 2012 Roland Grunberg <rgrunber(a)redhat.com> 0.16.0-3.1.df2c35
+- Add tycho.local.keepTarget flag to bypass ignoring environments.
+
* Thu Aug 9 2012 Krzysztof Daniel <kdaniel(a)redhat.com> 0.16.0-3.df2c35
- Non-bootstrap build.