From 56f6d9ebc372b6e64065ccf9d6aebf96bb91abc8 Mon Sep 17 00:00:00 2001
From: Robin Rosenberg <robin.rosenberg@dewire.com>
Date: Sun, 17 Jan 2010 22:44:05 +0100
Subject: [PATCH] Make HTTP test project work in Eclipse

The Jetty components are not available as part of Eclipse, but a
P2 packaged version can be found via [1] for Eclipse 3.5 and newer.

[1] http://wiki.eclipse.org/Jetty-OSGi_SDK

Change-Id: Ibd5930bb9fc9589125876ca50c52e58bd31b051c
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
 org.eclipse.jgit.http.test/.classpath         |  7 ++++
 org.eclipse.jgit.http.test/.gitignore         |  1 +
 org.eclipse.jgit.http.test/.project           | 28 ++++++++++++++++
 .../.settings/org.eclipse.jdt.core.prefs      |  7 ++++
 .../META-INF/MANIFEST.MF                      | 32 +++++++++++++++++++
 org.eclipse.jgit.http.test/build.properties   |  4 +++
 .../org.eclipse.jgit.http--All-Tests.launch   | 15 +++++++++
 7 files changed, 94 insertions(+)
 create mode 100644 org.eclipse.jgit.http.test/.classpath
 create mode 100644 org.eclipse.jgit.http.test/.project
 create mode 100644 org.eclipse.jgit.http.test/.settings/org.eclipse.jdt.core.prefs
 create mode 100644 org.eclipse.jgit.http.test/META-INF/MANIFEST.MF
 create mode 100644 org.eclipse.jgit.http.test/build.properties
 create mode 100644 org.eclipse.jgit.http.test/org.eclipse.jgit.http--All-Tests.launch

diff --git a/org.eclipse.jgit.http.test/.classpath b/org.eclipse.jgit.http.test/.classpath
new file mode 100644
index 000000000..db269cf46
--- /dev/null
+++ b/org.eclipse.jgit.http.test/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="tst"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.jgit.http.test/.gitignore b/org.eclipse.jgit.http.test/.gitignore
index ea8c4bf7f..4dc009173 100644
--- a/org.eclipse.jgit.http.test/.gitignore
+++ b/org.eclipse.jgit.http.test/.gitignore
@@ -1 +1,2 @@
 /target
+/bin
diff --git a/org.eclipse.jgit.http.test/.project b/org.eclipse.jgit.http.test/.project
new file mode 100644
index 000000000..b686ff7a2
--- /dev/null
+++ b/org.eclipse.jgit.http.test/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.eclipse.jgit.http.test</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
diff --git a/org.eclipse.jgit.http.test/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.http.test/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 000000000..67a855964
--- /dev/null
+++ b/org.eclipse.jgit.http.test/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+#Tue Jan 12 23:43:54 CET 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF
new file mode 100644
index 000000000..01982da6c
--- /dev/null
+++ b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF
@@ -0,0 +1,32 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Java Git HTTP Tests (Incubation)
+Bundle-SymbolicName: org.eclipse.jgit.http.test
+Bundle-Version: 0.6.0.qualifier
+Bundle-Vendor: Eclipse.org
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: javax.servlet;version="2.5.0",
+ javax.servlet.http;version="2.5.0",
+ junit.framework;version="3.8.2",
+ org.eclipse.jetty.continuation;version="7.0.1",
+ org.eclipse.jetty.http;version="7.0.1",
+ org.eclipse.jetty.http.security;version="7.0.1",
+ org.eclipse.jetty.io;version="7.0.1",
+ org.eclipse.jetty.security;version="7.0.1",
+ org.eclipse.jetty.security.authentication;version="7.0.1",
+ org.eclipse.jetty.server;version="7.0.1",
+ org.eclipse.jetty.server.handler;version="7.0.1",
+ org.eclipse.jetty.server.nio;version="7.0.1",
+ org.eclipse.jetty.servlet;version="7.0.1",
+ org.eclipse.jetty.util.component;version="7.0.1",
+ org.eclipse.jetty.util.log;version="7.0.1",
+ org.eclipse.jetty.util.thread;version="7.0.1",
+ org.eclipse.jgit.errors;version="0.6.0",
+ org.eclipse.jgit.http.server;version="0.6.0",
+ org.eclipse.jgit.http.server.glue;version="0.6.0",
+ org.eclipse.jgit.http.server.resolver;version="0.6.0",
+ org.eclipse.jgit.junit;version="0.6.0",
+ org.eclipse.jgit.lib;version="0.6.0",
+ org.eclipse.jgit.revwalk;version="0.6.0",
+ org.eclipse.jgit.transport;version="0.6.0",
+ org.eclipse.jgit.util;version="0.6.0"
diff --git a/org.eclipse.jgit.http.test/build.properties b/org.eclipse.jgit.http.test/build.properties
new file mode 100644
index 000000000..54c9cd2d7
--- /dev/null
+++ b/org.eclipse.jgit.http.test/build.properties
@@ -0,0 +1,4 @@
+source.. = tst/
+output.. = bin/
+bin.includes = META-INF/,\
+               .
diff --git a/org.eclipse.jgit.http.test/org.eclipse.jgit.http--All-Tests.launch b/org.eclipse.jgit.http.test/org.eclipse.jgit.http--All-Tests.launch
new file mode 100644
index 000000000..f22dc4bbe
--- /dev/null
+++ b/org.eclipse.jgit.http.test/org.eclipse.jgit.http--All-Tests.launch
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.jgit.http.test"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value="=org.eclipse.jgit.http.test"/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.jgit.http.test"/>
+</launchConfiguration>
-- 
GitLab