|
 |
65abda |
From 1136a52447b28da1dfa29c46b8ba025435a798be Mon Sep 17 00:00:00 2001
|
|
 |
65abda |
From: Roland Grunberg <rgrunber@redhat.com>
|
|
 |
65abda |
Date: Mon, 6 May 2013 14:20:58 -0400
|
|
 |
65abda |
Subject: [PATCH] Use custom resolver for tycho-eclipserun-plugin.
|
|
 |
65abda |
|
|
 |
65abda |
Add various system local OSGi bundle locations to the target platform
|
|
 |
65abda |
used by tycho-eclipserun-plugin.
|
|
 |
65abda |
|
|
 |
65abda |
Change-Id: Ifd0aae3f32c8077cd0ae33e70f40698c1129788d
|
|
 |
65abda |
---
|
|
 |
65abda |
tycho-eclipserun-plugin/pom.xml | 5 +++++
|
|
 |
65abda |
.../org/eclipse/tycho/extras/eclipserun/EclipseRunMojo.java | 10 ++++++++++
|
|
 |
65abda |
2 files changed, 15 insertions(+)
|
|
 |
65abda |
|
|
 |
65abda |
diff --git a/tycho-eclipserun-plugin/src/main/java/org/eclipse/tycho/extras/eclipserun/EclipseRunMojo.java b/tycho-eclipserun-plugin/src/main/java/org/eclipse/tycho/extras/eclipserun/EclipseRunMojo.java
|
|
 |
65abda |
index 4c4baf0..18db847 100644
|
|
 |
65abda |
--- a/tycho-eclipserun-plugin/src/main/java/org/eclipse/tycho/extras/eclipserun/EclipseRunMojo.java
|
|
 |
65abda |
+++ b/tycho-eclipserun-plugin/src/main/java/org/eclipse/tycho/extras/eclipserun/EclipseRunMojo.java
|
|
 |
65abda |
@@ -13,6 +13,7 @@ package org.eclipse.tycho.extras.eclipserun;
|
|
 |
65abda |
|
|
 |
65abda |
import java.io.File;
|
|
 |
65abda |
import java.net.MalformedURLException;
|
|
 |
65abda |
+import java.net.URI;
|
|
 |
65abda |
import java.util.ArrayList;
|
|
 |
65abda |
import java.util.List;
|
|
 |
65abda |
import java.util.Map;
|
|
 |
65abda |
@@ -51,6 +52,7 @@ import org.eclipse.tycho.p2.resolver.facade.P2Resolver;
|
|
 |
65abda |
import org.eclipse.tycho.p2.resolver.facade.P2ResolverFactory;
|
|
 |
65abda |
import org.eclipse.tycho.p2.target.facade.TargetPlatformConfigurationStub;
|
|
 |
65abda |
import org.eclipse.tycho.plugins.p2.extras.Repository;
|
|
 |
65abda |
+import org.fedoraproject.p2.EclipseSystemLayout;
|
|
 |
65abda |
|
|
 |
65abda |
/**
|
|
 |
65abda |
* Launch an eclipse process with arbitrary commandline arguments. The eclipse installation is
|
|
 |
65abda |
@@ -187,6 +189,14 @@ public class EclipseRunMojo extends AbstractMojo {
|
|
 |
65abda |
TargetPlatformConfigurationStub tpConfiguration = new TargetPlatformConfigurationStub();
|
|
 |
65abda |
// we want to resolve from remote repos only
|
|
 |
65abda |
tpConfiguration.setForceIgnoreLocalArtifacts(true);
|
|
 |
65abda |
+
|
|
 |
65abda |
+ // Add Fedora Local P2 Repository when running in local mode
|
|
 |
65abda |
+ if (System.getProperty("TYCHO_MVN_LOCAL") != null || System.getProperty("TYCHO_MVN_RPMBUILD") != null) {
|
|
 |
65abda |
+ for (URI uri : EclipseSystemLayout.getRepositories()) {
|
|
 |
65abda |
+ tpConfiguration.addP2Repository(new MavenRepositoryLocation(uri.getPath(), uri));
|
|
 |
65abda |
+ }
|
|
 |
65abda |
+ }
|
|
 |
65abda |
+
|
|
 |
65abda |
for (Repository repository : repositories) {
|
|
 |
65abda |
tpConfiguration.addP2Repository(new MavenRepositoryLocation(repository.getId(), repository.getLocation()));
|
|
 |
65abda |
}
|
|
 |
65abda |
--
|
|
 |
65abda |
1.9.3
|
|
 |
65abda |
|