|
 |
4c9427 |
From 33bb1bece17d1b6f6e81b149828fa1287aa61093 Mon Sep 17 00:00:00 2001
|
|
 |
4c9427 |
From: Roland Grunberg <rgrunber@redhat.com>
|
|
 |
4c9427 |
Date: Tue, 12 Jun 2012 09:56:38 -0400
|
|
 |
4c9427 |
Subject: [PATCH] Fix the Tycho build to work on Fedora.
|
|
 |
4c9427 |
|
|
 |
4c9427 |
Minor fixes of limited scope needed to have Tycho building on Fedora.
|
|
 |
4c9427 |
|
|
 |
4c9427 |
Remove org.eclipse.equinox.concurrent until present in Fedora Eclipse.
|
|
 |
4c9427 |
|
|
 |
4c9427 |
Tycho upstream currently depends upon 0.15.0 when building
|
|
 |
4c9427 |
0.16.0-SNAPSHOT, which doesn't have reactor plugin version checking. In
|
|
 |
4c9427 |
Fedora we depend on the previously built version which has that version
|
|
 |
4c9427 |
checking. We must keep previous build version strings different to avoid
|
|
 |
4c9427 |
a cyclic dependency, but doing so causes the version checking to fail,
|
|
 |
4c9427 |
so we must provide a way to disable it. Disable by default.
|
|
 |
4c9427 |
|
|
 |
4c9427 |
Update to using Jetty 9 API.
|
|
 |
4c9427 |
|
|
 |
4c9427 |
Update to using maven-surefire 2.18.
|
|
 |
4c9427 |
|
|
 |
4c9427 |
Change-Id: Ic8c0514c1fa10ee53580d2654ac6a363ccd66814
|
|
 |
4c9427 |
---
|
|
 |
4c9427 |
.../META-INF/MANIFEST.MF | 2 +-
|
|
 |
4c9427 |
.../eclipse/tycho/p2/target/ee/CustomEEResolutionHandler.java | 2 +-
|
|
 |
4c9427 |
.../src/main/java/org/eclipse/tycho/test/util/HttpServer.java | 8 ++++++--
|
|
 |
4c9427 |
.../tycho-bundles-external/tycho-bundles-external.product | 1 -
|
|
 |
4c9427 |
.../tycho-standalone-p2-director/p2 Director.product | 1 -
|
|
 |
4c9427 |
.../tycho/core/maven/TychoMavenLifecycleParticipant.java | 4 +++-
|
|
 |
4c9427 |
.../eclipse/tycho/surefire/osgibooter/OsgiSurefireBooter.java | 2 +-
|
|
 |
4c9427 |
.../org/eclipse/tycho/test/AbstractTychoIntegrationTest.java | 11 +++++------
|
|
 |
4c9427 |
8 files changed, 17 insertions(+), 14 deletions(-)
|
|
 |
4c9427 |
|
|
 |
4c9427 |
diff --git a/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/META-INF/MANIFEST.MF b/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/META-INF/MANIFEST.MF
|
|
 |
4c9427 |
index 4243cfd..eca4c01 100644
|
|
 |
4c9427 |
--- a/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/META-INF/MANIFEST.MF
|
|
 |
4c9427 |
+++ b/tycho-bundles/org.eclipse.tycho.p2.maven.repository.tests/META-INF/MANIFEST.MF
|
|
 |
4c9427 |
@@ -9,7 +9,7 @@ Fragment-Host: org.eclipse.tycho.p2.maven.repository
|
|
 |
4c9427 |
Require-Bundle: org.junit,
|
|
 |
4c9427 |
org.eclipse.equinox.p2.publisher,
|
|
 |
4c9427 |
org.eclipse.equinox.ds,
|
|
 |
4c9427 |
- org.mockito
|
|
 |
4c9427 |
+ org.mockito.mockito-core
|
|
 |
4c9427 |
Import-Package: org.eclipse.tycho.locking.facade,
|
|
 |
4c9427 |
org.eclipse.tycho.repository.local.testutil,
|
|
 |
4c9427 |
org.eclipse.tycho.repository.streaming.testutil,
|
|
 |
