d351d15
From 446e73cd3c2ef5ed8d5dc57615d88ef36445bafa Mon Sep 17 00:00:00 2001
aba2795
From: Roland Grunberg <rgrunber@redhat.com>
aba2795
Date: Mon, 19 Nov 2012 10:33:43 -0500
aba2795
Subject: [PATCH] Minor fixes of limited scope to get a Tycho bootstrapped
aba2795
 build.
aba2795
aba2795
Eclipse p2 repositories can change subtly (disappear, become composites)
aba2795
causing bizare failures in resolving from the reactor cache so we must
aba2795
keep the URLs up to date.
aba2795
aba2795
When doing a bootstrap build, we're using upstream jars with class files
aba2795
compiled as 'jsr14' (Allows running on 1.4 JDK and can compile against
aba2795
1.5 sources). JDK 1.7 is not backwards compatible (eg. info on generics
aba2795
is ignored in these jars).
5a5bb5a
5a5bb5a
Upstream is still building with Jetty 8 so our bootstrap build must do
5a5bb5a
the same.
5a5bb5a
5a5bb5a
Change-Id: Ib8f471e5df40eb06da4f2d4ca6c2d3ab14f5dc99
aba2795
---
5a5bb5a
 .../main/java/org/eclipse/tycho/test/util/HttpServer.java    |  5 ++---
eed45a2
 .../tycho-bundles-target/tycho-bundles-target.target         | 12 ++++++------
aba2795
 .../java/org/eclipse/tycho/core/osgitools/OsgiManifest.java  | 12 ++++++------
aba2795
 tycho-surefire/pom.xml                                       |  2 +-
48f6780
 4 files changed, 15 insertions(+), 16 deletions(-)
aba2795
5a5bb5a
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
eed45a2
index 47423e5..4b4c600 100644
5a5bb5a
--- a/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/test/util/HttpServer.java
5a5bb5a
+++ b/tycho-bundles/org.eclipse.tycho.test.utils/src/main/java/org/eclipse/tycho/test/util/HttpServer.java
5a5bb5a
@@ -20,10 +20,9 @@ import java.util.Random;
5a5bb5a
 import org.eclipse.jetty.security.ConstraintMapping;
5a5bb5a
 import org.eclipse.jetty.security.ConstraintSecurityHandler;
5a5bb5a
 import org.eclipse.jetty.security.HashLoginService;
5a5bb5a
-import org.eclipse.jetty.server.AbstractNetworkConnector;
5a5bb5a
 import org.eclipse.jetty.server.Connector;
5a5bb5a
 import org.eclipse.jetty.server.Server;
5a5bb5a
-import org.eclipse.jetty.server.ServerConnector;
5a5bb5a
+import org.eclipse.jetty.server.bio.SocketConnector;
5a5bb5a
 import org.eclipse.jetty.servlet.ServletContextHandler;
5a5bb5a
 import org.eclipse.jetty.servlet.ServletHolder;
eed45a2
 import org.junit.rules.ExternalResource;
