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.
This commit is contained in:
parent
b335532d6b
commit
03ccfcfec4
@ -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@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
|
||||
|
@ -1,4 +1,4 @@
|
||||
%global bootstrap 0
|
||||
%global bootstrap 1
|
||||
|
||||
%if %{bootstrap}
|
||||
%global snap -SNAPSHOT
|
||||
@ -8,7 +8,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@redhat.com> 0.15.0-2.1
|
||||
- Ignore defined environments in local mode.
|
||||
|
||||
* Mon Jul 30 2012 Roland Grunberg <rgrunber@redhat.com> 0.15.0-2
|
||||
- Non-bootstrap build.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user