4c9427 |
diff --git a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/ee/CustomEEResolutionHandler.java b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/ee/CustomEEResolutionHandler.java
|
|
 |
4c9427 |
index 7afa13e..82962f9 100644
|
|
 |
4c9427 |
--- a/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/ee/CustomEEResolutionHandler.java
|
|
 |
4c9427 |
+++ b/tycho-bundles/org.eclipse.tycho.p2.resolver.impl/src/main/java/org/eclipse/tycho/p2/target/ee/CustomEEResolutionHandler.java
|
|
 |
4c9427 |
@@ -59,7 +59,7 @@ class CustomEEResolutionHandler extends ExecutionEnvironmentResolutionHandler {
|
|
 |
4c9427 |
String name = capability.getName();
|
|
 |
4c9427 |
String version = capability.getVersion().toString();
|
|
 |
4c9427 |
|
|
 |
4c9427 |
- if (JREAction.NAMESPACE_OSGI_EE.equals(namespace)) {
|
|
 |
4c9427 |
+ if ("osgi.ee".equals(namespace)) {
|
|
 |
4c9427 |
result.add(new SystemCapability(Type.OSGI_EE, name, version));
|
|
 |
4c9427 |
} else if (PublisherHelper.CAPABILITY_NS_JAVA_PACKAGE.equals(namespace)) {
|
|
 |
4c9427 |
result.add(new SystemCapability(Type.JAVA_PACKAGE, name, version));
|
|
 |
4c9427 |
diff --git a/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/test/util/HttpServer.java b/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/test/util/HttpServer.java
|
|
 |
4c9427 |
index 6e65627..eefc753 100644
|
|
 |
4c9427 |
--- a/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/test/util/HttpServer.java
|
|
 |
4c9427 |
+++ b/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/test/util/HttpServer.java
|
|
 |
4c9427 |
@@ -17,6 +17,11 @@ import java.util.List;
|
|
 |
4c9427 |
import java.util.Map;
|
|
 |
4c9427 |
import java.util.Random;
|
|
 |
4c9427 |
|
|
 |
4c9427 |
+import org.eclipse.jetty.security.ConstraintMapping;
|
|
 |
4c9427 |
+import org.eclipse.jetty.security.ConstraintSecurityHandler;
|
|
 |
4c9427 |
+import org.eclipse.jetty.security.HashLoginService;
|
|
 |
4c9427 |
+import org.eclipse.jetty.server.AbstractNetworkConnector;
|
|
 |
4c9427 |
+import org.eclipse.jetty.server.Connector;
|
|
 |
4c9427 |
import org.eclipse.jetty.server.Server;
|
|
 |
4c9427 |
import org.eclipse.jetty.server.ServerConnector;
|
|
 |
4c9427 |
import org.eclipse.jetty.servlet.ServletContextHandler;
|
|
 |
4c9427 |
@@ -76,8 +81,7 @@ public class HttpServer extends ExternalResource {
|
|
 |
4c9427 |
|
|
 |
4c9427 |
private static RunningServer startServerOnPort(int port) throws Exception {
|
|
 |
4c9427 |
Server jetty = new Server();
|
|
 |
4c9427 |
- ServerConnector connector = new ServerConnector(jetty);
|
|
 |
4c9427 |
- connector.setHost("localhost");
|
|
 |
4c9427 |
+ AbstractNetworkConnector connector = new ServerConnector(jetty);
|
|
 |
4c9427 |
connector.setPort(port);
|
|
 |
4c9427 |
jetty.addConnector(connector);
|
|
 |
4c9427 |
|
|
 |
4c9427 |
diff --git a/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product b/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product
|
|
 |
4c9427 |
index 814afe1..0dc0980 100644
|
|
 |
4c9427 |
--- a/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product
|
|
 |
4c9427 |
+++ b/tycho-bundles/tycho-bundles-external/tycho-bundles-external.product
|
|
 |
4c9427 |
@@ -43,7 +43,6 @@
|
|
 |
4c9427 |
<plugin id="org.eclipse.ecf.ssl" fragment="true"/>
|
|
 |
4c9427 |
<plugin id="org.eclipse.equinox.app"/>
|
|
 |
4c9427 |
<plugin id="org.eclipse.equinox.common"/>
|
|
 |
4c9427 |
- <plugin id="org.eclipse.equinox.concurrent"/>
|
|
 |
4c9427 |
<plugin id="org.eclipse.equinox.ds"/>
|
|
 |
4c9427 |
<plugin id="org.eclipse.equinox.frameworkadmin"/>
|
|
 |
4c9427 |
<plugin id="org.eclipse.equinox.frameworkadmin.equinox"/>
|
|
 |
4c9427 |
diff --git a/tycho-bundles/tycho-standalone-p2-director/p2 Director.product b/tycho-bundles/tycho-standalone-p2-director/p2 Director.product
|
|
 |
4c9427 |
index 771d4f7..eabd0d9 100644
|
|
 |
4c9427 |
--- a/tycho-bundles/tycho-standalone-p2-director/p2 Director.product
|
|
 |
4c9427 |
+++ b/tycho-bundles/tycho-standalone-p2-director/p2 Director.product
|
|
 |
4c9427 |
@@ -42,7 +42,6 @@
|
|
 |
4c9427 |
<plugin id="org.eclipse.ecf.ssl" fragment="true"/>
|
|
 |
4c9427 |
<plugin id="org.eclipse.equinox.app"/>
|
|
 |
4c9427 |
<plugin id="org.eclipse.equinox.common"/>
|
|
 |
4c9427 |
- <plugin id="org.eclipse.equinox.concurrent"/>
|
|
 |
4c9427 |
<plugin id="org.eclipse.equinox.ds"/>
|
|
 |
4c9427 |
<plugin id="org.eclipse.equinox.frameworkadmin"/>
|
|
 |
4c9427 |
<plugin id="org.eclipse.equinox.frameworkadmin.equinox"/>
|
|
 |
4c9427 |
diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/maven/TychoMavenLifecycleParticipant.java b/tycho-core/src/main/java/org/eclipse/tycho/core/maven/TychoMavenLifecycleParticipant.java
|
|
 |
4c9427 |
index b00c344..bc05c2d 100644
|
|
 |
4c9427 |
--- a/tycho-core/src/main/java/org/eclipse/tycho/core/maven/TychoMavenLifecycleParticipant.java
|
|
 |
4c9427 |
+++ b/tycho-core/src/main/java/org/eclipse/tycho/core/maven/TychoMavenLifecycleParticipant.java
|
|
 |
4c9427 |
@@ -102,7 +102,9 @@ public class TychoMavenLifecycleParticipant extends AbstractMavenLifecyclePartic
|
|
 |
4c9427 |
}
|
|
 |
4c9427 |
|
|
 |
4c9427 |
private void validate(List<MavenProject> projects) throws MavenExecutionException {
|
|
 |
4c9427 |
- validateConsistentTychoVersion(projects);
|
|
 |
4c9427 |
+ if (System.getProperty("tycho.enableVersionCheck") != null) {
|
|
 |
4c9427 |
+ validateConsistentTychoVersion(projects);
|
|
 |
4c9427 |
+ }
|
|
 |
4c9427 |
validateUniqueBaseDirs(projects);
|
|
 |
4c9427 |
}
|
|
 |
4c9427 |
|
|
 |
4c9427 |
diff --git a/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/AbstractTychoIntegrationTest.java b/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/AbstractTychoIntegrationTest.java
|
|
 |
4c9427 |
index 097bdeb..f90b10c 100644
|
|
 |
4c9427 |
--- a/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/AbstractTychoIntegrationTest.java
|
|
 |
4c9427 |
+++ b/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/AbstractTychoIntegrationTest.java
|
|
 |
4c9427 |
@@ -115,12 +115,11 @@ public abstract class AbstractTychoIntegrationTest {
|
|
 |
4c9427 |
verifier.getCliOptions().add(customOptions);
|
|
 |
4c9427 |
}
|
|
 |
4c9427 |
|
|
 |
4c9427 |
- if (System.getProperty(SYSPROP_STATELOCATION) != null) {
|
|
 |
4c9427 |
- verifier.setForkJvm(false);
|
|
 |
4c9427 |
- String m2eresolver = System.getProperty("tychodev-maven.ext.class.path"); // XXX
|
|
 |
4c9427 |
- if (m2eresolver != null) {
|
|
 |
4c9427 |
- verifier.addCliOption("-Dmaven.ext.class.path=" + m2eresolver);
|
|
 |
4c9427 |
- }
|
|
 |
4c9427 |
+ String m2eState = System.getProperty("m2eclipse.workspace.state");
|
|
 |
4c9427 |
+ String m2eResolver = System.getProperty("m2eclipse.workspace.resolver");
|
|
 |
4c9427 |
+
|
|
 |
4c9427 |
+ if (m2eState != null && m2eResolver != null) {
|
|
 |
4c9427 |
+ verifier.getVerifierProperties().put("m2eclipse.workspace.state", m2eState);
|
|
 |
4c9427 |
}
|
|
 |
4c9427 |
|
|
 |
4c9427 |
return verifier;
|
|
 |
4c9427 |
diff --git a/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/ProductArchiverMojo.java b/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/ProductArchiverMojo.java
|
|
 |
4c9427 |
index e30aae3..0102465 100644
|
|
 |
4c9427 |
--- a/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/ProductArchiverMojo.java
|
|
 |
4c9427 |
+++ b/tycho-p2/tycho-p2-director-plugin/src/main/java/org/eclipse/tycho/plugins/p2/director/ProductArchiverMojo.java
|
|
 |
4c9427 |
@@ -27,7 +27,6 @@ import org.apache.maven.project.MavenProjectHelper;
|
|
 |
4c9427 |
import org.codehaus.plexus.archiver.Archiver;
|
|
 |
4c9427 |
import org.codehaus.plexus.archiver.ArchiverException;
|
|
 |
4c9427 |
import org.codehaus.plexus.archiver.tar.TarArchiver;
|
|
 |
4c9427 |
-import org.codehaus.plexus.archiver.tar.TarArchiver.TarCompressionMethod;
|
|
 |
4c9427 |
import org.codehaus.plexus.archiver.tar.TarLongFileMode;
|
|
 |
4c9427 |
import org.eclipse.tycho.core.shared.TargetEnvironment;
|
|
 |
4c9427 |
import org.eclipse.tycho.plugins.tar.TarGzArchiver;
|
|
 |
4c9427 |
@@ -98,9 +99,13 @@ public final class ProductArchiverMojo extends AbstractProductMojo {
|
|
 |
4c9427 |
productArchivers.put(TAR_GZ_ARCHIVE_FORMAT, new ProductArchiver() {
|
|
 |
4c9427 |
@Override
|
|
 |
4c9427 |
Archiver getArchiver() throws ArchiverException {
|
|
 |
4c9427 |
+ TarArchiver.TarCompressionMethod tarCompressionMethod = new TarArchiver.TarCompressionMethod();
|
|
 |
4c9427 |
+ tarCompressionMethod.setValue("gzip"); // surprisingly, compression names are private in plexus
|
|
 |
4c9427 |
+ tarArchiver.setCompression(tarCompressionMethod);
|
|
 |
4c9427 |
- tarArchiver.setCompression(TarCompressionMethod.gzip);
|
|
 |
4c9427 |
// avoid lots of long file path (> 100 chars) warnings
|
|
 |
4c9427 |
+ TarLongFileMode gnuMode = new TarLongFileMode();
|
|
 |
4c9427 |
+ gnuMode.setValue(TarLongFileMode.GNU);
|
|
 |
4c9427 |
+ tarArchiver.setLongfile(gnuMode);
|
|
 |
4c9427 |
- tarArchiver.setLongfile(TarLongFileMode.gnu);
|
|
 |
4c9427 |
return tarArchiver;
|
|
 |
4c9427 |
}
|
|
 |
4c9427 |
});
|
|
 |
4c9427 |
--
|
|
 |
4c9427 |
2.1.0
|
|
 |
4c9427 |
|