eed45a2
@@ -81,7 +80,7 @@ public class HttpServer extends ExternalResource {
5a5bb5a
 
eed45a2
     private static RunningServer startServerOnPort(int port) throws Exception {
eed45a2
         Server jetty = new Server();
eed45a2
-        AbstractNetworkConnector connector = new ServerConnector(jetty);
eed45a2
+	 Connector connector = new SocketConnector();
5a5bb5a
         connector.setPort(port);
eed45a2
         jetty.addConnector(connector);
eed45a2
 
5a5bb5a
diff --git a/tycho-bundles/tycho-bundles-target/tycho-bundles-target.target b/tycho-bundles/tycho-bundles-target/tycho-bundles-target.target
d351d15
index 2a04214..400117a 100644
5a5bb5a
--- a/tycho-bundles/tycho-bundles-target/tycho-bundles-target.target
5a5bb5a
+++ b/tycho-bundles/tycho-bundles-target/tycho-bundles-target.target
eed45a2
@@ -2,16 +2,16 @@
66215e3
 <target name="Target platform for Tycho's bundles" sequenceNumber="16">
aba2795
 <locations>
aba2795
 <location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="slicer" includeSource="false" type="InstallableUnit">
66215e3
-<unit id="org.eclipse.equinox.executable.feature.group" version="3.6.0.v20130521-0416"/>
d351d15
-<unit id="org.eclipse.sdk.ide" version="4.3.0.I20130605-2000"/>
d351d15
-<unit id="org.eclipse.equinox.p2.sdk.feature.group" version="3.8.0.v20130604-2046"/>
d351d15
-<unit id="org.eclipse.equinox.core.sdk.feature.group" version="3.8.0.v20130529-1710"/>
aba2795
+<unit id="org.eclipse.equinox.executable.feature.group"/>
aba2795
+<unit id="org.eclipse.sdk.ide"/>
aba2795
+<unit id="org.eclipse.equinox.p2.sdk.feature.group"/>
eed45a2
+<unit id="org.eclipse.equinox.core.sdk.feature.group"/>
d351d15
 <repository location="http://download.eclipse.org/releases/kepler/"/>
eed45a2
 </location>
eed45a2
 <location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="slicer" includeSource="false" type="InstallableUnit">
eed45a2
 
eed45a2
-<unit id="org.junit" version="3.8.2.v3_8_2_v20100427-1100"/>
eed45a2
-<repository location="http://download.eclipse.org/releases/indigo"/>
eed45a2
+<unit id="org.junit"/>
eed45a2
+<repository location="http://download.eclipse.org/releases/indigo/201202240900"/>
aba2795
 </location>
aba2795
 </locations>
eed45a2
 </target>
aba2795
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
66215e3
index 1aec480..0eeb0fa 100644
aba2795
--- a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiManifest.java
aba2795
+++ b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiManifest.java
66215e3
@@ -26,7 +26,7 @@ public class OsgiManifest {
aba2795
     private static final StandardExecutionEnvironment[] EMPTY_EXEC_ENV = new StandardExecutionEnvironment[0];
aba2795
 
aba2795
     private String location;
aba2795
-    private Headers<String, String> headers;
aba2795
+    private Headers headers;
aba2795
 
aba2795
     // cache for parsed values of commonly used headers
aba2795
     private String bundleSymbolicName;
66215e3
@@ -80,7 +80,7 @@ public class OsgiManifest {
aba2795
     }
aba2795
 
aba2795
     private String parseMandatoryFirstValue(String headerKey) throws InvalidOSGiManifestException {
aba2795
-        String value = headers.get(headerKey);
aba2795
+        String value = (String) headers.get(headerKey);
aba2795
         if (value == null) {
aba2795
             throw new InvalidOSGiManifestException(location, "MANIFEST header '" + headerKey + "' not found");
aba2795
         }
66215e3
@@ -102,12 +102,12 @@ public class OsgiManifest {
aba2795
                 && "dir".equals(bundleShapeElements[0].getValue());
aba2795
     }
aba2795
 
aba2795
-    public Headers<String, String> getHeaders() {
aba2795
+    public Headers getHeaders() {
aba2795
         return headers;
aba2795
     }
aba2795
 
aba2795
     public String getValue(String key) {
aba2795
-        return headers.get(key);
aba2795
+        return (String) headers.get(key);
aba2795
     }
aba2795
 
aba2795
     public String getBundleSymbolicName() {
66215e3
@@ -143,7 +143,7 @@ public class OsgiManifest {
aba2795
     }
aba2795
 
aba2795
     private ManifestElement[] parseHeader(String key) {
aba2795
-        String value = headers.get(key);
aba2795
+        String value = (String) headers.get(key);
aba2795
         if (value == null) {
aba2795
             return null;
aba2795
         }
66215e3
@@ -156,7 +156,7 @@ public class OsgiManifest {
aba2795
 
aba2795
     public ManifestElement[] getManifestElements(String key) throws OsgiManifestParserException {
aba2795
         try {
aba2795
-            return ManifestElement.parseHeader(key, headers.get(key));
aba2795
+            return ManifestElement.parseHeader(key, (String) headers.get(key));
aba2795
         } catch (BundleException e) {
aba2795
             throw new OsgiManifestParserException(location, e);
aba2795
         }
aba2795
diff --git a/tycho-surefire/pom.xml b/tycho-surefire/pom.xml
d351d15
index 7b9697c..43ab800 100644
aba2795
--- a/tycho-surefire/pom.xml
aba2795
+++ b/tycho-surefire/pom.xml
aba2795
@@ -41,7 +41,7 @@
aba2795
 		<repository>
aba2795
 			<id>eclipse</id>
aba2795
 			<layout>p2</layout>
aba2795
-			<url>http://download.eclipse.org/releases/indigo</url>
aba2795
+			<url>http://download.eclipse.org/releases/indigo/201202240900</url>
aba2795
 		</repository>
aba2795
 	</repositories>
aba2795
 
aba2795
-- 
5a5bb5a
1.8.1.4
aba2795