[tycho-extras] Port to latest fedoraproject-p2
Mikolaj Izdebski
mizdebsk at fedoraproject.org
Fri Dec 5 08:34:58 UTC 2014
commit 7b47c86fb32d55de0f286b6a4bc3c66b03d0fee0
Author: Mikolaj Izdebski <mizdebsk at redhat.com>
Date: Fri Dec 5 09:26:45 2014 +0100
Port to latest fedoraproject-p2
tycho-extras-use-custom-resolver.patch | 42 +++++++------------------------
tycho-extras.spec | 7 ++++-
2 files changed, 15 insertions(+), 34 deletions(-)
---
diff --git a/tycho-extras-use-custom-resolver.patch b/tycho-extras-use-custom-resolver.patch
index c6fe163..6931a6e 100644
--- a/tycho-extras-use-custom-resolver.patch
+++ b/tycho-extras-use-custom-resolver.patch
@@ -1,4 +1,4 @@
-From 8c5f7ddcf38279d30102084ba0f99f7b755212a2 Mon Sep 17 00:00:00 2001
+From 1136a52447b28da1dfa29c46b8ba025435a798be Mon Sep 17 00:00:00 2001
From: Roland Grunberg <rgrunber at redhat.com>
Date: Mon, 6 May 2013 14:20:58 -0400
Subject: [PATCH] Use custom resolver for tycho-eclipserun-plugin.
@@ -8,9 +8,9 @@ used by tycho-eclipserun-plugin.
Change-Id: Ifd0aae3f32c8077cd0ae33e70f40698c1129788d
---
- tycho-eclipserun-plugin/pom.xml | 5 ++++
- .../tycho/extras/eclipserun/EclipseRunMojo.java | 29 ++++++++++++++++++++++
- 2 files changed, 34 insertions(+)
+ tycho-eclipserun-plugin/pom.xml | 5 +++++
+ .../org/eclipse/tycho/extras/eclipserun/EclipseRunMojo.java | 10 ++++++++++
+ 2 files changed, 15 insertions(+)
diff --git a/tycho-eclipserun-plugin/pom.xml b/tycho-eclipserun-plugin/pom.xml
index 708b35c..c4e9b17 100644
@@ -29,25 +29,18 @@ index 708b35c..c4e9b17 100644
<profiles>
<profile>
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
-index 4c4baf0..a7179e0 100644
+index 4c4baf0..18db847 100644
--- 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
-@@ -13,9 +13,14 @@ package org.eclipse.tycho.extras.eclipserun;
+@@ -13,6 +13,7 @@ package org.eclipse.tycho.extras.eclipserun;
import java.io.File;
import java.net.MalformedURLException;
+import java.net.URI;
-+import java.net.URISyntaxException;
-+import java.nio.file.Paths;
import java.util.ArrayList;
-+import java.util.HashSet;
import java.util.List;
import java.util.Map;
-+import java.util.Set;
-
- import org.apache.maven.execution.MavenSession;
- import org.apache.maven.model.Dependency;
-@@ -51,6 +56,7 @@ import org.eclipse.tycho.p2.resolver.facade.P2Resolver;
+@@ -51,6 +52,7 @@ import org.eclipse.tycho.p2.resolver.facade.P2Resolver;
import org.eclipse.tycho.p2.resolver.facade.P2ResolverFactory;
import org.eclipse.tycho.p2.target.facade.TargetPlatformConfigurationStub;
import org.eclipse.tycho.plugins.p2.extras.Repository;
@@ -55,30 +48,15 @@ index 4c4baf0..a7179e0 100644
/**
* Launch an eclipse process with arbitrary commandline arguments. The eclipse installation is
-@@ -187,6 +193,29 @@ public class EclipseRunMojo extends AbstractMojo {
+@@ -187,6 +189,14 @@ public class EclipseRunMojo extends AbstractMojo {
TargetPlatformConfigurationStub tpConfiguration = new TargetPlatformConfigurationStub();
// we want to resolve from remote repos only
tpConfiguration.setForceIgnoreLocalArtifacts(true);
+
+ // Add Fedora Local P2 Repository when running in local mode
+ if (System.getProperty("TYCHO_MVN_LOCAL") != null || System.getProperty("TYCHO_MVN_RPMBUILD") != null) {
-+
-+ Set<String> allLocations = new HashSet<String>();
-+ final Set<String> roots = EclipseSystemLayout.getSCLRoots();
-+
-+ for (String root : roots) {
-+ EclipseSystemLayout.initLocations(Paths.get(root), allLocations, allLocations, allLocations, false);
-+ }
-+
-+ allLocations.addAll(EclipseSystemLayout.getUserDefinedBundleLocations());
-+
-+ for (String loc : allLocations) {
-+ String uri = "fedora:" + loc;
-+ try {
-+ tpConfiguration.addP2Repository(new MavenRepositoryLocation(uri, new URI(uri)));
-+ } catch (URISyntaxException e) {
-+ logger.warn("Unable to resolve repository URI : " + uri, e);
-+ }
++ for (URI uri : EclipseSystemLayout.getRepositories()) {
++ tpConfiguration.addP2Repository(new MavenRepositoryLocation(uri.getPath(), uri));
+ }
+ }
+
diff --git a/tycho-extras.spec b/tycho-extras.spec
index c6d5be1..198721b 100644
--- a/tycho-extras.spec
+++ b/tycho-extras.spec
@@ -4,7 +4,7 @@
Name: tycho-extras
Version: 0.22.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Additional plugins for Tycho
License: EPL
@@ -17,7 +17,7 @@ BuildArch: noarch
BuildRequires: jgit
BuildRequires: maven-local
-BuildRequires: tycho
+BuildRequires: tycho >= 0.22.0-3
Requires: java-headless >= 1.5
@@ -63,6 +63,9 @@ This package contains the API documentation for %{name}.
%files javadoc -f .mfiles-javadoc
%changelog
+* Fri Dec 5 2014 Mikolaj Izdebski <mizdebsk at redhat.com> - 0.22.0-2
+- Port to latest fedoraproject-p2
+
* Mon Dec 01 2014 Mat Booth <mat.booth at redhat.com> - 0.22.0-1
- Update to tagged release
- Fix directory ownership problem
More information about the scm-commits
mailing list