2014-01-09 20:05:09 +00:00
|
|
|
From 4ff6d1a5652d8825611cb3dd016b50eb0454883b Mon Sep 17 00:00:00 2001
|
2012-11-17 18:04:34 +00:00
|
|
|
From: Roland Grunberg <rgrunber@redhat.com>
|
|
|
|
Date: Mon, 19 Nov 2012 10:33:43 -0500
|
|
|
|
Subject: [PATCH] Minor fixes of limited scope to get a Tycho bootstrapped
|
|
|
|
build.
|
|
|
|
|
|
|
|
Eclipse p2 repositories can change subtly (disappear, become composites)
|
|
|
|
causing bizare failures in resolving from the reactor cache so we must
|
|
|
|
keep the URLs up to date.
|
|
|
|
|
|
|
|
When doing a bootstrap build, we're using upstream jars with class files
|
|
|
|
compiled as 'jsr14' (Allows running on 1.4 JDK and can compile against
|
|
|
|
1.5 sources). JDK 1.7 is not backwards compatible (eg. info on generics
|
|
|
|
is ignored in these jars).
|
2013-03-17 01:19:47 +00:00
|
|
|
|
|
|
|
Upstream is still building with Jetty 8 so our bootstrap build must do
|
|
|
|
the same.
|
|
|
|
|
|
|
|
Change-Id: Ib8f471e5df40eb06da4f2d4ca6c2d3ab14f5dc99
|
2012-11-17 18:04:34 +00:00
|
|
|
---
|
2014-01-09 20:05:09 +00:00
|
|
|
.../META-INF/MANIFEST.MF | 2 +-
|
|
|
|
.../java/org/eclipse/tycho/test/util/HttpServer.java | 5 ++---
|
|
|
|
.../tycho-bundles-target/tycho-bundles-target.target | 20 ++++++++++----------
|
|
|
|
.../eclipse/tycho/core/osgitools/OsgiManifest.java | 12 ++++++------
|
|
|
|
tycho-surefire/pom.xml | 2 +-
|
|
|
|
5 files changed, 20 insertions(+), 21 deletions(-)
|
2012-11-17 18:04:34 +00:00
|
|
|
|
2014-01-09 20:05:09 +00:00
|
|
|
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
|
|
|
|
index 0a01dd5..1d0965a 100644
|
|
|
|
--- 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
|
|
|
|
@@ -9,7 +9,7 @@ Fragment-Host: org.eclipse.tycho.p2.maven.repository
|
|
|
|
Require-Bundle: org.junit,
|
|
|
|
org.eclipse.equinox.p2.publisher,
|
|
|
|
org.eclipse.equinox.ds,
|
|
|
|
- org.mockito.mockito-core
|
|
|
|
+ org.mockito
|
|
|
|
Import-Package: org.eclipse.tycho.locking.facade,
|
|
|
|
org.eclipse.tycho.repository.local.testutil,
|
|
|
|
org.eclipse.tycho.repository.streaming.testutil,
|
2013-03-17 01:19:47 +00:00
|
|
|
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
|
2013-04-12 13:36:29 +00:00
|
|
|
index 47423e5..4b4c600 100644
|
2013-03-17 01:19:47 +00:00
|
|
|
--- 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
|
|
|
|
@@ -20,10 +20,9 @@ import java.util.Random;
|
|
|
|
import org.eclipse.jetty.security.ConstraintMapping;
|
|
|
|
import org.eclipse.jetty.security.ConstraintSecurityHandler;
|
|
|
|
import org.eclipse.jetty.security.HashLoginService;
|
|
|
|
-import org.eclipse.jetty.server.AbstractNetworkConnector;
|
|
|
|
import org.eclipse.jetty.server.Connector;
|
|
|
|
import org.eclipse.jetty.server.Server;
|
|
|
|
-import org.eclipse.jetty.server.ServerConnector;
|
|
|
|
+import org.eclipse.jetty.server.bio.SocketConnector;
|
|
|
|
import org.eclipse.jetty.servlet.ServletContextHandler;
|
|
|
|
import org.eclipse.jetty.servlet.ServletHolder;
|
2013-04-12 13:36:29 +00:00
|
|
|
import org.junit.rules.ExternalResource;
|
|
|
|
@@ -81,7 +80,7 @@ public class HttpServer extends ExternalResource {
|
2013-03-17 01:19:47 +00:00
|
|
|
|
2013-04-12 13:36:29 +00:00
|
|
|
private static RunningServer startServerOnPort(int port) throws Exception {
|
|
|
|
Server jetty = new Server();
|
|
|
|
- AbstractNetworkConnector connector = new ServerConnector(jetty);
|
|
|
|
+ Connector connector = new SocketConnector();
|
2013-03-17 01:19:47 +00:00
|
|
|
connector.setPort(port);
|
2013-04-12 13:36:29 +00:00
|
|
|
jetty.addConnector(connector);
|
|
|
|
|
2013-03-17 01:19:47 +00:00
|
|
|
diff --git a/tycho-bundles/tycho-bundles-target/tycho-bundles-target.target b/tycho-bundles/tycho-bundles-target/tycho-bundles-target.target
|
2014-01-09 20:05:09 +00:00
|
|
|
index b099b7d..6031d7b 100644
|
2013-03-17 01:19:47 +00:00
|
|
|
--- a/tycho-bundles/tycho-bundles-target/tycho-bundles-target.target
|
|
|
|
+++ b/tycho-bundles/tycho-bundles-target/tycho-bundles-target.target
|
2014-01-09 20:05:09 +00:00
|
|
|
@@ -1,14 +1,14 @@
|
|
|
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
|
|
<?pde version="3.8"?><target name="Target platform for Tycho's bundles" sequenceNumber="17">
|
2012-11-17 18:04:34 +00:00
|
|
|
<locations>
|
2014-01-09 20:05:09 +00:00
|
|
|
-<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
|
|
|
|
-<unit id="org.eclipse.equinox.executable.feature.group" version="3.6.0.v20130807-1835"/>
|
|
|
|
-<unit id="org.eclipse.sdk.ide" version="4.3.1.M20130911-1000"/>
|
|
|
|
-<unit id="org.eclipse.equinox.p2.sdk.feature.group" version="3.8.1.v20130828-0031"/>
|
|
|
|
-<unit id="org.eclipse.equinox.core.sdk.feature.group" version="3.8.0.v20130814-1242"/>
|
|
|
|
-<repository location="http://download.eclipse.org/releases/kepler/"/>
|
|
|
|
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="slicer" includeSource="false" type="InstallableUnit">
|
2012-11-17 18:04:34 +00:00
|
|
|
+<unit id="org.eclipse.equinox.executable.feature.group"/>
|
|
|
|
+<unit id="org.eclipse.sdk.ide"/>
|
|
|
|
+<unit id="org.eclipse.equinox.p2.sdk.feature.group"/>
|
2013-04-12 13:36:29 +00:00
|
|
|
+<unit id="org.eclipse.equinox.core.sdk.feature.group"/>
|
2014-01-09 20:05:09 +00:00
|
|
|
+<repository location="http://download.eclipse.org/releases/kepler/201306260900"/>
|
2013-04-12 13:36:29 +00:00
|
|
|
</location>
|
2014-01-09 20:05:09 +00:00
|
|
|
-<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
|
|
|
|
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="slicer" includeSource="false" type="InstallableUnit">
|
|
|
|
<unit id="org.mockito" version="1.8.4.v201303031500"/>
|
|
|
|
<unit id="org.objenesis" version="1.0.0.v201105211943"/>
|
|
|
|
<unit id="org.hamcrest" version="1.1.0.v20090501071000"/>
|
|
|
|
@@ -18,10 +18,10 @@
|
|
|
|
<unit id="org.hamcrest.text" version="1.1.0.v20090501071000"/>
|
|
|
|
<repository location="http://download.eclipse.org/tools/orbit/downloads/drops/R20130517111416/repository/"/>
|
|
|
|
</location>
|
|
|
|
-<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="slicer" includeSource="true" type="InstallableUnit">
|
|
|
|
+<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="slicer" includeSource="false" type="InstallableUnit">
|
2013-04-12 13:36:29 +00:00
|
|
|
<!-- required for surefire junit3 provider -->
|
|
|
|
-<unit id="org.junit" version="3.8.2.v3_8_2_v20100427-1100"/>
|
|
|
|
-<repository location="http://download.eclipse.org/releases/indigo"/>
|
|
|
|
+<unit id="org.junit"/>
|
|
|
|
+<repository location="http://download.eclipse.org/releases/indigo/201202240900"/>
|
2012-11-17 18:04:34 +00:00
|
|
|
</location>
|
|
|
|
</locations>
|
2013-04-12 13:36:29 +00:00
|
|
|
</target>
|
2012-11-17 18:04:34 +00:00
|
|
|
diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiManifest.java b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiManifest.java
|
2013-05-28 16:30:56 +00:00
|
|
|
index 1aec480..0eeb0fa 100644
|
2012-11-17 18:04:34 +00:00
|
|
|
--- a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiManifest.java
|
|
|
|
+++ b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiManifest.java
|
2013-05-28 16:30:56 +00:00
|
|
|
@@ -26,7 +26,7 @@ public class OsgiManifest {
|
2012-11-17 18:04:34 +00:00
|
|
|
private static final StandardExecutionEnvironment[] EMPTY_EXEC_ENV = new StandardExecutionEnvironment[0];
|
|
|
|
|
|
|
|
private String location;
|
|
|
|
- private Headers<String, String> headers;
|
|
|
|
+ private Headers headers;
|
|
|
|
|
|
|
|
// cache for parsed values of commonly used headers
|
|
|
|
private String bundleSymbolicName;
|
2013-05-28 16:30:56 +00:00
|
|
|
@@ -80,7 +80,7 @@ public class OsgiManifest {
|
2012-11-17 18:04:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private String parseMandatoryFirstValue(String headerKey) throws InvalidOSGiManifestException {
|
|
|
|
- String value = headers.get(headerKey);
|
|
|
|
+ String value = (String) headers.get(headerKey);
|
|
|
|
if (value == null) {
|
|
|
|
throw new InvalidOSGiManifestException(location, "MANIFEST header '" + headerKey + "' not found");
|
|
|
|
}
|
2013-05-28 16:30:56 +00:00
|
|
|
@@ -102,12 +102,12 @@ public class OsgiManifest {
|
2012-11-17 18:04:34 +00:00
|
|
|
&& "dir".equals(bundleShapeElements[0].getValue());
|
|
|
|
}
|
|
|
|
|
|
|
|
- public Headers<String, String> getHeaders() {
|
|
|
|
+ public Headers getHeaders() {
|
|
|
|
return headers;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getValue(String key) {
|
|
|
|
- return headers.get(key);
|
|
|
|
+ return (String) headers.get(key);
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getBundleSymbolicName() {
|
2013-05-28 16:30:56 +00:00
|
|
|
@@ -143,7 +143,7 @@ public class OsgiManifest {
|
2012-11-17 18:04:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private ManifestElement[] parseHeader(String key) {
|
|
|
|
- String value = headers.get(key);
|
|
|
|
+ String value = (String) headers.get(key);
|
|
|
|
if (value == null) {
|
|
|
|
return null;
|
|
|
|
}
|
2013-05-28 16:30:56 +00:00
|
|
|
@@ -156,7 +156,7 @@ public class OsgiManifest {
|
2012-11-17 18:04:34 +00:00
|
|
|
|
|
|
|
public ManifestElement[] getManifestElements(String key) throws OsgiManifestParserException {
|
|
|
|
try {
|
|
|
|
- return ManifestElement.parseHeader(key, headers.get(key));
|
|
|
|
+ return ManifestElement.parseHeader(key, (String) headers.get(key));
|
|
|
|
} catch (BundleException e) {
|
|
|
|
throw new OsgiManifestParserException(location, e);
|
|
|
|
}
|
|
|
|
diff --git a/tycho-surefire/pom.xml b/tycho-surefire/pom.xml
|
2014-01-09 20:05:09 +00:00
|
|
|
index 811dff0..ea2f657 100644
|
2012-11-17 18:04:34 +00:00
|
|
|
--- a/tycho-surefire/pom.xml
|
|
|
|
+++ b/tycho-surefire/pom.xml
|
|
|
|
@@ -41,7 +41,7 @@
|
|
|
|
<repository>
|
|
|
|
<id>eclipse</id>
|
|
|
|
<layout>p2</layout>
|
|
|
|
- <url>http://download.eclipse.org/releases/indigo</url>
|
|
|
|
+ <url>http://download.eclipse.org/releases/indigo/201202240900</url>
|
|
|
|
</repository>
|
|
|
|
</repositories>
|
|
|
|
|
|
|
|
--
|
2014-01-09 20:05:09 +00:00
|
|
|
1.8.3.1
|
2012-11-17 18:04:34 +00:00
|
|
|
|