[tycho/f17] Add tycho.local.keepTarget flag to bypass ignoring environments.

Roland Grunberg rgrunber at fedoraproject.org
Fri Aug 10 15:38:48 UTC 2012


commit 633ff16ae250ff46cc2d98a39648d769cb3f24ec
Author: Roland Grunberg <rgrunber at 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 3a03e75..a03564c 100644
--- a/tycho-use-custom-resolver.patch
+++ b/tycho-use-custom-resolver.patch
@@ -1,4 +1,4 @@
-From 9a323780512a16b0ed3e095d4b0954ed2780fe3d Mon Sep 17 00:00:00 2001
+From 204897532cb0a533634dc66faef31afb1822df03 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.
@@ -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
 ---
@@ -203,7 +203,7 @@ index fe6383f..d037faf 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 aad664a..87fe760 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 {
@@ -211,8 +211,8 @@ index aad664a..87fe760 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 6d92043..270cec5 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:        3%{?dist}
+Release:        3.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
+* Thu Aug 9 2012 Roland Grunberg <rgrunber at redhat.com> 0.15.0-3.1
+- Add tycho.local.keepTarget flag to bypass ignoring environments.
+
 * Tue Jul 31 2012 Roland Grunberg <rgrunber at redhat.com> 0.15.0-3
 - Non-bootstrap build.
 


More information about the scm-commits mailing list