summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.junit.http
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.junit.http')
-rw-r--r--org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF20
-rw-r--r--org.eclipse.jgit.junit.http/META-INF/SOURCE-MANIFEST.MF7
-rw-r--r--org.eclipse.jgit.junit.http/pom.xml45
-rw-r--r--org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/SimpleHttpServer.java17
4 files changed, 66 insertions, 23 deletions
diff --git a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF
index 1286fc3f18..d2b692b1d3 100644
--- a/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %plugin_name
Automatic-Module-Name: org.eclipse.jgit.junit.http
Bundle-SymbolicName: org.eclipse.jgit.junit.http
-Bundle-Version: 5.3.6.qualifier
+Bundle-Version: 5.4.4.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %provider_name
Bundle-ActivationPolicy: lazy
@@ -22,16 +22,16 @@ Import-Package: javax.servlet;version="[2.5.0,3.2.0)",
org.eclipse.jetty.util.log;version="[9.4.5,10.0.0)",
org.eclipse.jetty.util.security;version="[9.4.5,10.0.0)",
org.eclipse.jetty.util.ssl;version="[9.4.5,10.0.0)",
- org.eclipse.jgit.errors;version="[5.3.6,5.4.0)",
- org.eclipse.jgit.http.server;version="[5.3.6,5.4.0)",
- org.eclipse.jgit.internal.storage.file;version="[5.3.6,5.4.0)",
- org.eclipse.jgit.junit;version="[5.3.6,5.4.0)",
- org.eclipse.jgit.lib;version="[5.3.6,5.4.0)",
- org.eclipse.jgit.revwalk;version="[5.3.6,5.4.0)",
- org.eclipse.jgit.transport;version="[5.3.6,5.4.0)",
- org.eclipse.jgit.transport.resolver;version="[5.3.6,5.4.0)",
+ org.eclipse.jgit.errors;version="[5.4.4,5.5.0)",
+ org.eclipse.jgit.http.server;version="[5.4.4,5.5.0)",
+ org.eclipse.jgit.internal.storage.file;version="[5.4.4,5.5.0)",
+ org.eclipse.jgit.junit;version="[5.4.4,5.5.0)",
+ org.eclipse.jgit.lib;version="[5.4.4,5.5.0)",
+ org.eclipse.jgit.revwalk;version="[5.4.4,5.5.0)",
+ org.eclipse.jgit.transport;version="[5.4.4,5.5.0)",
+ org.eclipse.jgit.transport.resolver;version="[5.4.4,5.5.0)",
org.junit;version="[4.12,5.0.0)"
-Export-Package: org.eclipse.jgit.junit.http;version="5.3.6";
+Export-Package: org.eclipse.jgit.junit.http;version="5.4.4";
uses:="org.eclipse.jgit.transport,
org.eclipse.jgit.junit,
javax.servlet.http,
diff --git a/org.eclipse.jgit.junit.http/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.junit.http/META-INF/SOURCE-MANIFEST.MF
new file mode 100644
index 0000000000..decfed1d4a
--- /dev/null
+++ b/org.eclipse.jgit.junit.http/META-INF/SOURCE-MANIFEST.MF
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.eclipse.jgit.junit.http - Sources
+Bundle-SymbolicName: org.eclipse.jgit.junit.http.source
+Bundle-Vendor: Eclipse.org - JGit
+Bundle-Version: 5.4.4.qualifier
+Eclipse-SourceBundle: org.eclipse.jgit.junit.http;version="5.4.4.qualifier";roots="."
diff --git a/org.eclipse.jgit.junit.http/pom.xml b/org.eclipse.jgit.junit.http/pom.xml
index 646cfd2ea0..e82c2438dc 100644
--- a/org.eclipse.jgit.junit.http/pom.xml
+++ b/org.eclipse.jgit.junit.http/pom.xml
@@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>5.3.6-SNAPSHOT</version>
+ <version>5.4.4-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.junit.http</artifactId>
@@ -62,6 +62,7 @@
<properties>
<translate-qualifier/>
+ <source-bundle-manifest>${project.build.directory}/META-INF/SOURCE-MANIFEST.MF</source-bundle-manifest>
</properties>
<dependencies>
@@ -109,6 +110,48 @@
<plugins>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>translate-source-qualifier</id>
+ <phase>generate-resources</phase>
+ <configuration>
+ <target>
+ <copy file="META-INF/SOURCE-MANIFEST.MF" tofile="${source-bundle-manifest}" overwrite="true"/>
+ <replace file="${source-bundle-manifest}">
+ <replacefilter token=".qualifier" value=".${maven.build.timestamp}"/>
+ </replace>
+ </target>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <inherited>true</inherited>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <configuration>
+ <archive>
+ <manifestFile>${source-bundle-manifest}</manifestFile>
+ </archive>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/SimpleHttpServer.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/SimpleHttpServer.java
index 245b510fe1..7c78330828 100644
--- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/SimpleHttpServer.java
+++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/SimpleHttpServer.java
@@ -54,8 +54,6 @@ import org.eclipse.jgit.errors.RepositoryNotFoundException;
import org.eclipse.jgit.http.server.GitServlet;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.transport.URIish;
-import org.eclipse.jgit.transport.resolver.RepositoryResolver;
-import org.eclipse.jgit.transport.resolver.ServiceNotEnabledException;
/**
* Simple http server for testing http access to Git repositories.
@@ -136,17 +134,12 @@ public class SimpleHttpServer {
private ServletContextHandler smart(String path) {
GitServlet gs = new GitServlet();
- gs.setRepositoryResolver(new RepositoryResolver<HttpServletRequest>() {
- @Override
- public Repository open(HttpServletRequest req, String name)
- throws RepositoryNotFoundException,
- ServiceNotEnabledException {
- if (!name.equals(nameOf(db)))
- throw new RepositoryNotFoundException(name);
-
- db.incrementOpen();
- return db;
+ gs.setRepositoryResolver((HttpServletRequest req, String name) -> {
+ if (!name.equals(nameOf(db))) {
+ throw new RepositoryNotFoundException(name);
}
+ db.incrementOpen();
+ return db;
});
ServletContextHandler ctx = server.addContext(path);