[tycho-extras] Fix upstream Bug 393686.

Roland Grunberg rgrunber at fedoraproject.org
Fri Dec 14 15:24:50 UTC 2012


commit 97fd3771c0355ae57a6ad4d720a3cb5f28f9ed3d
Author: Roland Grunberg <rgrunber at redhat.com>
Date:   Fri Dec 14 09:40:37 2012 -0500

    Fix upstream Bug 393686.

 tycho-extras-393686.patch |   53 +++++++++++++++++++++++++++++++++++++++++++++
 tycho-extras.spec         |    7 +++++-
 2 files changed, 59 insertions(+), 1 deletions(-)
---
diff --git a/tycho-extras-393686.patch b/tycho-extras-393686.patch
new file mode 100644
index 0000000..d95b881
--- /dev/null
+++ b/tycho-extras-393686.patch
@@ -0,0 +1,53 @@
+From b57fed1d046cde40d90bda409280463006337b4a Mon Sep 17 00:00:00 2001
+From: Tobias Oberlies <tobias.oberlies at sap.com>
+Date: Wed, 28 Nov 2012 14:13:42 +0100
+Subject: [PATCH] 393686 Correctly add reactor artifacts to eclipserun mojo
+ runtime
+
+- Special handling for eclipserun runtime artifact from the reactor. It
+  is questionable if we need this at all, but while the eclipserun
+  runtime resolved from the target platform (and hence may include
+  reactor artifacts), we need this special handling.
+- Fail fast if reactor artifacts for runtime have not yet been packaged.
+- Still no integration test - tested manually.
+
+Bug: 393686
+Change-Id: Ifa542df7af5691c9146b65ff230201c4c857d4b4
+---
+ .../tycho/extras/eclipserun/EclipseRunMojo.java      | 20 +++++++++++++++++++-
+ 1 file changed, 19 insertions(+), 1 deletion(-)
+
+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 0ca5be1..a6fba3d 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
+@@ -170,7 +170,25 @@ public class EclipseRunMojo extends AbstractMojo {
+         EquinoxInstallationDescription installationDesc = new DefaultEquinoxInstallationDescription();
+ 
+         for (ArtifactDescriptor artifact : runtimeArtifacts.getArtifacts(ArtifactKey.TYPE_ECLIPSE_PLUGIN)) {
+-            installationDesc.addBundle(artifact);
++
++            ReactorProject reactorProject = artifact.getMavenProject();
++            if (reactorProject != null) {
++                // while reactor projects may be in the runtime, we need this special handling here
++                if (reactorProject.sameProject(project)) {
++                    // never add this project to the runtime
++                    continue;
++                }
++
++                File reactorArtifactFile = reactorProject.getArtifact(artifact.getClassifier());
++                if (reactorArtifactFile == null || !reactorArtifactFile.isFile()) {
++                    throw new MojoExecutionException(
++                            "Eclipse runtime includes artifact from the reactor which has not yet been built: "
++                                    + artifact);
++                }
++                installationDesc.addBundle(artifact.getKey(), reactorArtifactFile);
++            } else {
++                installationDesc.addBundle(artifact);
++            }
+         }
+ 
+         return installationFactory.createInstallation(installationDesc, work);
+-- 
+1.7.11.7
+
diff --git a/tycho-extras.spec b/tycho-extras.spec
index dfc4fcf..520d8dd 100644
--- a/tycho-extras.spec
+++ b/tycho-extras.spec
@@ -1,6 +1,6 @@
 Name:           tycho-extras
 Version:        0.16.0
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Additional plugins for Tycho
 
 Group:          Development/Libraries
@@ -10,6 +10,7 @@ Source0:        http://git.eclipse.org/c/tycho/org.eclipse.tycho.extras.git/snap
 # maven-properties-plugin is only needed for tests
 Patch0:         %{name}-no-maven-properties-plugin.patch
 Patch1:         %{name}-remove-core.patch
+Patch2:         %{name}-393686.patch
 
 BuildArch:      noarch
 
@@ -41,6 +42,7 @@ This package contains the API documentation for %{name}.
 %setup -q -n tycho-extras-0.16.x
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 # To run tests, we need :
@@ -86,6 +88,9 @@ cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}
 %{_javadocdir}/%{name}
 
 %changelog
+* Thu Dec 13 2012 Roland Grunberg <rgrunber at redhat.com> 0.16.0-3
+- Fix upstream Bug 393686.
+
 * Fri Oct 19 2012 Roland Grunberg <rgrunber at redhat.com> 0.16.0-2
 - Update to 0.16.0 Release.
 


More information about the scm-commits mailing list