diff options
297 files changed, 9326 insertions, 1075 deletions
@@ -209,48 +209,48 @@ maven_jar( sha1 = "3edcfe49d2c6053a70a2a47e4e1c2f94998a49cf", ) -JETTY_VER = "9.4.25.v20191220" +JETTY_VER = "9.4.28.v20200408" maven_jar( name = "jetty-servlet", artifact = "org.eclipse.jetty:jetty-servlet:" + JETTY_VER, - sha1 = "bee77d6a4f87dc90d5bc142cbd6cef470ec46aae", - src_sha1 = "e8b09b6431fc9cfbff588698ac0262a745fe00e4", + sha1 = "7df27a6d73e3094ad94ea4f32e3e6597cecbdf38", + src_sha1 = "49da8455dd5760b7c5961df3b1e7d1490ff9723e", ) maven_jar( name = "jetty-security", artifact = "org.eclipse.jetty:jetty-security:" + JETTY_VER, - sha1 = "593ff5b5dfd5bf973184329f5d1209b9a411ec12", - src_sha1 = "369f869a13a33d25535db3176a84945e94a3718a", + sha1 = "d5fe6851f14d1375e4b4ab1818475bfd929cf517", + src_sha1 = "204f19ac7e4df9f6f68df1910154d7667ecd78e8", ) maven_jar( name = "jetty-server", artifact = "org.eclipse.jetty:jetty-server:" + JETTY_VER, - sha1 = "5b352c9f9135a1c20e4808e5cb1d84fbddfdc460", - src_sha1 = "0f3acc2abcdb86491a2c37074592860cb1100269", + sha1 = "9c2cbd96426be38b1273ec87ae21e2696688a737", + src_sha1 = "83454098deb880ecc7168252578f712c06a5504b", ) maven_jar( name = "jetty-http", artifact = "org.eclipse.jetty:jetty-http:" + JETTY_VER, - sha1 = "c3aa7da362f1a492667ce754ba16b2535b793668", - src_sha1 = "70ef1436dc895eafe2cc24cf59af6e2d2874d963", + sha1 = "dd56750ea7410c925f1fbae973c0a19cce5a0a68", + src_sha1 = "1ef8d10cb5ce5694f12650cbb49b31008c673182", ) maven_jar( name = "jetty-io", artifact = "org.eclipse.jetty:jetty-io:" + JETTY_VER, - sha1 = "3eb34b5481012701de0ea9dfaf2bdf1dbb947b16", - src_sha1 = "ad129617793088aaf69eab18a13c9bce02cb1195", + sha1 = "adda6786588a922f834e9c33c7db5f1484310f44", + src_sha1 = "4e7756e00b97b439d404e6a682bb1cdeb36fc887", ) maven_jar( name = "jetty-util", artifact = "org.eclipse.jetty:jetty-util:" + JETTY_VER, - sha1 = "fd8b642cc16728f1c36ca6a64653cb1b26ec0232", - src_sha1 = "c84dc3026cc4aea013dc97b18228756816167745", + sha1 = "118d2a44721885a04238aee21a5055dc1ab3818a", + src_sha1 = "e2e6d7c90e4126645d2667014d02f0732c08c948", ) BOUNCYCASTLE_VER = "1.65" @@ -259,14 +259,14 @@ maven_jar( name = "bcpg", artifact = "org.bouncycastle:bcpg-jdk15on:" + BOUNCYCASTLE_VER, sha1 = "f32fc02cc29c9fdcc35c0de4d16964f01777067c", - src_sha1 = "35e87838bf9348b25aae07135ceccfbef6827e3c", + src_sha1 = "508476d5383c7d086b400f5e7c5a8cf4dc8ac4e2", ) maven_jar( name = "bcprov", - artifact = "org.bouncycastle:bcprov-jdk15on:" + BOUNCYCASTLE_VER, - sha1 = "320b989112f00a63a3bcfa5a98f31a4f865a20fa", - src_sha1 = "ef2676604015c183bb29f8e17846cb3aa4b80c24", + artifact = "org.bouncycastle:bcprov-jdk15on:1.65.01", + sha1 = "0fbd478ea7b07acc3902b9585a37fd88393f8427", + src_sha1 = "8f54635075628c69b6c037e800dd0b03ffb8dd51", ) maven_jar( @@ -35,6 +35,7 @@ java_library( visibility = [ "//org.eclipse.jgit.ssh.apache:__pkg__", "//org.eclipse.jgit.ssh.apache.test:__pkg__", + "//org.eclipse.jgit.ssh.jsch.test:__pkg__", ], exports = ["@eddsa//jar"], ) @@ -145,7 +146,9 @@ java_library( name = "jsch", visibility = [ "//org.eclipse.jgit:__pkg__", - "//org.eclipse.jgit.test:__pkg__", + "//org.eclipse.jgit.junit.ssh:__pkg__", + "//org.eclipse.jgit.ssh.jsch:__pkg__", + "//org.eclipse.jgit.ssh.jsch.test:__pkg__", ], exports = ["@jsch//jar"], ) @@ -154,6 +157,7 @@ java_library( name = "bcpg", visibility = [ "//org.eclipse.jgit:__pkg__", + "//org.eclipse.jgit.gpg.bc:__pkg__", "//org.eclipse.jgit.test:__pkg__", ], exports = ["@bcpg//jar"], @@ -163,6 +167,7 @@ java_library( name = "bcprov", visibility = [ "//org.eclipse.jgit:__pkg__", + "//org.eclipse.jgit.gpg.bc:__pkg__", "//org.eclipse.jgit.test:__pkg__", ], exports = ["@bcprov//jar"], @@ -172,6 +177,7 @@ java_library( name = "bcpkix", visibility = [ "//org.eclipse.jgit:__pkg__", + "//org.eclipse.jgit.gpg.bc:__pkg__", "//org.eclipse.jgit.test:__pkg__", ], exports = ["@bcpkix//jar"], @@ -181,6 +187,7 @@ java_library( name = "jzlib", visibility = [ "//org.eclipse.jgit:__pkg__", + "//org.eclipse.jgit.ssh.jsch:__pkg__", "//org.eclipse.jgit.test:__pkg__", ], exports = ["@jzlib//jar"], diff --git a/org.eclipse.jgit.ant/pom.xml b/org.eclipse.jgit.ant/pom.xml index 54f7ba9bc7..bfc415863d 100644 --- a/org.eclipse.jgit.ant/pom.xml +++ b/org.eclipse.jgit.ant/pom.xml @@ -38,7 +38,7 @@ <dependency> <groupId>org.apache.ant</groupId> <artifactId>ant</artifactId> - <version>1.10.7</version> + <version>1.10.8</version> </dependency> </dependencies> diff --git a/org.eclipse.jgit.benchmarks/src/org/eclipse/jgit/benchmarks/FileMoveBenchmark.java b/org.eclipse.jgit.benchmarks/src/org/eclipse/jgit/benchmarks/FileMoveBenchmark.java new file mode 100644 index 0000000000..d3ada22df2 --- /dev/null +++ b/org.eclipse.jgit.benchmarks/src/org/eclipse/jgit/benchmarks/FileMoveBenchmark.java @@ -0,0 +1,136 @@ +/* + * Copyright (C) 2020, Matthias Sohn <matthias.sohn@sap.com> and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.benchmarks; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.NoSuchFileException; +import java.nio.file.Path; +import java.nio.file.StandardCopyOption; +import java.util.concurrent.TimeUnit; + +import org.eclipse.jgit.util.FileUtils; +import org.openjdk.jmh.annotations.Benchmark; +import org.openjdk.jmh.annotations.BenchmarkMode; +import org.openjdk.jmh.annotations.Measurement; +import org.openjdk.jmh.annotations.Mode; +import org.openjdk.jmh.annotations.OutputTimeUnit; +import org.openjdk.jmh.annotations.Scope; +import org.openjdk.jmh.annotations.Setup; +import org.openjdk.jmh.annotations.State; +import org.openjdk.jmh.annotations.TearDown; +import org.openjdk.jmh.annotations.Warmup; +import org.openjdk.jmh.runner.Runner; +import org.openjdk.jmh.runner.RunnerException; +import org.openjdk.jmh.runner.options.Options; +import org.openjdk.jmh.runner.options.OptionsBuilder; + +@State(Scope.Thread) +public class FileMoveBenchmark { + int i; + + Path testDir; + + Path targetDir; + + @Setup + public void setupBenchmark() throws IOException { + testDir = Files.createTempDirectory("dir"); + targetDir = testDir.resolve("target"); + Files.createDirectory(targetDir); + } + + @TearDown + public void teardown() throws IOException { + FileUtils.delete(testDir.toFile(), + FileUtils.RECURSIVE | FileUtils.RETRY); + } + + @Benchmark + @BenchmarkMode({ Mode.AverageTime }) + @OutputTimeUnit(TimeUnit.MICROSECONDS) + @Warmup(iterations = 5, time = 1000, timeUnit = TimeUnit.MILLISECONDS) + @Measurement(iterations = 5, time = 5000, timeUnit = TimeUnit.MILLISECONDS) + public Path moveFileToExistingDir() throws IOException { + i++; + Path tmp = testDir.resolve("tmp" + i++); + Files.createFile(tmp); + Path targetDirectory = targetDir; + Path targetFile = targetDirectory.resolve("tmp" + i); + try { + return Files.move(tmp, targetFile, StandardCopyOption.ATOMIC_MOVE); + } catch (NoSuchFileException e) { + Files.createDirectory(targetDirectory); + return Files.move(tmp, targetFile, StandardCopyOption.ATOMIC_MOVE); + } + } + + @Benchmark + @BenchmarkMode({ Mode.AverageTime }) + @OutputTimeUnit(TimeUnit.MICROSECONDS) + @Warmup(iterations = 5, time = 1000, timeUnit = TimeUnit.MILLISECONDS) + @Measurement(iterations = 5, time = 5000, timeUnit = TimeUnit.MILLISECONDS) + public Path moveFileToExistingDirExists() throws IOException { + Path tmp = testDir.resolve("tmp" + i++); + Files.createFile(tmp); + Path targetDirectory = targetDir; + Path targetFile = targetDir.resolve("tmp" + i); + if (!targetDirectory.toFile().exists()) { + Files.createDirectory(targetDirectory); + } + return Files.move(tmp, targetFile, StandardCopyOption.ATOMIC_MOVE); + } + + @Benchmark + @BenchmarkMode({ Mode.AverageTime }) + @OutputTimeUnit(TimeUnit.MICROSECONDS) + @Warmup(iterations = 5, time = 1000, timeUnit = TimeUnit.MILLISECONDS) + @Measurement(iterations = 5, time = 5000, timeUnit = TimeUnit.MILLISECONDS) + public Path moveFileToMissingDir() throws IOException { + i++; + Path tmp = testDir.resolve("tmp" + i); + Files.createFile(tmp); + Path targetDirectory = testDir.resolve("target" + i); + Path targetFile = targetDirectory.resolve("tmp" + i); + try { + return Files.move(tmp, targetFile, StandardCopyOption.ATOMIC_MOVE); + } catch (NoSuchFileException e) { + Files.createDirectory(targetDirectory); + return Files.move(tmp, targetFile, StandardCopyOption.ATOMIC_MOVE); + } + } + + @Benchmark + @BenchmarkMode({ Mode.AverageTime }) + @OutputTimeUnit(TimeUnit.MICROSECONDS) + @Warmup(iterations = 5, time = 1000, timeUnit = TimeUnit.MILLISECONDS) + @Measurement(iterations = 5, time = 5000, timeUnit = TimeUnit.MILLISECONDS) + public Path moveFileToMissingDirExists() throws IOException { + i++; + Path tmp = testDir.resolve("tmp" + i); + Files.createFile(tmp); + Path targetDirectory = testDir.resolve("target" + i); + Path targetFile = targetDirectory.resolve("tmp" + i); + if (!targetDirectory.toFile().exists()) { + Files.createDirectory(targetDirectory); + } + return Files.move(tmp, targetFile, StandardCopyOption.ATOMIC_MOVE); + } + + public static void main(String[] args) throws RunnerException { + Options opt = new OptionsBuilder() + .include(FileMoveBenchmark.class + .getSimpleName()) + // .addProfiler(StackProfiler.class) + // .addProfiler(GCProfiler.class) + .forks(1).jvmArgs("-ea").build(); + new Runner(opt).run(); + } +}
\ No newline at end of file diff --git a/org.eclipse.jgit.gpg.bc.test/.classpath b/org.eclipse.jgit.gpg.bc.test/.classpath new file mode 100644 index 0000000000..f08af0a4e9 --- /dev/null +++ b/org.eclipse.jgit.gpg.bc.test/.classpath @@ -0,0 +1,11 @@ +<?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/JavaSE-1.8"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="tst"> + <attributes> + <attribute name="test" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/org.eclipse.jgit.gpg.bc.test/.gitignore b/org.eclipse.jgit.gpg.bc.test/.gitignore new file mode 100644 index 0000000000..934e0e06ff --- /dev/null +++ b/org.eclipse.jgit.gpg.bc.test/.gitignore @@ -0,0 +1,2 @@ +/bin +/target diff --git a/org.eclipse.jgit.gpg.bc.test/.project b/org.eclipse.jgit.gpg.bc.test/.project new file mode 100644 index 0000000000..9aac4a256d --- /dev/null +++ b/org.eclipse.jgit.gpg.bc.test/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.jgit.gpg.bc.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.gpg.bc.test/.settings/org.eclipse.core.resources.prefs b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000..99f26c0203 --- /dev/null +++ b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/<project>=UTF-8 diff --git a/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.core.runtime.prefs new file mode 100644 index 0000000000..5a0ad22d2a --- /dev/null +++ b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.core.runtime.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +line.separator=\n diff --git a/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..822846c4d0 --- /dev/null +++ b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,399 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.doc.comment.support=enabled +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=warning +org.eclipse.jdt.core.compiler.problem.comparingIdentical=error +org.eclipse.jdt.core.compiler.problem.deadCode=error +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning +org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=warning +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=error +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error +org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private +org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error +org.eclipse.jdt.core.compiler.problem.nullReference=error +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error +org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedImport=error +org.eclipse.jdt.core.compiler.problem.unusedLabel=error +org.eclipse.jdt.core.compiler.problem.unusedLocal=error +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning +org.eclipse.jdt.core.compiler.problem.unusedParameter=warning +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=1 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=80 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=true +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000000..fef3713825 --- /dev/null +++ b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,66 @@ +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_JGit Format +formatter_settings_version=12 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/> +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_functional_interfaces=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=true +sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.make_local_variable_final=false +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=false +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=true +sp_cleanup.remove_unused_imports=false +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_blocks=false +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_lambda=false +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.mylyn.tasks.ui.prefs new file mode 100644 index 0000000000..3dec4d97c7 --- /dev/null +++ b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.mylyn.tasks.ui.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +project.repository.kind=bugzilla +project.repository.url=https\://bugs.eclipse.org/bugs diff --git a/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.mylyn.team.ui.prefs b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.mylyn.team.ui.prefs new file mode 100644 index 0000000000..ce7a0f0478 --- /dev/null +++ b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.mylyn.team.ui.prefs @@ -0,0 +1,2 @@ +commit.comment.template=${task.description} \n\nBug\: ${task.key} +eclipse.preferences.version=1 diff --git a/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.pde.api.tools.prefs b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.pde.api.tools.prefs new file mode 100644 index 0000000000..c0030ded71 --- /dev/null +++ b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.pde.api.tools.prefs @@ -0,0 +1,104 @@ +ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error +API_USE_SCAN_FIELD_SEVERITY=Error +API_USE_SCAN_METHOD_SEVERITY=Error +API_USE_SCAN_TYPE_SEVERITY=Error +CLASS_ELEMENT_TYPE_ADDED_FIELD=Error +CLASS_ELEMENT_TYPE_ADDED_METHOD=Error +CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error +CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error +CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error +CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error +ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error +ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error +ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +FIELD_ELEMENT_TYPE_ADDED_VALUE=Error +FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error +FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error +FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error +FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error +ILLEGAL_EXTEND=Warning +ILLEGAL_IMPLEMENT=Warning +ILLEGAL_INSTANTIATE=Warning +ILLEGAL_OVERRIDE=Warning +ILLEGAL_REFERENCE=Warning +INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error +INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +INVALID_ANNOTATION=Ignore +INVALID_JAVADOC_TAG=Ignore +INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Error +LEAK_EXTEND=Warning +LEAK_FIELD_DECL=Warning +LEAK_IMPLEMENT=Warning +LEAK_METHOD_PARAM=Warning +LEAK_METHOD_RETURN_TYPE=Warning +METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error +METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +MISSING_EE_DESCRIPTIONS=Warning +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +UNUSED_PROBLEM_FILTERS=Warning +automatically_removed_unused_problem_filters=false +changed_execution_env=Error +eclipse.preferences.version=1 +incompatible_api_component_version=Error +incompatible_api_component_version_include_major_without_breaking_change=Disabled +incompatible_api_component_version_include_minor_without_api_change=Disabled +incompatible_api_component_version_report_major_without_breaking_change=Warning +incompatible_api_component_version_report_minor_without_api_change=Ignore +invalid_since_tag_version=Error +malformed_since_tag=Error +missing_since_tag=Error +report_api_breakage_when_major_version_incremented=Disabled +report_resolution_errors_api_component=Warning diff --git a/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.pde.core.prefs b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.pde.core.prefs new file mode 100644 index 0000000000..923c37fb8d --- /dev/null +++ b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.pde.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +resolve.requirebundle=false diff --git a/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.pde.prefs b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.pde.prefs new file mode 100644 index 0000000000..2174e4fd5b --- /dev/null +++ b/org.eclipse.jgit.gpg.bc.test/.settings/org.eclipse.pde.prefs @@ -0,0 +1,34 @@ +compilers.f.unresolved-features=1 +compilers.f.unresolved-plugins=1 +compilers.incompatible-environment=1 +compilers.p.build=1 +compilers.p.build.bin.includes=1 +compilers.p.build.encodings=2 +compilers.p.build.java.compiler=2 +compilers.p.build.java.compliance=1 +compilers.p.build.missing.output=2 +compilers.p.build.output.library=1 +compilers.p.build.source.library=1 +compilers.p.build.src.includes=1 +compilers.p.deprecated=1 +compilers.p.discouraged-class=1 +compilers.p.internal=1 +compilers.p.missing-packages=2 +compilers.p.missing-version-export-package=2 +compilers.p.missing-version-import-package=2 +compilers.p.missing-version-require-bundle=2 +compilers.p.no-required-att=0 +compilers.p.no.automatic.module=1 +compilers.p.not-externalized-att=2 +compilers.p.service.component.without.lazyactivation=1 +compilers.p.unknown-attribute=1 +compilers.p.unknown-class=1 +compilers.p.unknown-element=1 +compilers.p.unknown-identifier=1 +compilers.p.unknown-resource=1 +compilers.p.unresolved-ex-points=0 +compilers.p.unresolved-import=0 +compilers.s.create-docs=false +compilers.s.doc-folder=doc +compilers.s.open-tags=1 +eclipse.preferences.version=1 diff --git a/org.eclipse.jgit.gpg.bc.test/BUILD b/org.eclipse.jgit.gpg.bc.test/BUILD new file mode 100644 index 0000000000..1e3677d929 --- /dev/null +++ b/org.eclipse.jgit.gpg.bc.test/BUILD @@ -0,0 +1,14 @@ +load( + "@com_googlesource_gerrit_bazlets//tools:junit.bzl", + "junit_tests", +) + +junit_tests( + name = "bc", + srcs = glob(["tst/**/*.java"]), + tags = ["bc"], + deps = [ + "//lib:junit", + "//org.eclipse.jgit.gpg.bc:gpg-bc", + ], +) diff --git a/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..3eb0e04bfa --- /dev/null +++ b/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF @@ -0,0 +1,14 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %Bundle-Name +Automatic-Module-Name: org.eclipse.jgit.gpg.bc.test +Bundle-SymbolicName: org.eclipse.jgit.gpg.bc.test +Bundle-Version: 5.8.0.qualifier +Bundle-Vendor: %Bundle-Vendor +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Import-Package: org.eclipse.jgit.gpg.bc.internal;version="[5.8.0,5.9.0)", + org.junit;version="[4.13,5.0.0)" +Export-Package: org.eclipse.jgit.gpg.bc.internal;x-internal:=true +Require-Bundle: org.hamcrest.core;bundle-version="[1.1.0,2.0.0)", + org.hamcrest.library;bundle-version="[1.1.0,2.0.0)" diff --git a/org.eclipse.jgit.gpg.bc.test/about.html b/org.eclipse.jgit.gpg.bc.test/about.html new file mode 100644 index 0000000000..f971af18d0 --- /dev/null +++ b/org.eclipse.jgit.gpg.bc.test/about.html @@ -0,0 +1,96 @@ +<?xml version="1.0" encoding="ISO-8859-1" ?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> + +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +<title>Eclipse Distribution License - Version 1.0</title> +<style type="text/css"> + body { + size: 8.5in 11.0in; + margin: 0.25in 0.5in 0.25in 0.5in; + tab-interval: 0.5in; + } + p { + margin-left: auto; + margin-top: 0.5em; + margin-bottom: 0.5em; + } + p.list { + margin-left: 0.5in; + margin-top: 0.05em; + margin-bottom: 0.05em; + } + .ubc-name { + margin-left: 0.5in; + white-space: pre; + } + </style> + +</head> + +<body lang="EN-US"> + +<p><b>Eclipse Distribution License - v 1.0</b></p> + +<p>Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors. </p> + +<p>All rights reserved.</p> +<p>Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: +<ul><li>Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. </li> +<li>Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. </li> +<li>Neither the name of the Eclipse Foundation, Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. </li></ul> +</p> +<p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE.</p> + +<hr> +<p><b>SHA-1 UbcCheck - MIT</b></p> + +<p>Copyright (c) 2017:</p> +<div class="ubc-name"> +Marc Stevens +Cryptology Group +Centrum Wiskunde & Informatica +P.O. Box 94079, 1090 GB Amsterdam, Netherlands +marc@marc-stevens.nl +</div> +<div class="ubc-name"> +Dan Shumow +Microsoft Research +danshu@microsoft.com +</div> +<p>Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +</p> +<ul><li>The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software.</li></ul> +<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.</p> + +</body> + +</html> diff --git a/org.eclipse.jgit.gpg.bc.test/build.properties b/org.eclipse.jgit.gpg.bc.test/build.properties new file mode 100644 index 0000000000..9ffa0caf78 --- /dev/null +++ b/org.eclipse.jgit.gpg.bc.test/build.properties @@ -0,0 +1,5 @@ +source.. = tst/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.properties diff --git a/org.eclipse.jgit.gpg.bc.test/plugin.properties b/org.eclipse.jgit.gpg.bc.test/plugin.properties new file mode 100644 index 0000000000..43776620c4 --- /dev/null +++ b/org.eclipse.jgit.gpg.bc.test/plugin.properties @@ -0,0 +1,2 @@ +Bundle-Name=JGit Tests for GPG with bouncycastle +Bundle-Vendor=Eclipse JGit diff --git a/org.eclipse.jgit.gpg.bc.test/pom.xml b/org.eclipse.jgit.gpg.bc.test/pom.xml new file mode 100644 index 0000000000..05c496b268 --- /dev/null +++ b/org.eclipse.jgit.gpg.bc.test/pom.xml @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (C) 2018, Thomas Wolf <thomas.wolf@paranor.ch> and others + + This program and the accompanying materials are made available under the + terms of the Eclipse Distribution License v. 1.0 which is available at + http://www.eclipse.org/org/documents/edl-v10.php. + + SPDX-License-Identifier: BSD-3-Clause +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit-parent</artifactId> + <version>5.8.0-SNAPSHOT</version> + </parent> + + <artifactId>org.eclipse.jgit.gpg.bc.test</artifactId> + <name>JGit - BouncyCastle GPG Tests</name> + + <description> + JUnit tests for the JGit GPG support based on BouncyCastle. + </description> + + <properties> + <maven.javadoc.skip>true</maven.javadoc.skip> + </properties> + + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </dependency> + + <dependency> + <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit.junit</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit.gpg.bc</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit.test</artifactId> + <version>${project.version}</version> + </dependency> + + </dependencies> + + <profiles> + <!-- Profile provides a property which enables long running tests. --> + <profile> + <id>test.long</id> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <argLine>@{argLine} -Djgit.test.long=true</argLine> + </configuration> + </plugin> + </plugins> + </build> + </profile> + </profiles> + + <build> + <sourceDirectory>src/</sourceDirectory> + <testSourceDirectory>tst/</testSourceDirectory> + + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>test-jar</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <argLine>@{argLine} -Xmx1024m -Dfile.encoding=UTF-8 -Djava.io.tmpdir=${project.build.directory}</argLine> + <includes> + <include>**/*Test.java</include> + <include>**/*Tests.java</include> + </includes> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/internal/BouncyCastleGpgKeyLocatorTest.java b/org.eclipse.jgit.gpg.bc.test/tst/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyLocatorTest.java index e93091d67d..744620163d 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/internal/BouncyCastleGpgKeyLocatorTest.java +++ b/org.eclipse.jgit.gpg.bc.test/tst/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyLocatorTest.java @@ -7,7 +7,7 @@ * * SPDX-License-Identifier: BSD-3-Clause */ -package org.eclipse.jgit.lib.internal; +package org.eclipse.jgit.gpg.bc.internal; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; diff --git a/org.eclipse.jgit.gpg.bc/.classpath b/org.eclipse.jgit.gpg.bc/.classpath new file mode 100644 index 0000000000..110168ffa1 --- /dev/null +++ b/org.eclipse.jgit.gpg.bc/.classpath @@ -0,0 +1,8 @@ +<?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/JavaSE-1.8"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="src" path="resources"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/org.eclipse.jgit.gpg.bc/.fbprefs b/org.eclipse.jgit.gpg.bc/.fbprefs new file mode 100644 index 0000000000..0a87ea2b4b --- /dev/null +++ b/org.eclipse.jgit.gpg.bc/.fbprefs @@ -0,0 +1,124 @@ +#FindBugs User Preferences +detectorAppendingToAnObjectOutputStream=AppendingToAnObjectOutputStream|true +detectorBadAppletConstructor=BadAppletConstructor|false +detectorBadResultSetAccess=BadResultSetAccess|true +detectorBadSyntaxForRegularExpression=BadSyntaxForRegularExpression|true +detectorBadUseOfReturnValue=BadUseOfReturnValue|true +detectorBadlyOverriddenAdapter=BadlyOverriddenAdapter|true +detectorBooleanReturnNull=BooleanReturnNull|true +detectorCallToUnsupportedMethod=CallToUnsupportedMethod|true +detectorCheckImmutableAnnotation=CheckImmutableAnnotation|true +detectorCheckTypeQualifiers=CheckTypeQualifiers|true +detectorCloneIdiom=CloneIdiom|false +detectorComparatorIdiom=ComparatorIdiom|true +detectorConfusedInheritance=ConfusedInheritance|true +detectorConfusionBetweenInheritedAndOuterMethod=ConfusionBetweenInheritedAndOuterMethod|true +detectorCrossSiteScripting=CrossSiteScripting|true +detectorDoInsideDoPrivileged=DoInsideDoPrivileged|true +detectorDontCatchIllegalMonitorStateException=DontCatchIllegalMonitorStateException|true +detectorDontUseEnum=DontUseEnum|true +detectorDroppedException=DroppedException|true +detectorDumbMethodInvocations=DumbMethodInvocations|true +detectorDumbMethods=DumbMethods|true +detectorDuplicateBranches=DuplicateBranches|true +detectorEmptyZipFileEntry=EmptyZipFileEntry|true +detectorEqualsOperandShouldHaveClassCompatibleWithThis=EqualsOperandShouldHaveClassCompatibleWithThis|true +detectorFinalizerNullsFields=FinalizerNullsFields|true +detectorFindBadCast2=FindBadCast2|true +detectorFindBadForLoop=FindBadForLoop|true +detectorFindCircularDependencies=FindCircularDependencies|false +detectorFindDeadLocalStores=FindDeadLocalStores|true +detectorFindDoubleCheck=FindDoubleCheck|true +detectorFindEmptySynchronizedBlock=FindEmptySynchronizedBlock|true +detectorFindFieldSelfAssignment=FindFieldSelfAssignment|true +detectorFindFinalizeInvocations=FindFinalizeInvocations|true +detectorFindFloatEquality=FindFloatEquality|true +detectorFindHEmismatch=FindHEmismatch|true +detectorFindInconsistentSync2=FindInconsistentSync2|true +detectorFindJSR166LockMonitorenter=FindJSR166LockMonitorenter|true +detectorFindLocalSelfAssignment2=FindLocalSelfAssignment2|true +detectorFindMaskedFields=FindMaskedFields|true +detectorFindMismatchedWaitOrNotify=FindMismatchedWaitOrNotify|true +detectorFindNakedNotify=FindNakedNotify|true +detectorFindNonSerializableStoreIntoSession=FindNonSerializableStoreIntoSession|true +detectorFindNonSerializableValuePassedToWriteObject=FindNonSerializableValuePassedToWriteObject|true +detectorFindNonShortCircuit=FindNonShortCircuit|true +detectorFindNullDeref=FindNullDeref|true +detectorFindNullDerefsInvolvingNonShortCircuitEvaluation=FindNullDerefsInvolvingNonShortCircuitEvaluation|true +detectorFindOpenStream=FindOpenStream|true +detectorFindPuzzlers=FindPuzzlers|true +detectorFindRefComparison=FindRefComparison|true +detectorFindReturnRef=FindReturnRef|true +detectorFindRunInvocations=FindRunInvocations|true +detectorFindSelfComparison=FindSelfComparison|true +detectorFindSelfComparison2=FindSelfComparison2|true +detectorFindSleepWithLockHeld=FindSleepWithLockHeld|true +detectorFindSpinLoop=FindSpinLoop|true +detectorFindSqlInjection=FindSqlInjection|true +detectorFindTwoLockWait=FindTwoLockWait|true +detectorFindUncalledPrivateMethods=FindUncalledPrivateMethods|true +detectorFindUnconditionalWait=FindUnconditionalWait|true +detectorFindUninitializedGet=FindUninitializedGet|true +detectorFindUnrelatedTypesInGenericContainer=FindUnrelatedTypesInGenericContainer|true +detectorFindUnreleasedLock=FindUnreleasedLock|true +detectorFindUnsatisfiedObligation=FindUnsatisfiedObligation|true +detectorFindUnsyncGet=FindUnsyncGet|true +detectorFindUselessControlFlow=FindUselessControlFlow|true +detectorFormatStringChecker=FormatStringChecker|true +detectorHugeSharedStringConstants=HugeSharedStringConstants|true +detectorIDivResultCastToDouble=IDivResultCastToDouble|true +detectorIncompatMask=IncompatMask|true +detectorInconsistentAnnotations=InconsistentAnnotations|true +detectorInefficientMemberAccess=InefficientMemberAccess|false +detectorInefficientToArray=InefficientToArray|true +detectorInfiniteLoop=InfiniteLoop|true +detectorInfiniteRecursiveLoop=InfiniteRecursiveLoop|true +detectorInfiniteRecursiveLoop2=InfiniteRecursiveLoop2|false +detectorInheritanceUnsafeGetResource=InheritanceUnsafeGetResource|true +detectorInitializationChain=InitializationChain|true +detectorInstantiateStaticClass=InstantiateStaticClass|true +detectorInvalidJUnitTest=InvalidJUnitTest|true +detectorIteratorIdioms=IteratorIdioms|true +detectorLazyInit=LazyInit|true +detectorLoadOfKnownNullValue=LoadOfKnownNullValue|true +detectorMethodReturnCheck=MethodReturnCheck|true +detectorMultithreadedInstanceAccess=MultithreadedInstanceAccess|true +detectorMutableLock=MutableLock|true +detectorMutableStaticFields=MutableStaticFields|true +detectorNaming=Naming|true +detectorNumberConstructor=NumberConstructor|true +detectorOverridingEqualsNotSymmetrical=OverridingEqualsNotSymmetrical|true +detectorPreferZeroLengthArrays=PreferZeroLengthArrays|true +detectorPublicSemaphores=PublicSemaphores|false +detectorQuestionableBooleanAssignment=QuestionableBooleanAssignment|true +detectorReadReturnShouldBeChecked=ReadReturnShouldBeChecked|true +detectorRedundantInterfaces=RedundantInterfaces|true +detectorRepeatedConditionals=RepeatedConditionals|true +detectorRuntimeExceptionCapture=RuntimeExceptionCapture|true +detectorSerializableIdiom=SerializableIdiom|true +detectorStartInConstructor=StartInConstructor|true +detectorStaticCalendarDetector=StaticCalendarDetector|true +detectorStringConcatenation=StringConcatenation|true +detectorSuperfluousInstanceOf=SuperfluousInstanceOf|true +detectorSuspiciousThreadInterrupted=SuspiciousThreadInterrupted|true +detectorSwitchFallthrough=SwitchFallthrough|true +detectorSynchronizeAndNullCheckField=SynchronizeAndNullCheckField|true +detectorSynchronizeOnClassLiteralNotGetClass=SynchronizeOnClassLiteralNotGetClass|true +detectorSynchronizingOnContentsOfFieldToProtectField=SynchronizingOnContentsOfFieldToProtectField|true +detectorURLProblems=URLProblems|true +detectorUncallableMethodOfAnonymousClass=UncallableMethodOfAnonymousClass|true +detectorUnnecessaryMath=UnnecessaryMath|true +detectorUnreadFields=UnreadFields|true +detectorUseObjectEquals=UseObjectEquals|false +detectorUselessSubclassMethod=UselessSubclassMethod|false +detectorVarArgsProblems=VarArgsProblems|true +detectorVolatileUsage=VolatileUsage|true +detectorWaitInLoop=WaitInLoop|true +detectorWrongMapIterator=WrongMapIterator|true +detectorXMLFactoryBypass=XMLFactoryBypass|true +detector_threshold=2 +effort=default +excludefilter0=findBugs/FindBugsExcludeFilter.xml +filter_settings=Medium|BAD_PRACTICE,CORRECTNESS,MT_CORRECTNESS,PERFORMANCE,STYLE|false +filter_settings_neg=MALICIOUS_CODE,NOISE,I18N,SECURITY,EXPERIMENTAL| +run_at_full_build=true diff --git a/org.eclipse.jgit.gpg.bc/.gitignore b/org.eclipse.jgit.gpg.bc/.gitignore new file mode 100644 index 0000000000..934e0e06ff --- /dev/null +++ b/org.eclipse.jgit.gpg.bc/.gitignore @@ -0,0 +1,2 @@ +/bin +/target diff --git a/org.eclipse.jgit.gpg.bc/.project b/org.eclipse.jgit.gpg.bc/.project new file mode 100644 index 0000000000..86910cf3ad --- /dev/null +++ b/org.eclipse.jgit.gpg.bc/.project @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.jgit.gpg.bc</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> + <buildCommand> + <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature> + </natures> +</projectDescription> diff --git a/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.core.resources.prefs b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000..99f26c0203 --- /dev/null +++ b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/<project>=UTF-8 diff --git a/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.core.runtime.prefs new file mode 100644 index 0000000000..5a0ad22d2a --- /dev/null +++ b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.core.runtime.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +line.separator=\n diff --git a/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..15ef2aad5d --- /dev/null +++ b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,399 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jgit.annotations.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jgit.annotations.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jgit.annotations.Nullable +org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.doc.comment.support=enabled +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=warning +org.eclipse.jdt.core.compiler.problem.comparingIdentical=error +org.eclipse.jdt.core.compiler.problem.deadCode=error +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning +org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=warning +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=error +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error +org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private +org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error +org.eclipse.jdt.core.compiler.problem.nullReference=error +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=ignore +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error +org.eclipse.jdt.core.compiler.problem.potentialNullReference=error +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedImport=error +org.eclipse.jdt.core.compiler.problem.unusedLabel=error +org.eclipse.jdt.core.compiler.problem.unusedLocal=error +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning +org.eclipse.jdt.core.compiler.problem.unusedParameter=warning +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=1 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=80 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=true +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000000..fef3713825 --- /dev/null +++ b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,66 @@ +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_JGit Format +formatter_settings_version=12 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/> +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_functional_interfaces=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=true +sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.make_local_variable_final=false +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=false +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=true +sp_cleanup.remove_unused_imports=false +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_blocks=false +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_lambda=false +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.mylyn.tasks.ui.prefs new file mode 100644 index 0000000000..3dec4d97c7 --- /dev/null +++ b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.mylyn.tasks.ui.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +project.repository.kind=bugzilla +project.repository.url=https\://bugs.eclipse.org/bugs diff --git a/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.mylyn.team.ui.prefs b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.mylyn.team.ui.prefs new file mode 100644 index 0000000000..ce7a0f0478 --- /dev/null +++ b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.mylyn.team.ui.prefs @@ -0,0 +1,2 @@ +commit.comment.template=${task.description} \n\nBug\: ${task.key} +eclipse.preferences.version=1 diff --git a/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.pde.api.tools.prefs b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.pde.api.tools.prefs new file mode 100644 index 0000000000..c0030ded71 --- /dev/null +++ b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.pde.api.tools.prefs @@ -0,0 +1,104 @@ +ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error +API_USE_SCAN_FIELD_SEVERITY=Error +API_USE_SCAN_METHOD_SEVERITY=Error +API_USE_SCAN_TYPE_SEVERITY=Error +CLASS_ELEMENT_TYPE_ADDED_FIELD=Error +CLASS_ELEMENT_TYPE_ADDED_METHOD=Error +CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error +CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error +CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error +CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error +ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error +ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error +ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +FIELD_ELEMENT_TYPE_ADDED_VALUE=Error +FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error +FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error +FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error +FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error +ILLEGAL_EXTEND=Warning +ILLEGAL_IMPLEMENT=Warning +ILLEGAL_INSTANTIATE=Warning +ILLEGAL_OVERRIDE=Warning +ILLEGAL_REFERENCE=Warning +INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error +INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +INVALID_ANNOTATION=Ignore +INVALID_JAVADOC_TAG=Ignore +INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Error +LEAK_EXTEND=Warning +LEAK_FIELD_DECL=Warning +LEAK_IMPLEMENT=Warning +LEAK_METHOD_PARAM=Warning +LEAK_METHOD_RETURN_TYPE=Warning +METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error +METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +MISSING_EE_DESCRIPTIONS=Warning +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +UNUSED_PROBLEM_FILTERS=Warning +automatically_removed_unused_problem_filters=false +changed_execution_env=Error +eclipse.preferences.version=1 +incompatible_api_component_version=Error +incompatible_api_component_version_include_major_without_breaking_change=Disabled +incompatible_api_component_version_include_minor_without_api_change=Disabled +incompatible_api_component_version_report_major_without_breaking_change=Warning +incompatible_api_component_version_report_minor_without_api_change=Ignore +invalid_since_tag_version=Error +malformed_since_tag=Error +missing_since_tag=Error +report_api_breakage_when_major_version_incremented=Disabled +report_resolution_errors_api_component=Warning diff --git a/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.pde.core.prefs b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.pde.core.prefs new file mode 100644 index 0000000000..923c37fb8d --- /dev/null +++ b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.pde.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +resolve.requirebundle=false diff --git a/org.eclipse.jgit.gpg.bc/BUILD b/org.eclipse.jgit.gpg.bc/BUILD new file mode 100644 index 0000000000..4fe1e478cf --- /dev/null +++ b/org.eclipse.jgit.gpg.bc/BUILD @@ -0,0 +1,21 @@ +load("@rules_java//java:defs.bzl", "java_library") + +package(default_visibility = ["//visibility:public"]) + +SRCS = glob(["src/**/*.java"]) + +RESOURCES = glob(["resources/**"]) + +java_library( + name = "gpg-bc", + srcs = SRCS, + resource_strip_prefix = "org.eclipse.jgit.gpg.bc/resources", + resources = RESOURCES, + deps = [ + "//lib:bcpg", + "//lib:bcpkix", + "//lib:bcprov", + "//lib:slf4j-api", + "//org.eclipse.jgit:jgit", + ], +) diff --git a/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF b/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..adab40574b --- /dev/null +++ b/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF @@ -0,0 +1,30 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %Bundle-Name +Automatic-Module-Name: org.eclipse.jgit.gpg.bc +Bundle-SymbolicName: org.eclipse.jgit.gpg.bc;singleton:=true +Fragment-Host: org.eclipse.jgit;bundle-version="[5.8.0,5.9.0)" +Bundle-Vendor: %Bundle-Vendor +Bundle-Localization: plugin +Bundle-Version: 5.8.0.qualifier +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Import-Package: org.assertj.core.annotations;version="3.14.0", + org.bouncycastle.bcpg;version="[1.65.0,2.0.0)", + org.bouncycastle.gpg;version="[1.65.0,2.0.0)", + org.bouncycastle.gpg.keybox;version="[1.65.0,2.0.0)", + org.bouncycastle.gpg.keybox.jcajce;version="[1.65.0,2.0.0)", + org.bouncycastle.jce.provider;version="[1.65.0,2.0.0)", + org.bouncycastle.openpgp;version="[1.65.0,2.0.0)", + org.bouncycastle.openpgp.operator;version="[1.65.0,2.0.0)", + org.bouncycastle.openpgp.operator.jcajce;version="[1.65.0,2.0.0)", + org.bouncycastle.util.encoders;version="[1.65.0,2.0.0)", + org.eclipse.jgit.annotations;version="[5.8.0,5.9.0)", + org.eclipse.jgit.api.errors;version="[5.8.0,5.9.0)", + org.eclipse.jgit.errors;version="[5.8.0,5.9.0)", + org.eclipse.jgit.lib;version="[5.8.0,5.9.0)", + org.eclipse.jgit.nls;version="[5.8.0,5.9.0)", + org.eclipse.jgit.transport;version="[5.8.0,5.9.0)", + org.eclipse.jgit.util;version="[5.8.0,5.9.0)", + org.slf4j;version="[1.7.0,2.0.0)" +Export-Package: org.eclipse.jgit.gpg.bc.internal;version="5.8.0"; + x-friends:="org.eclipse.jgit.gpg.bc.test" diff --git a/org.eclipse.jgit.gpg.bc/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.gpg.bc/META-INF/SOURCE-MANIFEST.MF new file mode 100644 index 0000000000..49081f826a --- /dev/null +++ b/org.eclipse.jgit.gpg.bc/META-INF/SOURCE-MANIFEST.MF @@ -0,0 +1,7 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.jgit.gpg.bc - Sources +Bundle-SymbolicName: org.eclipse.jgit.gpg.bc.source +Bundle-Vendor: Eclipse.org - JGit +Bundle-Version: 5.8.0.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.gpg.bc;version="5.8.0.qualifier";roots="." diff --git a/org.eclipse.jgit.gpg.bc/about.html b/org.eclipse.jgit.gpg.bc/about.html new file mode 100644 index 0000000000..f971af18d0 --- /dev/null +++ b/org.eclipse.jgit.gpg.bc/about.html @@ -0,0 +1,96 @@ +<?xml version="1.0" encoding="ISO-8859-1" ?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> + +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +<title>Eclipse Distribution License - Version 1.0</title> +<style type="text/css"> + body { + size: 8.5in 11.0in; + margin: 0.25in 0.5in 0.25in 0.5in; + tab-interval: 0.5in; + } + p { + margin-left: auto; + margin-top: 0.5em; + margin-bottom: 0.5em; + } + p.list { + margin-left: 0.5in; + margin-top: 0.05em; + margin-bottom: 0.05em; + } + .ubc-name { + margin-left: 0.5in; + white-space: pre; + } + </style> + +</head> + +<body lang="EN-US"> + +<p><b>Eclipse Distribution License - v 1.0</b></p> + +<p>Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors. </p> + +<p>All rights reserved.</p> +<p>Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: +<ul><li>Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. </li> +<li>Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. </li> +<li>Neither the name of the Eclipse Foundation, Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. </li></ul> +</p> +<p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE.</p> + +<hr> +<p><b>SHA-1 UbcCheck - MIT</b></p> + +<p>Copyright (c) 2017:</p> +<div class="ubc-name"> +Marc Stevens +Cryptology Group +Centrum Wiskunde & Informatica +P.O. Box 94079, 1090 GB Amsterdam, Netherlands +marc@marc-stevens.nl +</div> +<div class="ubc-name"> +Dan Shumow +Microsoft Research +danshu@microsoft.com +</div> +<p>Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +</p> +<ul><li>The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software.</li></ul> +<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.</p> + +</body> + +</html> diff --git a/org.eclipse.jgit.gpg.bc/build.properties b/org.eclipse.jgit.gpg.bc/build.properties new file mode 100644 index 0000000000..8148271ef3 --- /dev/null +++ b/org.eclipse.jgit.gpg.bc/build.properties @@ -0,0 +1,7 @@ +source.. = src/,\ + resources/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.properties,\ + about.html diff --git a/org.eclipse.jgit.gpg.bc/plugin.properties b/org.eclipse.jgit.gpg.bc/plugin.properties new file mode 100644 index 0000000000..b0914927bf --- /dev/null +++ b/org.eclipse.jgit.gpg.bc/plugin.properties @@ -0,0 +1,2 @@ +Bundle-Name=JGit GPG support based on bouncycastle +Bundle-Vendor=Eclipse JGit diff --git a/org.eclipse.jgit.gpg.bc/pom.xml b/org.eclipse.jgit.gpg.bc/pom.xml new file mode 100644 index 0000000000..ab0bc2ea8e --- /dev/null +++ b/org.eclipse.jgit.gpg.bc/pom.xml @@ -0,0 +1,223 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (C) 2020, Matthias Sohn <matthias.sohn@sap.com> and others + + This program and the accompanying materials are made available under the + terms of the Eclipse Distribution License v. 1.0 which is available at + http://www.eclipse.org/org/documents/edl-v10.php. + + SPDX-License-Identifier: BSD-3-Clause +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit-parent</artifactId> + <version>5.8.0-SNAPSHOT</version> + </parent> + + <artifactId>org.eclipse.jgit.gpg.bc</artifactId> + <name>JGit - BouncyCastle-based GPG support</name> + + <description> + GPG support for JGit based on BouncyCastle + </description> + + <properties> + <translate-qualifier/> + <source-bundle-manifest>${project.build.directory}/META-INF/SOURCE-MANIFEST.MF</source-bundle-manifest> + </properties> + + <dependencies> + <dependency> + <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcpg-jdk15on</artifactId> + </dependency> + + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcprov-jdk15on</artifactId> + </dependency> + + <dependency> + <groupId>org.bouncycastle</groupId> + <artifactId>bcpkix-jdk15on</artifactId> + </dependency> + + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </dependency> + </dependencies> + + <build> + <sourceDirectory>src/</sourceDirectory> + + <resources> + <resource> + <directory>.</directory> + <includes> + <include>plugin.properties</include> + <include>about.html</include> + </includes> + </resource> + <resource> + <directory>resources/</directory> + </resource> + </resources> + + <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> + <manifestFile>${bundle-manifest}</manifestFile> + </archive> + </configuration> + </plugin> + + <!-- No previous version to compare to + <plugin> + <groupId>com.github.siom79.japicmp</groupId> + <artifactId>japicmp-maven-plugin</artifactId> + <version>${japicmp-version}</version> + <configuration> + <oldVersion> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>${project.artifactId}</artifactId> + <version>${jgit-last-release-version}</version> + </dependency> + </oldVersion> + <newVersion> + <file> + <path>${project.build.directory}/${project.artifactId}-${project.version}.jar</path> + </file> + </newVersion> + <parameter> + <onlyModified>true</onlyModified> + <includes> + <include>org.eclipse.jgit.*</include> + </includes> + <accessModifier>public</accessModifier> + <breakBuildOnModifications>false</breakBuildOnModifications> + <breakBuildOnBinaryIncompatibleModifications>false</breakBuildOnBinaryIncompatibleModifications> + <onlyBinaryIncompatible>false</onlyBinaryIncompatible> + <includeSynthetic>false</includeSynthetic> + <ignoreMissingClasses>false</ignoreMissingClasses> + <skipPomModules>true</skipPomModules> + </parameter> + <skip>false</skip> + </configuration> + <executions> + <execution> + <phase>verify</phase> + <goals> + <goal>cmp</goal> + </goals> + </execution> + </executions> + </plugin> + --> + </plugins> + </build> + + <reporting> + <plugins> + <!-- No previous version to compare to + <plugin> + <groupId>com.github.siom79.japicmp</groupId> + <artifactId>japicmp-maven-plugin</artifactId> + <version>${japicmp-version}</version> + <reportSets> + <reportSet> + <reports> + <report>cmp-report</report> + </reports> + </reportSet> + </reportSets> + <configuration> + <oldVersion> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>${project.artifactId}</artifactId> + <version>${jgit-last-release-version}</version> + </dependency> + </oldVersion> + <newVersion> + <file> + <path>${project.build.directory}/${project.artifactId}-${project.version}.jar</path> + </file> + </newVersion> + <parameter> + <onlyModified>true</onlyModified> + <includes> + <include>org.eclipse.jgit.*</include> + </includes> + <accessModifier>public</accessModifier> + <breakBuildOnModifications>false</breakBuildOnModifications> + <breakBuildOnBinaryIncompatibleModifications>false</breakBuildOnBinaryIncompatibleModifications> + <onlyBinaryIncompatible>false</onlyBinaryIncompatible> + <includeSynthetic>false</includeSynthetic> + <ignoreMissingClasses>false</ignoreMissingClasses> + <skipPomModules>true</skipPomModules> + </parameter> + <skip>false</skip> + </configuration> + </plugin> + --> + </plugins> + </reporting> +</project> diff --git a/org.eclipse.jgit.gpg.bc/resources/META-INF/services/org.eclipse.jgit.lib.GpgSigner b/org.eclipse.jgit.gpg.bc/resources/META-INF/services/org.eclipse.jgit.lib.GpgSigner new file mode 100644 index 0000000000..6752b64ddf --- /dev/null +++ b/org.eclipse.jgit.gpg.bc/resources/META-INF/services/org.eclipse.jgit.lib.GpgSigner @@ -0,0 +1 @@ +org.eclipse.jgit.gpg.bc.internal.BouncyCastleGpgSigner diff --git a/org.eclipse.jgit.gpg.bc/resources/org/eclipse/jgit/gpg/bc/internal/BCText.properties b/org.eclipse.jgit.gpg.bc/resources/org/eclipse/jgit/gpg/bc/internal/BCText.properties new file mode 100644 index 0000000000..1441c63e8e --- /dev/null +++ b/org.eclipse.jgit.gpg.bc/resources/org/eclipse/jgit/gpg/bc/internal/BCText.properties @@ -0,0 +1,11 @@ +credentialPassphrase=Passphrase +gpgFailedToParseSecretKey=Failed to parse secret key file in directory: {0}. Is the entered passphrase correct? +gpgNoCredentialsProvider=missing credentials provider +gpgNoKeyring=neither pubring.kbx nor secring.gpg files found +gpgNoKeyInLegacySecring=no matching secret key found in legacy secring.gpg for key or user id: {0} +gpgNoPublicKeyFound=Unable to find a public-key with key or user id: {0} +gpgNoSecretKeyForPublicKey=unable to find associated secret key for public key: {0} +gpgNotASigningKey=Secret key ({0}) is not suitable for signing +gpgKeyInfo=GPG Key (fingerprint {0}) +gpgSigningCancelled=Signing was cancelled +unableToSignCommitNoSecretKey=Unable to sign commit. Signing key not available. diff --git a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BCText.java b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BCText.java new file mode 100644 index 0000000000..1a00b0fc79 --- /dev/null +++ b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BCText.java @@ -0,0 +1,33 @@ +package org.eclipse.jgit.gpg.bc.internal; + +import org.eclipse.jgit.nls.NLS; +import org.eclipse.jgit.nls.TranslationBundle; + +/** + * Externalized text messages for localization. + */ +public final class BCText extends TranslationBundle { + + /** + * Get an instance of this translation bundle. + * + * @return an instance of this translation bundle + */ + public static BCText get() { + return NLS.getBundleFor(BCText.class); + } + + // @formatter:off + /***/ public String credentialPassphrase; + /***/ public String gpgFailedToParseSecretKey; + /***/ public String gpgNoCredentialsProvider; + /***/ public String gpgNoKeyring; + /***/ public String gpgNoKeyInLegacySecring; + /***/ public String gpgNoPublicKeyFound; + /***/ public String gpgNoSecretKeyForPublicKey; + /***/ public String gpgNotASigningKey; + /***/ public String gpgKeyInfo; + /***/ public String gpgSigningCancelled; + /***/ public String unableToSignCommitNoSecretKey; + +} diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/BouncyCastleGpgKey.java b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKey.java index 8601d7c94f..bc26cb98a3 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/BouncyCastleGpgKey.java +++ b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKey.java @@ -7,7 +7,7 @@ * * SPDX-License-Identifier: BSD-3-Clause */ -package org.eclipse.jgit.lib.internal; +package org.eclipse.jgit.gpg.bc.internal; import java.nio.file.Path; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/BouncyCastleGpgKeyLocator.java b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyLocator.java index 8a32299dd3..eca45072bf 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/BouncyCastleGpgKeyLocator.java +++ b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyLocator.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018, Salesforce. and others + * Copyright (C) 2018, 2020 Salesforce and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0 which is available at @@ -7,7 +7,7 @@ * * SPDX-License-Identifier: BSD-3-Clause */ -package org.eclipse.jgit.lib.internal; +package org.eclipse.jgit.gpg.bc.internal; import static java.nio.file.Files.exists; import static java.nio.file.Files.newInputStream; @@ -25,7 +25,9 @@ import java.nio.file.Paths; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import java.text.MessageFormat; +import java.util.ArrayList; import java.util.Iterator; +import java.util.List; import java.util.Locale; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -57,7 +59,6 @@ import org.bouncycastle.util.encoders.Hex; import org.eclipse.jgit.annotations.NonNull; import org.eclipse.jgit.api.errors.CanceledException; import org.eclipse.jgit.errors.UnsupportedCredentialItem; -import org.eclipse.jgit.internal.JGitText; import org.eclipse.jgit.util.FS; import org.eclipse.jgit.util.StringUtils; import org.eclipse.jgit.util.SystemReader; @@ -68,7 +69,7 @@ import org.slf4j.LoggerFactory; * Locates GPG keys from either <code>~/.gnupg/private-keys-v1.d</code> or * <code>~/.gnupg/secring.gpg</code> */ -class BouncyCastleGpgKeyLocator { +public class BouncyCastleGpgKeyLocator { /** Thrown if a keybox file exists but doesn't contain an OpenPGP key. */ private static class NoOpenPgpKeyException extends Exception { @@ -77,6 +78,13 @@ class BouncyCastleGpgKeyLocator { } + /** Thrown if we try to read an encrypted private key without password. */ + private static class EncryptedPgpKeyException extends RuntimeException { + + private static final long serialVersionUID = 1L; + + } + private static final Logger log = LoggerFactory .getLogger(BouncyCastleGpgKeyLocator.class); @@ -338,11 +346,11 @@ class BouncyCastleGpgKeyLocator { return key; } throw new PGPException(MessageFormat.format( - JGitText.get().gpgNoSecretKeyForPublicKey, + BCText.get().gpgNoSecretKeyForPublicKey, Long.toHexString(publicKey.getKeyID()))); } throw new PGPException(MessageFormat.format( - JGitText.get().gpgNoPublicKeyFound, signingKey)); + BCText.get().gpgNoPublicKeyFound, signingKey)); } catch (NoOpenPgpKeyException e) { // There are no OpenPGP keys in the keybox at all: try the // pubring.gpg, if it exists. @@ -370,7 +378,7 @@ class BouncyCastleGpgKeyLocator { } if (publicKey == null) { throw new PGPException(MessageFormat.format( - JGitText.get().gpgNoPublicKeyFound, signingKey)); + BCText.get().gpgNoPublicKeyFound, signingKey)); } // We found a public key, but didn't find the secret key in the // private key directory. Go try the secring.gpg. @@ -385,14 +393,14 @@ class BouncyCastleGpgKeyLocator { } if (publicKey != null) { throw new PGPException(MessageFormat.format( - JGitText.get().gpgNoSecretKeyForPublicKey, + BCText.get().gpgNoSecretKeyForPublicKey, Long.toHexString(publicKey.getKeyID()))); } else if (hasSecring) { // publicKey == null: user has _only_ pubring.gpg/secring.gpg. throw new PGPException(MessageFormat.format( - JGitText.get().gpgNoKeyInLegacySecring, signingKey)); + BCText.get().gpgNoKeyInLegacySecring, signingKey)); } else { - throw new PGPException(JGitText.get().gpgNoKeyring); + throw new PGPException(BCText.get().gpgNoKeyring); } } @@ -414,7 +422,7 @@ class BouncyCastleGpgKeyLocator { if (secretKey != null) { if (!secretKey.isSigningKey()) { throw new PGPException(MessageFormat - .format(JGitText.get().gpgNotASigningKey, signingKey)); + .format(BCText.get().gpgNotASigningKey, signingKey)); } return new BouncyCastleGpgKey(secretKey, secring); } @@ -434,22 +442,46 @@ class BouncyCastleGpgKeyLocator { PGPDigestCalculatorProvider calculatorProvider = new JcaPGPDigestCalculatorProviderBuilder() .build(); - PBEProtectionRemoverFactory passphraseProvider = new JcePBEProtectionRemoverFactory( - passphrasePrompt.getPassphrase(publicKey.getFingerprint(), - userKeyboxPath)); - try (Stream<Path> keyFiles = Files.walk(USER_SECRET_KEY_DIR)) { - for (Path keyFile : keyFiles.filter(Files::isRegularFile) - .collect(Collectors.toList())) { - PGPSecretKey secretKey = attemptParseSecretKey(keyFile, - calculatorProvider, passphraseProvider, publicKey); - if (secretKey != null) { - if (!secretKey.isSigningKey()) { - throw new PGPException(MessageFormat.format( - JGitText.get().gpgNotASigningKey, signingKey)); + List<Path> allPaths = keyFiles.filter(Files::isRegularFile) + .collect(Collectors.toCollection(ArrayList::new)); + if (allPaths.isEmpty()) { + return null; + } + PBEProtectionRemoverFactory passphraseProvider = p -> { + throw new EncryptedPgpKeyException(); + }; + for (int attempts = 0; attempts < 2; attempts++) { + // Second pass will traverse only the encrypted keys with a real + // passphrase provider. + Iterator<Path> pathIterator = allPaths.iterator(); + while (pathIterator.hasNext()) { + Path keyFile = pathIterator.next(); + try { + PGPSecretKey secretKey = attemptParseSecretKey(keyFile, + calculatorProvider, passphraseProvider, + publicKey); + pathIterator.remove(); + if (secretKey != null) { + if (!secretKey.isSigningKey()) { + throw new PGPException(MessageFormat.format( + BCText.get().gpgNotASigningKey, + signingKey)); + } + return new BouncyCastleGpgKey(secretKey, + userKeyboxPath); + } + } catch (EncryptedPgpKeyException e) { + // Ignore; we'll try again. } - return new BouncyCastleGpgKey(secretKey, userKeyboxPath); } + if (attempts > 0 || allPaths.isEmpty()) { + break; + } + // allPaths contains only the encrypted keys now. + passphraseProvider = new JcePBEProtectionRemoverFactory( + passphrasePrompt.getPassphrase( + publicKey.getFingerprint(), userKeyboxPath)); } passphrasePrompt.clear(); @@ -460,7 +492,7 @@ class BouncyCastleGpgKeyLocator { } catch (IOException e) { passphrasePrompt.clear(); throw new PGPException(MessageFormat.format( - JGitText.get().gpgFailedToParseSecretKey, + BCText.get().gpgFailedToParseSecretKey, USER_SECRET_KEY_DIR.toAbsolutePath()), e); } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/BouncyCastleGpgKeyPassphrasePrompt.java b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyPassphrasePrompt.java index 6e29af51d8..e47f64f1a6 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/BouncyCastleGpgKeyPassphrasePrompt.java +++ b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyPassphrasePrompt.java @@ -1,5 +1,5 @@ /*- - * Copyright (C) 2019, Salesforce. and others + * Copyright (C) 2019, 2020 Salesforce and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0 which is available at @@ -7,7 +7,7 @@ * * SPDX-License-Identifier: BSD-3-Clause */ -package org.eclipse.jgit.lib.internal; +package org.eclipse.jgit.gpg.bc.internal; import java.net.URISyntaxException; import java.nio.file.Path; @@ -17,7 +17,6 @@ import org.bouncycastle.openpgp.PGPException; import org.bouncycastle.util.encoders.Hex; import org.eclipse.jgit.api.errors.CanceledException; import org.eclipse.jgit.errors.UnsupportedCredentialItem; -import org.eclipse.jgit.internal.JGitText; import org.eclipse.jgit.transport.CredentialItem.CharArrayType; import org.eclipse.jgit.transport.CredentialItem.InformationalMessage; import org.eclipse.jgit.transport.CredentialsProvider; @@ -79,23 +78,32 @@ class BouncyCastleGpgKeyPassphrasePrompt implements AutoCloseable { throws PGPException, CanceledException, UnsupportedCredentialItem, URISyntaxException { if (passphrase == null) { - passphrase = new CharArrayType(JGitText.get().credentialPassphrase, + passphrase = new CharArrayType(BCText.get().credentialPassphrase, true); } if (credentialsProvider == null) { - throw new PGPException(JGitText.get().gpgNoCredentialsProvider); + throw new PGPException(BCText.get().gpgNoCredentialsProvider); } if (passphrase.getValue() == null && !credentialsProvider.get(createURI(keyLocation), new InformationalMessage( - MessageFormat.format(JGitText.get().gpgKeyInfo, + MessageFormat.format(BCText.get().gpgKeyInfo, Hex.toHexString(keyFingerprint))), passphrase)) { - throw new CanceledException(JGitText.get().gpgSigningCancelled); + throw new CanceledException(BCText.get().gpgSigningCancelled); } return passphrase.getValue(); } + /** + * Determines whether a passphrase was already obtained. + * + * @return {@code true} if a passphrase is already set, {@code false} + * otherwise + */ + public boolean hasPassphrase() { + return passphrase != null && passphrase.getValue() != null; + } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/BouncyCastleGpgSigner.java b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgSigner.java index 388169637e..c6ecdbe6da 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/internal/BouncyCastleGpgSigner.java +++ b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgSigner.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018, Salesforce. and others + * Copyright (C) 2018, 2020, Salesforce and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0 which is available at @@ -7,7 +7,7 @@ * * SPDX-License-Identifier: BSD-3-Clause */ -package org.eclipse.jgit.lib.internal; +package org.eclipse.jgit.gpg.bc.internal; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -25,6 +25,7 @@ import org.bouncycastle.openpgp.PGPPrivateKey; import org.bouncycastle.openpgp.PGPSecretKey; import org.bouncycastle.openpgp.PGPSignature; import org.bouncycastle.openpgp.PGPSignatureGenerator; +import org.bouncycastle.openpgp.PGPSignatureSubpacketGenerator; import org.bouncycastle.openpgp.operator.jcajce.JcaPGPContentSignerBuilder; import org.bouncycastle.openpgp.operator.jcajce.JcePBESecretKeyDecryptorBuilder; import org.eclipse.jgit.annotations.NonNull; @@ -32,7 +33,6 @@ import org.eclipse.jgit.annotations.Nullable; import org.eclipse.jgit.api.errors.CanceledException; import org.eclipse.jgit.api.errors.JGitInternalException; import org.eclipse.jgit.errors.UnsupportedCredentialItem; -import org.eclipse.jgit.internal.JGitText; import org.eclipse.jgit.lib.CommitBuilder; import org.eclipse.jgit.lib.GpgSignature; import org.eclipse.jgit.lib.GpgSigner; @@ -102,21 +102,41 @@ public class BouncyCastleGpgSigner extends GpgSigner { PGPSecretKey secretKey = gpgKey.getSecretKey(); if (secretKey == null) { throw new JGitInternalException( - JGitText.get().unableToSignCommitNoSecretKey); + BCText.get().unableToSignCommitNoSecretKey); + } + JcePBESecretKeyDecryptorBuilder decryptorBuilder = new JcePBESecretKeyDecryptorBuilder() + .setProvider(BouncyCastleProvider.PROVIDER_NAME); + PGPPrivateKey privateKey = null; + if (!passphrasePrompt.hasPassphrase()) { + // Either the key is not encrypted, or it was read from the + // legacy secring.gpg. Try getting the private key without + // passphrase first. + try { + privateKey = secretKey.extractPrivateKey( + decryptorBuilder.build(new char[0])); + } catch (PGPException e) { + // Ignore and try again with passphrase below + } + } + if (privateKey == null) { + // Try using a passphrase + char[] passphrase = passphrasePrompt.getPassphrase( + secretKey.getPublicKey().getFingerprint(), + gpgKey.getOrigin()); + privateKey = secretKey + .extractPrivateKey(decryptorBuilder.build(passphrase)); } - char[] passphrase = passphrasePrompt.getPassphrase( - secretKey.getPublicKey().getFingerprint(), - gpgKey.getOrigin()); - PGPPrivateKey privateKey = secretKey - .extractPrivateKey(new JcePBESecretKeyDecryptorBuilder() - .setProvider(BouncyCastleProvider.PROVIDER_NAME) - .build(passphrase)); PGPSignatureGenerator signatureGenerator = new PGPSignatureGenerator( new JcaPGPContentSignerBuilder( secretKey.getPublicKey().getAlgorithm(), HashAlgorithmTags.SHA256).setProvider( BouncyCastleProvider.PROVIDER_NAME)); signatureGenerator.init(PGPSignature.BINARY_DOCUMENT, privateKey); + PGPSignatureSubpacketGenerator subpacketGenerator = new PGPSignatureSubpacketGenerator(); + subpacketGenerator.setIssuerFingerprint(false, + secretKey.getPublicKey()); + signatureGenerator + .setHashedSubpackets(subpacketGenerator.generate()); ByteArrayOutputStream buffer = new ByteArrayOutputStream(); try (BCPGOutputStream out = new BCPGOutputStream( new ArmoredOutputStream(buffer))) { diff --git a/org.eclipse.jgit.http.test/BUILD b/org.eclipse.jgit.http.test/BUILD index 09316adc6f..732b4fae2c 100644 --- a/org.eclipse.jgit.http.test/BUILD +++ b/org.eclipse.jgit.http.test/BUILD @@ -37,9 +37,7 @@ java_library( deps = [ "//lib:junit", "//lib:servlet-api", - "//org.eclipse.jgit.http.server:jgit-servlet", "//org.eclipse.jgit:jgit", - "//org.eclipse.jgit.junit.http:junit-http", "//org.eclipse.jgit.junit:junit", ], ) diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java index 51a7a8ddc1..8d1870a87e 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java @@ -112,6 +112,10 @@ public class SmartClientSmartServerTest extends AllFactoriesHttpTestCase { private URIish authOnPostURI; + private URIish slowURI; + + private URIish slowAuthURI; + private RevBlob A_txt; private RevCommit A, B, unreachableCommit; @@ -152,6 +156,10 @@ public class SmartClientSmartServerTest extends AllFactoriesHttpTestCase { ServletContextHandler authOnPost = addAuthContext(gs, "pauth", "POST"); + ServletContextHandler slow = addSlowContext(gs, "slow", false); + + ServletContextHandler slowAuth = addSlowContext(gs, "slowAuth", true); + server.setUp(); remoteRepository = src.getRepository(); @@ -160,6 +168,8 @@ public class SmartClientSmartServerTest extends AllFactoriesHttpTestCase { redirectURI = toURIish(redirect, srcName); authURI = toURIish(auth, srcName); authOnPostURI = toURIish(authOnPost, srcName); + slowURI = toURIish(slow, srcName); + slowAuthURI = toURIish(slowAuth, srcName); A_txt = src.blob("A"); A = src.commit().add("A_txt", A_txt).create(); @@ -372,6 +382,43 @@ public class SmartClientSmartServerTest extends AllFactoriesHttpTestCase { return redirect; } + private ServletContextHandler addSlowContext(GitServlet gs, String path, + boolean auth) { + ServletContextHandler slow = server.addContext('/' + path); + slow.addFilter(new FilterHolder(new Filter() { + + @Override + public void init(FilterConfig filterConfig) + throws ServletException { + // empty + } + + // Simply delays the servlet for two seconds. Used for timeout + // tests, which use a one-second timeout. + @Override + public void doFilter(ServletRequest request, + ServletResponse response, FilterChain chain) + throws IOException, ServletException { + try { + Thread.sleep(2000); + } catch (InterruptedException e) { + throw new IOException(e); + } + chain.doFilter(request, response); + } + + @Override + public void destroy() { + // empty + } + }), "/*", EnumSet.of(DispatcherType.REQUEST)); + slow.addServlet(new ServletHolder(gs), "/*"); + if (auth) { + return server.authBasic(slow); + } + return slow; + } + @Test public void testListRemote() throws IOException { assertEquals("http", remoteURI.getScheme()); @@ -489,6 +536,35 @@ public class SmartClientSmartServerTest extends AllFactoriesHttpTestCase { } @Test + public void testTimeoutExpired() throws Exception { + try (Repository dst = createBareRepository(); + Transport t = Transport.open(dst, slowURI)) { + t.setTimeout(1); + TransportException expected = assertThrows(TransportException.class, + () -> t.fetch(NullProgressMonitor.INSTANCE, + mirror(master))); + assertTrue("Unexpected exception message: " + expected.toString(), + expected.getMessage().contains("time")); + } + } + + @Test + public void testTimeoutExpiredWithAuth() throws Exception { + try (Repository dst = createBareRepository(); + Transport t = Transport.open(dst, slowAuthURI)) { + t.setTimeout(1); + t.setCredentialsProvider(testCredentials); + TransportException expected = assertThrows(TransportException.class, + () -> t.fetch(NullProgressMonitor.INSTANCE, + mirror(master))); + assertTrue("Unexpected exception message: " + expected.toString(), + expected.getMessage().contains("time")); + assertFalse("Unexpected exception message: " + expected.toString(), + expected.getMessage().contains("auth")); + } + } + + @Test public void testInitialClone_Small() throws Exception { try (Repository dst = createBareRepository(); Transport t = Transport.open(dst, remoteURI)) { diff --git a/org.eclipse.jgit.junit.ssh/.classpath b/org.eclipse.jgit.junit.ssh/.classpath index eca7bdba8f..110168ffa1 100644 --- a/org.eclipse.jgit.junit.ssh/.classpath +++ b/org.eclipse.jgit.junit.ssh/.classpath @@ -3,5 +3,6 @@ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="src" path="src"/> + <classpathentry kind="src" path="resources"/> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/org.eclipse.jgit.junit.ssh/BUILD b/org.eclipse.jgit.junit.ssh/BUILD index 906053e39a..61b5ce78cb 100644 --- a/org.eclipse.jgit.junit.ssh/BUILD +++ b/org.eclipse.jgit.junit.ssh/BUILD @@ -8,10 +8,17 @@ java_library( srcs = glob(["src/**/*.java"]), resource_strip_prefix = "org.eclipse.jgit.junit.ssh/resources", resources = glob(["resources/**"]), + visibility = [ + "//org.eclipse.jgit.ssh.apache.test:__pkg__", + "//org.eclipse.jgit.ssh.jsch.test:__pkg__", + ], deps = [ + "//lib:jsch", + "//lib:junit", "//lib:sshd-osgi", "//lib:sshd-sftp", # We want these deps to be provided_deps "//org.eclipse.jgit:jgit", + "//org.eclipse.jgit.junit:junit", ], ) diff --git a/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF index 27223b2de8..9a34eff447 100644 --- a/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF @@ -8,7 +8,8 @@ Bundle-Localization: plugin Bundle-Vendor: %Bundle-Vendor Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Import-Package: org.apache.sshd.common;version="[2.4.0,2.5.0)", +Import-Package: com.jcraft.jsch;version="0.1.55", + org.apache.sshd.common;version="[2.4.0,2.5.0)", org.apache.sshd.common.config.keys;version="[2.4.0,2.5.0)", org.apache.sshd.common.file.virtualfs;version="[2.4.0,2.5.0)", org.apache.sshd.common.helpers;version="[2.4.0,2.5.0)", @@ -31,7 +32,15 @@ Import-Package: org.apache.sshd.common;version="[2.4.0,2.5.0)", org.apache.sshd.server.subsystem;version="[2.4.0,2.5.0)", org.apache.sshd.server.subsystem.sftp;version="[2.4.0,2.5.0)", org.eclipse.jgit.annotations;version="[5.8.0,5.9.0)", + org.eclipse.jgit.api;version="[5.8.0,5.9.0)", + org.eclipse.jgit.api.errors;version="[5.8.0,5.9.0)", + org.eclipse.jgit.errors;version="[5.8.0,5.9.0)", + org.eclipse.jgit.junit;version="[5.8.0,5.9.0)", org.eclipse.jgit.lib;version="[5.8.0,5.9.0)", + org.eclipse.jgit.revwalk;version="[5.8.0,5.9.0)", org.eclipse.jgit.transport;version="[5.8.0,5.9.0)", + org.eclipse.jgit.util;version="[5.8.0,5.9.0)", + org.junit;version="[4.13,5.0.0)", + org.junit.experimental.theories;version="[4.13,5.0.0)", org.slf4j;version="[1.7.0,2.0.0)" Export-Package: org.eclipse.jgit.junit.ssh;version="5.8.0" diff --git a/org.eclipse.jgit.junit.ssh/build.properties b/org.eclipse.jgit.junit.ssh/build.properties index aa1a008269..84f1c95cfa 100644 --- a/org.eclipse.jgit.junit.ssh/build.properties +++ b/org.eclipse.jgit.junit.ssh/build.properties @@ -1,4 +1,5 @@ -source.. = src/ +source.. = src/,\ + resources/ output.. = bin/ bin.includes = META-INF/,\ .,\ diff --git a/org.eclipse.jgit.junit.ssh/pom.xml b/org.eclipse.jgit.junit.ssh/pom.xml index 9f9dc26e69..6eaea83ee6 100644 --- a/org.eclipse.jgit.junit.ssh/pom.xml +++ b/org.eclipse.jgit.junit.ssh/pom.xml @@ -40,6 +40,12 @@ </dependency> <dependency> + <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit.junit</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> <groupId>org.apache.sshd</groupId> <artifactId>sshd-osgi</artifactId> <version>${apache-sshd-version}</version> @@ -52,6 +58,16 @@ </dependency> <dependency> + <groupId>com.jcraft</groupId> + <artifactId>jsch</artifactId> + </dependency> + + <dependency> + <groupId>com.jcraft</groupId> + <artifactId>jzlib</artifactId> + </dependency> + + <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>provided</scope> @@ -68,6 +84,9 @@ <include>plugin.properties</include> </includes> </resource> + <resource> + <directory>resources/</directory> + </resource> </resources> <plugins> diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_dsa b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_dsa index f097516df2..f097516df2 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_dsa +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_dsa diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_dsa.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_dsa.pub index 676685332e..676685332e 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_dsa.pub +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_dsa.pub diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_dsa_testpass b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_dsa_testpass index 375d38fe43..375d38fe43 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_dsa_testpass +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_dsa_testpass diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_dsa_testpass.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_dsa_testpass.pub index 676685332e..676685332e 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_dsa_testpass.pub +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_dsa_testpass.pub diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_256 b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_256 index 8a4c864afa..8a4c864afa 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_256 +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_256 diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_256.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_256.pub index 43540ec0ec..43540ec0ec 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_256.pub +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_256.pub diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_256_testpass b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_256_testpass index b767c8e99a..b767c8e99a 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_256_testpass +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_256_testpass diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_256_testpass.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_256_testpass.pub index 43540ec0ec..43540ec0ec 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_256_testpass.pub +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_256_testpass.pub diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_384 b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_384 index dc2ac86508..dc2ac86508 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_384 +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_384 diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_384.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_384.pub index 3e813a5e48..3e813a5e48 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_384.pub +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_384.pub diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_384_testpass b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_384_testpass index 06032d049f..06032d049f 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_384_testpass +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_384_testpass diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_384_testpass.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_384_testpass.pub index 3e813a5e48..3e813a5e48 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_384_testpass.pub +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_384_testpass.pub diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_521 b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_521 index c28151e5ab..c28151e5ab 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_521 +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_521 diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_521.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_521.pub index 9bac1e80f0..9bac1e80f0 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_521.pub +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_521.pub diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_521_testpass b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_521_testpass index c1c1bbaced..c1c1bbaced 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_521_testpass +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_521_testpass diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_521_testpass.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_521_testpass.pub index 9bac1e80f0..9bac1e80f0 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ecdsa_521_testpass.pub +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ecdsa_521_testpass.pub diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519 b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ed25519 index 02afa54788..02afa54788 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519 +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ed25519 diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ed25519.pub index 7857db5602..7857db5602 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519.pub +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ed25519.pub diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519_expensive_testpass b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ed25519_expensive_testpass index 904cf302c2..904cf302c2 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519_expensive_testpass +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ed25519_expensive_testpass diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519_expensive_testpass.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ed25519_expensive_testpass.pub index 65038b5f4c..65038b5f4c 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519_expensive_testpass.pub +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ed25519_expensive_testpass.pub diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519_testpass b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ed25519_testpass index 7ad4a77056..7ad4a77056 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519_testpass +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ed25519_testpass diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519_testpass.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ed25519_testpass.pub index 7857db5602..7857db5602 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_ed25519_testpass.pub +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_ed25519_testpass.pub diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_1024 b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_1024 index 0b403674fa..0b403674fa 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_1024 +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_1024 diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_1024.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_1024.pub index 4aded97ab6..4aded97ab6 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_1024.pub +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_1024.pub diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_1024_testpass b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_1024_testpass index 0b66dc0aa9..0b66dc0aa9 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_1024_testpass +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_1024_testpass diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_1024_testpass.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_1024_testpass.pub index 4aded97ab6..4aded97ab6 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_1024_testpass.pub +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_1024_testpass.pub diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_2048 b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_2048 index a2d7d62310..a2d7d62310 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_2048 +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_2048 diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_2048.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_2048.pub index b787e36483..b787e36483 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_2048.pub +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_2048.pub diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_2048_testpass b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_2048_testpass index 7b3a3f4e58..7b3a3f4e58 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_2048_testpass +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_2048_testpass diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_2048_testpass.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_2048_testpass.pub index b787e36483..b787e36483 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_2048_testpass.pub +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_2048_testpass.pub diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_3072 b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_3072 index 10d622c905..10d622c905 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_3072 +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_3072 diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_3072.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_3072.pub index 686d3b06b1..686d3b06b1 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_3072.pub +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_3072.pub diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_3072_testpass b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_3072_testpass index 353a24c206..353a24c206 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_3072_testpass +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_3072_testpass diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_3072_testpass.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_3072_testpass.pub index 686d3b06b1..686d3b06b1 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_3072_testpass.pub +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_3072_testpass.pub diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_4096 b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_4096 index 1a10b388e6..1a10b388e6 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_4096 +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_4096 diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_4096.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_4096.pub index 3c3c16feeb..3c3c16feeb 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_4096.pub +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_4096.pub diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_4096_testpass b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_4096_testpass index 96e29fc15c..96e29fc15c 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_4096_testpass +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_4096_testpass diff --git a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_4096_testpass.pub b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_4096_testpass.pub index 3c3c16feeb..3c3c16feeb 100644 --- a/org.eclipse.jgit.test/resources/org/eclipse/jgit/transport/ssh/id_rsa_4096_testpass.pub +++ b/org.eclipse.jgit.junit.ssh/resources/org/eclipse/jgit/junit/ssh/id_rsa_4096_testpass.pub diff --git a/org.eclipse.jgit.test/src/org/eclipse/jgit/transport/ssh/SshTestBase.java b/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestBase.java index c22c10cb7f..2d284cf1d5 100644 --- a/org.eclipse.jgit.test/src/org/eclipse/jgit/transport/ssh/SshTestBase.java +++ b/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestBase.java @@ -7,7 +7,7 @@ * * SPDX-License-Identifier: BSD-3-Clause */ -package org.eclipse.jgit.transport.ssh; +package org.eclipse.jgit.junit.ssh; import static java.nio.charset.StandardCharsets.UTF_8; import static org.junit.Assert.assertArrayEquals; @@ -25,7 +25,6 @@ import java.util.Locale; import org.eclipse.jgit.api.errors.TransportException; import org.eclipse.jgit.transport.CredentialItem; -import org.eclipse.jgit.transport.JschConfigSessionFactory; import org.junit.Test; import org.junit.experimental.theories.DataPoints; import org.junit.experimental.theories.Theory; @@ -140,6 +139,10 @@ public abstract class SshTestBase extends SshTestHarness { provider.getLog().size()); } + private boolean isJsch() { + return getSessionFactory().getType().equals("jsch"); + } + @Test public void testSshWithConfigEncryptedUnusedKeyInConfigFirst() throws Exception { @@ -148,7 +151,7 @@ public abstract class SshTestBase extends SshTestHarness { // JschConfigSessionFactory)); gives in bazel a failure with "Never // found parameters that satisfied method assumptions." // In maven it's fine!? - if (getSessionFactory() instanceof JschConfigSessionFactory) { + if (isJsch()) { return; } // Copy the encrypted test key from the bundle. @@ -258,7 +261,7 @@ public abstract class SshTestBase extends SshTestHarness { "IdentityFile " + privateKey1.getAbsolutePath()); List<LogEntry> messages = provider.getLog(); assertFalse("Expected user interaction", messages.isEmpty()); - if (getSessionFactory() instanceof JschConfigSessionFactory) { + if (isJsch()) { // JSch doesn't create a non-existing file. assertEquals("Expected to be asked about the key", 1, messages.size()); @@ -295,7 +298,7 @@ public abstract class SshTestBase extends SshTestHarness { "User " + TEST_USER, // "StrictHostKeyChecking accept-new", // "IdentityFile " + privateKey1.getAbsolutePath()); - if (getSessionFactory() instanceof JschConfigSessionFactory) { + if (isJsch()) { // JSch doesn't create new files. assertTrue("CredentialsProvider not called", provider.getLog().isEmpty()); @@ -772,10 +775,9 @@ public abstract class SshTestBase extends SshTestHarness { public void testSshKeys(String keyName) throws Exception { // JSch fails on ECDSA 384/521 keys. Compare // https://sourceforge.net/p/jsch/patches/10/ - assumeTrue(!(getSessionFactory() instanceof JschConfigSessionFactory - && (keyName.contains("ed25519") - || keyName.startsWith("id_ecdsa_384") - || keyName.startsWith("id_ecdsa_521")))); + assumeTrue(!(isJsch() && (keyName.contains("ed25519") + || keyName.startsWith("id_ecdsa_384") + || keyName.startsWith("id_ecdsa_521")))); File cloned = new File(getTemporaryDirectory(), "cloned"); String keyFileName = keyName + "_key"; File privateKey = new File(sshDir, keyFileName); diff --git a/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestGitServer.java b/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestGitServer.java index 883ff0b8b5..03e2855829 100644 --- a/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestGitServer.java +++ b/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestGitServer.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018, Thomas Wolf <thomas.wolf@paranor.ch> and others + * Copyright (C) 2018, 2020 Thomas Wolf <thomas.wolf@paranor.ch> and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0 which is available at @@ -252,11 +252,24 @@ public class SshTestGitServer { .loadKeyPairIdentities(null, NamedResource.ofName(key.toString()), in, null) .iterator().next(); - if (inFront) { - hostKeys.add(0, pair); - } else { - hostKeys.add(pair); - } + addHostKey(pair, inFront); + } + } + + /** + * Adds an additional host key to the server. + * + * @param key + * {@link KeyPair} to add + * @param inFront + * whether to add the new key before other existing keys + * @since 5.8 + */ + public void addHostKey(@NonNull KeyPair key, boolean inFront) { + if (inFront) { + hostKeys.add(0, key); + } else { + hostKeys.add(key); } } @@ -323,6 +336,18 @@ public class SshTestGitServer { } /** + * Sets the test user's public key on the server. + * + * @param key + * to set + * + * @since 5.8 + */ + public void setTestUserPublicKey(@NonNull PublicKey key) { + this.testKey = key; + } + + /** * Sets the lines the server sends before its server identification in the * initial protocol version exchange. * diff --git a/org.eclipse.jgit.test/src/org/eclipse/jgit/transport/ssh/SshTestHarness.java b/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestHarness.java index 632c24b890..43f9dc4b24 100644 --- a/org.eclipse.jgit.test/src/org/eclipse/jgit/transport/ssh/SshTestHarness.java +++ b/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestHarness.java @@ -7,7 +7,7 @@ * * SPDX-License-Identifier: BSD-3-Clause */ -package org.eclipse.jgit.transport.ssh; +package org.eclipse.jgit.junit.ssh; import static java.nio.charset.StandardCharsets.US_ASCII; import static java.nio.charset.StandardCharsets.UTF_8; @@ -36,7 +36,6 @@ import org.eclipse.jgit.api.PushCommand; import org.eclipse.jgit.api.ResetCommand.ResetType; import org.eclipse.jgit.errors.UnsupportedCredentialItem; import org.eclipse.jgit.junit.RepositoryTestCase; -import org.eclipse.jgit.junit.ssh.SshTestGitServer; import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.revwalk.RevCommit; diff --git a/org.eclipse.jgit.lfs.server/resources/org/eclipse/jgit/lfs/server/internal/LfsServerText.properties b/org.eclipse.jgit.lfs.server/resources/org/eclipse/jgit/lfs/server/internal/LfsServerText.properties index 659714528c..911cdcf125 100644 --- a/org.eclipse.jgit.lfs.server/resources/org/eclipse/jgit/lfs/server/internal/LfsServerText.properties +++ b/org.eclipse.jgit.lfs.server/resources/org/eclipse/jgit/lfs/server/internal/LfsServerText.properties @@ -4,6 +4,7 @@ objectNotFound=Object ''{0}'' not found undefinedS3AccessKey=S3 configuration: 'accessKey' is undefined undefinedS3Bucket=S3 configuration: 'bucket' is undefined undefinedS3Region=S3 configuration: 'region' is undefined +undefinedS3Hostname=S3 configuration: 'hostname' is undefined undefinedS3SecretKey=S3 configuration: 'secretKey' is undefined undefinedS3StorageClass=S3 configuration: 'storageClass' is undefined unparsableEndpoint=Unable to parse service endpoint: {0} diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/internal/LfsServerText.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/internal/LfsServerText.java index bed485f605..56d59bb540 100644 --- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/internal/LfsServerText.java +++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/internal/LfsServerText.java @@ -33,6 +33,7 @@ public class LfsServerText extends TranslationBundle { /***/ public String undefinedS3AccessKey; /***/ public String undefinedS3Bucket; /***/ public String undefinedS3Region; + /***/ public String undefinedS3Hostname; /***/ public String undefinedS3SecretKey; /***/ public String undefinedS3StorageClass; /***/ public String unparsableEndpoint; diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Config.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Config.java index f3dd2781c8..3942e22a8e 100644 --- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Config.java +++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Config.java @@ -16,6 +16,7 @@ package org.eclipse.jgit.lfs.server.s3; * @since 4.3 */ public class S3Config { + private final String hostname; private final String region; private final String bucket; private final String storageClass; @@ -25,8 +26,12 @@ public class S3Config { private final boolean disableSslVerify; /** - * <p>Constructor for S3Config.</p> + * <p> + * Constructor for S3Config. + * </p> * + * @param hostname + * S3 API host * @param region * AWS region * @param bucket @@ -43,10 +48,12 @@ public class S3Config { * @param disableSslVerify * if {@code true} disable Amazon server certificate and hostname * verification + * @since 5.8 */ - public S3Config(String region, String bucket, String storageClass, + public S3Config(String hostname, String region, String bucket, String storageClass, String accessKey, String secretKey, int expirationSeconds, boolean disableSslVerify) { + this.hostname = hostname; this.region = region; this.bucket = bucket; this.storageClass = storageClass; @@ -57,6 +64,44 @@ public class S3Config { } /** + * <p>Constructor for S3Config.</p> + * + * @param region + * AWS region + * @param bucket + * S3 storage bucket + * @param storageClass + * S3 storage class + * @param accessKey + * access key for authenticating to AWS + * @param secretKey + * secret key for authenticating to AWS + * @param expirationSeconds + * period in seconds after which requests signed for this bucket + * will expire + * @param disableSslVerify + * if {@code true} disable Amazon server certificate and hostname + * verification + */ + public S3Config(String region, String bucket, String storageClass, + String accessKey, String secretKey, int expirationSeconds, + boolean disableSslVerify) { + this(String.format("s3-%s.amazonaws.com", region), region, bucket, //$NON-NLS-1$ + storageClass, accessKey, secretKey, expirationSeconds, + disableSslVerify); + } + + /** + * Get the <code>hostname</code>. + * + * @return Get the S3 API host + * @since 5.8 + */ + public String getHostname() { + return hostname; + } + + /** * Get the <code>region</code>. * * @return Get name of AWS region this bucket resides in diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Repository.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Repository.java index bd1705b827..c7c7a7146b 100644 --- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Repository.java +++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Repository.java @@ -159,6 +159,8 @@ public class S3Repository implements LargeFileRepository { config.getBucket()); assertNotEmpty(LfsServerText.get().undefinedS3Region, config.getRegion()); + assertNotEmpty(LfsServerText.get().undefinedS3Hostname, + config.getHostname()); assertNotEmpty(LfsServerText.get().undefinedS3SecretKey, config.getSecretKey()); assertNotEmpty(LfsServerText.get().undefinedS3StorageClass, @@ -173,8 +175,8 @@ public class S3Repository implements LargeFileRepository { private URL getObjectUrl(AnyLongObjectId oid) { try { - return new URL(String.format("https://s3-%s.amazonaws.com/%s/%s", //$NON-NLS-1$ - s3Config.getRegion(), s3Config.getBucket(), + return new URL(String.format("https://%s/%s/%s", //$NON-NLS-1$ + s3Config.getHostname(), s3Config.getBucket(), getPath(oid))); } catch (MalformedURLException e) { throw new IllegalArgumentException(MessageFormat.format( diff --git a/org.eclipse.jgit.lfs.test/BUILD b/org.eclipse.jgit.lfs.test/BUILD index ee2402aee0..061ecd71f7 100644 --- a/org.eclipse.jgit.lfs.test/BUILD +++ b/org.eclipse.jgit.lfs.test/BUILD @@ -25,8 +25,6 @@ java_library( srcs = glob(["src/**/*.java"]), deps = [ "//lib:junit", - "//org.eclipse.jgit:jgit", - "//org.eclipse.jgit.junit:junit", "//org.eclipse.jgit.lfs:jgit-lfs", ], ) diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPointer.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPointer.java index 55d2cfa6ec..4e2d8a998d 100644 --- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPointer.java +++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPointer.java @@ -168,7 +168,7 @@ public class LfsPointer implements Comparable<LfsPointer> { return x; } - return (int) (getSize() - o.getSize()); + return Long.compare(getSize(), o.getSize()); } } diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java index 23ece3e484..2f80d5b9a7 100644 --- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java +++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java @@ -133,7 +133,8 @@ public class SmudgeFilter extends FilterCommand { .toRequest(Protocol.OPERATION_DOWNLOAD, res)) .getBytes(UTF_8)); int responseCode = lfsServerConn.getResponseCode(); - if (responseCode != HttpConnection.HTTP_OK) { + if (!(responseCode == HttpConnection.HTTP_OK + || responseCode == HttpConnection.HTTP_NOT_AUTHORITATIVE)) { throw new IOException( MessageFormat.format(LfsText.get().serverFailure, lfsServerConn.getURL(), diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml index 0026a98c03..49932139f1 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml @@ -37,13 +37,6 @@ unpack="false"/> <plugin - id="com.jcraft.jsch" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> - - <plugin id="javaewah" download-size="0" install-size="0" @@ -64,47 +57,4 @@ version="0.0.0" unpack="false"/> - <plugin - id="org.slf4j.impl.log4j12" - download-size="0" - install-size="0" - version="0.0.0" - fragment="true" - unpack="false"/> - - <plugin - id="org.apache.log4j" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> - - <plugin - id="com.jcraft.jzlib" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> - - <plugin - id="org.bouncycastle.bcpg" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> - - <plugin - id="org.bouncycastle.bcpkix" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> - - <plugin - id="org.bouncycastle.bcprov" - download-size="0" - install-size="0" - version="0.0.0" - unpack="false"/> - </feature> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.gitignore b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.gitignore new file mode 100644 index 0000000000..2f7896d1d1 --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.gitignore @@ -0,0 +1 @@ +target/ diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.project b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.project new file mode 100644 index 0000000000..76a6f7b9f7 --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.project @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.jgit.gpg.bc.feature</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.pde.FeatureBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.FeatureNature</nature> + </natures> +</projectDescription> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.settings/org.eclipse.core.runtime.prefs new file mode 100644 index 0000000000..5a0ad22d2a --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.settings/org.eclipse.core.runtime.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +line.separator=\n diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.settings/org.eclipse.m2e.core.prefs b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000000..f897a7f1cb --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.settings/org.eclipse.mylyn.tasks.ui.prefs new file mode 100644 index 0000000000..3dec4d97c7 --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.settings/org.eclipse.mylyn.tasks.ui.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +project.repository.kind=bugzilla +project.repository.url=https\://bugs.eclipse.org/bugs diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.settings/org.eclipse.mylyn.team.ui.prefs b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.settings/org.eclipse.mylyn.team.ui.prefs new file mode 100644 index 0000000000..984263dd94 --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/.settings/org.eclipse.mylyn.team.ui.prefs @@ -0,0 +1,2 @@ +commit.comment.template=${task.description}\n\nBug\: ${task.key} +eclipse.preferences.version=1 diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/build.properties b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/build.properties new file mode 100644 index 0000000000..b4a8dde9e5 --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/build.properties @@ -0,0 +1,4 @@ +bin.includes = feature.xml,\ + edl-v10.html,\ + feature.properties,\ + license.html diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/edl-v10.html b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/edl-v10.html new file mode 100644 index 0000000000..1826b47af8 --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/edl-v10.html @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="ISO-8859-1" ?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> + +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +<title>Eclipse Distribution License - Version 1.0</title> +<style type="text/css"> + body { + size: 8.5in 11.0in; + margin: 0.25in 0.5in 0.25in 0.5in; + tab-interval: 0.5in; + } + p { + margin-left: auto; + margin-top: 0.5em; + margin-bottom: 0.5em; + } + p.list { + margin-left: 0.5in; + margin-top: 0.05em; + margin-bottom: 0.05em; + } + </style> + +</head> + +<body lang="EN-US"> + +<p><b>Eclipse Distribution License - v 1.0</b></p> + +<p>Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors. </p> + +<p>All rights reserved.</p> +<p>Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: +<ul><li>Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer.</li> +<li>Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution.</li> +<li>Neither the name of the Eclipse Foundation, Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission.</li></ul> +</p> +<p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE.</p> + +</body> + +</html> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.properties b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.properties new file mode 100644 index 0000000000..b14f0defe8 --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.properties @@ -0,0 +1,176 @@ +############################################################################### +# Copyright (c) 2000, 2010 IBM Corporation and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +############################################################################### + +featureName=Java implementation of Git - GPG support using BouncyCastle +providerName=Eclipse JGit + +updateSiteName=Eclipse JGit Update Site + +# description property - text of the "Feature Description" +description=\ +GPG support using BouncyCastle.\n +################ end of description property ################################## + +# "copyright" property - text of the "Feature Update Copyright" +copyright=\ +Copyright (c) 2020 Matthias Sohn and others.\n\ +All rights reserved. This program and the accompanying materials\n\ +are made available under the terms of the Eclipse Distribution License v1.0\n\ +which accompanies this distribution, and is available at\n\ +http://www.eclipse.org/org/documents/edl-v10.html\n +################ end of copyright property #################################### + +# "licenseURL" property - URL of the "Feature License" +# do not translate value - just change to point to a locale-specific HTML page +licenseURL=license.html +# "license" property - text of the "Feature Update License" +# should be plain text version of license agreement pointed to be "licenseURL" +license=\ +Eclipse Foundation Software User Agreement\n\ +\n\ +November 22, 2017\n\ +\n\ +Usage Of Content\n\ +\n\ +THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION\n\ +AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT"). USE OF\n\ +THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE\n\ +TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\ +BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED\n\ +BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE\n\ +AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\ +TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS OF ANY\n\ +APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU\n\ +MAY NOT USE THE CONTENT.\n\ +\n\ +Applicable Licenses\n\ +\n\ +Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\ +is provided to you under the terms and conditions of the Eclipse Public License\n\ +Version 2.0 ("EPL"). A copy of the EPL is provided with this Content and is also\n\ +available at http://www.eclipse.org/legal/epl-2.0. For purposes of the EPL,\n\ +"Program" will mean the Content.\n\ +\n\ +Content includes, but is not limited to, source code, object code, documentation\n\ +and other files maintained in the Eclipse Foundation source code repository\n\ +("Repository") in software modules ("Modules") and made available as\n\ +downloadable archives ("Downloads").\n\ +\n\ +- Content may be structured and packaged into modules to facilitate\n\ + delivering, extending, and upgrading the Content. Typical modules may\n\ + include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and\n\ + features ("Features").\n\ +- Each Plug-in or Fragment may be packaged as a sub-directory or JAR\n\ + (Java\u2122 ARchive) in a directory named "plugins".\n\ +- A Feature is a bundle of one or more Plug-ins and/or Fragments and\n\ + associated material. Each Feature may be packaged as a sub-directory in a\n\ + directory named "features". Within a Feature, files named "feature.xml" may\n\ + contain a list of the names and version numbers of the Plug-ins and/or\n\ + Fragments associated with that Feature.\n\ +- Features may also include other Features ("Included Features"). Within a\n\ + Feature, files named "feature.xml" may contain a list of the names and\n\ + version numbers of Included Features.\n\ +\n\ +The terms and conditions governing Plug-ins and Fragments should be contained in\n\ +files named "about.html" ("Abouts"). The terms and conditions governing Features\n\ +and Included Features should be contained in files named "license.html"\n\ +("Feature Licenses"). Abouts and Feature Licenses may be located in any\n\ +directory of a Download or Module including, but not limited to the following\n\ +locations:\n\ +\n\ +- The top-level (root) directory\n\ +- Plug-in and Fragment directories\n\ +- Inside Plug-ins and Fragments packaged as JARs\n\ +- Sub-directories of the directory named "src" of certain Plug-ins\n\ +- Feature directories\n\ +\n\ +Note: if a Feature made available by the Eclipse Foundation is installed using\n\ +the Provisioning Technology (as defined below), you must agree to a license\n\ +("Feature Update License") during the installation process. If the Feature\n\ +contains Included Features, the Feature Update License should either provide you\n\ +with the terms and conditions governing the Included Features or inform you\n\ +where you can locate them. Feature Update Licenses may be found in the "license"\n\ +property of files named "feature.properties" found within a Feature. Such\n\ +Abouts, Feature Licenses, and Feature Update Licenses contain the terms and\n\ +conditions (or references to such terms and conditions) that govern your use of\n\ +the associated Content in that directory.\n\ +\n\ +THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL\n\ +OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE\n\ +OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\ +\n\ +- Eclipse Public License Version 1.0 (available at\n\ + http://www.eclipse.org/legal/epl-v10.html)\n\ +- Eclipse Distribution License Version 1.0 (available at\n\ + http://www.eclipse.org/licenses/edl-v1.0.html)\n\ +- Common Public License Version 1.0 (available at\n\ + http://www.eclipse.org/legal/cpl-v10.html)\n\ +- Apache Software License 1.1 (available at\n\ + http://www.apache.org/licenses/LICENSE)\n\ +- Apache Software License 2.0 (available at\n\ + http://www.apache.org/licenses/LICENSE-2.0)\n\ +- Mozilla Public License Version 1.1 (available at\n\ + http://www.mozilla.org/MPL/MPL-1.1.html)\n\ +\n\ +IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO\n\ +USE OF THE CONTENT. If no About, Feature License, or Feature Update License is\n\ +provided, please contact the Eclipse Foundation to determine what terms and\n\ +conditions govern that particular Content.\n\ +\n\ +Use of Provisioning Technology\n\ +\n\ +The Eclipse Foundation makes available provisioning software, examples of which\n\ +include, but are not limited to, p2 and the Eclipse Update Manager\n\ +("Provisioning Technology") for the purpose of allowing users to install\n\ +software, documentation, information and/or other materials (collectively\n\ +"Installable Software"). This capability is provided with the intent of allowing\n\ +such users to install, extend and update Eclipse-based products. Information\n\ +about packaging Installable Software is available at\n\ +http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\ +\n\ +You may use Provisioning Technology to allow other parties to install\n\ +Installable Software. You shall be responsible for enabling the applicable\n\ +license agreements relating to the Installable Software to be presented to, and\n\ +accepted by, the users of the Provisioning Technology in accordance with the\n\ +Specification. By using Provisioning Technology in such a manner and making it\n\ +available in accordance with the Specification, you further acknowledge your\n\ +agreement to, and the acquisition of all necessary rights to permit the\n\ +following:\n\ +\n\ +1. A series of actions may occur ("Provisioning Process") in which a user may\n\ + execute the Provisioning Technology on a machine ("Target Machine") with the\n\ + intent of installing, extending or updating the functionality of an\n\ + Eclipse-based product.\n\ +2. During the Provisioning Process, the Provisioning Technology may cause third\n\ + party Installable Software or a portion thereof to be accessed and copied to\n\ + the Target Machine.\n\ +3. Pursuant to the Specification, you will provide to the user the terms and\n\ + conditions that govern the use of the Installable Software ("Installable\n\ + Software Agreement") and such Installable Software Agreement shall be\n\ + accessed from the Target Machine in accordance with the Specification. Such\n\ + Installable Software Agreement must inform the user of the terms and\n\ + conditions that govern the Installable Software and must solicit acceptance\n\ + by the end user in the manner prescribed in such Installable\n\ + Software Agreement. Upon such indication of agreement by the user, the\n\ + provisioning Technology will complete installation of the\n\ + Installable Software.\n\ +\n\ +Cryptography\n\ +\n\ +Content may contain encryption software. The country in which you are currently\n\ +may have restrictions on the import, possession, and use, and/or re-export to\n\ +another country, of encryption software. BEFORE using any encryption software,\n\ +please check the country's laws, regulations and policies concerning the import,\n\ +possession, or use, and re-export of encryption software, to see if this is\n\ +permitted.\n\ +\n\ +Java and all Java-based trademarks are trademarks of Oracle Corporation in the\n\ +United States, other countries, or both.\n +########### end of license property ##########################################
\ No newline at end of file diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.xml new file mode 100644 index 0000000000..c99b62e34a --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/feature.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?> +<feature + id="org.eclipse.jgit.gpg.bc" + label="%featureName" + version="5.8.0.qualifier" + provider-name="%providerName"> + + <description url="http://www.eclipse.org/jgit/"> + %description + </description> + + <copyright> + %copyright + </copyright> + + <license url="%licenseURL"> + %license + </license> + + <url> + <update label="%updateSiteName" url="https://download.eclipse.org/egit/updates"/> + <discovery label="%updateSiteName" url="https://download.eclipse.org/egit/updates"/> + </url> + + <requires> + <import plugin="org.eclipse.jgit" version="5.8.0" match="equivalent"/> + </requires> + + <plugin + id="org.eclipse.jgit.gpg.bc" + download-size="0" + install-size="0" + version="0.0.0" + fragment="true" + unpack="false"/> + + <plugin + id="org.bouncycastle.bcpg" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + + <plugin + id="org.bouncycastle.bcpkix" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + + <plugin + id="org.bouncycastle.bcprov" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + +</feature> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/license.html b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/license.html new file mode 100644 index 0000000000..004b6dec6b --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/license.html @@ -0,0 +1,168 @@ +<?xml version="1.0" encoding="ISO-8859-1" ?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +<title>Eclipse Foundation Software User Agreement</title> +</head> +<body lang="EN-US"> + <h2>Eclipse Foundation Software User Agreement</h2> + <p>November 22, 2017</p> + <h3>Usage Of Content</h3> + <p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, + INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS + (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY + THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND + CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED + BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE CONTENT IS + GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY + APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED + BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS + AGREEMENT AND THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE + AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT + USE THE CONTENT.</p> + <h3>Applicable Licenses</h3> + <p> + Unless otherwise indicated, all Content made available by the Eclipse + Foundation is provided to you under the terms and conditions of the + Eclipse Public License Version 2.0 ("EPL"). A copy of the + EPL is provided with this Content and is also available at <a + href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>. + For purposes of the EPL, "Program" will mean the Content. + </p> + <p>Content includes, but is not limited to, source code, object + code, documentation and other files maintained in the Eclipse + Foundation source code repository ("Repository") in software + modules ("Modules") and made available as downloadable + archives ("Downloads").</p> + <ul> + <li>Content may be structured and packaged into modules to + facilitate delivering, extending, and upgrading the Content. Typical + modules may include plug-ins ("Plug-ins"), plug-in + fragments ("Fragments"), and features + ("Features").</li> + <li>Each Plug-in or Fragment may be packaged as a sub-directory + or JAR (Java™ ARchive) in a directory named + "plugins".</li> + <li>A Feature is a bundle of one or more Plug-ins and/or + Fragments and associated material. Each Feature may be packaged as a + sub-directory in a directory named "features". Within a + Feature, files named "feature.xml" may contain a list of + the names and version numbers of the Plug-ins and/or Fragments + associated with that Feature.</li> + <li>Features may also include other Features ("Included + Features"). Within a Feature, files named + "feature.xml" may contain a list of the names and version + numbers of Included Features.</li> + </ul> + <p>The terms and conditions governing Plug-ins and Fragments should + be contained in files named "about.html" + ("Abouts"). The terms and conditions governing Features and + Included Features should be contained in files named + "license.html" ("Feature Licenses"). Abouts and + Feature Licenses may be located in any directory of a Download or + Module including, but not limited to the following locations:</p> + <ul> + <li>The top-level (root) directory</li> + <li>Plug-in and Fragment directories</li> + <li>Inside Plug-ins and Fragments packaged as JARs</li> + <li>Sub-directories of the directory named "src" of + certain Plug-ins</li> + <li>Feature directories</li> + </ul> + <p>Note: if a Feature made available by the Eclipse Foundation is + installed using the Provisioning Technology (as defined below), you + must agree to a license ("Feature Update License") during + the installation process. If the Feature contains Included Features, + the Feature Update License should either provide you with the terms + and conditions governing the Included Features or inform you where you + can locate them. Feature Update Licenses may be found in the + "license" property of files named + "feature.properties" found within a Feature. Such Abouts, + Feature Licenses, and Feature Update Licenses contain the terms and + conditions (or references to such terms and conditions) that govern + your use of the associated Content in that directory.</p> + <p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY + REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND + CONDITIONS. SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT + ARE NOT LIMITED TO):</p> + <ul> + <li>Eclipse Public License Version 1.0 (available at <a + href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>) + </li> + <li>Eclipse Distribution License Version 1.0 (available at <a + href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>) + </li> + <li>Common Public License Version 1.0 (available at <a + href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>) + </li> + <li>Apache Software License 1.1 (available at <a + href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>) + </li> + <li>Apache Software License 2.0 (available at <a + href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>) + </li> + <li>Mozilla Public License Version 1.1 (available at <a + href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>) + </li> + </ul> + <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND + CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, + or Feature Update License is provided, please contact the Eclipse + Foundation to determine what terms and conditions govern that + particular Content.</p> + <h3>Use of Provisioning Technology</h3> + <p> + The Eclipse Foundation makes available provisioning software, examples + of which include, but are not limited to, p2 and the Eclipse Update + Manager ("Provisioning Technology") for the purpose of + allowing users to install software, documentation, information and/or + other materials (collectively "Installable Software"). This + capability is provided with the intent of allowing such users to + install, extend and update Eclipse-based products. Information about + packaging Installable Software is available at <a + href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a> + ("Specification"). + </p> + <p>You may use Provisioning Technology to allow other parties to + install Installable Software. You shall be responsible for enabling + the applicable license agreements relating to the Installable Software + to be presented to, and accepted by, the users of the Provisioning + Technology in accordance with the Specification. By using Provisioning + Technology in such a manner and making it available in accordance with + the Specification, you further acknowledge your agreement to, and the + acquisition of all necessary rights to permit the following:</p> + <ol> + <li>A series of actions may occur ("Provisioning + Process") in which a user may execute the Provisioning + Technology on a machine ("Target Machine") with the intent + of installing, extending or updating the functionality of an + Eclipse-based product.</li> + <li>During the Provisioning Process, the Provisioning Technology + may cause third party Installable Software or a portion thereof to be + accessed and copied to the Target Machine.</li> + <li>Pursuant to the Specification, you will provide to the user + the terms and conditions that govern the use of the Installable + Software ("Installable Software Agreement") and such + Installable Software Agreement shall be accessed from the Target + Machine in accordance with the Specification. Such Installable + Software Agreement must inform the user of the terms and conditions + that govern the Installable Software and must solicit acceptance by + the end user in the manner prescribed in such Installable Software + Agreement. Upon such indication of agreement by the user, the + provisioning Technology will complete installation of the Installable + Software.</li> + </ol> + <h3>Cryptography</h3> + <p>Content may contain encryption software. The country in which + you are currently may have restrictions on the import, possession, and + use, and/or re-export to another country, of encryption software. + BEFORE using any encryption software, please check the country's laws, + regulations and policies concerning the import, possession, or use, + and re-export of encryption software, to see if this is permitted.</p> + <p> + <small>Java and all Java-based trademarks are trademarks of + Oracle Corporation in the United States, other countries, or both.</small> + </p> +</body> +</html>
\ No newline at end of file diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/pom.xml new file mode 100644 index 0000000000..c9ada739e1 --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.gpg.bc.feature/pom.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (C) 2020, Matthias Sohn <matthias.sohn@sap.com> and others + + This program and the accompanying materials are made available under the + terms of the Eclipse Distribution License v. 1.0 which is available at + http://www.eclipse.org/org/documents/edl-v10.php. + + SPDX-License-Identifier: BSD-3-Clause +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.eclipse.jgit</groupId> + <artifactId>jgit.tycho.parent</artifactId> + <version>5.8.0-SNAPSHOT</version> + </parent> + + <groupId>org.eclipse.jgit.feature</groupId> + <artifactId>org.eclipse.jgit.gpg.bc</artifactId> + <packaging>eclipse-feature</packaging> + + <name>JGit - GPG support using bouncycastle</name> + <dependencies> + + <dependency> + <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit.gpg.bc</artifactId> + <version>${project.version}</version> + </dependency> + + </dependencies> + +</project> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml index e2aeee38c6..abda695639 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml @@ -3,25 +3,31 @@ <description url="JGit"> This is a pure Java implementation of the Git version control system. The native Git version is also required in this version. </description> - <feature url="features/org.eclipse.jgit_0.0.0.qualifier.jar" id="org.eclipse.jgit" version="0.0.0" patch="true"> + <feature url="features/org.eclipse.jgit_0.0.0.qualifier.jar" id="org.eclipse.jgit" version="0.0.0"> <category name="JGit"/> </feature> - <feature url="features/org.eclipse.jgit.pgm_0.0.0.qualifier.jar" id="org.eclipse.jgit.pgm" version="0.0.0" patch="true"> + <feature url="features/org.eclipse.jgit.pgm_0.0.0.qualifier.jar" id="org.eclipse.jgit.pgm" version="0.0.0"> <category name="JGit"/> </feature> - <feature url="features/org.eclipse.jgit.ssh.apache_0.0.0.qualifier.jar" id="org.eclipse.jgit.ssh.apache" version="0.0.0" patch="true"> + <feature url="features/org.eclipse.jgit.ssh.apache_0.0.0.qualifier.jar" id="org.eclipse.jgit.ssh.apache" version="0.0.0"> <category name="JGit"/> </feature> - <feature url="features/org.eclipse.jgit.source_0.0.0.qualifier.jar" id="org.eclipse.jgit.source" version="0.0.0" patch="true"> + <feature url="features/org.eclipse.jgit.source_0.0.0.qualifier.jar" id="org.eclipse.jgit.source" version="0.0.0"> <category name="JGit"/> </feature> - <feature url="features/org.eclipse.jgit.junit_0.0.0.qualifier.jar" id="org.eclipse.jgit.junit" version="0.0.0" patch="true"> + <feature url="features/org.eclipse.jgit.junit_0.0.0.qualifier.jar" id="org.eclipse.jgit.junit" version="0.0.0"> <category name="JGit"/> </feature> - <feature url="features/org.eclipse.jgit.http.apache_0.0.0.qualifier.jar" id="org.eclipse.jgit.http.apache" version="0.0.0" patch="true"> + <feature url="features/org.eclipse.jgit.http.apache_0.0.0.qualifier.jar" id="org.eclipse.jgit.http.apache" version="0.0.0"> <category name="JGit"/> </feature> - <feature url="features/org.eclipse.jgit.lfs_0.0.0.qualifier.jar" id="org.eclipse.jgit.lfs" version="0.0.0" patch="true"> + <feature url="features/org.eclipse.jgit.lfs_0.0.0.qualifier.jar" id="org.eclipse.jgit.lfs" version="0.0.0"> + <category name="JGit"/> + </feature> + <feature url="features/org.eclipse.jgit.ssh.jsch_0.0.0.qualifier.jar" id="org.eclipse.jgit.ssh.jsch" version="0.0.0"> + <category name="JGit"/> + </feature> + <feature url="features/org.eclipse.jgit.gpg.bc_0.0.0.qualifier.jar" id="org.eclipse.jgit.gpg.bc" version="0.0.0"> <category name="JGit"/> </feature> <bundle id="org.eclipse.jgit.ant" version="0.0.0"> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml index 67d1eda22f..2907995b5f 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/pom.xml @@ -43,6 +43,11 @@ </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit.gpg.bc</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.http.apache</artifactId> <version>${project.version}</version> </dependency> @@ -86,6 +91,11 @@ <artifactId>org.eclipse.jgit.ssh.apache</artifactId> <version>${project.version}</version> </dependency> + <dependency> + <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit.ssh.jsch</artifactId> + <version>${project.version}</version> + </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.ui</artifactId> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml index e58d40b32d..44d2129a82 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.xml @@ -111,10 +111,24 @@ unpack="false"/> <plugin + id="org.eclipse.jgit.ssh.jsch.source" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + + <plugin id="org.eclipse.jgit.ui.source" download-size="0" install-size="0" version="0.0.0" unpack="false"/> + <plugin + id="org.eclipse.jgit.gpg.bc.source" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + </feature> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.gitignore b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.gitignore new file mode 100644 index 0000000000..2f7896d1d1 --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.gitignore @@ -0,0 +1 @@ +target/ diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.project b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.project new file mode 100644 index 0000000000..f5b9258152 --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.project @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.jgit.ssh.jsch.feature</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.pde.FeatureBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.FeatureNature</nature> + </natures> +</projectDescription> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.settings/org.eclipse.core.runtime.prefs new file mode 100644 index 0000000000..5a0ad22d2a --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.settings/org.eclipse.core.runtime.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +line.separator=\n diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.settings/org.eclipse.m2e.core.prefs b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.settings/org.eclipse.m2e.core.prefs new file mode 100644 index 0000000000..f897a7f1cb --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.settings/org.eclipse.m2e.core.prefs @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1 diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.settings/org.eclipse.mylyn.tasks.ui.prefs new file mode 100644 index 0000000000..3dec4d97c7 --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.settings/org.eclipse.mylyn.tasks.ui.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +project.repository.kind=bugzilla +project.repository.url=https\://bugs.eclipse.org/bugs diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.settings/org.eclipse.mylyn.team.ui.prefs b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.settings/org.eclipse.mylyn.team.ui.prefs new file mode 100644 index 0000000000..984263dd94 --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/.settings/org.eclipse.mylyn.team.ui.prefs @@ -0,0 +1,2 @@ +commit.comment.template=${task.description}\n\nBug\: ${task.key} +eclipse.preferences.version=1 diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/build.properties b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/build.properties new file mode 100644 index 0000000000..b4a8dde9e5 --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/build.properties @@ -0,0 +1,4 @@ +bin.includes = feature.xml,\ + edl-v10.html,\ + feature.properties,\ + license.html diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/edl-v10.html b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/edl-v10.html new file mode 100644 index 0000000000..1826b47af8 --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/edl-v10.html @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="ISO-8859-1" ?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> + +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +<title>Eclipse Distribution License - Version 1.0</title> +<style type="text/css"> + body { + size: 8.5in 11.0in; + margin: 0.25in 0.5in 0.25in 0.5in; + tab-interval: 0.5in; + } + p { + margin-left: auto; + margin-top: 0.5em; + margin-bottom: 0.5em; + } + p.list { + margin-left: 0.5in; + margin-top: 0.05em; + margin-bottom: 0.05em; + } + </style> + +</head> + +<body lang="EN-US"> + +<p><b>Eclipse Distribution License - v 1.0</b></p> + +<p>Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors. </p> + +<p>All rights reserved.</p> +<p>Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: +<ul><li>Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer.</li> +<li>Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution.</li> +<li>Neither the name of the Eclipse Foundation, Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission.</li></ul> +</p> +<p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE.</p> + +</body> + +</html> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.properties b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.properties new file mode 100644 index 0000000000..dc79b3230a --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.properties @@ -0,0 +1,176 @@ +############################################################################### +# Copyright (c) 2020 Matthias Sohn <matthias.sohn@sap.com> and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +############################################################################### + +featureName=Java implementation of Git - ssh support using JCraft jsch +providerName=Eclipse JGit + +updateSiteName=Eclipse JGit Update Site + +# description property - text of the "Feature Description" +description=\ +Ssh support using JCraft jsch.\n +################ end of description property ################################## + +# "copyright" property - text of the "Feature Update Copyright" +copyright=\ +Copyright (c) 2020 Matthias Sohn and others.\n\ +All rights reserved. This program and the accompanying materials\n\ +are made available under the terms of the Eclipse Distribution License v1.0\n\ +which accompanies this distribution, and is available at\n\ +http://www.eclipse.org/org/documents/edl-v10.html\n +################ end of copyright property #################################### + +# "licenseURL" property - URL of the "Feature License" +# do not translate value - just change to point to a locale-specific HTML page +licenseURL=license.html +# "license" property - text of the "Feature Update License" +# should be plain text version of license agreement pointed to be "licenseURL" +license=\ +Eclipse Foundation Software User Agreement\n\ +\n\ +November 22, 2017\n\ +\n\ +Usage Of Content\n\ +\n\ +THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION\n\ +AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT"). USE OF\n\ +THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE\n\ +TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\ +BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED\n\ +BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE\n\ +AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\ +TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS OF ANY\n\ +APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU\n\ +MAY NOT USE THE CONTENT.\n\ +\n\ +Applicable Licenses\n\ +\n\ +Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\ +is provided to you under the terms and conditions of the Eclipse Public License\n\ +Version 2.0 ("EPL"). A copy of the EPL is provided with this Content and is also\n\ +available at http://www.eclipse.org/legal/epl-2.0. For purposes of the EPL,\n\ +"Program" will mean the Content.\n\ +\n\ +Content includes, but is not limited to, source code, object code, documentation\n\ +and other files maintained in the Eclipse Foundation source code repository\n\ +("Repository") in software modules ("Modules") and made available as\n\ +downloadable archives ("Downloads").\n\ +\n\ +- Content may be structured and packaged into modules to facilitate\n\ + delivering, extending, and upgrading the Content. Typical modules may\n\ + include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and\n\ + features ("Features").\n\ +- Each Plug-in or Fragment may be packaged as a sub-directory or JAR\n\ + (Java\u2122 ARchive) in a directory named "plugins".\n\ +- A Feature is a bundle of one or more Plug-ins and/or Fragments and\n\ + associated material. Each Feature may be packaged as a sub-directory in a\n\ + directory named "features". Within a Feature, files named "feature.xml" may\n\ + contain a list of the names and version numbers of the Plug-ins and/or\n\ + Fragments associated with that Feature.\n\ +- Features may also include other Features ("Included Features"). Within a\n\ + Feature, files named "feature.xml" may contain a list of the names and\n\ + version numbers of Included Features.\n\ +\n\ +The terms and conditions governing Plug-ins and Fragments should be contained in\n\ +files named "about.html" ("Abouts"). The terms and conditions governing Features\n\ +and Included Features should be contained in files named "license.html"\n\ +("Feature Licenses"). Abouts and Feature Licenses may be located in any\n\ +directory of a Download or Module including, but not limited to the following\n\ +locations:\n\ +\n\ +- The top-level (root) directory\n\ +- Plug-in and Fragment directories\n\ +- Inside Plug-ins and Fragments packaged as JARs\n\ +- Sub-directories of the directory named "src" of certain Plug-ins\n\ +- Feature directories\n\ +\n\ +Note: if a Feature made available by the Eclipse Foundation is installed using\n\ +the Provisioning Technology (as defined below), you must agree to a license\n\ +("Feature Update License") during the installation process. If the Feature\n\ +contains Included Features, the Feature Update License should either provide you\n\ +with the terms and conditions governing the Included Features or inform you\n\ +where you can locate them. Feature Update Licenses may be found in the "license"\n\ +property of files named "feature.properties" found within a Feature. Such\n\ +Abouts, Feature Licenses, and Feature Update Licenses contain the terms and\n\ +conditions (or references to such terms and conditions) that govern your use of\n\ +the associated Content in that directory.\n\ +\n\ +THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL\n\ +OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE\n\ +OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\ +\n\ +- Eclipse Public License Version 1.0 (available at\n\ + http://www.eclipse.org/legal/epl-v10.html)\n\ +- Eclipse Distribution License Version 1.0 (available at\n\ + http://www.eclipse.org/licenses/edl-v1.0.html)\n\ +- Common Public License Version 1.0 (available at\n\ + http://www.eclipse.org/legal/cpl-v10.html)\n\ +- Apache Software License 1.1 (available at\n\ + http://www.apache.org/licenses/LICENSE)\n\ +- Apache Software License 2.0 (available at\n\ + http://www.apache.org/licenses/LICENSE-2.0)\n\ +- Mozilla Public License Version 1.1 (available at\n\ + http://www.mozilla.org/MPL/MPL-1.1.html)\n\ +\n\ +IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO\n\ +USE OF THE CONTENT. If no About, Feature License, or Feature Update License is\n\ +provided, please contact the Eclipse Foundation to determine what terms and\n\ +conditions govern that particular Content.\n\ +\n\ +Use of Provisioning Technology\n\ +\n\ +The Eclipse Foundation makes available provisioning software, examples of which\n\ +include, but are not limited to, p2 and the Eclipse Update Manager\n\ +("Provisioning Technology") for the purpose of allowing users to install\n\ +software, documentation, information and/or other materials (collectively\n\ +"Installable Software"). This capability is provided with the intent of allowing\n\ +such users to install, extend and update Eclipse-based products. Information\n\ +about packaging Installable Software is available at\n\ +http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\ +\n\ +You may use Provisioning Technology to allow other parties to install\n\ +Installable Software. You shall be responsible for enabling the applicable\n\ +license agreements relating to the Installable Software to be presented to, and\n\ +accepted by, the users of the Provisioning Technology in accordance with the\n\ +Specification. By using Provisioning Technology in such a manner and making it\n\ +available in accordance with the Specification, you further acknowledge your\n\ +agreement to, and the acquisition of all necessary rights to permit the\n\ +following:\n\ +\n\ +1. A series of actions may occur ("Provisioning Process") in which a user may\n\ + execute the Provisioning Technology on a machine ("Target Machine") with the\n\ + intent of installing, extending or updating the functionality of an\n\ + Eclipse-based product.\n\ +2. During the Provisioning Process, the Provisioning Technology may cause third\n\ + party Installable Software or a portion thereof to be accessed and copied to\n\ + the Target Machine.\n\ +3. Pursuant to the Specification, you will provide to the user the terms and\n\ + conditions that govern the use of the Installable Software ("Installable\n\ + Software Agreement") and such Installable Software Agreement shall be\n\ + accessed from the Target Machine in accordance with the Specification. Such\n\ + Installable Software Agreement must inform the user of the terms and\n\ + conditions that govern the Installable Software and must solicit acceptance\n\ + by the end user in the manner prescribed in such Installable\n\ + Software Agreement. Upon such indication of agreement by the user, the\n\ + provisioning Technology will complete installation of the\n\ + Installable Software.\n\ +\n\ +Cryptography\n\ +\n\ +Content may contain encryption software. The country in which you are currently\n\ +may have restrictions on the import, possession, and use, and/or re-export to\n\ +another country, of encryption software. BEFORE using any encryption software,\n\ +please check the country's laws, regulations and policies concerning the import,\n\ +possession, or use, and re-export of encryption software, to see if this is\n\ +permitted.\n\ +\n\ +Java and all Java-based trademarks are trademarks of Oracle Corporation in the\n\ +United States, other countries, or both.\n +########### end of license property ##########################################
\ No newline at end of file diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.xml new file mode 100644 index 0000000000..d6dbf01b86 --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/feature.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="UTF-8"?> +<feature + id="org.eclipse.jgit.ssh.jsch" + label="%featureName" + version="5.8.0.qualifier" + provider-name="%providerName"> + + <description url="http://www.eclipse.org/jgit/"> + %description + </description> + + <copyright> + %copyright + </copyright> + + <license url="%licenseURL"> + %license + </license> + + <url> + <update label="%updateSiteName" url="https://download.eclipse.org/egit/updates"/> + <discovery label="%updateSiteName" url="https://download.eclipse.org/egit/updates"/> + </url> + + <requires> + <import plugin="org.eclipse.jgit" version="5.8.0" match="equivalent"/> + </requires> + + <plugin + id="org.eclipse.jgit.ssh.jsch" + download-size="0" + install-size="0" + version="0.0.0" + fragment="true" + unpack="false"/> + + <plugin + id="com.jcraft.jsch" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + + <plugin + id="com.jcraft.jzlib" + download-size="0" + install-size="0" + version="0.0.0" + unpack="false"/> + +</feature> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/license.html b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/license.html new file mode 100644 index 0000000000..004b6dec6b --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/license.html @@ -0,0 +1,168 @@ +<?xml version="1.0" encoding="ISO-8859-1" ?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +<title>Eclipse Foundation Software User Agreement</title> +</head> +<body lang="EN-US"> + <h2>Eclipse Foundation Software User Agreement</h2> + <p>November 22, 2017</p> + <h3>Usage Of Content</h3> + <p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, + INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS + (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY + THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND + CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED + BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE CONTENT IS + GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY + APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED + BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS + AGREEMENT AND THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE + AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT + USE THE CONTENT.</p> + <h3>Applicable Licenses</h3> + <p> + Unless otherwise indicated, all Content made available by the Eclipse + Foundation is provided to you under the terms and conditions of the + Eclipse Public License Version 2.0 ("EPL"). A copy of the + EPL is provided with this Content and is also available at <a + href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>. + For purposes of the EPL, "Program" will mean the Content. + </p> + <p>Content includes, but is not limited to, source code, object + code, documentation and other files maintained in the Eclipse + Foundation source code repository ("Repository") in software + modules ("Modules") and made available as downloadable + archives ("Downloads").</p> + <ul> + <li>Content may be structured and packaged into modules to + facilitate delivering, extending, and upgrading the Content. Typical + modules may include plug-ins ("Plug-ins"), plug-in + fragments ("Fragments"), and features + ("Features").</li> + <li>Each Plug-in or Fragment may be packaged as a sub-directory + or JAR (Java™ ARchive) in a directory named + "plugins".</li> + <li>A Feature is a bundle of one or more Plug-ins and/or + Fragments and associated material. Each Feature may be packaged as a + sub-directory in a directory named "features". Within a + Feature, files named "feature.xml" may contain a list of + the names and version numbers of the Plug-ins and/or Fragments + associated with that Feature.</li> + <li>Features may also include other Features ("Included + Features"). Within a Feature, files named + "feature.xml" may contain a list of the names and version + numbers of Included Features.</li> + </ul> + <p>The terms and conditions governing Plug-ins and Fragments should + be contained in files named "about.html" + ("Abouts"). The terms and conditions governing Features and + Included Features should be contained in files named + "license.html" ("Feature Licenses"). Abouts and + Feature Licenses may be located in any directory of a Download or + Module including, but not limited to the following locations:</p> + <ul> + <li>The top-level (root) directory</li> + <li>Plug-in and Fragment directories</li> + <li>Inside Plug-ins and Fragments packaged as JARs</li> + <li>Sub-directories of the directory named "src" of + certain Plug-ins</li> + <li>Feature directories</li> + </ul> + <p>Note: if a Feature made available by the Eclipse Foundation is + installed using the Provisioning Technology (as defined below), you + must agree to a license ("Feature Update License") during + the installation process. If the Feature contains Included Features, + the Feature Update License should either provide you with the terms + and conditions governing the Included Features or inform you where you + can locate them. Feature Update Licenses may be found in the + "license" property of files named + "feature.properties" found within a Feature. Such Abouts, + Feature Licenses, and Feature Update Licenses contain the terms and + conditions (or references to such terms and conditions) that govern + your use of the associated Content in that directory.</p> + <p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY + REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND + CONDITIONS. SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT + ARE NOT LIMITED TO):</p> + <ul> + <li>Eclipse Public License Version 1.0 (available at <a + href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>) + </li> + <li>Eclipse Distribution License Version 1.0 (available at <a + href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>) + </li> + <li>Common Public License Version 1.0 (available at <a + href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>) + </li> + <li>Apache Software License 1.1 (available at <a + href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>) + </li> + <li>Apache Software License 2.0 (available at <a + href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>) + </li> + <li>Mozilla Public License Version 1.1 (available at <a + href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>) + </li> + </ul> + <p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND + CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, + or Feature Update License is provided, please contact the Eclipse + Foundation to determine what terms and conditions govern that + particular Content.</p> + <h3>Use of Provisioning Technology</h3> + <p> + The Eclipse Foundation makes available provisioning software, examples + of which include, but are not limited to, p2 and the Eclipse Update + Manager ("Provisioning Technology") for the purpose of + allowing users to install software, documentation, information and/or + other materials (collectively "Installable Software"). This + capability is provided with the intent of allowing such users to + install, extend and update Eclipse-based products. Information about + packaging Installable Software is available at <a + href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a> + ("Specification"). + </p> + <p>You may use Provisioning Technology to allow other parties to + install Installable Software. You shall be responsible for enabling + the applicable license agreements relating to the Installable Software + to be presented to, and accepted by, the users of the Provisioning + Technology in accordance with the Specification. By using Provisioning + Technology in such a manner and making it available in accordance with + the Specification, you further acknowledge your agreement to, and the + acquisition of all necessary rights to permit the following:</p> + <ol> + <li>A series of actions may occur ("Provisioning + Process") in which a user may execute the Provisioning + Technology on a machine ("Target Machine") with the intent + of installing, extending or updating the functionality of an + Eclipse-based product.</li> + <li>During the Provisioning Process, the Provisioning Technology + may cause third party Installable Software or a portion thereof to be + accessed and copied to the Target Machine.</li> + <li>Pursuant to the Specification, you will provide to the user + the terms and conditions that govern the use of the Installable + Software ("Installable Software Agreement") and such + Installable Software Agreement shall be accessed from the Target + Machine in accordance with the Specification. Such Installable + Software Agreement must inform the user of the terms and conditions + that govern the Installable Software and must solicit acceptance by + the end user in the manner prescribed in such Installable Software + Agreement. Upon such indication of agreement by the user, the + provisioning Technology will complete installation of the Installable + Software.</li> + </ol> + <h3>Cryptography</h3> + <p>Content may contain encryption software. The country in which + you are currently may have restrictions on the import, possession, and + use, and/or re-export to another country, of encryption software. + BEFORE using any encryption software, please check the country's laws, + regulations and policies concerning the import, possession, or use, + and re-export of encryption software, to see if this is permitted.</p> + <p> + <small>Java and all Java-based trademarks are trademarks of + Oracle Corporation in the United States, other countries, or both.</small> + </p> +</body> +</html>
\ No newline at end of file diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/pom.xml b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/pom.xml new file mode 100644 index 0000000000..19905b6255 --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.jsch.feature/pom.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (C) 2020, Matthias Sohn <matthias.sohn@sap.com> and others + + This program and the accompanying materials are made available under the + terms of the Eclipse Distribution License v. 1.0 which is available at + http://www.eclipse.org/org/documents/edl-v10.php. + + SPDX-License-Identifier: BSD-3-Clause +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.eclipse.jgit</groupId> + <artifactId>jgit.tycho.parent</artifactId> + <version>5.8.0-SNAPSHOT</version> + </parent> + + <groupId>org.eclipse.jgit.feature</groupId> + <artifactId>org.eclipse.jgit.ssh.jsch</artifactId> + <packaging>eclipse-feature</packaging> + + <name>JGit - Ssh support using JCraft jsch</name> + <dependencies> + + <dependency> + <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit.ssh.jsch</artifactId> + <version>${project.version}</version> + </dependency> + + </dependencies> + +</project> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target index f4c2acf7d8..452503a330 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target @@ -1,26 +1,26 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.10" sequenceNumber="1588775715"> +<target name="jgit-4.10" sequenceNumber="1590935844"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> - <unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.client.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.continuation" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.continuation.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.http" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.http.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.io" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.io.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.security" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.security.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.server" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.server.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.servlet" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.servlet.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.util" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.util.source" version="9.4.25.v20191220"/> - <repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.25.v20191220/"/> + <unit id="org.eclipse.jetty.client" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.client.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.continuation" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.continuation.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.http" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.http.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.io" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.io.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.security" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.security.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.server" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.server.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.servlet" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.servlet.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.util" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.util.source" version="9.4.28.v20200408"/> + <repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.28.v20200408/"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="com.google.gson" version="2.8.2.v20180104-1110"/> @@ -39,8 +39,8 @@ <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/> <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> - <unit id="org.apache.ant" version="1.10.7.v20190926-0324"/> - <unit id="org.apache.ant.source" version="1.10.7.v20190926-0324"/> + <unit id="org.apache.ant" version="1.10.8.v20200515-1239"/> + <unit id="org.apache.ant.source" version="1.10.8.v20200515-1239"/> <unit id="org.apache.commons.codec" version="1.13.0.v20200108-0001"/> <unit id="org.apache.commons.codec.source" version="1.13.0.v20200108-0001"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/> @@ -59,12 +59,12 @@ <unit id="org.apache.sshd.sftp.source" version="2.4.0.v20200319-1547"/> <unit id="org.assertj" version="3.14.0.v20200120-1926"/> <unit id="org.assertj.source" version="3.14.0.v20200120-1926"/> - <unit id="org.bouncycastle.bcpg" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpg.source" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpkix" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpkix.source" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcprov" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcprov.source" version="1.65.0.v20200502-2229"/> + <unit id="org.bouncycastle.bcpg" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpg.source" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpkix" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpkix.source" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcprov" version="1.65.1.v20200529-1514"/> + <unit id="org.bouncycastle.bcprov.source" version="1.65.1.v20200529-1514"/> <unit id="org.hamcrest" version="1.1.0.v20090501071000"/> <unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> @@ -84,7 +84,7 @@ <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/I20200506000552/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd index 34357eee07..717bc0a090 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd @@ -1,7 +1,7 @@ target "jgit-4.10" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20200506000552.tpd" +include "orbit/R20200529191137-2020-06.tpd" location "https://download.eclipse.org/releases/2018-12/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target index b17d13aad7..03e3641d65 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target @@ -1,26 +1,26 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.11" sequenceNumber="1588775715"> +<target name="jgit-4.11" sequenceNumber="1590935852"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> - <unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.client.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.continuation" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.continuation.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.http" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.http.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.io" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.io.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.security" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.security.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.server" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.server.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.servlet" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.servlet.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.util" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.util.source" version="9.4.25.v20191220"/> - <repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.25.v20191220/"/> + <unit id="org.eclipse.jetty.client" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.client.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.continuation" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.continuation.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.http" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.http.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.io" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.io.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.security" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.security.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.server" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.server.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.servlet" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.servlet.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.util" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.util.source" version="9.4.28.v20200408"/> + <repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.28.v20200408/"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="com.google.gson" version="2.8.2.v20180104-1110"/> @@ -39,8 +39,8 @@ <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/> <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> - <unit id="org.apache.ant" version="1.10.7.v20190926-0324"/> - <unit id="org.apache.ant.source" version="1.10.7.v20190926-0324"/> + <unit id="org.apache.ant" version="1.10.8.v20200515-1239"/> + <unit id="org.apache.ant.source" version="1.10.8.v20200515-1239"/> <unit id="org.apache.commons.codec" version="1.13.0.v20200108-0001"/> <unit id="org.apache.commons.codec.source" version="1.13.0.v20200108-0001"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/> @@ -59,12 +59,12 @@ <unit id="org.apache.sshd.sftp.source" version="2.4.0.v20200319-1547"/> <unit id="org.assertj" version="3.14.0.v20200120-1926"/> <unit id="org.assertj.source" version="3.14.0.v20200120-1926"/> - <unit id="org.bouncycastle.bcpg" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpg.source" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpkix" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpkix.source" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcprov" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcprov.source" version="1.65.0.v20200502-2229"/> + <unit id="org.bouncycastle.bcpg" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpg.source" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpkix" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpkix.source" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcprov" version="1.65.1.v20200529-1514"/> + <unit id="org.bouncycastle.bcprov.source" version="1.65.1.v20200529-1514"/> <unit id="org.hamcrest" version="1.1.0.v20090501071000"/> <unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> @@ -84,7 +84,7 @@ <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/I20200506000552/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd index f7c0a5b7d9..9abd9b2d3c 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd @@ -1,7 +1,7 @@ target "jgit-4.11" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20200506000552.tpd" +include "orbit/R20200529191137-2020-06.tpd" location "https://download.eclipse.org/releases/2019-03/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target index f72699b73a..2c09a1770c 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target @@ -1,26 +1,26 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.12" sequenceNumber="1588775715"> +<target name="jgit-4.12" sequenceNumber="1590935859"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> - <unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.client.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.continuation" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.continuation.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.http" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.http.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.io" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.io.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.security" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.security.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.server" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.server.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.servlet" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.servlet.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.util" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.util.source" version="9.4.25.v20191220"/> - <repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.25.v20191220/"/> + <unit id="org.eclipse.jetty.client" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.client.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.continuation" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.continuation.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.http" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.http.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.io" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.io.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.security" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.security.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.server" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.server.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.servlet" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.servlet.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.util" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.util.source" version="9.4.28.v20200408"/> + <repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.28.v20200408/"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="com.google.gson" version="2.8.2.v20180104-1110"/> @@ -39,8 +39,8 @@ <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/> <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> - <unit id="org.apache.ant" version="1.10.7.v20190926-0324"/> - <unit id="org.apache.ant.source" version="1.10.7.v20190926-0324"/> + <unit id="org.apache.ant" version="1.10.8.v20200515-1239"/> + <unit id="org.apache.ant.source" version="1.10.8.v20200515-1239"/> <unit id="org.apache.commons.codec" version="1.13.0.v20200108-0001"/> <unit id="org.apache.commons.codec.source" version="1.13.0.v20200108-0001"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/> @@ -59,12 +59,12 @@ <unit id="org.apache.sshd.sftp.source" version="2.4.0.v20200319-1547"/> <unit id="org.assertj" version="3.14.0.v20200120-1926"/> <unit id="org.assertj.source" version="3.14.0.v20200120-1926"/> - <unit id="org.bouncycastle.bcpg" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpg.source" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpkix" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpkix.source" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcprov" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcprov.source" version="1.65.0.v20200502-2229"/> + <unit id="org.bouncycastle.bcpg" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpg.source" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpkix" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpkix.source" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcprov" version="1.65.1.v20200529-1514"/> + <unit id="org.bouncycastle.bcprov.source" version="1.65.1.v20200529-1514"/> <unit id="org.hamcrest" version="1.1.0.v20090501071000"/> <unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> @@ -84,7 +84,7 @@ <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/I20200506000552/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd index 4be47a478e..e668a9df80 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd @@ -1,7 +1,7 @@ target "jgit-4.12" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20200506000552.tpd" +include "orbit/R20200529191137-2020-06.tpd" location "https://download.eclipse.org/releases/2019-06/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target index 7be48e5531..b92beb48b9 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target @@ -1,26 +1,26 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.13" sequenceNumber="1588775715"> +<target name="jgit-4.13" sequenceNumber="1590935871"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> - <unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.client.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.continuation" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.continuation.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.http" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.http.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.io" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.io.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.security" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.security.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.server" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.server.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.servlet" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.servlet.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.util" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.util.source" version="9.4.25.v20191220"/> - <repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.25.v20191220/"/> + <unit id="org.eclipse.jetty.client" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.client.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.continuation" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.continuation.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.http" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.http.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.io" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.io.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.security" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.security.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.server" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.server.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.servlet" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.servlet.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.util" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.util.source" version="9.4.28.v20200408"/> + <repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.28.v20200408/"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="com.google.gson" version="2.8.2.v20180104-1110"/> @@ -39,8 +39,8 @@ <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/> <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> - <unit id="org.apache.ant" version="1.10.7.v20190926-0324"/> - <unit id="org.apache.ant.source" version="1.10.7.v20190926-0324"/> + <unit id="org.apache.ant" version="1.10.8.v20200515-1239"/> + <unit id="org.apache.ant.source" version="1.10.8.v20200515-1239"/> <unit id="org.apache.commons.codec" version="1.13.0.v20200108-0001"/> <unit id="org.apache.commons.codec.source" version="1.13.0.v20200108-0001"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/> @@ -59,12 +59,12 @@ <unit id="org.apache.sshd.sftp.source" version="2.4.0.v20200319-1547"/> <unit id="org.assertj" version="3.14.0.v20200120-1926"/> <unit id="org.assertj.source" version="3.14.0.v20200120-1926"/> - <unit id="org.bouncycastle.bcpg" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpg.source" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpkix" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpkix.source" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcprov" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcprov.source" version="1.65.0.v20200502-2229"/> + <unit id="org.bouncycastle.bcpg" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpg.source" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpkix" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpkix.source" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcprov" version="1.65.1.v20200529-1514"/> + <unit id="org.bouncycastle.bcprov.source" version="1.65.1.v20200529-1514"/> <unit id="org.hamcrest" version="1.1.0.v20090501071000"/> <unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> @@ -84,7 +84,7 @@ <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/I20200506000552/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd index 3c3dd50c40..0499e3f163 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd @@ -1,7 +1,7 @@ target "jgit-4.13" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20200506000552.tpd" +include "orbit/R20200529191137-2020-06.tpd" location "https://download.eclipse.org/releases/2019-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target index 02330c92d2..6ab40f0427 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target @@ -1,26 +1,26 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.14-staging" sequenceNumber="1588775715"> +<target name="jgit-4.14-staging" sequenceNumber="1590935878"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> - <unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.client.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.continuation" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.continuation.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.http" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.http.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.io" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.io.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.security" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.security.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.server" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.server.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.servlet" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.servlet.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.util" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.util.source" version="9.4.25.v20191220"/> - <repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.25.v20191220/"/> + <unit id="org.eclipse.jetty.client" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.client.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.continuation" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.continuation.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.http" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.http.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.io" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.io.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.security" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.security.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.server" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.server.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.servlet" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.servlet.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.util" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.util.source" version="9.4.28.v20200408"/> + <repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.28.v20200408/"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="com.google.gson" version="2.8.2.v20180104-1110"/> @@ -39,8 +39,8 @@ <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/> <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> - <unit id="org.apache.ant" version="1.10.7.v20190926-0324"/> - <unit id="org.apache.ant.source" version="1.10.7.v20190926-0324"/> + <unit id="org.apache.ant" version="1.10.8.v20200515-1239"/> + <unit id="org.apache.ant.source" version="1.10.8.v20200515-1239"/> <unit id="org.apache.commons.codec" version="1.13.0.v20200108-0001"/> <unit id="org.apache.commons.codec.source" version="1.13.0.v20200108-0001"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/> @@ -59,12 +59,12 @@ <unit id="org.apache.sshd.sftp.source" version="2.4.0.v20200319-1547"/> <unit id="org.assertj" version="3.14.0.v20200120-1926"/> <unit id="org.assertj.source" version="3.14.0.v20200120-1926"/> - <unit id="org.bouncycastle.bcpg" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpg.source" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpkix" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpkix.source" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcprov" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcprov.source" version="1.65.0.v20200502-2229"/> + <unit id="org.bouncycastle.bcpg" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpg.source" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpkix" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpkix.source" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcprov" version="1.65.1.v20200529-1514"/> + <unit id="org.bouncycastle.bcprov.source" version="1.65.1.v20200529-1514"/> <unit id="org.hamcrest" version="1.1.0.v20090501071000"/> <unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> @@ -84,7 +84,7 @@ <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/I20200506000552/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd index 69fb2bb0da..c2fa119d1a 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd @@ -1,7 +1,7 @@ target "jgit-4.14-staging" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20200506000552.tpd" +include "orbit/R20200529191137-2020-06.tpd" location "https://download.eclipse.org/releases/2019-12/201912181000/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15-staging.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15-staging.tpd deleted file mode 100644 index 84bad578c0..0000000000 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15-staging.tpd +++ /dev/null @@ -1,8 +0,0 @@ -target "jgit-4.14-staging" with source configurePhase - -include "projects/jetty-9.4.x.tpd" -include "orbit/I20200506000552.tpd" - -location "https://download.eclipse.org/staging/2020-03/" { - org.eclipse.osgi lazy -} diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target new file mode 100644 index 0000000000..a7ca0dc72a --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target @@ -0,0 +1,94 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<?pde?> +<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> +<target name="jgit-4.15" sequenceNumber="1590935883"> + <locations> + <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> + <unit id="org.eclipse.jetty.client" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.client.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.continuation" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.continuation.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.http" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.http.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.io" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.io.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.security" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.security.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.server" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.server.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.servlet" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.servlet.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.util" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.util.source" version="9.4.28.v20200408"/> + <repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.28.v20200408/"/> + </location> + <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> + <unit id="com.google.gson" version="2.8.2.v20180104-1110"/> + <unit id="com.google.gson.source" version="2.8.2.v20180104-1110"/> + <unit id="com.jcraft.jsch" version="0.1.55.v20190404-1902"/> + <unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/> + <unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/> + <unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/> + <unit id="javaewah" version="1.1.7.v20200107-0831"/> + <unit id="javaewah.source" version="1.1.7.v20200107-0831"/> + <unit id="javax.servlet" version="3.1.0.v201410161800"/> + <unit id="javax.servlet.source" version="3.1.0.v201410161800"/> + <unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/> + <unit id="net.bytebuddy.byte-buddy-agent" version="1.9.0.v20181106-1534"/> + <unit id="net.bytebuddy.byte-buddy-agent.source" version="1.9.0.v20181106-1534"/> + <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/> + <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/> + <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> + <unit id="org.apache.ant" version="1.10.8.v20200515-1239"/> + <unit id="org.apache.ant.source" version="1.10.8.v20200515-1239"/> + <unit id="org.apache.commons.codec" version="1.13.0.v20200108-0001"/> + <unit id="org.apache.commons.codec.source" version="1.13.0.v20200108-0001"/> + <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/> + <unit id="org.apache.commons.compress.source" version="1.19.0.v20200106-2343"/> + <unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/> + <unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/> + <unit id="org.apache.httpcomponents.httpclient" version="4.5.10.v20200114-1512"/> + <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.10.v20200114-1512"/> + <unit id="org.apache.httpcomponents.httpcore" version="4.4.12.v20200108-1212"/> + <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.12.v20200108-1212"/> + <unit id="org.apache.log4j" version="1.2.15.v201012070815"/> + <unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/> + <unit id="org.apache.sshd.osgi" version="2.4.0.v20200318-1614"/> + <unit id="org.apache.sshd.osgi.source" version="2.4.0.v20200318-1614"/> + <unit id="org.apache.sshd.sftp" version="2.4.0.v20200319-1547"/> + <unit id="org.apache.sshd.sftp.source" version="2.4.0.v20200319-1547"/> + <unit id="org.assertj" version="3.14.0.v20200120-1926"/> + <unit id="org.assertj.source" version="3.14.0.v20200120-1926"/> + <unit id="org.bouncycastle.bcpg" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpg.source" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpkix" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpkix.source" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcprov" version="1.65.1.v20200529-1514"/> + <unit id="org.bouncycastle.bcprov.source" version="1.65.1.v20200529-1514"/> + <unit id="org.hamcrest" version="1.1.0.v20090501071000"/> + <unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/> + <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> + <unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/> + <unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/> + <unit id="org.junit" version="4.13.0.v20200204-1500"/> + <unit id="org.junit.source" version="4.13.0.v20200204-1500"/> + <unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/> + <unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/> + <unit id="org.mockito" version="2.23.0.v20200310-1642"/> + <unit id="org.mockito.source" version="2.23.0.v20200310-1642"/> + <unit id="org.objenesis" version="2.6.0.v20180420-1519"/> + <unit id="org.objenesis.source" version="2.6.0.v20180420-1519"/> + <unit id="org.slf4j.api" version="1.7.2.v20121108-1250"/> + <unit id="org.slf4j.api.source" version="1.7.2.v20121108-1250"/> + <unit id="org.slf4j.impl.log4j12" version="1.7.2.v20131105-2200"/> + <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> + <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> + <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/repository"/> + </location> + <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> + <unit id="org.eclipse.osgi" version="0.0.0"/> + <repository location="https://download.eclipse.org/releases/2020-03/202003181000/"/> + </location> + </locations> +</target> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd new file mode 100644 index 0000000000..ff55a7d966 --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd @@ -0,0 +1,8 @@ +target "jgit-4.15" with source configurePhase + +include "projects/jetty-9.4.x.tpd" +include "orbit/R20200529191137-2020-06.tpd" + +location "https://download.eclipse.org/releases/2020-03/202003181000/" { + org.eclipse.osgi lazy +} diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15-staging.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16-staging.target index f070f48c2d..0aff7968e2 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15-staging.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16-staging.target @@ -1,26 +1,26 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.14-staging" sequenceNumber="1588775715"> +<target name="jgit-4.15" sequenceNumber="1590935890"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> - <unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.client.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.continuation" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.continuation.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.http" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.http.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.io" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.io.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.security" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.security.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.server" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.server.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.servlet" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.servlet.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.util" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.util.source" version="9.4.25.v20191220"/> - <repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.25.v20191220/"/> + <unit id="org.eclipse.jetty.client" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.client.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.continuation" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.continuation.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.http" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.http.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.io" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.io.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.security" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.security.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.server" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.server.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.servlet" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.servlet.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.util" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.util.source" version="9.4.28.v20200408"/> + <repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.28.v20200408/"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="com.google.gson" version="2.8.2.v20180104-1110"/> @@ -39,8 +39,8 @@ <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/> <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> - <unit id="org.apache.ant" version="1.10.7.v20190926-0324"/> - <unit id="org.apache.ant.source" version="1.10.7.v20190926-0324"/> + <unit id="org.apache.ant" version="1.10.8.v20200515-1239"/> + <unit id="org.apache.ant.source" version="1.10.8.v20200515-1239"/> <unit id="org.apache.commons.codec" version="1.13.0.v20200108-0001"/> <unit id="org.apache.commons.codec.source" version="1.13.0.v20200108-0001"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/> @@ -59,12 +59,12 @@ <unit id="org.apache.sshd.sftp.source" version="2.4.0.v20200319-1547"/> <unit id="org.assertj" version="3.14.0.v20200120-1926"/> <unit id="org.assertj.source" version="3.14.0.v20200120-1926"/> - <unit id="org.bouncycastle.bcpg" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpg.source" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpkix" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpkix.source" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcprov" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcprov.source" version="1.65.0.v20200502-2229"/> + <unit id="org.bouncycastle.bcpg" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpg.source" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpkix" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpkix.source" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcprov" version="1.65.1.v20200529-1514"/> + <unit id="org.bouncycastle.bcprov.source" version="1.65.1.v20200529-1514"/> <unit id="org.hamcrest" version="1.1.0.v20090501071000"/> <unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> @@ -84,11 +84,11 @@ <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/I20200506000552/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> - <repository location="https://download.eclipse.org/staging/2020-03/"/> + <repository location="https://download.eclipse.org/staging/2020-06/"/> </location> </locations> </target> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16-staging.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16-staging.tpd new file mode 100644 index 0000000000..777aaf3ce2 --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16-staging.tpd @@ -0,0 +1,8 @@ +target "jgit-4.15" with source configurePhase + +include "projects/jetty-9.4.x.tpd" +include "orbit/R20200529191137-2020-06.tpd" + +location "https://download.eclipse.org/staging/2020-06/" { + org.eclipse.osgi lazy +} diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target index 4a40ec0f98..b07ddd0058 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target @@ -1,26 +1,26 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.6" sequenceNumber="1588775729"> +<target name="jgit-4.6" sequenceNumber="1590935806"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> - <unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.client.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.continuation" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.continuation.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.http" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.http.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.io" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.io.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.security" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.security.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.server" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.server.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.servlet" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.servlet.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.util" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.util.source" version="9.4.25.v20191220"/> - <repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.25.v20191220/"/> + <unit id="org.eclipse.jetty.client" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.client.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.continuation" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.continuation.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.http" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.http.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.io" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.io.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.security" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.security.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.server" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.server.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.servlet" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.servlet.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.util" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.util.source" version="9.4.28.v20200408"/> + <repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.28.v20200408/"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="com.google.gson" version="2.8.2.v20180104-1110"/> @@ -39,8 +39,8 @@ <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/> <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> - <unit id="org.apache.ant" version="1.10.7.v20190926-0324"/> - <unit id="org.apache.ant.source" version="1.10.7.v20190926-0324"/> + <unit id="org.apache.ant" version="1.10.8.v20200515-1239"/> + <unit id="org.apache.ant.source" version="1.10.8.v20200515-1239"/> <unit id="org.apache.commons.codec" version="1.13.0.v20200108-0001"/> <unit id="org.apache.commons.codec.source" version="1.13.0.v20200108-0001"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/> @@ -59,12 +59,12 @@ <unit id="org.apache.sshd.sftp.source" version="2.4.0.v20200319-1547"/> <unit id="org.assertj" version="3.14.0.v20200120-1926"/> <unit id="org.assertj.source" version="3.14.0.v20200120-1926"/> - <unit id="org.bouncycastle.bcpg" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpg.source" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpkix" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpkix.source" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcprov" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcprov.source" version="1.65.0.v20200502-2229"/> + <unit id="org.bouncycastle.bcpg" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpg.source" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpkix" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpkix.source" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcprov" version="1.65.1.v20200529-1514"/> + <unit id="org.bouncycastle.bcprov.source" version="1.65.1.v20200529-1514"/> <unit id="org.hamcrest" version="1.1.0.v20090501071000"/> <unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> @@ -84,7 +84,7 @@ <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/I20200506000552/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd index 8c8253597a..d0c3c1bcfc 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd @@ -1,7 +1,7 @@ target "jgit-4.6" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20200506000552.tpd" +include "orbit/R20200529191137-2020-06.tpd" location "https://download.eclipse.org/releases/neon/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target index 0a704200e4..351b0fc0e1 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target @@ -1,26 +1,26 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.7" sequenceNumber="1588775719"> +<target name="jgit-4.7" sequenceNumber="1590935820"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> - <unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.client.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.continuation" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.continuation.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.http" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.http.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.io" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.io.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.security" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.security.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.server" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.server.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.servlet" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.servlet.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.util" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.util.source" version="9.4.25.v20191220"/> - <repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.25.v20191220/"/> + <unit id="org.eclipse.jetty.client" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.client.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.continuation" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.continuation.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.http" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.http.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.io" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.io.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.security" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.security.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.server" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.server.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.servlet" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.servlet.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.util" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.util.source" version="9.4.28.v20200408"/> + <repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.28.v20200408/"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="com.google.gson" version="2.8.2.v20180104-1110"/> @@ -39,8 +39,8 @@ <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/> <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> - <unit id="org.apache.ant" version="1.10.7.v20190926-0324"/> - <unit id="org.apache.ant.source" version="1.10.7.v20190926-0324"/> + <unit id="org.apache.ant" version="1.10.8.v20200515-1239"/> + <unit id="org.apache.ant.source" version="1.10.8.v20200515-1239"/> <unit id="org.apache.commons.codec" version="1.13.0.v20200108-0001"/> <unit id="org.apache.commons.codec.source" version="1.13.0.v20200108-0001"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/> @@ -59,12 +59,12 @@ <unit id="org.apache.sshd.sftp.source" version="2.4.0.v20200319-1547"/> <unit id="org.assertj" version="3.14.0.v20200120-1926"/> <unit id="org.assertj.source" version="3.14.0.v20200120-1926"/> - <unit id="org.bouncycastle.bcpg" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpg.source" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpkix" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpkix.source" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcprov" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcprov.source" version="1.65.0.v20200502-2229"/> + <unit id="org.bouncycastle.bcpg" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpg.source" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpkix" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpkix.source" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcprov" version="1.65.1.v20200529-1514"/> + <unit id="org.bouncycastle.bcprov.source" version="1.65.1.v20200529-1514"/> <unit id="org.hamcrest" version="1.1.0.v20090501071000"/> <unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> @@ -84,7 +84,7 @@ <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/I20200506000552/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd index baa228a702..19790ff0ac 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd @@ -1,7 +1,7 @@ target "jgit-4.7" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20200506000552.tpd" +include "orbit/R20200529191137-2020-06.tpd" location "https://download.eclipse.org/releases/oxygen/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target index fa0413746c..be6108d489 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target @@ -1,26 +1,26 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.8" sequenceNumber="1588775715"> +<target name="jgit-4.8" sequenceNumber="1590935828"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> - <unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.client.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.continuation" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.continuation.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.http" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.http.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.io" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.io.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.security" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.security.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.server" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.server.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.servlet" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.servlet.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.util" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.util.source" version="9.4.25.v20191220"/> - <repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.25.v20191220/"/> + <unit id="org.eclipse.jetty.client" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.client.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.continuation" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.continuation.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.http" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.http.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.io" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.io.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.security" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.security.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.server" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.server.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.servlet" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.servlet.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.util" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.util.source" version="9.4.28.v20200408"/> + <repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.28.v20200408/"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="com.google.gson" version="2.8.2.v20180104-1110"/> @@ -39,8 +39,8 @@ <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/> <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> - <unit id="org.apache.ant" version="1.10.7.v20190926-0324"/> - <unit id="org.apache.ant.source" version="1.10.7.v20190926-0324"/> + <unit id="org.apache.ant" version="1.10.8.v20200515-1239"/> + <unit id="org.apache.ant.source" version="1.10.8.v20200515-1239"/> <unit id="org.apache.commons.codec" version="1.13.0.v20200108-0001"/> <unit id="org.apache.commons.codec.source" version="1.13.0.v20200108-0001"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/> @@ -59,12 +59,12 @@ <unit id="org.apache.sshd.sftp.source" version="2.4.0.v20200319-1547"/> <unit id="org.assertj" version="3.14.0.v20200120-1926"/> <unit id="org.assertj.source" version="3.14.0.v20200120-1926"/> - <unit id="org.bouncycastle.bcpg" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpg.source" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpkix" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpkix.source" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcprov" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcprov.source" version="1.65.0.v20200502-2229"/> + <unit id="org.bouncycastle.bcpg" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpg.source" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpkix" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpkix.source" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcprov" version="1.65.1.v20200529-1514"/> + <unit id="org.bouncycastle.bcprov.source" version="1.65.1.v20200529-1514"/> <unit id="org.hamcrest" version="1.1.0.v20090501071000"/> <unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> @@ -84,7 +84,7 @@ <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/I20200506000552/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd index e60b7b5566..5fe27fcf62 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd @@ -1,7 +1,7 @@ target "jgit-4.8" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20200506000552.tpd" +include "orbit/R20200529191137-2020-06.tpd" location "https://download.eclipse.org/releases/photon/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target index 4db5e3b1c5..b9ad2cbacb 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target @@ -1,26 +1,26 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <?pde?> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> -<target name="jgit-4.9" sequenceNumber="1588775715"> +<target name="jgit-4.9" sequenceNumber="1590935836"> <locations> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> - <unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.client.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.continuation" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.continuation.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.http" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.http.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.io" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.io.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.security" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.security.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.server" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.server.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.servlet" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.servlet.source" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.util" version="9.4.25.v20191220"/> - <unit id="org.eclipse.jetty.util.source" version="9.4.25.v20191220"/> - <repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.25.v20191220/"/> + <unit id="org.eclipse.jetty.client" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.client.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.continuation" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.continuation.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.http" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.http.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.io" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.io.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.security" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.security.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.server" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.server.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.servlet" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.servlet.source" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.util" version="9.4.28.v20200408"/> + <unit id="org.eclipse.jetty.util.source" version="9.4.28.v20200408"/> + <repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.28.v20200408/"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="com.google.gson" version="2.8.2.v20180104-1110"/> @@ -39,8 +39,8 @@ <unit id="net.bytebuddy.byte-buddy.source" version="1.9.0.v20181107-1410"/> <unit id="net.i2p.crypto.eddsa" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> - <unit id="org.apache.ant" version="1.10.7.v20190926-0324"/> - <unit id="org.apache.ant.source" version="1.10.7.v20190926-0324"/> + <unit id="org.apache.ant" version="1.10.8.v20200515-1239"/> + <unit id="org.apache.ant.source" version="1.10.8.v20200515-1239"/> <unit id="org.apache.commons.codec" version="1.13.0.v20200108-0001"/> <unit id="org.apache.commons.codec.source" version="1.13.0.v20200108-0001"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/> @@ -59,12 +59,12 @@ <unit id="org.apache.sshd.sftp.source" version="2.4.0.v20200319-1547"/> <unit id="org.assertj" version="3.14.0.v20200120-1926"/> <unit id="org.assertj.source" version="3.14.0.v20200120-1926"/> - <unit id="org.bouncycastle.bcpg" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpg.source" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpkix" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcpkix.source" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcprov" version="1.65.0.v20200502-2229"/> - <unit id="org.bouncycastle.bcprov.source" version="1.65.0.v20200502-2229"/> + <unit id="org.bouncycastle.bcpg" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpg.source" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpkix" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcpkix.source" version="1.65.0.v20200527-1955"/> + <unit id="org.bouncycastle.bcprov" version="1.65.1.v20200529-1514"/> + <unit id="org.bouncycastle.bcprov.source" version="1.65.1.v20200529-1514"/> <unit id="org.hamcrest" version="1.1.0.v20090501071000"/> <unit id="org.hamcrest.core" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> @@ -84,7 +84,7 @@ <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/> <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/> - <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/I20200506000552/repository"/> + <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/repository"/> </location> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <unit id="org.eclipse.osgi" version="0.0.0"/> diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd index af62db9ec6..4e39322b15 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd @@ -1,7 +1,7 @@ target "jgit-4.9" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20200506000552.tpd" +include "orbit/R20200529191137-2020-06.tpd" location "https://download.eclipse.org/releases/2018-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20200529191137-2020-06.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20200529191137-2020-06.tpd new file mode 100644 index 0000000000..b012ecdc5a --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20200529191137-2020-06.tpd @@ -0,0 +1,66 @@ +target "R20200529191137-2020-06" with source configurePhase +// see https://download.eclipse.org/tools/orbit/downloads/ + +location "https://download.eclipse.org/tools/orbit/downloads/drops/R20200529191137/repository" { + com.google.gson [2.8.2.v20180104-1110,2.8.2.v20180104-1110] + com.google.gson.source [2.8.2.v20180104-1110,2.8.2.v20180104-1110] + com.jcraft.jsch [0.1.55.v20190404-1902,0.1.55.v20190404-1902] + com.jcraft.jsch.source [0.1.55.v20190404-1902,0.1.55.v20190404-1902] + com.jcraft.jzlib [1.1.1.v201205102305,1.1.1.v201205102305] + com.jcraft.jzlib.source [1.1.1.v201205102305,1.1.1.v201205102305] + javaewah [1.1.7.v20200107-0831,1.1.7.v20200107-0831] + javaewah.source [1.1.7.v20200107-0831,1.1.7.v20200107-0831] + javax.servlet [3.1.0.v201410161800,3.1.0.v201410161800] + javax.servlet.source [3.1.0.v201410161800,3.1.0.v201410161800] + net.bytebuddy.byte-buddy [1.9.0.v20181107-1410,1.9.0.v20181107-1410] + net.bytebuddy.byte-buddy-agent [1.9.0.v20181106-1534,1.9.0.v20181106-1534] + net.bytebuddy.byte-buddy-agent.source [1.9.0.v20181106-1534,1.9.0.v20181106-1534] + net.bytebuddy.byte-buddy.source [1.9.0.v20181107-1410,1.9.0.v20181107-1410] + net.i2p.crypto.eddsa [0.3.0.v20181102-1323,0.3.0.v20181102-1323] + net.i2p.crypto.eddsa.source [0.3.0.v20181102-1323,0.3.0.v20181102-1323] + org.apache.ant [1.10.8.v20200515-1239,1.10.8.v20200515-1239] + org.apache.ant.source [1.10.8.v20200515-1239,1.10.8.v20200515-1239] + org.apache.commons.codec [1.13.0.v20200108-0001,1.13.0.v20200108-0001] + org.apache.commons.codec.source [1.13.0.v20200108-0001,1.13.0.v20200108-0001] + org.apache.commons.compress [1.19.0.v20200106-2343,1.19.0.v20200106-2343] + org.apache.commons.compress.source [1.19.0.v20200106-2343,1.19.0.v20200106-2343] + org.apache.commons.logging [1.2.0.v20180409-1502,1.2.0.v20180409-1502] + org.apache.commons.logging.source [1.2.0.v20180409-1502,1.2.0.v20180409-1502] + org.apache.httpcomponents.httpclient [4.5.10.v20200114-1512,4.5.10.v20200114-1512] + org.apache.httpcomponents.httpclient.source [4.5.10.v20200114-1512,4.5.10.v20200114-1512] + org.apache.httpcomponents.httpcore [4.4.12.v20200108-1212,4.4.12.v20200108-1212] + org.apache.httpcomponents.httpcore.source [4.4.12.v20200108-1212,4.4.12.v20200108-1212] + org.apache.log4j [1.2.15.v201012070815,1.2.15.v201012070815] + org.apache.log4j.source [1.2.15.v201012070815,1.2.15.v201012070815] + org.apache.sshd.osgi [2.4.0.v20200318-1614,2.4.0.v20200318-1614] + org.apache.sshd.osgi.source [2.4.0.v20200318-1614,2.4.0.v20200318-1614] + org.apache.sshd.sftp [2.4.0.v20200319-1547,2.4.0.v20200319-1547] + org.apache.sshd.sftp.source [2.4.0.v20200319-1547,2.4.0.v20200319-1547] + org.assertj [3.14.0.v20200120-1926,3.14.0.v20200120-1926] + org.assertj.source [3.14.0.v20200120-1926,3.14.0.v20200120-1926] + org.bouncycastle.bcpg [1.65.0.v20200527-1955,1.65.0.v20200527-1955] + org.bouncycastle.bcpg.source [1.65.0.v20200527-1955,1.65.0.v20200527-1955] + org.bouncycastle.bcpkix [1.65.0.v20200527-1955,1.65.0.v20200527-1955] + org.bouncycastle.bcpkix.source [1.65.0.v20200527-1955,1.65.0.v20200527-1955] + org.bouncycastle.bcprov [1.65.1.v20200529-1514,1.65.1.v20200529-1514] + org.bouncycastle.bcprov.source [1.65.1.v20200529-1514,1.65.1.v20200529-1514] + org.hamcrest [1.1.0.v20090501071000,1.1.0.v20090501071000] + org.hamcrest.core [1.3.0.v20180420-1519,1.3.0.v20180420-1519] + org.hamcrest.core.source [1.3.0.v20180420-1519,1.3.0.v20180420-1519] + org.hamcrest.library [1.3.0.v20180524-2246,1.3.0.v20180524-2246] + org.hamcrest.library.source [1.3.0.v20180524-2246,1.3.0.v20180524-2246] + org.junit [4.13.0.v20200204-1500,4.13.0.v20200204-1500] + org.junit.source [4.13.0.v20200204-1500,4.13.0.v20200204-1500] + org.kohsuke.args4j [2.33.0.v20160323-2218,2.33.0.v20160323-2218] + org.kohsuke.args4j.source [2.33.0.v20160323-2218,2.33.0.v20160323-2218] + org.mockito [2.23.0.v20200310-1642,2.23.0.v20200310-1642] + org.mockito.source [2.23.0.v20200310-1642,2.23.0.v20200310-1642] + org.objenesis [2.6.0.v20180420-1519,2.6.0.v20180420-1519] + org.objenesis.source [2.6.0.v20180420-1519,2.6.0.v20180420-1519] + org.slf4j.api [1.7.2.v20121108-1250,1.7.2.v20121108-1250] + org.slf4j.api.source [1.7.2.v20121108-1250,1.7.2.v20121108-1250] + org.slf4j.impl.log4j12 [1.7.2.v20131105-2200,1.7.2.v20131105-2200] + org.slf4j.impl.log4j12.source [1.7.2.v20131105-2200,1.7.2.v20131105-2200] + org.tukaani.xz [1.8.0.v20180207-1613,1.8.0.v20180207-1613] + org.tukaani.xz.source [1.8.0.v20180207-1613,1.8.0.v20180207-1613] +} diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/I20200506000552.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20200519202422.tpd index 5edb2fc4c3..abe97e1fd3 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/I20200506000552.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20200519202422.tpd @@ -1,7 +1,7 @@ -target "I20200506000552" with source configurePhase +target "S20200519202422" with source configurePhase // see https://download.eclipse.org/tools/orbit/downloads/ -location "https://download.eclipse.org/tools/orbit/downloads/drops/I20200506000552/repository" { +location "https://download.eclipse.org/tools/orbit/downloads/drops/S20200519202422/repository" { com.google.gson [2.8.2.v20180104-1110,2.8.2.v20180104-1110] com.google.gson.source [2.8.2.v20180104-1110,2.8.2.v20180104-1110] com.jcraft.jsch [0.1.55.v20190404-1902,0.1.55.v20190404-1902] @@ -18,8 +18,8 @@ location "https://download.eclipse.org/tools/orbit/downloads/drops/I202005060005 net.bytebuddy.byte-buddy.source [1.9.0.v20181107-1410,1.9.0.v20181107-1410] net.i2p.crypto.eddsa [0.3.0.v20181102-1323,0.3.0.v20181102-1323] net.i2p.crypto.eddsa.source [0.3.0.v20181102-1323,0.3.0.v20181102-1323] - org.apache.ant [1.10.7.v20190926-0324,1.10.7.v20190926-0324] - org.apache.ant.source [1.10.7.v20190926-0324,1.10.7.v20190926-0324] + org.apache.ant [1.10.8.v20200515-1239,1.10.8.v20200515-1239] + org.apache.ant.source [1.10.8.v20200515-1239,1.10.8.v20200515-1239] org.apache.commons.codec [1.13.0.v20200108-0001,1.13.0.v20200108-0001] org.apache.commons.codec.source [1.13.0.v20200108-0001,1.13.0.v20200108-0001] org.apache.commons.compress [1.19.0.v20200106-2343,1.19.0.v20200106-2343] diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-9.4.x.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-9.4.x.tpd index fb9bb2d003..0eea06d64c 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-9.4.x.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-9.4.x.tpd @@ -1,20 +1,20 @@ target "jetty-9.4.x" with source configurePhase -location jetty-9.4.25 "https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.25.v20191220/" { - org.eclipse.jetty.client [9.4.25.v20191220,9.4.25.v20191220] - org.eclipse.jetty.client.source [9.4.25.v20191220,9.4.25.v20191220] - org.eclipse.jetty.continuation [9.4.25.v20191220,9.4.25.v20191220] - org.eclipse.jetty.continuation.source [9.4.25.v20191220,9.4.25.v20191220] - org.eclipse.jetty.http [9.4.25.v20191220,9.4.25.v20191220] - org.eclipse.jetty.http.source [9.4.25.v20191220,9.4.25.v20191220] - org.eclipse.jetty.io [9.4.25.v20191220,9.4.25.v20191220] - org.eclipse.jetty.io.source [9.4.25.v20191220,9.4.25.v20191220] - org.eclipse.jetty.security [9.4.25.v20191220,9.4.25.v20191220] - org.eclipse.jetty.security.source [9.4.25.v20191220,9.4.25.v20191220] - org.eclipse.jetty.server [9.4.25.v20191220,9.4.25.v20191220] - org.eclipse.jetty.server.source [9.4.25.v20191220,9.4.25.v20191220] - org.eclipse.jetty.servlet [9.4.25.v20191220,9.4.25.v20191220] - org.eclipse.jetty.servlet.source [9.4.25.v20191220,9.4.25.v20191220] - org.eclipse.jetty.util [9.4.25.v20191220,9.4.25.v20191220] - org.eclipse.jetty.util.source [9.4.25.v20191220,9.4.25.v20191220] +location jetty-9.4.25 "https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.28.v20200408/" { + org.eclipse.jetty.client [9.4.28.v20200408,9.4.28.v20200408] + org.eclipse.jetty.client.source [9.4.28.v20200408,9.4.28.v20200408] + org.eclipse.jetty.continuation [9.4.28.v20200408,9.4.28.v20200408] + org.eclipse.jetty.continuation.source [9.4.28.v20200408,9.4.28.v20200408] + org.eclipse.jetty.http [9.4.28.v20200408,9.4.28.v20200408] + org.eclipse.jetty.http.source [9.4.28.v20200408,9.4.28.v20200408] + org.eclipse.jetty.io [9.4.28.v20200408,9.4.28.v20200408] + org.eclipse.jetty.io.source [9.4.28.v20200408,9.4.28.v20200408] + org.eclipse.jetty.security [9.4.28.v20200408,9.4.28.v20200408] + org.eclipse.jetty.security.source [9.4.28.v20200408,9.4.28.v20200408] + org.eclipse.jetty.server [9.4.28.v20200408,9.4.28.v20200408] + org.eclipse.jetty.server.source [9.4.28.v20200408,9.4.28.v20200408] + org.eclipse.jetty.servlet [9.4.28.v20200408,9.4.28.v20200408] + org.eclipse.jetty.servlet.source [9.4.28.v20200408,9.4.28.v20200408] + org.eclipse.jetty.util [9.4.28.v20200408,9.4.28.v20200408] + org.eclipse.jetty.util.source [9.4.28.v20200408,9.4.28.v20200408] } diff --git a/org.eclipse.jgit.packaging/pom.xml b/org.eclipse.jgit.packaging/pom.xml index 5cbf2aab08..b066b12c23 100644 --- a/org.eclipse.jgit.packaging/pom.xml +++ b/org.eclipse.jgit.packaging/pom.xml @@ -41,8 +41,10 @@ <modules> <module>org.eclipse.jgit.target</module> <module>org.eclipse.jgit.feature</module> + <module>org.eclipse.jgit.gpg.bc.feature</module> <module>org.eclipse.jgit.http.apache.feature</module> <module>org.eclipse.jgit.ssh.apache.feature</module> + <module>org.eclipse.jgit.ssh.jsch.feature</module> <module>org.eclipse.jgit.lfs.feature</module> <module>org.eclipse.jgit.pgm.feature</module> <module>org.eclipse.jgit.source.feature</module> @@ -86,6 +88,12 @@ </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit.gpg.bc</artifactId> + <version>${project.version}</version> + <classifier>sources</classifier> + </dependency> + <dependency> + <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.http.apache</artifactId> <version>${project.version}</version> <classifier>sources</classifier> @@ -140,6 +148,12 @@ </dependency> <dependency> <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit.ssh.jsch</artifactId> + <version>${project.version}</version> + <classifier>sources</classifier> + </dependency> + <dependency> + <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.ui</artifactId> <version>${project.version}</version> <classifier>sources</classifier> diff --git a/org.eclipse.jgit.pgm.test/BUILD b/org.eclipse.jgit.pgm.test/BUILD index 86413b5ff8..539d666883 100644 --- a/org.eclipse.jgit.pgm.test/BUILD +++ b/org.eclipse.jgit.pgm.test/BUILD @@ -21,7 +21,6 @@ junit_tests( "//lib:slf4j-api", "//lib:slf4j-simple", "//lib:xz", - "//org.eclipse.jgit.archive:jgit-archive", "//org.eclipse.jgit:jgit", "//org.eclipse.jgit.junit:junit", "//org.eclipse.jgit.pgm:pgm", diff --git a/org.eclipse.jgit.pgm.test/pom.xml b/org.eclipse.jgit.pgm.test/pom.xml index 9ef8a4aed3..86ec1f1bfb 100644 --- a/org.eclipse.jgit.pgm.test/pom.xml +++ b/org.eclipse.jgit.pgm.test/pom.xml @@ -52,6 +52,12 @@ </dependency> <dependency> + <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit.ssh.jsch</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> <groupId>org.tukaani</groupId> <artifactId>xz</artifactId> <optional>true</optional> diff --git a/org.eclipse.jgit.pgm/BUILD b/org.eclipse.jgit.pgm/BUILD index 18607ea6ea..2593122f40 100644 --- a/org.eclipse.jgit.pgm/BUILD +++ b/org.eclipse.jgit.pgm/BUILD @@ -6,8 +6,11 @@ java_library( resource_strip_prefix = "org.eclipse.jgit.pgm/resources", resources = glob(["resources/**"]), visibility = ["//visibility:public"], - deps = [ + runtime_deps = [ ":services", + "//org.eclipse.jgit.gpg.bc:gpg-bc", + ], + deps = [ "//lib:args4j", "//lib:commons-logging", "//lib:httpclient", @@ -25,6 +28,7 @@ java_library( "//org.eclipse.jgit.lfs:jgit-lfs", "//org.eclipse.jgit.lfs.server:jgit-lfs-server", "//org.eclipse.jgit.ssh.apache:ssh-apache", + "//org.eclipse.jgit.ssh.jsch:ssh-jsch", "//org.eclipse.jgit.ui:ui", ], ) diff --git a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF index 06728de622..afe2da94db 100644 --- a/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.pgm/META-INF/MANIFEST.MF @@ -5,29 +5,14 @@ Automatic-Module-Name: org.eclipse.jgit.pgm Bundle-SymbolicName: org.eclipse.jgit.pgm Bundle-Version: 5.8.0.qualifier Bundle-Vendor: %Bundle-Vendor -Bundle-ActivationPolicy: lazy Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Import-Package: javax.servlet;version="[3.1.0,4.0.0)", - javax.servlet.http;version="[3.1.0,4.0.0)", - org.apache.commons.compress.archivers;version="[1.3,2.0)", - org.apache.commons.compress.archivers.tar;version="[1.3,2.0)", - org.apache.commons.compress.archivers.zip;version="[1.3,2.0)", - org.apache.commons.logging;version="1.1.1", - org.eclipse.jetty.continuation;version="[9.4.5,10.0.0)", - org.eclipse.jetty.http;version="[9.4.5,10.0.0)", - org.eclipse.jetty.io;version="[9.4.5,10.0.0)", - org.eclipse.jetty.security;version="[9.4.5,10.0.0)", - org.eclipse.jetty.security.authentication;version="[9.4.5,10.0.0)", org.eclipse.jetty.server;version="[9.4.5,10.0.0)", org.eclipse.jetty.server.handler;version="[9.4.5,10.0.0)", - org.eclipse.jetty.server.nio;version="[9.4.5,10.0.0)", org.eclipse.jetty.servlet;version="[9.4.5,10.0.0)", org.eclipse.jetty.util;version="[9.4.5,10.0.0)", org.eclipse.jetty.util.component;version="[9.4.5,10.0.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.thread;version="[9.4.5,10.0.0)", org.eclipse.jgit.api;version="[5.8.0,5.9.0)", org.eclipse.jgit.api.errors;version="[5.8.0,5.9.0)", org.eclipse.jgit.archive;version="[5.8.0,5.9.0)", @@ -38,14 +23,12 @@ Import-Package: javax.servlet;version="[3.1.0,4.0.0)", org.eclipse.jgit.errors;version="[5.8.0,5.9.0)", org.eclipse.jgit.gitrepo;version="[5.8.0,5.9.0)", org.eclipse.jgit.internal.ketch;version="[5.8.0,5.9.0)", - org.eclipse.jgit.internal.storage.dfs;version="[5.8.0,5.9.0)", org.eclipse.jgit.internal.storage.file;version="[5.8.0,5.9.0)", org.eclipse.jgit.internal.storage.io;version="[5.8.0,5.9.0)", org.eclipse.jgit.internal.storage.pack;version="[5.8.0,5.9.0)", org.eclipse.jgit.internal.storage.reftable;version="[5.8.0,5.9.0)", org.eclipse.jgit.internal.storage.reftree;version="[5.8.0,5.9.0)", org.eclipse.jgit.lfs;version="[5.8.0,5.9.0)", - org.eclipse.jgit.lfs.lib;version="[5.8.0,5.9.0)", org.eclipse.jgit.lfs.server;version="[5.8.0,5.9.0)", org.eclipse.jgit.lfs.server.fs;version="[5.8.0,5.9.0)", org.eclipse.jgit.lfs.server.s3;version="[5.8.0,5.9.0)", @@ -69,27 +52,31 @@ Import-Package: javax.servlet;version="[3.1.0,4.0.0)", org.kohsuke.args4j;version="[2.33.0,3.0.0)", org.kohsuke.args4j.spi;version="[2.33.0,3.0.0)" Export-Package: org.eclipse.jgit.console;version="5.8.0"; - uses:="org.eclipse.jgit.transport, - org.eclipse.jgit.util", + uses:="org.eclipse.jgit.transport, + org.eclipse.jgit.util", org.eclipse.jgit.pgm;version="5.8.0"; - uses:="org.eclipse.jgit.revwalk, - org.eclipse.jgit.treewalk.filter, - org.eclipse.jgit.pgm.opt, - org.eclipse.jgit.diff, - org.eclipse.jgit.awtui, + uses:="org.eclipse.jgit.transport, org.eclipse.jgit.util.io, + org.eclipse.jgit.awtui, org.eclipse.jgit.lib, + org.eclipse.jgit.revwalk, + org.eclipse.jgit.pgm.opt, + org.eclipse.jgit.treewalk.filter, + org.eclipse.jgit.diff, org.eclipse.jgit.treewalk, - javax.swing, - org.eclipse.jgit.transport", + org.eclipse.jgit.api, + javax.swing", org.eclipse.jgit.pgm.debug;version="5.8.0"; uses:="org.eclipse.jgit.util.io, - org.eclipse.jgit.pgm", - org.eclipse.jgit.pgm.internal;version="5.8.0";x-friends:="org.eclipse.jgit.pgm.test,org.eclipse.jgit.test", + org.eclipse.jgit.pgm, + org.eclipse.jetty.servlet", + org.eclipse.jgit.pgm.internal;version="5.8.0"; + x-friends:="org.eclipse.jgit.pgm.test, + org.eclipse.jgit.test", org.eclipse.jgit.pgm.opt;version="5.8.0"; - uses:="org.eclipse.jgit.lib, + uses:="org.kohsuke.args4j, + org.eclipse.jgit.lib, org.eclipse.jgit.revwalk, - org.kohsuke.args4j.spi, - org.kohsuke.args4j" + org.kohsuke.args4j.spi" Main-Class: org.eclipse.jgit.pgm.Main Implementation-Title: JGit Command Line Interface diff --git a/org.eclipse.jgit.pgm/build.properties b/org.eclipse.jgit.pgm/build.properties index 6365cbb7ee..4b38114d09 100644 --- a/org.eclipse.jgit.pgm/build.properties +++ b/org.eclipse.jgit.pgm/build.properties @@ -5,4 +5,5 @@ output.. = bin/ bin.includes = META-INF/,\ .,\ plugin.properties,\ - about.html + about.html,\ + resources/log4j.properties diff --git a/org.eclipse.jgit.pgm/pom.xml b/org.eclipse.jgit.pgm/pom.xml index 87baa396ca..bc8d8c19b4 100644 --- a/org.eclipse.jgit.pgm/pom.xml +++ b/org.eclipse.jgit.pgm/pom.xml @@ -63,6 +63,12 @@ <dependency> <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit.gpg.bc</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.http.apache</artifactId> <version>${project.version}</version> </dependency> @@ -74,6 +80,12 @@ </dependency> <dependency> + <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit.ssh.jsch</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> </dependency> diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java index 58825f284e..0b02dd148d 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java @@ -36,6 +36,7 @@ import org.eclipse.jgit.pgm.internal.CLIText; import org.eclipse.jgit.pgm.internal.SshDriver; import org.eclipse.jgit.pgm.opt.CmdLineParser; import org.eclipse.jgit.revwalk.RevWalk; +import org.eclipse.jgit.transport.JschConfigSessionFactory; import org.eclipse.jgit.transport.SshSessionFactory; import org.eclipse.jgit.transport.sshd.DefaultProxyDataFactory; import org.eclipse.jgit.transport.sshd.JGitKeyCache; @@ -224,6 +225,9 @@ public abstract class TextBuiltin { break; } case JSCH: + JschConfigSessionFactory factory = new JschConfigSessionFactory(); + SshSessionFactory.setInstance(factory); + break; default: SshSessionFactory.setInstance(null); break; diff --git a/org.eclipse.jgit.ssh.apache.test/BUILD b/org.eclipse.jgit.ssh.apache.test/BUILD index 18a48dca09..b384464484 100644 --- a/org.eclipse.jgit.ssh.apache.test/BUILD +++ b/org.eclipse.jgit.ssh.apache.test/BUILD @@ -13,7 +13,7 @@ junit_tests( "//lib:sshd-osgi", "//lib:sshd-sftp", "//org.eclipse.jgit:jgit", + "//org.eclipse.jgit.junit.ssh:junit-ssh", "//org.eclipse.jgit.ssh.apache:ssh-apache", - "//org.eclipse.jgit.test:sshd-helpers", ], ) diff --git a/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF index 0d00e18d13..62470b1317 100644 --- a/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF @@ -21,9 +21,9 @@ Import-Package: org.apache.sshd.client.config.hosts;version="[2.4.0,2.5.0)", org.eclipse.jgit.junit.ssh;version="[5.8.0,5.9.0)", org.eclipse.jgit.lib;version="[5.8.0,5.9.0)", org.eclipse.jgit.transport;version="[5.8.0,5.9.0)", - org.eclipse.jgit.transport.ssh;version="[5.8.0,5.9.0)", org.eclipse.jgit.transport.sshd;version="[5.8.0,5.9.0)", org.eclipse.jgit.util;version="[5.8.0,5.9.0)", org.junit;version="[4.13,5.0.0)", org.junit.experimental.theories;version="[4.13,5.0.0)", org.junit.runner;version="[4.13,5.0.0)" +Require-Bundle: org.hamcrest.core;bundle-version="[1.3.0,2.0.0)" diff --git a/org.eclipse.jgit.ssh.apache.test/pom.xml b/org.eclipse.jgit.ssh.apache.test/pom.xml index fc2a2525b8..c951e32d3d 100644 --- a/org.eclipse.jgit.ssh.apache.test/pom.xml +++ b/org.eclipse.jgit.ssh.apache.test/pom.xml @@ -51,6 +51,12 @@ <dependency> <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit.junit.ssh</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>org.eclipse.jgit</groupId> <artifactId>org.eclipse.jgit.ssh.apache</artifactId> <version>${project.version}</version> </dependency> diff --git a/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java index fa6450ef4d..bfee04219d 100644 --- a/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java +++ b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java @@ -22,9 +22,9 @@ import java.util.List; import java.util.stream.Collectors; import org.apache.sshd.client.config.hosts.KnownHostEntry; import org.eclipse.jgit.api.errors.TransportException; +import org.eclipse.jgit.junit.ssh.SshTestBase; import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.transport.SshSessionFactory; -import org.eclipse.jgit.transport.ssh.SshTestBase; import org.eclipse.jgit.util.FS; import org.junit.Test; import org.junit.experimental.theories.Theories; diff --git a/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshBuilderTest.java b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshBuilderTest.java new file mode 100644 index 0000000000..9d64adc95e --- /dev/null +++ b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshBuilderTest.java @@ -0,0 +1,152 @@ +/* + * Copyright (C) 2020 Thomas Wolf <thomas.wolf@paranor.ch> and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.transport.sshd; + +import static org.junit.Assert.assertNotNull; + +import java.io.File; +import java.io.IOException; +import java.io.UncheckedIOException; +import java.net.InetSocketAddress; +import java.nio.file.Files; +import java.security.GeneralSecurityException; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.PublicKey; +import java.util.Arrays; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; + +import org.apache.sshd.common.config.keys.KeyUtils; +import org.apache.sshd.common.keyprovider.KeyIdentityProvider; +import org.apache.sshd.common.session.SessionContext; +import org.apache.sshd.common.util.net.SshdSocketAddress; +import org.eclipse.jgit.lib.Constants; +import org.eclipse.jgit.transport.CredentialsProvider; +import org.eclipse.jgit.transport.SshSessionFactory; +import org.eclipse.jgit.junit.ssh.SshTestHarness; +import org.eclipse.jgit.util.FS; +import org.junit.After; +import org.junit.Test; + +/** + * Test for using the SshdSessionFactory without files in ~/.ssh but with an + * in-memory setup, creating the factory via the builder API. + */ +public class NoFilesSshBuilderTest extends SshTestHarness { + + private PublicKey testServerKey; + + private KeyPair testUserKey; + + @Override + protected SshSessionFactory createSessionFactory() { + return new SshdSessionFactoryBuilder() // + .setConfigStoreFactory((h, f, u) -> null) + .setDefaultKeysProvider(f -> new KeyAuthenticator()) + .setServerKeyDatabase((h, s) -> new ServerKeyDatabase() { + + @Override + public List<PublicKey> lookup(String connectAddress, + InetSocketAddress remoteAddress, + Configuration config) { + return Collections.singletonList(testServerKey); + } + + @Override + public boolean accept(String connectAddress, + InetSocketAddress remoteAddress, + PublicKey serverKey, Configuration config, + CredentialsProvider provider) { + return KeyUtils.compareKeys(serverKey, testServerKey); + } + + }) // + .setPreferredAuthentications("publickey") + .setHomeDirectory(FS.DETECTED.userHome()) + .setSshDirectory(sshDir) // + .build(new JGitKeyCache()); + } + + private class KeyAuthenticator + implements KeyIdentityProvider, Iterable<KeyPair> { + + @Override + public Iterator<KeyPair> iterator() { + // Should not be called. The use of the Iterable interface in + // SshdSessionFactory.getDefaultKeys() made sense in sshd 2.0.0, + // but sshd 2.2.0 added the SessionContext, which although good + // (without it we couldn't check here) breaks the Iterable analogy. + // But we're stuck now with that interface for getDefaultKeys, and + // so this override throwing an exception is unfortunately needed. + throw new UnsupportedOperationException(); + } + + @Override + public Iterable<KeyPair> loadKeys(SessionContext session) + throws IOException, GeneralSecurityException { + if (!TEST_USER.equals(session.getUsername())) { + return Collections.emptyList(); + } + SshdSocketAddress remoteAddress = SshdSocketAddress + .toSshdSocketAddress(session.getRemoteAddress()); + switch (remoteAddress.getHostName()) { + case "localhost": + case "127.0.0.1": + return Collections.singletonList(testUserKey); + default: + return Collections.emptyList(); + } + } + } + + @After + public void cleanUp() { + testServerKey = null; + testUserKey = null; + } + + @Override + protected void installConfig(String... config) { + File configFile = new File(sshDir, Constants.CONFIG); + if (config != null) { + try { + Files.write(configFile.toPath(), Arrays.asList(config)); + } catch (IOException e) { + throw new UncheckedIOException(e); + } + } + } + + @Test + public void testCloneWithBuiltInKeys() throws Exception { + // This test should fail unless our in-memory setup is taken: no + // known_hosts file, a config that specifies a non-existing key, + // and the test is using a newly generated KeyPairs anyway. + KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA"); + generator.initialize(2048); + testUserKey = generator.generateKeyPair(); + KeyPair hostKey = generator.generateKeyPair(); + server.addHostKey(hostKey, true); + testServerKey = hostKey.getPublic(); + assertNotNull(testServerKey); + assertNotNull(testUserKey); + server.setTestUserPublicKey(testUserKey.getPublic()); + cloneWith( + "ssh://" + TEST_USER + "@localhost:" + testPort + + "/doesntmatter", + new File(getTemporaryDirectory(), "cloned"), null, // + "Host localhost", // + "IdentityFile " + + new File(sshDir, "does_not_exist").getAbsolutePath()); + } + +} diff --git a/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshTest.java b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshTest.java index 608f647bc5..7b6e508c31 100644 --- a/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshTest.java +++ b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/NoFilesSshTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019 Thomas Wolf <thomas.wolf@paranor.ch> and others + * Copyright (C) 2019, 2020 Thomas Wolf <thomas.wolf@paranor.ch> and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0 which is available at @@ -10,33 +10,29 @@ package org.eclipse.jgit.transport.sshd; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; import java.io.File; import java.io.IOException; -import java.io.InputStream; import java.io.UncheckedIOException; import java.net.InetSocketAddress; import java.nio.file.Files; -import java.nio.file.Path; import java.security.GeneralSecurityException; import java.security.KeyPair; +import java.security.KeyPairGenerator; import java.security.PublicKey; import java.util.Arrays; import java.util.Collections; import java.util.Iterator; import java.util.List; -import org.apache.sshd.common.NamedResource; import org.apache.sshd.common.config.keys.KeyUtils; import org.apache.sshd.common.keyprovider.KeyIdentityProvider; import org.apache.sshd.common.session.SessionContext; import org.apache.sshd.common.util.net.SshdSocketAddress; -import org.apache.sshd.common.util.security.SecurityUtils; +import org.eclipse.jgit.junit.ssh.SshTestHarness; import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.transport.CredentialsProvider; import org.eclipse.jgit.transport.SshSessionFactory; -import org.eclipse.jgit.transport.ssh.SshTestHarness; import org.eclipse.jgit.util.FS; import org.junit.After; import org.junit.Test; @@ -47,7 +43,6 @@ import org.junit.Test; */ public class NoFilesSshTest extends SshTestHarness { - private PublicKey testServerKey; private KeyPair testUserKey; @@ -155,27 +150,20 @@ public class NoFilesSshTest extends SshTestHarness { } } - private KeyPair load(Path path) throws Exception { - try (InputStream in = Files.newInputStream(path)) { - return SecurityUtils - .loadKeyPairIdentities(null, - NamedResource.ofName(path.toString()), in, null) - .iterator().next(); - } - } - @Test public void testCloneWithBuiltInKeys() throws Exception { // This test should fail unless our in-memory setup is taken: no - // known_hosts file, and a config that specifies a non-existing key. - File newHostKey = new File(getTemporaryDirectory(), "newhostkey"); - copyTestResource("id_ed25519", newHostKey); - server.addHostKey(newHostKey.toPath(), true); - testServerKey = load(newHostKey.toPath()).getPublic(); - assertTrue(newHostKey.delete()); - testUserKey = load(privateKey1.getAbsoluteFile().toPath()); + // known_hosts file, a config that specifies a non-existing key, + // and the test is using a newly generated KeyPairs anyway. + KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA"); + generator.initialize(2048); + testUserKey = generator.generateKeyPair(); + KeyPair hostKey = generator.generateKeyPair(); + server.addHostKey(hostKey, true); + testServerKey = hostKey.getPublic(); assertNotNull(testServerKey); assertNotNull(testUserKey); + server.setTestUserPublicKey(testUserKey.getPublic()); cloneWith( "ssh://" + TEST_USER + "@localhost:" + testPort + "/doesntmatter", diff --git a/org.eclipse.jgit.ssh.apache/resources/META-INF/services/org.eclipse.jgit.transport.SshSessionFactory b/org.eclipse.jgit.ssh.apache/resources/META-INF/services/org.eclipse.jgit.transport.SshSessionFactory new file mode 100644 index 0000000000..8289411149 --- /dev/null +++ b/org.eclipse.jgit.ssh.apache/resources/META-INF/services/org.eclipse.jgit.transport.SshSessionFactory @@ -0,0 +1 @@ +org.eclipse.jgit.transport.sshd.SshdSessionFactory diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/CachingKeyPairProvider.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/CachingKeyPairProvider.java index 2ce69901c1..79b3637caa 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/CachingKeyPairProvider.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/CachingKeyPairProvider.java @@ -170,7 +170,7 @@ public class CachingKeyPairProvider extends FileKeyPairProvider } catch (CancellationException cancelled) { throw cancelled; } catch (Exception other) { - log.warn(other.toString()); + log.warn(other.getMessage(), other); } } return nextItem != null; diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshConfig.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshConfig.java index e770134fa1..97e0fcc7d2 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshConfig.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshConfig.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018, Thomas Wolf <thomas.wolf@paranor.ch> and others + * Copyright (C) 2018, 2020 Thomas Wolf <thomas.wolf@paranor.ch> and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0 which is available at @@ -12,7 +12,6 @@ package org.eclipse.jgit.internal.transport.sshd; import static org.eclipse.jgit.internal.transport.ssh.OpenSshConfigFile.flag; import static org.eclipse.jgit.internal.transport.ssh.OpenSshConfigFile.positive; -import java.io.File; import java.io.IOException; import java.net.SocketAddress; import java.util.Map; @@ -22,61 +21,36 @@ import org.apache.sshd.client.config.hosts.HostConfigEntry; import org.apache.sshd.client.config.hosts.HostConfigEntryResolver; import org.apache.sshd.common.AttributeRepository; import org.apache.sshd.common.util.net.SshdSocketAddress; -import org.eclipse.jgit.annotations.NonNull; -import org.eclipse.jgit.internal.transport.ssh.OpenSshConfigFile; -import org.eclipse.jgit.internal.transport.ssh.OpenSshConfigFile.HostEntry; +import org.eclipse.jgit.transport.SshConfigStore; import org.eclipse.jgit.transport.SshConstants; +import org.eclipse.jgit.transport.SshSessionFactory; /** - * A {@link HostConfigEntryResolver} adapted specifically for JGit. - * <p> - * We use our own config file parser and entry resolution since the default - * {@link org.apache.sshd.client.config.hosts.ConfigFileHostEntryResolver - * ConfigFileHostEntryResolver} has a number of problems: - * </p> - * <ul> - * <li>It does case-insensitive pattern matching. Matching in OpenSsh is - * case-sensitive! Compare also bug 531118.</li> - * <li>It only merges values from the global items (before the first "Host" - * line) into the host entries. Otherwise it selects the most specific match. - * OpenSsh processes <em>all</em> entries in the order they appear in the file - * and whenever one matches, it updates values as appropriate.</li> - * <li>We have to ensure that ~ replacement uses the same HOME directory as - * JGit. Compare bug bug 526175.</li> - * </ul> - * Therefore, this re-uses the parsing and caching from - * {@link OpenSshConfigFile}. - * + * A bridge between a JGit {@link SshConfigStore} and the Apache MINA sshd + * {@link HostConfigEntryResolver}. */ public class JGitSshConfig implements HostConfigEntryResolver { - private final OpenSshConfigFile configFile; - - private final String localUserName; + private final SshConfigStore configFile; /** - * Creates a new {@link OpenSshConfigFile} that will read the config from - * file {@code config} use the given file {@code home} as "home" directory. + * Creates a new {@link JGitSshConfig} that will read the config from the + * given {@link SshConfigStore}. * - * @param home - * user's home directory for the purpose of ~ replacement - * @param config - * file to load; may be {@code null} if no ssh config file - * handling is desired - * @param localUserName - * user name of the current user on the local host OS + * @param store + * to use */ - public JGitSshConfig(@NonNull File home, File config, - @NonNull String localUserName) { - this.localUserName = localUserName; - configFile = config == null ? null : new OpenSshConfigFile(home, config, localUserName); + public JGitSshConfig(SshConfigStore store) { + configFile = store; } @Override public HostConfigEntry resolveEffectiveHost(String host, int port, SocketAddress localAddress, String username, AttributeRepository attributes) throws IOException { - HostEntry entry = configFile == null ? new HostEntry() : configFile.lookup(host, port, username); + SshConfigStore.HostConfig entry = configFile == null + ? SshConfigStore.EMPTY_CONFIG + : configFile.lookup(host, port, username); JGitHostConfigEntry config = new JGitHostConfigEntry(); // Apache MINA conflates all keys, even multi-valued ones, in one map // and puts multiple values separated by commas in one string. See @@ -102,7 +76,7 @@ public class JGitSshConfig implements HostConfigEntryResolver { String user = username != null && !username.isEmpty() ? username : entry.getValue(SshConstants.USER); if (user == null || user.isEmpty()) { - user = localUserName; + user = SshSessionFactory.getLocalUserName(); } config.setUsername(user); config.setProperty(SshConstants.USER, user); diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java index 4c1b49b67f..bb4e49be8e 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java @@ -39,6 +39,7 @@ import org.apache.sshd.common.config.keys.loader.openssh.kdf.BCryptKdfOptions; import org.apache.sshd.common.keyprovider.KeyIdentityProvider; import org.eclipse.jgit.annotations.NonNull; import org.eclipse.jgit.errors.TransportException; +import org.eclipse.jgit.internal.transport.ssh.OpenSshConfigFile; import org.eclipse.jgit.internal.transport.sshd.CachingKeyPairProvider; import org.eclipse.jgit.internal.transport.sshd.GssApiWithMicAuthFactory; import org.eclipse.jgit.internal.transport.sshd.JGitPasswordAuthFactory; @@ -50,6 +51,7 @@ import org.eclipse.jgit.internal.transport.sshd.OpenSshServerKeyDatabase; import org.eclipse.jgit.internal.transport.sshd.PasswordProviderWrapper; import org.eclipse.jgit.internal.transport.sshd.SshdText; import org.eclipse.jgit.transport.CredentialsProvider; +import org.eclipse.jgit.transport.SshConfigStore; import org.eclipse.jgit.transport.SshConstants; import org.eclipse.jgit.transport.SshSessionFactory; import org.eclipse.jgit.transport.URIish; @@ -64,6 +66,8 @@ import org.eclipse.jgit.util.FS; */ public class SshdSessionFactory extends SshSessionFactory implements Closeable { + private static final String MINA_SSHD = "mina-sshd"; //$NON-NLS-1$ + private final AtomicBoolean closing = new AtomicBoolean(); private final Set<SshdSession> sessions = new HashSet<>(); @@ -131,6 +135,11 @@ public class SshdSessionFactory extends SshSessionFactory implements Closeable { BCryptKdfOptions.setMaxAllowedRounds(16384); } + @Override + public String getType() { + return MINA_SSHD; + } + /** A simple general map key. */ private static final class Tuple { private Object[] objects; @@ -327,8 +336,8 @@ public class SshdSessionFactory extends SshSessionFactory implements Closeable { @NonNull File homeDir, @NonNull File sshDir) { return defaultHostConfigEntryResolver.computeIfAbsent( new Tuple(new Object[] { homeDir, sshDir }), - t -> new JGitSshConfig(homeDir, getSshConfig(sshDir), - getLocalUserName())); + t -> new JGitSshConfig(createSshConfigStore(homeDir, + getSshConfig(sshDir), getLocalUserName()))); } /** @@ -347,7 +356,29 @@ public class SshdSessionFactory extends SshSessionFactory implements Closeable { } /** - * Obtain a {@link ServerKeyDatabase} to verify server host keys. The + * Obtains a {@link SshConfigStore}, or {@code null}Â if not SSH config is to + * be used. The default implementation returns {@code null} if + * {@code configFile == null} and otherwise an OpenSSH-compatible store + * reading host entries from the given file. + * + * @param homeDir + * may be used for ~-replacements by the returned config store + * @param configFile + * to use, or {@code null} if none + * @param localUserName + * user name of the current user on the local OS + * @return A {@link SshConfigStore}, or {@code null}Â if none is to be used + * + * @since 5.8 + */ + protected SshConfigStore createSshConfigStore(@NonNull File homeDir, + File configFile, String localUserName) { + return configFile == null ? null + : new OpenSshConfigFile(homeDir, configFile, localUserName); + } + + /** + * Obtains a {@link ServerKeyDatabase} to verify server host keys. The * default implementation returns a {@link ServerKeyDatabase} that * recognizes the two openssh standard files {@code ~/.ssh/known_hosts} and * {@code ~/.ssh/known_hosts2} as well as any files configured via the @@ -365,10 +396,31 @@ public class SshdSessionFactory extends SshSessionFactory implements Closeable { @NonNull File sshDir) { return defaultServerKeyDatabase.computeIfAbsent( new Tuple(new Object[] { homeDir, sshDir }), - t -> new OpenSshServerKeyDatabase(true, - getDefaultKnownHostsFiles(sshDir))); + t -> createServerKeyDatabase(homeDir, sshDir)); } + + /** + * Creates a {@link ServerKeyDatabase} to verify server host keys. The + * default implementation returns a {@link ServerKeyDatabase} that + * recognizes the two openssh standard files {@code ~/.ssh/known_hosts} and + * {@code ~/.ssh/known_hosts2} as well as any files configured via the + * {@code UserKnownHostsFile} option in the ssh config file. + * + * @param homeDir + * home directory to use for ~ replacement + * @param sshDir + * representing ~/.ssh/ + * @return the {@link ServerKeyDatabase} + * @since 5.8 + */ + @NonNull + protected ServerKeyDatabase createServerKeyDatabase(@NonNull File homeDir, + @NonNull File sshDir) { + return new OpenSshServerKeyDatabase(true, + getDefaultKnownHostsFiles(sshDir)); + } + /** * Gets the list of default user known hosts files. The default returns * ~/.ssh/known_hosts and ~/.ssh/known_hosts2. The ssh config diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactoryBuilder.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactoryBuilder.java new file mode 100644 index 0000000000..2147c2bd58 --- /dev/null +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactoryBuilder.java @@ -0,0 +1,393 @@ +/* + * Copyright (C) 2020 Thomas Wolf <thomas.wolf@paranor.ch> and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.transport.sshd; + +import java.io.File; +import java.nio.file.Path; +import java.security.KeyPair; +import java.util.Collections; +import java.util.List; +import java.util.function.BiFunction; +import java.util.function.Function; + +import org.eclipse.jgit.annotations.NonNull; +import org.eclipse.jgit.transport.CredentialsProvider; +import org.eclipse.jgit.transport.SshConfigStore; +import org.eclipse.jgit.util.StringUtils; + +/** + * A builder API to configure {@link SshdSessionFactory SshdSessionFactories}. + * + * @since 5.8 + */ +public final class SshdSessionFactoryBuilder { + + private final State state = new State(); + + /** + * Sets the {@link ProxyDataFactory} to use for {@link SshdSessionFactory + * SshdSessionFactories} created by {@link #build(KeyCache)}. + * + * @param proxyDataFactory + * to use + * @return this {@link SshdSessionFactoryBuilder} + */ + public SshdSessionFactoryBuilder setProxyDataFactory( + ProxyDataFactory proxyDataFactory) { + this.state.proxyDataFactory = proxyDataFactory; + return this; + } + + /** + * Sets the home directory to use for {@link SshdSessionFactory + * SshdSessionFactories} created by {@link #build(KeyCache)}. + * + * @param homeDirectory + * to use; may be {@code null}, in which case the home directory + * as defined by {@link org.eclipse.jgit.util.FS#userHome() + * FS.userHome()} is assumed + * @return this {@link SshdSessionFactoryBuilder} + */ + public SshdSessionFactoryBuilder setHomeDirectory(File homeDirectory) { + this.state.homeDirectory = homeDirectory; + return this; + } + + /** + * Sets the SSH directory to use for {@link SshdSessionFactory + * SshdSessionFactories} created by {@link #build(KeyCache)}. + * + * @param sshDirectory + * to use; may be {@code null}, in which case ".ssh" under the + * {@link #setHomeDirectory(File) home directory} is assumed + * @return this {@link SshdSessionFactoryBuilder} + */ + public SshdSessionFactoryBuilder setSshDirectory(File sshDirectory) { + this.state.sshDirectory = sshDirectory; + return this; + } + + /** + * Sets the default preferred authentication mechanisms to use for + * {@link SshdSessionFactory SshdSessionFactories} created by + * {@link #build(KeyCache)}. + * + * @param authentications + * comma-separated list of authentication mechanism names; if + * {@code null} or empty, the default as specified by + * {@link SshdSessionFactory#getDefaultPreferredAuthentications()} + * will be used + * @return this {@link SshdSessionFactoryBuilder} + */ + public SshdSessionFactoryBuilder setPreferredAuthentications( + String authentications) { + this.state.preferredAuthentications = authentications; + return this; + } + + /** + * Sets a function that returns the SSH config file, given the SSH + * directory. The function may return {@code null}, in which case no SSH + * config file will be used. If a non-null file is returned, it will be used + * when it exists. If no supplier has been set, or the supplier has been set + * explicitly to {@code null}, by default a file named + * {@link org.eclipse.jgit.transport.SshConstants#CONFIG + * SshConstants.CONFIG} in the {@link #setSshDirectory(File) SSH directory} + * is used. + * + * @param supplier + * returning a {@link File} for the SSH config file to use, or + * returning {@code null} if no config file is to be used + * @return this {@link SshdSessionFactoryBuilder} + */ + public SshdSessionFactoryBuilder setConfigFile( + Function<File, File> supplier) { + this.state.configFileFinder = supplier; + return this; + } + + /** + * A factory interface for creating a @link SshConfigStore}. + */ + @FunctionalInterface + public interface ConfigStoreFactory { + + /** + * Creates a {@link SshConfigStore}. May return {@code null} if none is + * to be used. + * + * @param homeDir + * to use for ~-replacements + * @param configFile + * to use, may be {@code null} if none + * @param localUserName + * name of the current user in the local OS + * @return the {@link SshConfigStore}, or {@code null} if none is to be + * used + */ + SshConfigStore create(@NonNull File homeDir, File configFile, + String localUserName); + } + + /** + * Sets a factory for the {@link SshConfigStore} to use. If not set or + * explicitly set to {@code null}, the default as specified by + * {@link SshdSessionFactory#createSshConfigStore(File, File, String)} is + * used. + * + * @param factory + * to set + * @return this {@link SshdSessionFactoryBuilder} + */ + public SshdSessionFactoryBuilder setConfigStoreFactory( + ConfigStoreFactory factory) { + this.state.configFactory = factory; + return this; + } + + /** + * Sets a function that returns the default known hosts files, given the SSH + * directory. If not set or explicitly set to {@code null}, the defaults as + * specified by {@link SshdSessionFactory#getDefaultKnownHostsFiles(File)} + * are used. + * + * @param supplier + * to get the default known hosts files + * @return this {@link SshdSessionFactoryBuilder} + */ + public SshdSessionFactoryBuilder setDefaultKnownHostsFiles( + Function<File, List<Path>> supplier) { + this.state.knownHostsFileFinder = supplier; + return this; + } + + /** + * Sets a function that returns the default private key files, given the SSH + * directory. If not set or explicitly set to {@code null}, the defaults as + * specified by {@link SshdSessionFactory#getDefaultIdentities(File)} are + * used. + * + * @param supplier + * to get the default private key files + * @return this {@link SshdSessionFactoryBuilder} + */ + public SshdSessionFactoryBuilder setDefaultIdentities( + Function<File, List<Path>> supplier) { + this.state.defaultKeyFileFinder = supplier; + return this; + } + + /** + * Sets a function that returns the default private keys, given the SSH + * directory. If not set or explicitly set to {@code null}, the defaults as + * specified by {@link SshdSessionFactory#getDefaultKeys(File)} are used. + * + * @param provider + * to get the default private key files + * @return this {@link SshdSessionFactoryBuilder} + */ + public SshdSessionFactoryBuilder setDefaultKeysProvider( + Function<File, Iterable<KeyPair>> provider) { + this.state.defaultKeysProvider = provider; + return this; + } + + /** + * Sets a factory function to create a {@link KeyPasswordProvider}. If not + * set or explicitly set to {@code null}, or if the factory returns + * {@code null}, the default as specified by + * {@link SshdSessionFactory#createKeyPasswordProvider(CredentialsProvider)} + * is used. + * + * @param factory + * to create a {@link KeyPasswordProvider} + * @return this {@link SshdSessionFactoryBuilder} + */ + public SshdSessionFactoryBuilder setKeyPasswordProvider( + Function<CredentialsProvider, KeyPasswordProvider> factory) { + this.state.passphraseProviderFactory = factory; + return this; + } + + /** + * Sets a function that creates a new {@link ServerKeyDatabase}, given the + * SSH and home directory. If not set or explicitly set to {@code null}, or + * if the {@code factory} returns {@code null}, the default as specified by + * {@link SshdSessionFactory#createServerKeyDatabase(File, File)} is used. + * + * @param factory + * to create a {@link ServerKeyDatabase} + * @return this {@link SshdSessionFactoryBuilder} + */ + public SshdSessionFactoryBuilder setServerKeyDatabase( + BiFunction<File, File, ServerKeyDatabase> factory) { + this.state.serverKeyDatabaseCreator = factory; + return this; + } + + /** + * Builds a {@link SshdSessionFactory} as configured, using the given + * {@link KeyCache} for caching keys. + * <p> + * Different {@link SshdSessionFactory SshdSessionFactories} should + * <em>not</em> share the same {@link KeyCache} since the cache is + * invalidated when the factory itself or when the last {@link SshdSession} + * created from the factory is closed. + * </p> + * + * @param cache + * to use for caching ssh keys; may be {@code null} if no caching + * is desired. + * @return the {@link SshdSessionFactory} + */ + public SshdSessionFactory build(KeyCache cache) { + // Use a copy to avoid that subsequent calls to setters affect an + // already created SshdSessionFactory. + return state.copy().build(cache); + } + + private static class State { + + ProxyDataFactory proxyDataFactory; + + File homeDirectory; + + File sshDirectory; + + String preferredAuthentications; + + Function<File, File> configFileFinder; + + ConfigStoreFactory configFactory; + + Function<CredentialsProvider, KeyPasswordProvider> passphraseProviderFactory; + + Function<File, List<Path>> knownHostsFileFinder; + + Function<File, List<Path>> defaultKeyFileFinder; + + Function<File, Iterable<KeyPair>> defaultKeysProvider; + + BiFunction<File, File, ServerKeyDatabase> serverKeyDatabaseCreator; + + State copy() { + State c = new State(); + c.proxyDataFactory = proxyDataFactory; + c.homeDirectory = homeDirectory; + c.sshDirectory = sshDirectory; + c.preferredAuthentications = preferredAuthentications; + c.configFileFinder = configFileFinder; + c.configFactory = configFactory; + c.passphraseProviderFactory = passphraseProviderFactory; + c.knownHostsFileFinder = knownHostsFileFinder; + c.defaultKeyFileFinder = defaultKeyFileFinder; + c.defaultKeysProvider = defaultKeysProvider; + c.serverKeyDatabaseCreator = serverKeyDatabaseCreator; + return c; + } + + SshdSessionFactory build(KeyCache cache) { + SshdSessionFactory factory = new SessionFactory(cache, + proxyDataFactory); + factory.setHomeDirectory(homeDirectory); + factory.setSshDirectory(sshDirectory); + return factory; + } + + private class SessionFactory extends SshdSessionFactory { + + public SessionFactory(KeyCache cache, + ProxyDataFactory proxyDataFactory) { + super(cache, proxyDataFactory); + } + + @Override + protected File getSshConfig(File sshDir) { + if (configFileFinder != null) { + return configFileFinder.apply(sshDir); + } + return super.getSshConfig(sshDir); + } + + @Override + protected List<Path> getDefaultKnownHostsFiles(File sshDir) { + if (knownHostsFileFinder != null) { + List<Path> result = knownHostsFileFinder.apply(sshDir); + return result == null ? Collections.emptyList() : result; + } + return super.getDefaultKnownHostsFiles(sshDir); + } + + @Override + protected List<Path> getDefaultIdentities(File sshDir) { + if (defaultKeyFileFinder != null) { + List<Path> result = defaultKeyFileFinder.apply(sshDir); + return result == null ? Collections.emptyList() : result; + } + return super.getDefaultIdentities(sshDir); + } + + @Override + protected String getDefaultPreferredAuthentications() { + if (!StringUtils.isEmptyOrNull(preferredAuthentications)) { + return preferredAuthentications; + } + return super.getDefaultPreferredAuthentications(); + } + + @Override + protected Iterable<KeyPair> getDefaultKeys(File sshDir) { + if (defaultKeysProvider != null) { + Iterable<KeyPair> result = defaultKeysProvider + .apply(sshDir); + return result == null ? Collections.emptyList() : result; + } + return super.getDefaultKeys(sshDir); + } + + @Override + protected KeyPasswordProvider createKeyPasswordProvider( + CredentialsProvider provider) { + if (passphraseProviderFactory != null) { + KeyPasswordProvider result = passphraseProviderFactory + .apply(provider); + if (result != null) { + return result; + } + } + return super.createKeyPasswordProvider(provider); + } + + @Override + protected ServerKeyDatabase createServerKeyDatabase(File homeDir, + File sshDir) { + if (serverKeyDatabaseCreator != null) { + ServerKeyDatabase result = serverKeyDatabaseCreator + .apply(homeDir, sshDir); + if (result != null) { + return result; + } + } + return super.createServerKeyDatabase(homeDir, sshDir); + } + + @Override + protected SshConfigStore createSshConfigStore(File homeDir, + File configFile, String localUserName) { + if (configFactory != null) { + return configFactory.create(homeDir, configFile, + localUserName); + } + return super.createSshConfigStore(homeDir, configFile, + localUserName); + } + } + } +} diff --git a/org.eclipse.jgit.ssh.jsch.test/.classpath b/org.eclipse.jgit.ssh.jsch.test/.classpath new file mode 100644 index 0000000000..f08af0a4e9 --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch.test/.classpath @@ -0,0 +1,11 @@ +<?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/JavaSE-1.8"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="tst"> + <attributes> + <attribute name="test" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/org.eclipse.jgit.ssh.jsch.test/.gitignore b/org.eclipse.jgit.ssh.jsch.test/.gitignore new file mode 100644 index 0000000000..934e0e06ff --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch.test/.gitignore @@ -0,0 +1,2 @@ +/bin +/target diff --git a/org.eclipse.jgit.ssh.jsch.test/.project b/org.eclipse.jgit.ssh.jsch.test/.project new file mode 100644 index 0000000000..ad4fefec1b --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch.test/.project @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.jgit.ssh.jsch.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.ssh.jsch.test/.settings/org.eclipse.core.resources.prefs b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000..689aec8668 --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +encoding/<project>=UTF-8 +encoding/tst=UTF-8 diff --git a/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.core.runtime.prefs new file mode 100644 index 0000000000..5a0ad22d2a --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.core.runtime.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +line.separator=\n diff --git a/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.apt.core.prefs b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.apt.core.prefs new file mode 100644 index 0000000000..d4313d4b25 --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.apt.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.apt.aptEnabled=false diff --git a/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..2bc2cf30de --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,403 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.doc.comment.support=enabled +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=warning +org.eclipse.jdt.core.compiler.problem.comparingIdentical=error +org.eclipse.jdt.core.compiler.problem.deadCode=error +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning +org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=warning +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=error +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error +org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private +org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error +org.eclipse.jdt.core.compiler.problem.nullReference=error +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error +org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedImport=error +org.eclipse.jdt.core.compiler.problem.unusedLabel=error +org.eclipse.jdt.core.compiler.problem.unusedLocal=error +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning +org.eclipse.jdt.core.compiler.problem.unusedParameter=warning +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=1 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=80 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=true +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000000..fef3713825 --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,66 @@ +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_JGit Format +formatter_settings_version=12 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/> +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_functional_interfaces=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=true +sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.make_local_variable_final=false +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=false +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=true +sp_cleanup.remove_unused_imports=false +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_blocks=false +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_lambda=false +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.mylyn.tasks.ui.prefs new file mode 100644 index 0000000000..3dec4d97c7 --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.mylyn.tasks.ui.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +project.repository.kind=bugzilla +project.repository.url=https\://bugs.eclipse.org/bugs diff --git a/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.mylyn.team.ui.prefs b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.mylyn.team.ui.prefs new file mode 100644 index 0000000000..ce7a0f0478 --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.mylyn.team.ui.prefs @@ -0,0 +1,2 @@ +commit.comment.template=${task.description} \n\nBug\: ${task.key} +eclipse.preferences.version=1 diff --git a/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.pde.api.tools.prefs b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.pde.api.tools.prefs new file mode 100644 index 0000000000..c0030ded71 --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.pde.api.tools.prefs @@ -0,0 +1,104 @@ +ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error +API_USE_SCAN_FIELD_SEVERITY=Error +API_USE_SCAN_METHOD_SEVERITY=Error +API_USE_SCAN_TYPE_SEVERITY=Error +CLASS_ELEMENT_TYPE_ADDED_FIELD=Error +CLASS_ELEMENT_TYPE_ADDED_METHOD=Error +CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error +CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error +CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error +CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error +ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error +ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error +ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +FIELD_ELEMENT_TYPE_ADDED_VALUE=Error +FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error +FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error +FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error +FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error +ILLEGAL_EXTEND=Warning +ILLEGAL_IMPLEMENT=Warning +ILLEGAL_INSTANTIATE=Warning +ILLEGAL_OVERRIDE=Warning +ILLEGAL_REFERENCE=Warning +INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error +INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +INVALID_ANNOTATION=Ignore +INVALID_JAVADOC_TAG=Ignore +INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Error +LEAK_EXTEND=Warning +LEAK_FIELD_DECL=Warning +LEAK_IMPLEMENT=Warning +LEAK_METHOD_PARAM=Warning +LEAK_METHOD_RETURN_TYPE=Warning +METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error +METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +MISSING_EE_DESCRIPTIONS=Warning +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +UNUSED_PROBLEM_FILTERS=Warning +automatically_removed_unused_problem_filters=false +changed_execution_env=Error +eclipse.preferences.version=1 +incompatible_api_component_version=Error +incompatible_api_component_version_include_major_without_breaking_change=Disabled +incompatible_api_component_version_include_minor_without_api_change=Disabled +incompatible_api_component_version_report_major_without_breaking_change=Warning +incompatible_api_component_version_report_minor_without_api_change=Ignore +invalid_since_tag_version=Error +malformed_since_tag=Error +missing_since_tag=Error +report_api_breakage_when_major_version_incremented=Disabled +report_resolution_errors_api_component=Warning diff --git a/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.pde.core.prefs b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.pde.core.prefs new file mode 100644 index 0000000000..923c37fb8d --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.pde.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +resolve.requirebundle=false diff --git a/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.pde.prefs b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.pde.prefs new file mode 100644 index 0000000000..2174e4fd5b --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch.test/.settings/org.eclipse.pde.prefs @@ -0,0 +1,34 @@ +compilers.f.unresolved-features=1 +compilers.f.unresolved-plugins=1 +compilers.incompatible-environment=1 +compilers.p.build=1 +compilers.p.build.bin.includes=1 +compilers.p.build.encodings=2 +compilers.p.build.java.compiler=2 +compilers.p.build.java.compliance=1 +compilers.p.build.missing.output=2 +compilers.p.build.output.library=1 +compilers.p.build.source.library=1 +compilers.p.build.src.includes=1 +compilers.p.deprecated=1 +compilers.p.discouraged-class=1 +compilers.p.internal=1 +compilers.p.missing-packages=2 +compilers.p.missing-version-export-package=2 +compilers.p.missing-version-import-package=2 +compilers.p.missing-version-require-bundle=2 +compilers.p.no-required-att=0 +compilers.p.no.automatic.module=1 +compilers.p.not-externalized-att=2 +compilers.p.service.component.without.lazyactivation=1 +compilers.p.unknown-attribute=1 +compilers.p.unknown-class=1 +compilers.p.unknown-element=1 +compilers.p.unknown-identifier=1 +compilers.p.unknown-resource=1 +compilers.p.unresolved-ex-points=0 +compilers.p.unresolved-import=0 +compilers.s.create-docs=false +compilers.s.doc-folder=doc +compilers.s.open-tags=1 +eclipse.preferences.version=1 diff --git a/org.eclipse.jgit.ssh.jsch.test/BUILD b/org.eclipse.jgit.ssh.jsch.test/BUILD new file mode 100644 index 0000000000..4a8b92518e --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch.test/BUILD @@ -0,0 +1,19 @@ +load( + "@com_googlesource_gerrit_bazlets//tools:junit.bzl", + "junit_tests", +) + +junit_tests( + name = "jsch", + srcs = glob(["tst/**/*.java"]), + tags = ["jsch"], + deps = [ + "//lib:eddsa", + "//lib:jsch", + "//lib:junit", + "//org.eclipse.jgit:jgit", + "//org.eclipse.jgit.junit:junit", + "//org.eclipse.jgit.junit.ssh:junit-ssh", + "//org.eclipse.jgit.ssh.jsch:ssh-jsch", + ], +) diff --git a/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..f5707a7e10 --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF @@ -0,0 +1,24 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %Bundle-Name +Automatic-Module-Name: org.eclipse.jgit.ssh.jsch.test +Bundle-SymbolicName: org.eclipse.jgit.ssh.jsch.test +Bundle-Version: 5.8.0.qualifier +Bundle-Vendor: %Bundle-Vendor +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Import-Package: com.jcraft.jsch;version="[0.1.54,0.2.0)", + org.eclipse.jgit.errors;version="[5.8.0,5.9.0)", + org.eclipse.jgit.junit;version="[5.8.0,5.9.0)", + org.eclipse.jgit.junit.ssh;version="[5.8.0,5.9.0)", + org.eclipse.jgit.lib;version="[5.8.0,5.9.0)", + org.eclipse.jgit.transport;version="[5.8.0,5.9.0)", + org.eclipse.jgit.util;version="[5.8.0,5.9.0)", + org.junit;version="[4.13,5.0.0)", + org.junit.experimental.theories;version="[4.13,5.0.0)", + org.junit.runner;version="[4.13,5.0.0)" +Export-Package: org.eclipse.jgit.transport;version="5.8.0"; + uses:="org.eclipse.jgit.transport, + org.eclipse.jgit.junit, + org.eclipse.jgit.junit.ssh" +Require-Bundle: org.hamcrest.core;bundle-version="[1.3.0,2.0.0)" diff --git a/org.eclipse.jgit.ssh.jsch.test/about.html b/org.eclipse.jgit.ssh.jsch.test/about.html new file mode 100644 index 0000000000..f971af18d0 --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch.test/about.html @@ -0,0 +1,96 @@ +<?xml version="1.0" encoding="ISO-8859-1" ?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> + +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +<title>Eclipse Distribution License - Version 1.0</title> +<style type="text/css"> + body { + size: 8.5in 11.0in; + margin: 0.25in 0.5in 0.25in 0.5in; + tab-interval: 0.5in; + } + p { + margin-left: auto; + margin-top: 0.5em; + margin-bottom: 0.5em; + } + p.list { + margin-left: 0.5in; + margin-top: 0.05em; + margin-bottom: 0.05em; + } + .ubc-name { + margin-left: 0.5in; + white-space: pre; + } + </style> + +</head> + +<body lang="EN-US"> + +<p><b>Eclipse Distribution License - v 1.0</b></p> + +<p>Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors. </p> + +<p>All rights reserved.</p> +<p>Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: +<ul><li>Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. </li> +<li>Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. </li> +<li>Neither the name of the Eclipse Foundation, Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. </li></ul> +</p> +<p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE.</p> + +<hr> +<p><b>SHA-1 UbcCheck - MIT</b></p> + +<p>Copyright (c) 2017:</p> +<div class="ubc-name"> +Marc Stevens +Cryptology Group +Centrum Wiskunde & Informatica +P.O. Box 94079, 1090 GB Amsterdam, Netherlands +marc@marc-stevens.nl +</div> +<div class="ubc-name"> +Dan Shumow +Microsoft Research +danshu@microsoft.com +</div> +<p>Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +</p> +<ul><li>The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software.</li></ul> +<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.</p> + +</body> + +</html> diff --git a/org.eclipse.jgit.ssh.jsch.test/build.properties b/org.eclipse.jgit.ssh.jsch.test/build.properties new file mode 100644 index 0000000000..9ffa0caf78 --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch.test/build.properties @@ -0,0 +1,5 @@ +source.. = tst/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.properties diff --git a/org.eclipse.jgit.ssh.jsch.test/plugin.properties b/org.eclipse.jgit.ssh.jsch.test/plugin.properties new file mode 100644 index 0000000000..463fd4ab39 --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch.test/plugin.properties @@ -0,0 +1,2 @@ +Bundle-Name=JGit Tests for SSH with JSch +Bundle-Vendor=Eclipse JGit diff --git a/org.eclipse.jgit.ssh.jsch.test/pom.xml b/org.eclipse.jgit.ssh.jsch.test/pom.xml new file mode 100644 index 0000000000..92b4176daf --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch.test/pom.xml @@ -0,0 +1,118 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (C) 2020, Matthias Sohn <matthias.sohn@sap.com> and others + + This program and the accompanying materials are made available under the + terms of the Eclipse Distribution License v. 1.0 which is available at + http://www.eclipse.org/org/documents/edl-v10.php. + + SPDX-License-Identifier: BSD-3-Clause +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit-parent</artifactId> + <version>5.8.0-SNAPSHOT</version> + </parent> + + <artifactId>org.eclipse.jgit.ssh.jsch.test</artifactId> + <name>JGit - JSch sshd SSH Tests</name> + + <description> + JUnit tests for the JGit SSH support based on JSch. + </description> + + <properties> + <maven.javadoc.skip>true</maven.javadoc.skip> + </properties> + + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + </dependency> + + <dependency> + <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit.junit</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit.junit.ssh</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit.ssh.jsch</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit.test</artifactId> + <version>${project.version}</version> + </dependency> + + </dependencies> + + <profiles> + <!-- Profile provides a property which enables long running tests. --> + <profile> + <id>test.long</id> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <argLine>@{argLine} -Djgit.test.long=true</argLine> + </configuration> + </plugin> + </plugins> + </build> + </profile> + </profiles> + + <build> + <sourceDirectory>src/</sourceDirectory> + <testSourceDirectory>tst/</testSourceDirectory> + + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>test-jar</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <argLine>@{argLine} -Xmx1024m -Dfile.encoding=UTF-8 -Djava.io.tmpdir=${project.build.directory}</argLine> + <includes> + <include>**/*Test.java</include> + <include>**/*Tests.java</include> + </includes> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/JSchSshTest.java b/org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/JSchSshTest.java index 52d21d355b..22caebdac2 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/JSchSshTest.java +++ b/org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/JSchSshTest.java @@ -7,6 +7,8 @@ * * SPDX-License-Identifier: BSD-3-Clause */ + +//TODO(ms): move to org.eclipse.jgit.ssh.jsch in 6.0 package org.eclipse.jgit.transport; import static org.junit.Assert.assertTrue; @@ -18,9 +20,9 @@ import java.nio.file.Files; import java.util.Arrays; import org.eclipse.jgit.errors.TransportException; +import org.eclipse.jgit.junit.ssh.SshTestBase; import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.transport.OpenSshConfig.Host; -import org.eclipse.jgit.transport.ssh.SshTestBase; import org.eclipse.jgit.util.FS; import org.junit.experimental.theories.Theories; import org.junit.runner.RunWith; diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/JschConfigSessionFactoryTest.java b/org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/JschConfigSessionFactoryTest.java index 5618be0790..4efeae1906 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/JschConfigSessionFactoryTest.java +++ b/org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/JschConfigSessionFactoryTest.java @@ -7,6 +7,8 @@ * * SPDX-License-Identifier: BSD-3-Clause */ + +//TODO(ms): move to org.eclipse.jgit.ssh.jsch in 6.0 package org.eclipse.jgit.transport; import static org.junit.Assert.assertEquals; @@ -35,7 +37,7 @@ public class JschConfigSessionFactoryTest { OpenSshConfig tmpConfig; - DefaultSshSessionFactory factory = new DefaultSshSessionFactory(); + JschConfigSessionFactory factory = new JschConfigSessionFactory(); @Before public void setup() { diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java b/org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java index d3cfacfbf3..af09f499f5 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java +++ b/org.eclipse.jgit.ssh.jsch.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java @@ -8,6 +8,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ +//TODO(ms): move to org.eclipse.jgit.ssh.jsch in 6.0 package org.eclipse.jgit.transport; import static java.nio.charset.StandardCharsets.UTF_8; diff --git a/org.eclipse.jgit.ssh.jsch/.classpath b/org.eclipse.jgit.ssh.jsch/.classpath new file mode 100644 index 0000000000..110168ffa1 --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch/.classpath @@ -0,0 +1,8 @@ +<?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/JavaSE-1.8"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="src" path="resources"/> + <classpathentry kind="output" path="bin"/> +</classpath> diff --git a/org.eclipse.jgit.ssh.jsch/.fbprefs b/org.eclipse.jgit.ssh.jsch/.fbprefs new file mode 100644 index 0000000000..81a0767ff6 --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch/.fbprefs @@ -0,0 +1,125 @@ +#FindBugs User Preferences +#Mon May 04 16:24:13 PDT 2009 +detectorAppendingToAnObjectOutputStream=AppendingToAnObjectOutputStream|true +detectorBadAppletConstructor=BadAppletConstructor|false +detectorBadResultSetAccess=BadResultSetAccess|true +detectorBadSyntaxForRegularExpression=BadSyntaxForRegularExpression|true +detectorBadUseOfReturnValue=BadUseOfReturnValue|true +detectorBadlyOverriddenAdapter=BadlyOverriddenAdapter|true +detectorBooleanReturnNull=BooleanReturnNull|true +detectorCallToUnsupportedMethod=CallToUnsupportedMethod|true +detectorCheckImmutableAnnotation=CheckImmutableAnnotation|true +detectorCheckTypeQualifiers=CheckTypeQualifiers|true +detectorCloneIdiom=CloneIdiom|false +detectorComparatorIdiom=ComparatorIdiom|true +detectorConfusedInheritance=ConfusedInheritance|true +detectorConfusionBetweenInheritedAndOuterMethod=ConfusionBetweenInheritedAndOuterMethod|true +detectorCrossSiteScripting=CrossSiteScripting|true +detectorDoInsideDoPrivileged=DoInsideDoPrivileged|true +detectorDontCatchIllegalMonitorStateException=DontCatchIllegalMonitorStateException|true +detectorDontUseEnum=DontUseEnum|true +detectorDroppedException=DroppedException|true +detectorDumbMethodInvocations=DumbMethodInvocations|true +detectorDumbMethods=DumbMethods|true +detectorDuplicateBranches=DuplicateBranches|true +detectorEmptyZipFileEntry=EmptyZipFileEntry|true +detectorEqualsOperandShouldHaveClassCompatibleWithThis=EqualsOperandShouldHaveClassCompatibleWithThis|true +detectorFinalizerNullsFields=FinalizerNullsFields|true +detectorFindBadCast2=FindBadCast2|true +detectorFindBadForLoop=FindBadForLoop|true +detectorFindCircularDependencies=FindCircularDependencies|false +detectorFindDeadLocalStores=FindDeadLocalStores|true +detectorFindDoubleCheck=FindDoubleCheck|true +detectorFindEmptySynchronizedBlock=FindEmptySynchronizedBlock|true +detectorFindFieldSelfAssignment=FindFieldSelfAssignment|true +detectorFindFinalizeInvocations=FindFinalizeInvocations|true +detectorFindFloatEquality=FindFloatEquality|true +detectorFindHEmismatch=FindHEmismatch|true +detectorFindInconsistentSync2=FindInconsistentSync2|true +detectorFindJSR166LockMonitorenter=FindJSR166LockMonitorenter|true +detectorFindLocalSelfAssignment2=FindLocalSelfAssignment2|true +detectorFindMaskedFields=FindMaskedFields|true +detectorFindMismatchedWaitOrNotify=FindMismatchedWaitOrNotify|true +detectorFindNakedNotify=FindNakedNotify|true +detectorFindNonSerializableStoreIntoSession=FindNonSerializableStoreIntoSession|true +detectorFindNonSerializableValuePassedToWriteObject=FindNonSerializableValuePassedToWriteObject|true +detectorFindNonShortCircuit=FindNonShortCircuit|true +detectorFindNullDeref=FindNullDeref|true +detectorFindNullDerefsInvolvingNonShortCircuitEvaluation=FindNullDerefsInvolvingNonShortCircuitEvaluation|true +detectorFindOpenStream=FindOpenStream|true +detectorFindPuzzlers=FindPuzzlers|true +detectorFindRefComparison=FindRefComparison|true +detectorFindReturnRef=FindReturnRef|true +detectorFindRunInvocations=FindRunInvocations|true +detectorFindSelfComparison=FindSelfComparison|true +detectorFindSelfComparison2=FindSelfComparison2|true +detectorFindSleepWithLockHeld=FindSleepWithLockHeld|true +detectorFindSpinLoop=FindSpinLoop|true +detectorFindSqlInjection=FindSqlInjection|true +detectorFindTwoLockWait=FindTwoLockWait|true +detectorFindUncalledPrivateMethods=FindUncalledPrivateMethods|true +detectorFindUnconditionalWait=FindUnconditionalWait|true +detectorFindUninitializedGet=FindUninitializedGet|true +detectorFindUnrelatedTypesInGenericContainer=FindUnrelatedTypesInGenericContainer|true +detectorFindUnreleasedLock=FindUnreleasedLock|true +detectorFindUnsatisfiedObligation=FindUnsatisfiedObligation|true +detectorFindUnsyncGet=FindUnsyncGet|true +detectorFindUselessControlFlow=FindUselessControlFlow|true +detectorFormatStringChecker=FormatStringChecker|true +detectorHugeSharedStringConstants=HugeSharedStringConstants|true +detectorIDivResultCastToDouble=IDivResultCastToDouble|true +detectorIncompatMask=IncompatMask|true +detectorInconsistentAnnotations=InconsistentAnnotations|true +detectorInefficientMemberAccess=InefficientMemberAccess|false +detectorInefficientToArray=InefficientToArray|true +detectorInfiniteLoop=InfiniteLoop|true +detectorInfiniteRecursiveLoop=InfiniteRecursiveLoop|true +detectorInfiniteRecursiveLoop2=InfiniteRecursiveLoop2|false +detectorInheritanceUnsafeGetResource=InheritanceUnsafeGetResource|true +detectorInitializationChain=InitializationChain|true +detectorInstantiateStaticClass=InstantiateStaticClass|true +detectorInvalidJUnitTest=InvalidJUnitTest|true +detectorIteratorIdioms=IteratorIdioms|true +detectorLazyInit=LazyInit|true +detectorLoadOfKnownNullValue=LoadOfKnownNullValue|true +detectorMethodReturnCheck=MethodReturnCheck|true +detectorMultithreadedInstanceAccess=MultithreadedInstanceAccess|true +detectorMutableLock=MutableLock|true +detectorMutableStaticFields=MutableStaticFields|true +detectorNaming=Naming|true +detectorNumberConstructor=NumberConstructor|true +detectorOverridingEqualsNotSymmetrical=OverridingEqualsNotSymmetrical|true +detectorPreferZeroLengthArrays=PreferZeroLengthArrays|true +detectorPublicSemaphores=PublicSemaphores|false +detectorQuestionableBooleanAssignment=QuestionableBooleanAssignment|true +detectorReadReturnShouldBeChecked=ReadReturnShouldBeChecked|true +detectorRedundantInterfaces=RedundantInterfaces|true +detectorRepeatedConditionals=RepeatedConditionals|true +detectorRuntimeExceptionCapture=RuntimeExceptionCapture|true +detectorSerializableIdiom=SerializableIdiom|true +detectorStartInConstructor=StartInConstructor|true +detectorStaticCalendarDetector=StaticCalendarDetector|true +detectorStringConcatenation=StringConcatenation|true +detectorSuperfluousInstanceOf=SuperfluousInstanceOf|true +detectorSuspiciousThreadInterrupted=SuspiciousThreadInterrupted|true +detectorSwitchFallthrough=SwitchFallthrough|true +detectorSynchronizeAndNullCheckField=SynchronizeAndNullCheckField|true +detectorSynchronizeOnClassLiteralNotGetClass=SynchronizeOnClassLiteralNotGetClass|true +detectorSynchronizingOnContentsOfFieldToProtectField=SynchronizingOnContentsOfFieldToProtectField|true +detectorURLProblems=URLProblems|true +detectorUncallableMethodOfAnonymousClass=UncallableMethodOfAnonymousClass|true +detectorUnnecessaryMath=UnnecessaryMath|true +detectorUnreadFields=UnreadFields|true +detectorUseObjectEquals=UseObjectEquals|false +detectorUselessSubclassMethod=UselessSubclassMethod|false +detectorVarArgsProblems=VarArgsProblems|true +detectorVolatileUsage=VolatileUsage|true +detectorWaitInLoop=WaitInLoop|true +detectorWrongMapIterator=WrongMapIterator|true +detectorXMLFactoryBypass=XMLFactoryBypass|true +detector_threshold=2 +effort=default +excludefilter0=findBugs/FindBugsExcludeFilter.xml +filter_settings=Medium|BAD_PRACTICE,CORRECTNESS,MT_CORRECTNESS,PERFORMANCE,STYLE|false +filter_settings_neg=MALICIOUS_CODE,NOISE,I18N,SECURITY,EXPERIMENTAL| +run_at_full_build=true diff --git a/org.eclipse.jgit.ssh.jsch/.gitignore b/org.eclipse.jgit.ssh.jsch/.gitignore new file mode 100644 index 0000000000..934e0e06ff --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch/.gitignore @@ -0,0 +1,2 @@ +/bin +/target diff --git a/org.eclipse.jgit.ssh.jsch/.project b/org.eclipse.jgit.ssh.jsch/.project new file mode 100644 index 0000000000..c29a38cb54 --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch/.project @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>org.eclipse.jgit.ssh.jsch</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> + <buildCommand> + <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature> + </natures> +</projectDescription> diff --git a/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.core.resources.prefs b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000..99f26c0203 --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/<project>=UTF-8 diff --git a/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.core.runtime.prefs new file mode 100644 index 0000000000..5a0ad22d2a --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.core.runtime.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +line.separator=\n diff --git a/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..15ef2aad5d --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,399 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jgit.annotations.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jgit.annotations.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jgit.annotations.Nullable +org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.doc.comment.support=enabled +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=warning +org.eclipse.jdt.core.compiler.problem.comparingIdentical=error +org.eclipse.jdt.core.compiler.problem.deadCode=error +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning +org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=warning +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=error +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error +org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private +org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error +org.eclipse.jdt.core.compiler.problem.nullReference=error +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=ignore +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error +org.eclipse.jdt.core.compiler.problem.potentialNullReference=error +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedImport=error +org.eclipse.jdt.core.compiler.problem.unusedLabel=error +org.eclipse.jdt.core.compiler.problem.unusedLocal=error +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=warning +org.eclipse.jdt.core.compiler.problem.unusedParameter=warning +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=1 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=80 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=true +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff --git a/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 0000000000..fef3713825 --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,66 @@ +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_JGit Format +formatter_settings_version=12 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.ondemandthreshold=99 +org.eclipse.jdt.ui.staticondemandthreshold=99 +org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates/> +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_functional_interfaces=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=true +sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.make_local_variable_final=false +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=false +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=true +sp_cleanup.remove_unused_imports=false +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_blocks=false +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_lambda=false +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.mylyn.tasks.ui.prefs new file mode 100644 index 0000000000..3dec4d97c7 --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.mylyn.tasks.ui.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +project.repository.kind=bugzilla +project.repository.url=https\://bugs.eclipse.org/bugs diff --git a/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.mylyn.team.ui.prefs b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.mylyn.team.ui.prefs new file mode 100644 index 0000000000..ce7a0f0478 --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.mylyn.team.ui.prefs @@ -0,0 +1,2 @@ +commit.comment.template=${task.description} \n\nBug\: ${task.key} +eclipse.preferences.version=1 diff --git a/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.pde.api.tools.prefs b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.pde.api.tools.prefs new file mode 100644 index 0000000000..c0030ded71 --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.pde.api.tools.prefs @@ -0,0 +1,104 @@ +ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error +API_USE_SCAN_FIELD_SEVERITY=Error +API_USE_SCAN_METHOD_SEVERITY=Error +API_USE_SCAN_TYPE_SEVERITY=Error +CLASS_ELEMENT_TYPE_ADDED_FIELD=Error +CLASS_ELEMENT_TYPE_ADDED_METHOD=Error +CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error +CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error +CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error +CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error +ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error +ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error +ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +FIELD_ELEMENT_TYPE_ADDED_VALUE=Error +FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error +FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error +FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error +FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error +ILLEGAL_EXTEND=Warning +ILLEGAL_IMPLEMENT=Warning +ILLEGAL_INSTANTIATE=Warning +ILLEGAL_OVERRIDE=Warning +ILLEGAL_REFERENCE=Warning +INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error +INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +INVALID_ANNOTATION=Ignore +INVALID_JAVADOC_TAG=Ignore +INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Error +LEAK_EXTEND=Warning +LEAK_FIELD_DECL=Warning +LEAK_IMPLEMENT=Warning +LEAK_METHOD_PARAM=Warning +LEAK_METHOD_RETURN_TYPE=Warning +METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error +METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +MISSING_EE_DESCRIPTIONS=Warning +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +UNUSED_PROBLEM_FILTERS=Warning +automatically_removed_unused_problem_filters=false +changed_execution_env=Error +eclipse.preferences.version=1 +incompatible_api_component_version=Error +incompatible_api_component_version_include_major_without_breaking_change=Disabled +incompatible_api_component_version_include_minor_without_api_change=Disabled +incompatible_api_component_version_report_major_without_breaking_change=Warning +incompatible_api_component_version_report_minor_without_api_change=Ignore +invalid_since_tag_version=Error +malformed_since_tag=Error +missing_since_tag=Error +report_api_breakage_when_major_version_incremented=Disabled +report_resolution_errors_api_component=Warning diff --git a/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.pde.core.prefs b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.pde.core.prefs new file mode 100644 index 0000000000..923c37fb8d --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.pde.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +resolve.requirebundle=false diff --git a/org.eclipse.jgit.ssh.jsch/BUILD b/org.eclipse.jgit.ssh.jsch/BUILD new file mode 100644 index 0000000000..4917e28e04 --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch/BUILD @@ -0,0 +1,20 @@ +load("@rules_java//java:defs.bzl", "java_library") + +package(default_visibility = ["//visibility:public"]) + +SRCS = glob(["src/**/*.java"]) + +RESOURCES = glob(["resources/**"]) + +java_library( + name = "ssh-jsch", + srcs = SRCS, + resource_strip_prefix = "org.eclipse.jgit.ssh.jsch/resources", + resources = RESOURCES, + deps = [ + "//lib:jsch", + "//lib:jzlib", + "//lib:slf4j-api", + "//org.eclipse.jgit:jgit", + ], +) diff --git a/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..afa0d188db --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch/META-INF/MANIFEST.MF @@ -0,0 +1,26 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %Bundle-Name +Automatic-Module-Name: org.eclipse.jgit.ssh.jsch +Bundle-SymbolicName: org.eclipse.jgit.ssh.jsch;singleton:=true +Fragment-Host: org.eclipse.jgit;bundle-version="[5.8.0,5.9.0)" +Bundle-Vendor: %Bundle-Vendor +Bundle-Localization: plugin +Bundle-ActivationPolicy: lazy +Bundle-Version: 5.8.0.qualifier +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Export-Package: org.eclipse.jgit.internal.transport.jsch;version="5.8.0";x-friends:="org.eclipse.egit.core", + org.eclipse.jgit.transport;version="5.8.0"; + uses:="org.eclipse.jgit.transport, + org.eclipse.jgit.internal.transport.ssh, + org.eclipse.jgit.util, + com.jcraft.jsch" +Import-Package: com.jcraft.jsch;version="[0.1.37,0.2.0)", + org.eclipse.jgit.errors;version="[5.8.0,5.9.0)", + org.eclipse.jgit.internal;version="[5.8.0,5.9.0)", + org.eclipse.jgit.internal.transport.ssh;version="[5.8.0,5.9.0)", + org.eclipse.jgit.nls;version="[5.8.0,5.9.0)", + org.eclipse.jgit.transport;version="[5.8.0,5.9.0)", + org.eclipse.jgit.util;version="[5.8.0,5.9.0)", + org.eclipse.jgit.util.io;version="[5.8.0,5.9.0)", + org.slf4j;version="[1.7.0,2.0.0)" diff --git a/org.eclipse.jgit.ssh.jsch/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.ssh.jsch/META-INF/SOURCE-MANIFEST.MF new file mode 100644 index 0000000000..35b27810c5 --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch/META-INF/SOURCE-MANIFEST.MF @@ -0,0 +1,7 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: org.eclipse.jgit.ssh.jsch - Sources +Bundle-SymbolicName: org.eclipse.jgit.ssh.jsch.source +Bundle-Vendor: Eclipse.org - JGit +Bundle-Version: 5.8.0.qualifier +Eclipse-SourceBundle: org.eclipse.jgit.ssh.jsch;version="5.8.0.qualifier";roots="." diff --git a/org.eclipse.jgit.ssh.jsch/about.html b/org.eclipse.jgit.ssh.jsch/about.html new file mode 100644 index 0000000000..f971af18d0 --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch/about.html @@ -0,0 +1,96 @@ +<?xml version="1.0" encoding="ISO-8859-1" ?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> + +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> +<title>Eclipse Distribution License - Version 1.0</title> +<style type="text/css"> + body { + size: 8.5in 11.0in; + margin: 0.25in 0.5in 0.25in 0.5in; + tab-interval: 0.5in; + } + p { + margin-left: auto; + margin-top: 0.5em; + margin-bottom: 0.5em; + } + p.list { + margin-left: 0.5in; + margin-top: 0.05em; + margin-bottom: 0.05em; + } + .ubc-name { + margin-left: 0.5in; + white-space: pre; + } + </style> + +</head> + +<body lang="EN-US"> + +<p><b>Eclipse Distribution License - v 1.0</b></p> + +<p>Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors. </p> + +<p>All rights reserved.</p> +<p>Redistribution and use in source and binary forms, with or without modification, + are permitted provided that the following conditions are met: +<ul><li>Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. </li> +<li>Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. </li> +<li>Neither the name of the Eclipse Foundation, Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. </li></ul> +</p> +<p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE.</p> + +<hr> +<p><b>SHA-1 UbcCheck - MIT</b></p> + +<p>Copyright (c) 2017:</p> +<div class="ubc-name"> +Marc Stevens +Cryptology Group +Centrum Wiskunde & Informatica +P.O. Box 94079, 1090 GB Amsterdam, Netherlands +marc@marc-stevens.nl +</div> +<div class="ubc-name"> +Dan Shumow +Microsoft Research +danshu@microsoft.com +</div> +<p>Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +</p> +<ul><li>The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software.</li></ul> +<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.</p> + +</body> + +</html> diff --git a/org.eclipse.jgit.ssh.jsch/build.properties b/org.eclipse.jgit.ssh.jsch/build.properties new file mode 100644 index 0000000000..8148271ef3 --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch/build.properties @@ -0,0 +1,7 @@ +source.. = src/,\ + resources/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.properties,\ + about.html diff --git a/org.eclipse.jgit.ssh.jsch/plugin.properties b/org.eclipse.jgit.ssh.jsch/plugin.properties new file mode 100644 index 0000000000..126709b961 --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch/plugin.properties @@ -0,0 +1,2 @@ +Bundle-Name=JGit SSH support based on JSch +Bundle-Vendor=Eclipse JGit diff --git a/org.eclipse.jgit.ssh.jsch/pom.xml b/org.eclipse.jgit.ssh.jsch/pom.xml new file mode 100644 index 0000000000..142ea28b1d --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch/pom.xml @@ -0,0 +1,218 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (C) 2018, Thomas Wolf <thomas.wolf@paranor.ch> and others + + This program and the accompanying materials are made available under the + terms of the Eclipse Distribution License v. 1.0 which is available at + http://www.eclipse.org/org/documents/edl-v10.php. + + SPDX-License-Identifier: BSD-3-Clause +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit-parent</artifactId> + <version>5.8.0-SNAPSHOT</version> + </parent> + + <artifactId>org.eclipse.jgit.ssh.jsch</artifactId> + <name>JGit - JSch-based SSH support</name> + + <description> + SSH support for JGit based on JSch + </description> + + <properties> + <translate-qualifier/> + <source-bundle-manifest>${project.build.directory}/META-INF/SOURCE-MANIFEST.MF</source-bundle-manifest> + </properties> + + <dependencies> + <dependency> + <groupId>org.eclipse.jgit</groupId> + <artifactId>org.eclipse.jgit</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>com.jcraft</groupId> + <artifactId>jsch</artifactId> + </dependency> + + <dependency> + <groupId>com.jcraft</groupId> + <artifactId>jzlib</artifactId> + </dependency> + + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </dependency> + </dependencies> + + <build> + <sourceDirectory>src/</sourceDirectory> + + <resources> + <resource> + <directory>.</directory> + <includes> + <include>plugin.properties</include> + <include>about.html</include> + </includes> + </resource> + <resource> + <directory>resources/</directory> + </resource> + </resources> + + <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> + <manifestFile>${bundle-manifest}</manifestFile> + </archive> + </configuration> + </plugin> + + <!-- No previous version to compare to + <plugin> + <groupId>com.github.siom79.japicmp</groupId> + <artifactId>japicmp-maven-plugin</artifactId> + <version>${japicmp-version}</version> + <configuration> + <oldVersion> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>${project.artifactId}</artifactId> + <version>${jgit-last-release-version}</version> + </dependency> + </oldVersion> + <newVersion> + <file> + <path>${project.build.directory}/${project.artifactId}-${project.version}.jar</path> + </file> + </newVersion> + <parameter> + <onlyModified>true</onlyModified> + <includes> + <include>org.eclipse.jgit.*</include> + </includes> + <accessModifier>public</accessModifier> + <breakBuildOnModifications>false</breakBuildOnModifications> + <breakBuildOnBinaryIncompatibleModifications>false</breakBuildOnBinaryIncompatibleModifications> + <onlyBinaryIncompatible>false</onlyBinaryIncompatible> + <includeSynthetic>false</includeSynthetic> + <ignoreMissingClasses>false</ignoreMissingClasses> + <skipPomModules>true</skipPomModules> + </parameter> + <skip>false</skip> + </configuration> + <executions> + <execution> + <phase>verify</phase> + <goals> + <goal>cmp</goal> + </goals> + </execution> + </executions> + </plugin> + --> + </plugins> + </build> + + <reporting> + <plugins> + <!-- No previous version to compare to + <plugin> + <groupId>com.github.siom79.japicmp</groupId> + <artifactId>japicmp-maven-plugin</artifactId> + <version>${japicmp-version}</version> + <reportSets> + <reportSet> + <reports> + <report>cmp-report</report> + </reports> + </reportSet> + </reportSets> + <configuration> + <oldVersion> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>${project.artifactId}</artifactId> + <version>${jgit-last-release-version}</version> + </dependency> + </oldVersion> + <newVersion> + <file> + <path>${project.build.directory}/${project.artifactId}-${project.version}.jar</path> + </file> + </newVersion> + <parameter> + <onlyModified>true</onlyModified> + <includes> + <include>org.eclipse.jgit.*</include> + </includes> + <accessModifier>public</accessModifier> + <breakBuildOnModifications>false</breakBuildOnModifications> + <breakBuildOnBinaryIncompatibleModifications>false</breakBuildOnBinaryIncompatibleModifications> + <onlyBinaryIncompatible>false</onlyBinaryIncompatible> + <includeSynthetic>false</includeSynthetic> + <ignoreMissingClasses>false</ignoreMissingClasses> + <skipPomModules>true</skipPomModules> + </parameter> + <skip>false</skip> + </configuration> + </plugin> + --> + </plugins> + </reporting> +</project> diff --git a/org.eclipse.jgit.ssh.jsch/resources/META-INF/services/org.eclipse.jgit.transport.SshSessionFactory b/org.eclipse.jgit.ssh.jsch/resources/META-INF/services/org.eclipse.jgit.transport.SshSessionFactory new file mode 100644 index 0000000000..81927466bb --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch/resources/META-INF/services/org.eclipse.jgit.transport.SshSessionFactory @@ -0,0 +1 @@ +org.eclipse.jgit.transport.JschConfigSessionFactory diff --git a/org.eclipse.jgit.ssh.jsch/resources/org/eclipse/jgit/internal/transport/jsch/JSchText.properties b/org.eclipse.jgit.ssh.jsch/resources/org/eclipse/jgit/internal/transport/jsch/JSchText.properties new file mode 100644 index 0000000000..529e9f488c --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch/resources/org/eclipse/jgit/internal/transport/jsch/JSchText.properties @@ -0,0 +1,4 @@ +connectionFailed=connection failed +sshUserNameError=Jsch error: failed to set SSH user name correctly to ''{0}''; using ''{1}'' picked up from SSH config file. +transportSSHRetryInterrupt=Interrupted while waiting for retry +unknownHost=unknown host diff --git a/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/internal/transport/jsch/JSchText.java b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/internal/transport/jsch/JSchText.java new file mode 100644 index 0000000000..4d4c9cb250 --- /dev/null +++ b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/internal/transport/jsch/JSchText.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2020, Michael Dardis <git@md-5.net> and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.internal.transport.jsch; + +import org.eclipse.jgit.nls.NLS; +import org.eclipse.jgit.nls.TranslationBundle; + +/** + * Externalized text messages for localization. + */ +public final class JSchText extends TranslationBundle { + + /** + * Get an instance of this translation bundle. + * + * @return an instance of this translation bundle + */ + public static JSchText get() { + return NLS.getBundleFor(JSchText.class); + } + + // @formatter:off + /***/ public String connectionFailed; + /***/ public String sshUserNameError; + /***/ public String transportSSHRetryInterrupt; + /***/ public String unknownHost; + +} diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/CredentialsProviderUserInfo.java b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/CredentialsProviderUserInfo.java index 10646b9e7a..01adcf30b0 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/CredentialsProviderUserInfo.java +++ b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/CredentialsProviderUserInfo.java @@ -8,6 +8,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ +//TODO(ms): move to org.eclipse.jgit.ssh.jsch in 6.0 package org.eclipse.jgit.transport; import java.util.ArrayList; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java index 718c8f6115..88202dd2d6 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java +++ b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java @@ -15,6 +15,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ +//TODO(ms): move to org.eclipse.jgit.ssh.jsch in 6.0 package org.eclipse.jgit.transport; import static java.util.stream.Collectors.joining; @@ -37,7 +38,7 @@ import java.util.concurrent.TimeUnit; import java.util.stream.Stream; import org.eclipse.jgit.errors.TransportException; -import org.eclipse.jgit.internal.JGitText; +import org.eclipse.jgit.internal.transport.jsch.JSchText; import org.eclipse.jgit.util.FS; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -62,7 +63,9 @@ import com.jcraft.jsch.Session; * {@link #configure(org.eclipse.jgit.transport.OpenSshConfig.Host, Session)} to * supply appropriate {@link com.jcraft.jsch.UserInfo} to the session. */ -public abstract class JschConfigSessionFactory extends SshSessionFactory { +public class JschConfigSessionFactory extends SshSessionFactory { + + private static final String JSCH = "jsch"; //$NON-NLS-1$ private static final Logger LOG = LoggerFactory .getLogger(JschConfigSessionFactory.class); @@ -137,7 +140,7 @@ public abstract class JschConfigSessionFactory extends SshSessionFactory { user, pass, host, port, hc); } catch (InterruptedException e1) { throw new TransportException( - JGitText.get().transportSSHRetryInterrupt, + JSchText.get().transportSSHRetryInterrupt, e1); } } @@ -149,7 +152,8 @@ public abstract class JschConfigSessionFactory extends SshSessionFactory { } catch (JSchException je) { final Throwable c = je.getCause(); if (c instanceof UnknownHostException) { - throw new TransportException(uri, JGitText.get().unknownHost, + throw new TransportException(uri, + JSchText.get().unknownHost, je); } if (c instanceof ConnectException) { @@ -160,6 +164,11 @@ public abstract class JschConfigSessionFactory extends SshSessionFactory { } + @Override + public String getType() { + return JSCH; + } + private static boolean isAuthenticationFailed(JSchException e) { return e.getCause() == null && e.getMessage().equals("Auth fail"); //$NON-NLS-1$ } @@ -279,7 +288,7 @@ public abstract class JschConfigSessionFactory extends SshSessionFactory { } catch (NullPointerException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e) { - LOG.error(MessageFormat.format(JGitText.get().sshUserNameError, + LOG.error(MessageFormat.format(JSchText.get().sshUserNameError, userName, session.getUserName()), e); } } @@ -331,7 +340,9 @@ public abstract class JschConfigSessionFactory extends SshSessionFactory { * @param session * session to configure */ - protected abstract void configure(OpenSshConfig.Host hc, Session session); + protected void configure(OpenSshConfig.Host hc, Session session) { + // No additional configuration required. + } /** * Obtain the JSch used to create new sessions. diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/JschSession.java b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/JschSession.java index d7270343cb..300e03d798 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/JschSession.java +++ b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/JschSession.java @@ -13,6 +13,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ +//TODO(ms): move to org.eclipse.jgit.ssh.jsch in 6.0 package org.eclipse.jgit.transport; import java.io.BufferedOutputStream; @@ -26,7 +27,7 @@ import java.util.concurrent.Callable; import java.util.concurrent.TimeUnit; import org.eclipse.jgit.errors.TransportException; -import org.eclipse.jgit.internal.JGitText; +import org.eclipse.jgit.internal.transport.jsch.JSchText; import org.eclipse.jgit.util.io.IsolatedOutputStream; import com.jcraft.jsch.Channel; @@ -142,7 +143,7 @@ public class JschSession implements RemoteSession { if (!channel.isConnected()) { closeOutputStream(); throw new TransportException(uri, - JGitText.get().connectionFailed); + JSchText.get().connectionFailed); } } catch (JSchException e) { closeOutputStream(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/OpenSshConfig.java b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/OpenSshConfig.java index a628897a59..5c6c80c768 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/OpenSshConfig.java +++ b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/OpenSshConfig.java @@ -8,6 +8,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ +//TODO(ms): move to org.eclipse.jgit.ssh.jsch in 6.0 package org.eclipse.jgit.transport; import static org.eclipse.jgit.internal.transport.ssh.OpenSshConfigFile.positive; @@ -39,8 +40,8 @@ import com.jcraft.jsch.ConfigRepository; * <p> * This parser makes the critical options available to * {@link org.eclipse.jgit.transport.SshSessionFactory} via - * {@link org.eclipse.jgit.transport.OpenSshConfig.Host} objects returned by - * {@link #lookup(String)}, and implements a fully conforming + * {@link org.eclipse.jgit.transport.OpenSshConfig.Host} objects returned + * by {@link #lookup(String)}, and implements a fully conforming * {@link com.jcraft.jsch.ConfigRepository} providing * {@link com.jcraft.jsch.ConfigRepository.Config}s via * {@link #getConfig(String)}. diff --git a/org.eclipse.jgit.test/.classpath b/org.eclipse.jgit.test/.classpath index 7cc18cca34..c99a7b0d34 100644 --- a/org.eclipse.jgit.test/.classpath +++ b/org.eclipse.jgit.test/.classpath @@ -1,22 +1,21 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry excluding="**/*.idx|**/*.pack" kind="src" path="tst" output="bin-tst"> + <classpathentry excluding="**/*.idx|**/*.pack" kind="src" output="bin-tst" path="tst"> <attributes> <attribute name="test" value="true"/> </attributes> </classpathentry> <classpathentry kind="src" path="src"/> - <classpathentry kind="src" path="tst-rsrc" output="bin-tst"> + <classpathentry kind="src" output="bin-tst" path="tst-rsrc"> <attributes> <attribute name="test" value="true"/> </attributes> </classpathentry> - <classpathentry kind="src" path="exttst" output="bin-tst"> + <classpathentry kind="src" output="bin-tst" path="exttst"> <attributes> <attribute name="test" value="true"/> </attributes> </classpathentry> - <classpathentry kind="src" path="resources"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="output" path="bin"/> diff --git a/org.eclipse.jgit.test/BUILD b/org.eclipse.jgit.test/BUILD index b04ac553d1..f12646e859 100644 --- a/org.eclipse.jgit.test/BUILD +++ b/org.eclipse.jgit.test/BUILD @@ -58,7 +58,6 @@ java_library( resources = DATA, deps = [ "//lib:assertj-core", - "//lib:jsch", "//lib:junit", "//lib:mockito", "//lib:slf4j-simple", @@ -67,26 +66,6 @@ java_library( ], ) -java_library( - name = "sshd-helpers", - testonly = 1, - srcs = glob(["src/org/eclipse/jgit/transport/ssh/*.java"]), - resource_strip_prefix = "org.eclipse.jgit.test/resources", - resources = RESOURCES, - visibility = [ - "//org.eclipse.jgit.ssh.apache.test:__pkg__", - ], - deps = [ - "//lib:jsch", - "//lib:junit", - "//lib:sshd-osgi", - "//lib:sshd-sftp", - "//org.eclipse.jgit:jgit", - "//org.eclipse.jgit.junit:junit", - "//org.eclipse.jgit.junit.ssh:junit-ssh", - ], -) - java_import( name = "tst_rsrc", jars = [":tst_rsrc_jar"], diff --git a/org.eclipse.jgit.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.test/META-INF/MANIFEST.MF index 6bd06e11b6..be3897ff68 100644 --- a/org.eclipse.jgit.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.test/META-INF/MANIFEST.MF @@ -6,10 +6,8 @@ Bundle-SymbolicName: org.eclipse.jgit.test Bundle-Version: 5.8.0.qualifier Bundle-Localization: plugin Bundle-Vendor: %Bundle-Vendor -Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)", - com.jcraft.jsch;version="[0.1.54,0.2.0)", net.bytebuddy.dynamic.loading;version="[1.9.0,2.0.0)", org.apache.commons.compress.archivers;version="[1.15.0,2.0)", org.apache.commons.compress.archivers.tar;version="[1.15.0,2.0)", @@ -42,10 +40,10 @@ Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)", org.eclipse.jgit.internal.storage.pack;version="[5.8.0,5.9.0)", org.eclipse.jgit.internal.storage.reftable;version="[5.8.0,5.9.0)", org.eclipse.jgit.internal.storage.reftree;version="[5.8.0,5.9.0)", + org.eclipse.jgit.internal.transport.connectivity;version="[5.8.0,5.9.0)", org.eclipse.jgit.internal.transport.http;version="[5.8.0,5.9.0)", org.eclipse.jgit.internal.transport.parser;version="[5.8.0,5.9.0)", org.eclipse.jgit.junit;version="[5.8.0,5.9.0)", - org.eclipse.jgit.junit.ssh;version="[5.8.0,5.9.0)", org.eclipse.jgit.junit.time;version="[5.8.0,5.9.0)", org.eclipse.jgit.lfs;version="[5.8.0,5.9.0)", org.eclipse.jgit.lib;version="[5.8.0,5.9.0)", @@ -85,4 +83,3 @@ Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)", org.tukaani.xz;version="[1.6.0,2.0)" Require-Bundle: org.hamcrest.core;bundle-version="[1.1.0,2.0.0)", org.hamcrest.library;bundle-version="[1.1.0,2.0.0)" -Export-Package: org.eclipse.jgit.transport.ssh;version="5.8.0";x-friends:="org.eclipse.jgit.ssh.apache.test" diff --git a/org.eclipse.jgit.test/build.properties b/org.eclipse.jgit.test/build.properties index 78c8f55f3a..7dc26c0b0d 100644 --- a/org.eclipse.jgit.test/build.properties +++ b/org.eclipse.jgit.test/build.properties @@ -1,8 +1,7 @@ source.. = tst/,\ tst-rsrc/,\ exttst/,\ - src/,\ - resources/ + src/ bin.includes = META-INF/,\ .,\ plugin.properties,\ diff --git a/org.eclipse.jgit.test/pom.xml b/org.eclipse.jgit.test/pom.xml index 377938b463..fa9bac8507 100644 --- a/org.eclipse.jgit.test/pom.xml +++ b/org.eclipse.jgit.test/pom.xml @@ -149,9 +149,6 @@ <include>plugin.properties</include> </includes> </resource> - <resource> - <directory>resources/</directory> - </resource> </resources> <plugins> diff --git a/org.eclipse.jgit.test/tests.bzl b/org.eclipse.jgit.test/tests.bzl index d030316452..34df07d5e6 100644 --- a/org.eclipse.jgit.test/tests.bzl +++ b/org.eclipse.jgit.test/tests.bzl @@ -34,26 +34,10 @@ def tests(tests): additional_deps = [ "//org.eclipse.jgit:insecure_cipher_factory", ] - if src.endswith("OpenSshConfigTest.java"): - additional_deps = [ - "//lib:jsch", - ] - if src.endswith("JschConfigSessionFactoryTest.java"): - additional_deps = [ - "//lib:jsch", - ] if src.endswith("SecurityManagerMissingPermissionsTest.java"): additional_deps = [ "//lib:log4j", ] - if src.endswith("JSchSshTest.java"): - additional_deps = [ - "//lib:jsch", - "//lib:jzlib", - "//lib:sshd-osgi", - "//lib:sshd-sftp", - ":sshd-helpers", - ] if src.endswith("JDKHttpConnectionTest.java"): additional_deps = [ "//lib:mockito", diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/attributes/add.png b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/attributes/add.png Binary files differnew file mode 100644 index 0000000000..c6aeae4d46 --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/attributes/add.png diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown.patch new file mode 100644 index 0000000000..74c33714b1 --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown.patch @@ -0,0 +1,14 @@ +diff --git a/ShiftDown b/ShiftDown +index 8b9727b..25dc192 100644 +--- a/ShiftDown ++++ b/ShiftDown +@@ -16,6 +16,9 @@ + something("A.b", "bar"); + } + ++ public void methodC() { ++ something("A.c", "bar"); ++ } + } + + public class B { diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown2.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown2.patch new file mode 100644 index 0000000000..a2b34b354c --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown2.patch @@ -0,0 +1,24 @@ +diff --git a/ShiftDown2 b/ShiftDown2 +index 8b9727b..63353aa 100644 +--- a/ShiftDown2 ++++ b/ShiftDown2 +@@ -16,6 +16,9 @@ + something("A.b", "bar"); + } + ++ public void methodC() { ++ something("A.c", "bar"); ++ } + } + + public class B { +@@ -28,5 +31,9 @@ + something("B.b", "bar"); + } + ++ public void methodC() { ++ something("B.c", "bar"); ++ } ++ + } + } diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown2_PostImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown2_PostImage new file mode 100644 index 0000000000..738484eefd --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown2_PostImage @@ -0,0 +1,75 @@ +package org.eclipse.jgit.test.apply; + +public class TestClass { + + private void something(String prefix, String msg) { + System.out.println(prefix + ": " + msg); + } + + public class D { + + public void methodA() { + something("A.a", "foo"); + } + + public void methodB() { + something("A.b", "bar"); + } + + } + + public class E { + + public void methodA() { + something("A.a", "foo"); + } + + public void methodB() { + something("A.b", "bar"); + } + + } + + public class F { + + public void methodA() { + something("A.a", "foo"); + } + + public void methodB() { + something("A.b", "bar"); + } + + } + + public class A { + + public void methodA() { + something("A.a", "foo"); + } + + public void methodB() { + something("A.b", "bar"); + } + + public void methodC() { + something("A.c", "bar"); + } + } + + public class B { + + public void methodA() { + something("B.a", "foo"); + } + + public void methodB() { + something("B.b", "bar"); + } + + public void methodC() { + something("B.c", "bar"); + } + + } +} diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown2_PreImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown2_PreImage new file mode 100644 index 0000000000..e1ee19c4dc --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown2_PreImage @@ -0,0 +1,68 @@ +package org.eclipse.jgit.test.apply; + +public class TestClass { + + private void something(String prefix, String msg) { + System.out.println(prefix + ": " + msg); + } + + public class D { + + public void methodA() { + something("A.a", "foo"); + } + + public void methodB() { + something("A.b", "bar"); + } + + } + + public class E { + + public void methodA() { + something("A.a", "foo"); + } + + public void methodB() { + something("A.b", "bar"); + } + + } + + public class F { + + public void methodA() { + something("A.a", "foo"); + } + + public void methodB() { + something("A.b", "bar"); + } + + } + + public class A { + + public void methodA() { + something("A.a", "foo"); + } + + public void methodB() { + something("A.b", "bar"); + } + + } + + public class B { + + public void methodA() { + something("B.a", "foo"); + } + + public void methodB() { + something("B.b", "bar"); + } + + } +} diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown_PostImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown_PostImage new file mode 100644 index 0000000000..5c6e9bccb2 --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown_PostImage @@ -0,0 +1,71 @@ +package org.eclipse.jgit.test.apply; + +public class TestClass { + + private void something(String prefix, String msg) { + System.out.println(prefix + ": " + msg); + } + + public class D { + + public void methodA() { + something("A.a", "foo"); + } + + public void methodB() { + something("A.b", "bar"); + } + + } + + public class E { + + public void methodA() { + something("A.a", "foo"); + } + + public void methodB() { + something("A.b", "bar"); + } + + } + + public class F { + + public void methodA() { + something("A.a", "foo"); + } + + public void methodB() { + something("A.b", "bar"); + } + + } + + public class A { + + public void methodA() { + something("A.a", "foo"); + } + + public void methodB() { + something("A.b", "bar"); + } + + public void methodC() { + something("A.c", "bar"); + } + } + + public class B { + + public void methodA() { + something("B.a", "foo"); + } + + public void methodB() { + something("B.b", "bar"); + } + + } +} diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown_PreImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown_PreImage new file mode 100644 index 0000000000..e1ee19c4dc --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftDown_PreImage @@ -0,0 +1,68 @@ +package org.eclipse.jgit.test.apply; + +public class TestClass { + + private void something(String prefix, String msg) { + System.out.println(prefix + ": " + msg); + } + + public class D { + + public void methodA() { + something("A.a", "foo"); + } + + public void methodB() { + something("A.b", "bar"); + } + + } + + public class E { + + public void methodA() { + something("A.a", "foo"); + } + + public void methodB() { + something("A.b", "bar"); + } + + } + + public class F { + + public void methodA() { + something("A.a", "foo"); + } + + public void methodB() { + something("A.b", "bar"); + } + + } + + public class A { + + public void methodA() { + something("A.a", "foo"); + } + + public void methodB() { + something("A.b", "bar"); + } + + } + + public class B { + + public void methodA() { + something("B.a", "foo"); + } + + public void methodB() { + something("B.b", "bar"); + } + + } +} diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp.patch new file mode 100644 index 0000000000..aa994a12e6 --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp.patch @@ -0,0 +1,14 @@ +diff --git a/ShiftUp b/ShiftUp +index e1ee19c..5c6e9bc 100644 +--- a/ShiftUp ++++ b/ShiftUp +@@ -52,6 +52,9 @@ + something("A.b", "bar"); + } + ++ public void methodC() { ++ something("A.c", "bar"); ++ } + } + + public class B { diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp2.patch b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp2.patch new file mode 100644 index 0000000000..eca99714c2 --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp2.patch @@ -0,0 +1,23 @@ +diff --git a/ShiftUp2 b/ShiftUp2 +index e1ee19c..f010144 100644 +--- a/ShiftUp2 ++++ b/ShiftUp2 +@@ -52,6 +52,9 @@ + something("A.b", "bar"); + } + ++ public void methodC() { ++ something("A.c", "bar"); ++ } + } + + public class B { +@@ -64,5 +67,8 @@ + something("B.b", "bar"); + } + ++ public void methodC() { ++ something("B.c", "bar"); ++ } + } + } diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp2_PostImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp2_PostImage new file mode 100644 index 0000000000..e279eceddd --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp2_PostImage @@ -0,0 +1,38 @@ +package org.eclipse.jgit.test.apply; + +public class TestClass { + + private void something(String prefix, String msg) { + System.out.println(prefix + ": " + msg); + } + + public class A { + + public void methodA() { + something("A.a", "foo"); + } + + public void methodB() { + something("A.b", "bar"); + } + + public void methodC() { + something("A.c", "bar"); + } + } + + public class B { + + public void methodA() { + something("B.a", "foo"); + } + + public void methodB() { + something("B.b", "bar"); + } + + public void methodC() { + something("B.c", "bar"); + } + } +} diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp2_PreImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp2_PreImage new file mode 100644 index 0000000000..8b9727b015 --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp2_PreImage @@ -0,0 +1,32 @@ +package org.eclipse.jgit.test.apply; + +public class TestClass { + + private void something(String prefix, String msg) { + System.out.println(prefix + ": " + msg); + } + + public class A { + + public void methodA() { + something("A.a", "foo"); + } + + public void methodB() { + something("A.b", "bar"); + } + + } + + public class B { + + public void methodA() { + something("B.a", "foo"); + } + + public void methodB() { + something("B.b", "bar"); + } + + } +} diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp_PostImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp_PostImage new file mode 100644 index 0000000000..25dc192b0b --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp_PostImage @@ -0,0 +1,35 @@ +package org.eclipse.jgit.test.apply; + +public class TestClass { + + private void something(String prefix, String msg) { + System.out.println(prefix + ": " + msg); + } + + public class A { + + public void methodA() { + something("A.a", "foo"); + } + + public void methodB() { + something("A.b", "bar"); + } + + public void methodC() { + something("A.c", "bar"); + } + } + + public class B { + + public void methodA() { + something("B.a", "foo"); + } + + public void methodB() { + something("B.b", "bar"); + } + + } +} diff --git a/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp_PreImage b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp_PreImage new file mode 100644 index 0000000000..8b9727b015 --- /dev/null +++ b/org.eclipse.jgit.test/tst-rsrc/org/eclipse/jgit/diff/ShiftUp_PreImage @@ -0,0 +1,32 @@ +package org.eclipse.jgit.test.apply; + +public class TestClass { + + private void something(String prefix, String msg) { + System.out.println(prefix + ": " + msg); + } + + public class A { + + public void methodA() { + something("A.a", "foo"); + } + + public void methodB() { + something("A.b", "bar"); + } + + } + + public class B { + + public void methodA() { + something("B.a", "foo"); + } + + public void methodB() { + something("B.b", "bar"); + } + + } +} diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ApplyCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ApplyCommandTest.java index 63cd21f59d..055eba7184 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ApplyCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ApplyCommandTest.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011, 2012, IBM Corporation and others. and others + * Copyright (C) 2011, 2020 IBM Corporation and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0 which is available at @@ -280,6 +280,46 @@ public class ApplyCommandTest extends RepositoryTestCase { b.getString(0, b.size(), false)); } + @Test + public void testShiftUp() throws Exception { + ApplyResult result = init("ShiftUp"); + assertEquals(1, result.getUpdatedFiles().size()); + assertEquals(new File(db.getWorkTree(), "ShiftUp"), + result.getUpdatedFiles().get(0)); + checkFile(new File(db.getWorkTree(), "ShiftUp"), + b.getString(0, b.size(), false)); + } + + @Test + public void testShiftUp2() throws Exception { + ApplyResult result = init("ShiftUp2"); + assertEquals(1, result.getUpdatedFiles().size()); + assertEquals(new File(db.getWorkTree(), "ShiftUp2"), + result.getUpdatedFiles().get(0)); + checkFile(new File(db.getWorkTree(), "ShiftUp2"), + b.getString(0, b.size(), false)); + } + + @Test + public void testShiftDown() throws Exception { + ApplyResult result = init("ShiftDown"); + assertEquals(1, result.getUpdatedFiles().size()); + assertEquals(new File(db.getWorkTree(), "ShiftDown"), + result.getUpdatedFiles().get(0)); + checkFile(new File(db.getWorkTree(), "ShiftDown"), + b.getString(0, b.size(), false)); + } + + @Test + public void testShiftDown2() throws Exception { + ApplyResult result = init("ShiftDown2"); + assertEquals(1, result.getUpdatedFiles().size()); + assertEquals(new File(db.getWorkTree(), "ShiftDown2"), + result.getUpdatedFiles().get(0)); + checkFile(new File(db.getWorkTree(), "ShiftDown2"), + b.getString(0, b.size(), false)); + } + private static byte[] readFile(String patchFile) throws IOException { final InputStream in = getTestResource(patchFile); if (in == null) { diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CheckoutCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CheckoutCommandTest.java index b0355b2b6f..0a0a88c838 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CheckoutCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CheckoutCommandTest.java @@ -125,6 +125,28 @@ public class CheckoutCommandTest extends RepositoryTestCase { } @Test + public void testCheckoutForced_deleteFileAndRestore() throws Exception { + File testFile = new File(db.getWorkTree(), "Test.txt"); + assertTrue(testFile.exists()); + + assertEquals("test", git.getRepository().getBranch()); + FileUtils.delete(testFile); + assertFalse(testFile.exists()); + // Switch from "test" to "master". + assertEquals(initialCommit.getId(), git.checkout().setName("master") + .setForced(true).call().getObjectId()); + assertTrue(testFile.exists()); + + assertEquals("master", git.getRepository().getBranch()); + FileUtils.delete(testFile); + assertFalse(testFile.exists()); + // Stay in current branch. + assertEquals(initialCommit.getId(), git.checkout().setName("master") + .setForced(true).call().getObjectId()); + assertTrue(testFile.exists()); + } + + @Test public void testCreateBranchOnCheckout() throws Exception { git.checkout().setCreateBranch(true).setName("test2").call(); assertNotNull(db.exactRef("refs/heads/test2")); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/attributes/AttributeFileTests.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/attributes/AttributeFileTests.java new file mode 100644 index 0000000000..5d05a98d66 --- /dev/null +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/attributes/AttributeFileTests.java @@ -0,0 +1,139 @@ +/* + * Copyright (C) 2020 Thomas Wolf <thomas.wolf@paranor.ch> and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.attributes; + +import static org.junit.Assert.assertArrayEquals; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + +import java.io.BufferedInputStream; +import java.io.File; +import java.io.InputStream; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.util.Arrays; + +import org.eclipse.jgit.api.Git; +import org.eclipse.jgit.api.ResetCommand.ResetType; +import org.eclipse.jgit.dircache.DirCache; +import org.eclipse.jgit.dircache.DirCacheEntry; +import org.eclipse.jgit.junit.RepositoryTestCase; +import org.eclipse.jgit.lib.ConfigConstants; +import org.eclipse.jgit.lib.Constants; +import org.eclipse.jgit.storage.file.FileBasedConfig; +import org.eclipse.jgit.util.IO; +import org.eclipse.jgit.util.RawParseUtils; +import org.junit.Test; + +/** + * End-to-end tests for some attribute combinations. Writes files, commit them, + * examines the index, deletes the files, performs a hard reset and checks file + * contents again. + */ +public class AttributeFileTests extends RepositoryTestCase { + + @Test + public void testTextAutoCoreEolCoreAutoCrLfInput() throws Exception { + FileBasedConfig cfg = db.getConfig(); + cfg.setBoolean(ConfigConstants.CONFIG_CORE_SECTION, null, + ConfigConstants.CONFIG_KEY_AUTOCRLF, false); + cfg.save(); + final String content = "Line1\nLine2\n"; + try (Git git = Git.wrap(db)) { + writeTrashFile(".gitattributes", "* text=auto"); + File dummy = writeTrashFile("dummy.txt", content); + git.add().addFilepattern(".").call(); + git.commit().setMessage("Commit with LF").call(); + assertEquals("Unexpected index state", + "[.gitattributes, mode:100644, content:* text=auto]" + + "[dummy.txt, mode:100644, content:" + content + + ']', + indexState(CONTENT)); + assertTrue("Should be able to delete " + dummy, dummy.delete()); + cfg.setString(ConfigConstants.CONFIG_CORE_SECTION, null, + ConfigConstants.CONFIG_KEY_EOL, "crlf"); + cfg.setString(ConfigConstants.CONFIG_CORE_SECTION, null, + ConfigConstants.CONFIG_KEY_AUTOCRLF, "input"); + cfg.save(); + git.reset().setMode(ResetType.HARD).call(); + assertTrue("File " + dummy + "should exist", dummy.isFile()); + String textFile = RawParseUtils.decode(IO.readFully(dummy, 512)); + assertEquals("Unexpected text content", content, textFile); + } + } + + @Test + public void testTextAutoEolLf() throws Exception { + writeTrashFile(".gitattributes", "* text=auto eol=lf"); + performTest("Test\r\nFile", "Test\nFile", "Test\nFile"); + } + + @Test + public void testTextAutoEolCrLf() throws Exception { + writeTrashFile(".gitattributes", "* text=auto eol=crlf"); + performTest("Test\r\nFile", "Test\nFile", "Test\r\nFile"); + } + + private void performTest(String initial, String index, String finalText) + throws Exception { + File dummy = writeTrashFile("dummy.foo", initial); + byte[] data = readTestResource("add.png"); + assertTrue("Expected some binary data", data.length > 100); + File binary = writeTrashFile("add.png", ""); + Files.write(binary.toPath(), data); + try (Git git = Git.wrap(db)) { + git.add().addFilepattern(".").call(); + git.commit().setMessage("test commit").call(); + // binary should be unchanged, dummy should match "index" + verifyIndexContent("dummy.foo", + index.getBytes(StandardCharsets.UTF_8)); + verifyIndexContent("add.png", data); + assertTrue("Should be able to delete " + dummy, dummy.delete()); + assertTrue("Should be able to delete " + binary, binary.delete()); + git.reset().setMode(ResetType.HARD).call(); + assertTrue("File " + dummy + " should exist", dummy.isFile()); + assertTrue("File " + binary + " should exist", binary.isFile()); + // binary should be unchanged, dummy should match "finalText" + String textFile = RawParseUtils.decode(IO.readFully(dummy, 512)); + assertEquals("Unexpected text content", finalText, textFile); + byte[] binaryFile = IO.readFully(binary, 512); + assertArrayEquals("Unexpected binary content", data, binaryFile); + } + } + + private byte[] readTestResource(String name) throws Exception { + try (InputStream in = new BufferedInputStream( + getClass().getResourceAsStream(name))) { + byte[] data = new byte[512]; + int read = in.read(data); + if (read == data.length) { + return data; + } + return Arrays.copyOf(data, read); + } + } + + private void verifyIndexContent(String path, byte[] expectedContent) + throws Exception { + DirCache dc = db.readDirCache(); + for (int i = 0; i < dc.getEntryCount(); ++i) { + DirCacheEntry entry = dc.getEntry(i); + if (path.equals(entry.getPathString())) { + byte[] data = db.open(entry.getObjectId(), Constants.OBJ_BLOB) + .getCachedBytes(); + assertArrayEquals("Unexpected index content for " + path, + expectedContent, data); + return; + } + } + fail("Path not found in index: " + path); + } +} diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RawTextIgnoreWhitespaceChangeTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RawTextIgnoreWhitespaceChangeTest.java index b271a048a4..c2b8641ebe 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RawTextIgnoreWhitespaceChangeTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/RawTextIgnoreWhitespaceChangeTest.java @@ -13,6 +13,7 @@ package org.eclipse.jgit.diff; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertTrue; import org.eclipse.jgit.lib.Constants; @@ -75,4 +76,75 @@ public class RawTextIgnoreWhitespaceChangeTest { assertTrue(cmp.equals(a, 5, b, 5)); assertTrue(cmp.equals(b, 5, a, 5)); } + + @Test + public void testEqualsWithTabs() { + RawText a = new RawText( + Constants.encodeASCII("a\tb\t \na\tb\t c \n foo\na b\na b")); + RawText b = new RawText( + Constants.encodeASCII("a b \na b c\n\tfoo\nab\na \tb")); + + // "a\tb\t \n" == "a b \n" + assertTrue(cmp.equals(a, 0, b, 0)); + assertTrue(cmp.equals(b, 0, a, 0)); + + // "a\tb\t c \n" == "a b c\n" + assertTrue(cmp.equals(a, 1, b, 1)); + assertTrue(cmp.equals(b, 1, a, 1)); + + // " foo" == "\tfoo" + assertTrue(cmp.equals(a, 2, b, 2)); + assertTrue(cmp.equals(b, 2, a, 2)); + + // "a b" != "ab" + assertFalse(cmp.equals(a, 3, b, 3)); + assertFalse(cmp.equals(b, 3, a, 3)); + + // "a b" == "a \tb " + assertTrue(cmp.equals(a, 4, b, 4)); + assertTrue(cmp.equals(b, 4, a, 4)); + } + + @Test + public void testHashCode() { + RawText a = new RawText(Constants + .encodeASCII("a b c\n\nab c d \n\ta bc d\nxyz\na b c")); + RawText b = new RawText(Constants.encodeASCII( + "a b c\na b c\nab c d\na bc d\n \t a bc d\na b c\n")); + + // Same line gives equal hash + assertEquals(cmp.hash(a, 0), cmp.hash(a, 0)); + + // Empty lines produce the same hash + assertEquals(cmp.hash(a, 1), cmp.hash(a, 1)); + + // Equal lines from different RawTexts get the same hash (RawText + // instance is not part of the hash) + assertEquals(cmp.hash(a, 0), cmp.hash(b, 0)); + + // A blank produces the same hash as a TAB + assertEquals(cmp.hash(new RawText(Constants.encodeASCII(" ")), 0), + cmp.hash(new RawText(Constants.encodeASCII("\t")), 0)); + + // Lines with only differing whitespace produce same hash + assertEquals(cmp.hash(a, 0), cmp.hash(b, 1)); + + // Lines with different trailing whitespace produce the same hash + assertEquals(cmp.hash(a, 2), cmp.hash(b, 2)); + + // A line with leading whitespace produces a hash different from the + // same line without leading whitespace + assertNotEquals(cmp.hash(a, 3), cmp.hash(b, 3)); + + // Lines with different leading whitespace produce equal hashes + assertEquals(cmp.hash(a, 3), cmp.hash(b, 4)); + + // While different lines _should_ produce different hashes, that may not + // always be the case. But for these two lines, it is. + assertNotEquals(cmp.hash(a, 4), cmp.hash(b, 4)); + + // A line without trailing \n produces the same hash as one without + assertEquals(cmp.hash(a, 5), cmp.hash(b, 5)); + + } } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/pack/GcCommitSelectionTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/pack/GcCommitSelectionTest.java index f2876b785b..cc826c30bd 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/pack/GcCommitSelectionTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/pack/GcCommitSelectionTest.java @@ -23,7 +23,6 @@ import java.util.Set; import org.eclipse.jgit.internal.storage.file.GcTestCase; import org.eclipse.jgit.internal.storage.file.PackBitmapIndexBuilder; -import org.eclipse.jgit.internal.storage.pack.PackWriterBitmapPreparer.BitmapCommit; import org.eclipse.jgit.junit.TestRepository.BranchBuilder; import org.eclipse.jgit.junit.TestRepository.CommitBuilder; import org.eclipse.jgit.lib.Constants; diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/transport/connectivity/IterativeConnectivityCheckerTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/transport/connectivity/IterativeConnectivityCheckerTest.java new file mode 100644 index 0000000000..e75dd22591 --- /dev/null +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/transport/connectivity/IterativeConnectivityCheckerTest.java @@ -0,0 +1,258 @@ +/* + * Copyright (c) 2019, Google LLC and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +package org.eclipse.jgit.internal.transport.connectivity; + +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.verify; + +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.jgit.errors.MissingObjectException; +import org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription; +import org.eclipse.jgit.internal.storage.dfs.InMemoryRepository; +import org.eclipse.jgit.junit.TestRepository; +import org.eclipse.jgit.lib.Constants; +import org.eclipse.jgit.lib.ObjectId; +import org.eclipse.jgit.lib.ProgressMonitor; +import org.eclipse.jgit.revwalk.RevCommit; +import org.eclipse.jgit.transport.PackParser; +import org.eclipse.jgit.transport.ReceiveCommand; +import org.eclipse.jgit.transport.ConnectivityChecker; +import org.eclipse.jgit.transport.ConnectivityChecker.ConnectivityCheckInfo; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnit; +import org.mockito.junit.MockitoRule; + +public class IterativeConnectivityCheckerTest { + @Rule + public MockitoRule rule = MockitoJUnit.rule(); + + private ObjectId branchHeadObjectId; + + private ObjectId openRewiewObjectId; + + private ObjectId newCommitObjectId; + private ObjectId otherHaveObjectId = ObjectId + .fromString("DEADBEEFDEADBEEFDEADBEEFDEADBEEFDEADBEEF"); + + private Set<ObjectId> advertisedHaves; + + @Mock + private ConnectivityChecker connectivityCheckerDelegate; + + @Mock + private ProgressMonitor pm; + + @Mock + private PackParser parser; + + private RevCommit branchHeadCommitObject; + private RevCommit openReviewCommitObject; + private RevCommit newCommitObject; + + private ConnectivityCheckInfo connectivityCheckInfo; + private IterativeConnectivityChecker connectivityChecker; + + private TestRepository tr; + + @Before + public void setUp() throws Exception { + tr = new TestRepository<>( + new InMemoryRepository(new DfsRepositoryDescription("test"))); + connectivityChecker = new IterativeConnectivityChecker( + connectivityCheckerDelegate); + connectivityCheckInfo = new ConnectivityCheckInfo(); + connectivityCheckInfo.setParser(parser); + connectivityCheckInfo.setRepository(tr.getRepository()); + connectivityCheckInfo.setWalk(tr.getRevWalk()); + + branchHeadCommitObject = tr.commit().create(); + branchHeadObjectId = branchHeadCommitObject.getId(); + + openReviewCommitObject = tr.commit().create(); + openRewiewObjectId = openReviewCommitObject.getId(); + + advertisedHaves = wrap(branchHeadObjectId, openRewiewObjectId, + otherHaveObjectId); + } + + @Test + public void testSuccessfulNewBranchBasedOnOld() throws Exception { + createNewCommit(branchHeadCommitObject); + connectivityCheckInfo.setCommands( + Collections.singletonList(createNewBrachCommand())); + + connectivityChecker.checkConnectivity(connectivityCheckInfo, + advertisedHaves, pm); + + verify(connectivityCheckerDelegate).checkConnectivity( + connectivityCheckInfo, + wrap(branchHeadObjectId /* as direct parent */), + pm); + } + + @Test + public void testSuccessfulNewBranchBasedOnOldWithTip() throws Exception { + createNewCommit(branchHeadCommitObject); + connectivityCheckInfo.setCommands( + Collections.singletonList(createNewBrachCommand())); + + connectivityChecker.setForcedHaves(wrap(openRewiewObjectId)); + + connectivityChecker.checkConnectivity(connectivityCheckInfo, + advertisedHaves, pm); + + verify(connectivityCheckerDelegate).checkConnectivity( + connectivityCheckInfo, + wrap(branchHeadObjectId /* as direct parent */, + openRewiewObjectId), + pm); + } + + @Test + public void testSuccessfulNewBranchMerge() throws Exception { + createNewCommit(branchHeadCommitObject, openReviewCommitObject); + connectivityCheckInfo.setCommands( + Collections.singletonList(createNewBrachCommand())); + + connectivityChecker.checkConnectivity(connectivityCheckInfo, + advertisedHaves, pm); + + verify(connectivityCheckerDelegate).checkConnectivity( + connectivityCheckInfo, + wrap(branchHeadObjectId /* as direct parent */, + openRewiewObjectId), + pm); + } + + @Test + public void testSuccessfulNewBranchBasedOnNewWithTip() throws Exception { + createNewCommit(); + connectivityCheckInfo.setCommands( + Collections.singletonList(createNewBrachCommand())); + + connectivityChecker.setForcedHaves(wrap(openRewiewObjectId)); + + connectivityChecker.checkConnectivity(connectivityCheckInfo, + advertisedHaves, pm); + + verify(connectivityCheckerDelegate).checkConnectivity( + connectivityCheckInfo, wrap(openRewiewObjectId), pm); + } + + @Test + public void testSuccessfulPushOldBranch() throws Exception { + createNewCommit(branchHeadCommitObject); + connectivityCheckInfo.setCommands( + Collections.singletonList(pushOldBranchCommand())); + + connectivityChecker.checkConnectivity(connectivityCheckInfo, + advertisedHaves, pm); + + verify(connectivityCheckerDelegate).checkConnectivity( + connectivityCheckInfo, wrap(branchHeadObjectId /* as direct parent */), + pm); + } + + @Test + public void testSuccessfulPushOldBranchMergeCommit() throws Exception { + createNewCommit(branchHeadCommitObject, openReviewCommitObject); + connectivityCheckInfo.setCommands( + Collections.singletonList(pushOldBranchCommand())); + + connectivityChecker.checkConnectivity(connectivityCheckInfo, + advertisedHaves, pm); + + verify(connectivityCheckerDelegate).checkConnectivity( + connectivityCheckInfo, + wrap(branchHeadObjectId /* as direct parent */, + openRewiewObjectId), + pm); + } + + + @Test + public void testNoChecksIfCantFindSubset() throws Exception { + createNewCommit(); + connectivityCheckInfo.setCommands( + Collections.singletonList(createNewBrachCommand())); + + connectivityChecker.checkConnectivity(connectivityCheckInfo, + advertisedHaves, pm); + + verify(connectivityCheckerDelegate) + .checkConnectivity(connectivityCheckInfo, advertisedHaves, pm); + } + + @Test + public void testReiterateInCaseNotSuccessful() throws Exception { + createNewCommit(branchHeadCommitObject); + connectivityCheckInfo.setCommands( + Collections.singletonList(createNewBrachCommand())); + + doThrow(new MissingObjectException(branchHeadCommitObject, + Constants.OBJ_COMMIT)).when(connectivityCheckerDelegate) + .checkConnectivity(connectivityCheckInfo, + wrap(branchHeadObjectId /* as direct parent */), pm); + + connectivityChecker.checkConnectivity(connectivityCheckInfo, + advertisedHaves, pm); + + verify(connectivityCheckerDelegate) + .checkConnectivity(connectivityCheckInfo, advertisedHaves, pm); + } + + @Test + public void testDependOnGrandparent() throws Exception { + RevCommit grandparent = tr.commit(new RevCommit[] {}); + RevCommit parent = tr.commit(grandparent); + createNewCommit(parent); + + branchHeadCommitObject = tr.commit(grandparent); + branchHeadObjectId = branchHeadCommitObject.getId(); + tr.getRevWalk().dispose(); + + connectivityCheckInfo.setCommands( + Collections.singletonList(createNewBrachCommand())); + + connectivityChecker.checkConnectivity(connectivityCheckInfo, + advertisedHaves, pm); + + verify(connectivityCheckerDelegate) + .checkConnectivity(connectivityCheckInfo, advertisedHaves, pm); + } + + private static Set<ObjectId> wrap(ObjectId... objectIds) { + return new HashSet<>(Arrays.asList(objectIds)); + } + + private ReceiveCommand createNewBrachCommand() { + return new ReceiveCommand(ObjectId.zeroId(), newCommitObjectId, + "totally/a/new/branch"); + } + + private ReceiveCommand pushOldBranchCommand() { + return new ReceiveCommand(branchHeadObjectId, newCommitObjectId, + "push/to/an/old/branch"); + } + + private void createNewCommit(RevCommit... parents) throws Exception { + newCommitObject = tr.commit(parents); + newCommitObjectId = newCommitObject.getId(); + } + +} diff --git a/org.eclipse.jgit/.settings/.api_filters b/org.eclipse.jgit/.settings/.api_filters index c8b7bf799e..e2565bd6b3 100644 --- a/org.eclipse.jgit/.settings/.api_filters +++ b/org.eclipse.jgit/.settings/.api_filters @@ -1,5 +1,61 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <component id="org.eclipse.jgit" version="2"> + <resource path="META-INF/MANIFEST.MF" type="org.eclipse.jgit.transport.CredentialsProviderUserInfo"> + <filter id="305324134"> + <message_arguments> + <message_argument value="org.eclipse.jgit.transport.CredentialsProviderUserInfo"/> + <message_argument value="org.eclipse.jgit_5.8.0"/> + </message_arguments> + </filter> + </resource> + <resource path="META-INF/MANIFEST.MF" type="org.eclipse.jgit.transport.DefaultSshSessionFactory"> + <filter id="305324134"> + <message_arguments> + <message_argument value="org.eclipse.jgit.transport.DefaultSshSessionFactory"/> + <message_argument value="org.eclipse.jgit_5.8.0"/> + </message_arguments> + </filter> + </resource> + <resource path="META-INF/MANIFEST.MF" type="org.eclipse.jgit.transport.JschConfigSessionFactory"> + <filter id="305324134"> + <message_arguments> + <message_argument value="org.eclipse.jgit.transport.JschConfigSessionFactory"/> + <message_argument value="org.eclipse.jgit_5.8.0"/> + </message_arguments> + </filter> + </resource> + <resource path="META-INF/MANIFEST.MF" type="org.eclipse.jgit.transport.JschSession"> + <filter id="305324134"> + <message_arguments> + <message_argument value="org.eclipse.jgit.transport.JschSession"/> + <message_argument value="org.eclipse.jgit_5.8.0"/> + </message_arguments> + </filter> + </resource> + <resource path="META-INF/MANIFEST.MF" type="org.eclipse.jgit.transport.OpenSshConfig"> + <filter id="305324134"> + <message_arguments> + <message_argument value="org.eclipse.jgit.transport.OpenSshConfig"/> + <message_argument value="org.eclipse.jgit_5.8.0"/> + </message_arguments> + </filter> + </resource> + <resource path="src/org/eclipse/jgit/lib/BitmapIndex.java" type="org.eclipse.jgit.lib.BitmapIndex$Bitmap"> + <filter id="403804204"> + <message_arguments> + <message_argument value="org.eclipse.jgit.lib.BitmapIndex.Bitmap"/> + <message_argument value="retrieveCompressed()"/> + </message_arguments> + </filter> + </resource> + <resource path="src/org/eclipse/jgit/transport/SshSessionFactory.java" type="org.eclipse.jgit.transport.SshSessionFactory"> + <filter id="336695337"> + <message_arguments> + <message_argument value="org.eclipse.jgit.transport.SshSessionFactory"/> + <message_argument value="getType()"/> + </message_arguments> + </filter> + </resource> <resource path="src/org/eclipse/jgit/transport/http/HttpConnection.java" type="org.eclipse.jgit.transport.http.HttpConnection"> <filter id="403767336"> <message_arguments> @@ -7,5 +63,11 @@ <message_argument value="HTTP_11_MOVED_PERM"/> </message_arguments> </filter> + <filter id="403767336"> + <message_arguments> + <message_argument value="org.eclipse.jgit.transport.http.HttpConnection"/> + <message_argument value="HTTP_NOT_AUTHORITATIVE"/> + </message_arguments> + </filter> </resource> </component> diff --git a/org.eclipse.jgit/BUILD b/org.eclipse.jgit/BUILD index dcfeb1702a..f7970976b0 100644 --- a/org.eclipse.jgit/BUILD +++ b/org.eclipse.jgit/BUILD @@ -20,12 +20,7 @@ java_library( resources = RESOURCES, deps = [ ":insecure_cipher_factory", - "//lib:bcpg", - "//lib:bcpkix", - "//lib:bcprov", "//lib:javaewah", - "//lib:jsch", - "//lib:jzlib", "//lib:slf4j-api", ], ) diff --git a/org.eclipse.jgit/META-INF/MANIFEST.MF b/org.eclipse.jgit/META-INF/MANIFEST.MF index 2cb8ce21f3..22454bad41 100644 --- a/org.eclipse.jgit/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit/META-INF/MANIFEST.MF @@ -6,62 +6,76 @@ Bundle-SymbolicName: org.eclipse.jgit Bundle-Version: 5.8.0.qualifier Bundle-Localization: plugin Bundle-Vendor: %Bundle-Vendor -Bundle-ActivationPolicy: lazy +Eclipse-ExtensibleAPI: true Export-Package: org.eclipse.jgit.annotations;version="5.8.0", org.eclipse.jgit.api;version="5.8.0"; - uses:="org.eclipse.jgit.revwalk, - org.eclipse.jgit.treewalk.filter, - org.eclipse.jgit.diff, - org.eclipse.jgit.util, + uses:="org.eclipse.jgit.transport, org.eclipse.jgit.notes, org.eclipse.jgit.dircache, - org.eclipse.jgit.api.errors, org.eclipse.jgit.lib, + org.eclipse.jgit.revwalk, + org.eclipse.jgit.treewalk.filter, + org.eclipse.jgit.diff, org.eclipse.jgit.treewalk, - org.eclipse.jgit.blame, + org.eclipse.jgit.util, org.eclipse.jgit.submodule, - org.eclipse.jgit.transport, + org.eclipse.jgit.api.errors, + org.eclipse.jgit.revwalk.filter, + org.eclipse.jgit.blame, org.eclipse.jgit.merge", - org.eclipse.jgit.api.errors;version="5.8.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.errors", - org.eclipse.jgit.attributes;version="5.8.0", + org.eclipse.jgit.api.errors;version="5.8.0"; + uses:="org.eclipse.jgit.lib, + org.eclipse.jgit.errors", + org.eclipse.jgit.attributes;version="5.8.0"; + uses:="org.eclipse.jgit.lib, + org.eclipse.jgit.treewalk", org.eclipse.jgit.blame;version="5.8.0"; uses:="org.eclipse.jgit.lib, org.eclipse.jgit.revwalk, org.eclipse.jgit.treewalk.filter, org.eclipse.jgit.diff", org.eclipse.jgit.diff;version="5.8.0"; - uses:="org.eclipse.jgit.patch, - org.eclipse.jgit.lib, - org.eclipse.jgit.treewalk, + uses:="org.eclipse.jgit.lib, + org.eclipse.jgit.attributes, org.eclipse.jgit.revwalk, + org.eclipse.jgit.patch, org.eclipse.jgit.treewalk.filter, + org.eclipse.jgit.treewalk, org.eclipse.jgit.util", org.eclipse.jgit.dircache;version="5.8.0"; - uses:="org.eclipse.jgit.lib, + uses:="org.eclipse.jgit.events, + org.eclipse.jgit.lib, + org.eclipse.jgit.attributes, org.eclipse.jgit.treewalk, - org.eclipse.jgit.util, - org.eclipse.jgit.events, - org.eclipse.jgit.attributes", + org.eclipse.jgit.util", org.eclipse.jgit.errors;version="5.8.0"; - uses:="org.eclipse.jgit.lib, - org.eclipse.jgit.internal.storage.pack, - org.eclipse.jgit.transport, - org.eclipse.jgit.dircache", - org.eclipse.jgit.events;version="5.8.0";uses:="org.eclipse.jgit.lib", + uses:="org.eclipse.jgit.transport, + org.eclipse.jgit.dircache, + org.eclipse.jgit.lib, + org.eclipse.jgit.internal.storage.pack", + org.eclipse.jgit.events;version="5.8.0"; + uses:="org.eclipse.jgit.lib", org.eclipse.jgit.fnmatch;version="5.8.0", org.eclipse.jgit.gitrepo;version="5.8.0"; - uses:="org.eclipse.jgit.api, + uses:="org.xml.sax.helpers, + org.eclipse.jgit.api, org.eclipse.jgit.lib, org.eclipse.jgit.revwalk, - org.xml.sax.helpers, org.xml.sax", org.eclipse.jgit.gitrepo.internal;version="5.8.0";x-internal:=true, org.eclipse.jgit.hooks;version="5.8.0";uses:="org.eclipse.jgit.lib", org.eclipse.jgit.ignore;version="5.8.0", - org.eclipse.jgit.ignore.internal;version="5.8.0";x-friends:="org.eclipse.jgit.test", - org.eclipse.jgit.internal;version="5.8.0";x-friends:="org.eclipse.jgit.test,org.eclipse.jgit.http.test", - org.eclipse.jgit.internal.fsck;version="5.8.0";x-friends:="org.eclipse.jgit.test", - org.eclipse.jgit.internal.ketch;version="5.8.0";x-friends:="org.eclipse.jgit.junit,org.eclipse.jgit.test,org.eclipse.jgit.pgm", + org.eclipse.jgit.ignore.internal;version="5.8.0"; + x-friends:="org.eclipse.jgit.test", + org.eclipse.jgit.internal;version="5.8.0"; + x-friends:="org.eclipse.jgit.test, + org.eclipse.jgit.http.test", + org.eclipse.jgit.internal.fsck;version="5.8.0"; + x-friends:="org.eclipse.jgit.test", + org.eclipse.jgit.internal.ketch;version="5.8.0"; + x-friends:="org.eclipse.jgit.junit, + org.eclipse.jgit.test, + org.eclipse.jgit.pgm", org.eclipse.jgit.internal.revwalk;version="5.8.0";x-internal:=true, org.eclipse.jgit.internal.storage.dfs;version="5.8.0"; x-friends:="org.eclipse.jgit.test, @@ -77,101 +91,142 @@ Export-Package: org.eclipse.jgit.annotations;version="5.8.0", org.eclipse.jgit.pgm, org.eclipse.jgit.pgm.test, org.eclipse.jgit.ssh.apache", - org.eclipse.jgit.internal.storage.io;version="5.8.0";x-friends:="org.eclipse.jgit.junit,org.eclipse.jgit.test,org.eclipse.jgit.pgm", - org.eclipse.jgit.internal.storage.pack;version="5.8.0";x-friends:="org.eclipse.jgit.junit,org.eclipse.jgit.test,org.eclipse.jgit.pgm", + org.eclipse.jgit.internal.storage.io;version="5.8.0"; + x-friends:="org.eclipse.jgit.junit, + org.eclipse.jgit.test, + org.eclipse.jgit.pgm", + org.eclipse.jgit.internal.storage.pack;version="5.8.0"; + x-friends:="org.eclipse.jgit.junit, + org.eclipse.jgit.test, + org.eclipse.jgit.pgm", org.eclipse.jgit.internal.storage.reftable;version="5.8.0"; x-friends:="org.eclipse.jgit.http.test, org.eclipse.jgit.junit, org.eclipse.jgit.test, org.eclipse.jgit.pgm", - org.eclipse.jgit.internal.storage.reftree;version="5.8.0";x-friends:="org.eclipse.jgit.junit,org.eclipse.jgit.test,org.eclipse.jgit.pgm", + org.eclipse.jgit.internal.storage.reftree;version="5.8.0"; + x-friends:="org.eclipse.jgit.junit, + org.eclipse.jgit.test, + org.eclipse.jgit.pgm", org.eclipse.jgit.internal.submodule;version="5.8.0";x-internal:=true, - org.eclipse.jgit.internal.transport.http;version="5.8.0";x-friends:="org.eclipse.jgit.test", - org.eclipse.jgit.internal.transport.parser;version="5.8.0";x-friends:="org.eclipse.jgit.http.server,org.eclipse.jgit.test", - org.eclipse.jgit.internal.transport.ssh;version="5.8.0";x-friends:="org.eclipse.jgit.ssh.apache", + org.eclipse.jgit.internal.transport.connectivity;version="5.8.0"; + x-friends:="org.eclipse.jgit.test", + org.eclipse.jgit.internal.transport.http;version="5.8.0"; + x-friends:="org.eclipse.jgit.test", + org.eclipse.jgit.internal.transport.parser;version="5.8.0"; + x-friends:="org.eclipse.jgit.http.server, + org.eclipse.jgit.test", + org.eclipse.jgit.internal.transport.ssh;version="5.8.0"; + x-friends:="org.eclipse.jgit.ssh.apache, + org.eclipse.jgit.ssh.jsch", org.eclipse.jgit.lib;version="5.8.0"; - uses:="org.eclipse.jgit.revwalk, - org.eclipse.jgit.treewalk.filter, - org.eclipse.jgit.util, - org.eclipse.jgit.events, + uses:="org.eclipse.jgit.transport, + org.eclipse.jgit.util.sha1, org.eclipse.jgit.dircache, + org.eclipse.jgit.revwalk, org.eclipse.jgit.internal.storage.file, + org.eclipse.jgit.attributes, + org.eclipse.jgit.events, + com.googlecode.javaewah, + org.eclipse.jgit.treewalk.filter, org.eclipse.jgit.treewalk, - org.eclipse.jgit.transport, - org.eclipse.jgit.submodule", - org.eclipse.jgit.lib.internal;version="5.8.0";x-friends:="org.eclipse.jgit.test", + org.eclipse.jgit.util, + org.eclipse.jgit.submodule, + org.eclipse.jgit.util.time", + org.eclipse.jgit.lib.internal;version="5.8.0"; + x-friends:="org.eclipse.jgit.test", org.eclipse.jgit.merge;version="5.8.0"; - uses:="org.eclipse.jgit.lib, - org.eclipse.jgit.treewalk, + uses:="org.eclipse.jgit.dircache, + org.eclipse.jgit.lib, org.eclipse.jgit.revwalk, org.eclipse.jgit.diff, - org.eclipse.jgit.dircache, - org.eclipse.jgit.api", + org.eclipse.jgit.treewalk, + org.eclipse.jgit.util, + org.eclipse.jgit.api, + org.eclipse.jgit.attributes", org.eclipse.jgit.nls;version="5.8.0", org.eclipse.jgit.notes;version="5.8.0"; uses:="org.eclipse.jgit.lib, - org.eclipse.jgit.treewalk, org.eclipse.jgit.revwalk, + org.eclipse.jgit.treewalk, org.eclipse.jgit.merge", - org.eclipse.jgit.patch;version="5.8.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.diff", - org.eclipse.jgit.revplot;version="5.8.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.revwalk", + org.eclipse.jgit.patch;version="5.8.0"; + uses:="org.eclipse.jgit.lib, + org.eclipse.jgit.diff", + org.eclipse.jgit.revplot;version="5.8.0"; + uses:="org.eclipse.jgit.lib, + org.eclipse.jgit.revwalk", org.eclipse.jgit.revwalk;version="5.8.0"; uses:="org.eclipse.jgit.lib, - org.eclipse.jgit.treewalk, + org.eclipse.jgit.diff, org.eclipse.jgit.treewalk.filter, + org.eclipse.jgit.revwalk.filter, + org.eclipse.jgit.treewalk", + org.eclipse.jgit.revwalk.filter;version="5.8.0"; + uses:="org.eclipse.jgit.revwalk, + org.eclipse.jgit.lib, + org.eclipse.jgit.util", + org.eclipse.jgit.storage.file;version="5.8.0"; + uses:="org.eclipse.jgit.lib, + org.eclipse.jgit.util", + org.eclipse.jgit.storage.pack;version="5.8.0"; + uses:="org.eclipse.jgit.lib", + org.eclipse.jgit.submodule;version="5.8.0"; + uses:="org.eclipse.jgit.lib, org.eclipse.jgit.diff, - org.eclipse.jgit.revwalk.filter", - org.eclipse.jgit.revwalk.filter;version="5.8.0";uses:="org.eclipse.jgit.revwalk,org.eclipse.jgit.lib,org.eclipse.jgit.util", - org.eclipse.jgit.storage.file;version="5.8.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.util", - org.eclipse.jgit.storage.pack;version="5.8.0";uses:="org.eclipse.jgit.lib", - org.eclipse.jgit.submodule;version="5.8.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.treewalk.filter,org.eclipse.jgit.treewalk", + org.eclipse.jgit.treewalk.filter, + org.eclipse.jgit.treewalk, + org.eclipse.jgit.util", org.eclipse.jgit.transport;version="5.8.0"; - uses:="org.eclipse.jgit.transport.resolver, - org.eclipse.jgit.revwalk, - org.eclipse.jgit.internal.storage.pack, - com.jcraft.jsch, - org.eclipse.jgit.util, + uses:="javax.crypto, org.eclipse.jgit.util.io, - org.eclipse.jgit.internal.storage.file, - org.eclipse.jgit.internal.transport.parser, org.eclipse.jgit.lib, + org.eclipse.jgit.revwalk, org.eclipse.jgit.transport.http, - org.eclipse.jgit.errors, - org.eclipse.jgit.storage.pack", - org.eclipse.jgit.transport.http;version="5.8.0";uses:="javax.net.ssl", - org.eclipse.jgit.transport.resolver;version="5.8.0";uses:="org.eclipse.jgit.lib,org.eclipse.jgit.transport", + org.eclipse.jgit.internal.storage.file, + org.eclipse.jgit.treewalk, + org.eclipse.jgit.util, + org.eclipse.jgit.internal.storage.pack, + org.eclipse.jgit.transport.resolver, + org.eclipse.jgit.storage.pack, + org.eclipse.jgit.errors", + org.eclipse.jgit.transport.http;version="5.8.0"; + uses:="javax.net.ssl", + org.eclipse.jgit.transport.resolver;version="5.8.0"; + uses:="org.eclipse.jgit.transport, + org.eclipse.jgit.lib", org.eclipse.jgit.treewalk;version="5.8.0"; - uses:="org.eclipse.jgit.lib, - org.eclipse.jgit.revwalk, + uses:="org.eclipse.jgit.dircache, + org.eclipse.jgit.lib, org.eclipse.jgit.attributes, + org.eclipse.jgit.revwalk, org.eclipse.jgit.treewalk.filter, - org.eclipse.jgit.util, - org.eclipse.jgit.dircache", - org.eclipse.jgit.treewalk.filter;version="5.8.0";uses:="org.eclipse.jgit.treewalk", + org.eclipse.jgit.util", + org.eclipse.jgit.treewalk.filter;version="5.8.0"; + uses:="org.eclipse.jgit.treewalk", org.eclipse.jgit.util;version="5.8.0"; - uses:="org.eclipse.jgit.lib, - org.eclipse.jgit.transport.http, + uses:="org.eclipse.jgit.transport, + org.eclipse.jgit.hooks, + org.eclipse.jgit.revwalk, org.eclipse.jgit.storage.file, - org.ietf.jgss", - org.eclipse.jgit.util.io;version="5.8.0", + org.ietf.jgss, + org.eclipse.jgit.attributes, + javax.management, + org.eclipse.jgit.lib, + org.eclipse.jgit.transport.http, + org.eclipse.jgit.treewalk, + javax.net.ssl, + org.eclipse.jgit.util.time", + org.eclipse.jgit.util.io;version="5.8.0"; + uses:="org.eclipse.jgit.attributes, + org.eclipse.jgit.lib, + org.eclipse.jgit.treewalk", org.eclipse.jgit.util.sha1;version="5.8.0", org.eclipse.jgit.util.time;version="5.8.0" Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)", - com.jcraft.jsch;version="[0.1.37,0.2.0)", javax.crypto, javax.net.ssl, - org.bouncycastle;version="[1.61.0,2.0.0)", - org.bouncycastle.bcpg;version="[1.61.0,2.0.0)", - org.bouncycastle.gpg;version="[1.61.0,2.0.0)", - org.bouncycastle.gpg.keybox;version="[1.61.0,2.0.0)", - org.bouncycastle.gpg.keybox.jcajce;version="[1.61.0,2.0.0)", - org.bouncycastle.jce.provider;version="[1.61.0,2.0.0)", - org.bouncycastle.openpgp;version="[1.61.0,2.0.0)", - org.bouncycastle.openpgp.jcajce;version="[1.61.0,2.0.0)", - org.bouncycastle.openpgp.operator;version="[1.61.0,2.0.0)", - org.bouncycastle.openpgp.operator.jcajce;version="[1.61.0,2.0.0)", - org.bouncycastle.util.encoders;version="[1.61.0,2.0.0)", org.slf4j;version="[1.7.0,2.0.0)", org.xml.sax, org.xml.sax.helpers diff --git a/org.eclipse.jgit/pom.xml b/org.eclipse.jgit/pom.xml index e87fa2ed72..c73eddcd64 100644 --- a/org.eclipse.jgit/pom.xml +++ b/org.eclipse.jgit/pom.xml @@ -37,16 +37,6 @@ <dependencies> <dependency> - <groupId>com.jcraft</groupId> - <artifactId>jsch</artifactId> - </dependency> - - <dependency> - <groupId>com.jcraft</groupId> - <artifactId>jzlib</artifactId> - </dependency> - - <dependency> <groupId>com.googlecode.javaewah</groupId> <artifactId>JavaEWAH</artifactId> </dependency> @@ -56,21 +46,6 @@ <artifactId>slf4j-api</artifactId> </dependency> - <dependency> - <groupId>org.bouncycastle</groupId> - <artifactId>bcpg-jdk15on</artifactId> - </dependency> - - <dependency> - <groupId>org.bouncycastle</groupId> - <artifactId>bcprov-jdk15on</artifactId> - </dependency> - - <dependency> - <groupId>org.bouncycastle</groupId> - <artifactId>bcpkix-jdk15on</artifactId> - </dependency> - </dependencies> <build> @@ -169,7 +144,7 @@ <breakBuildOnBinaryIncompatibleModifications>false</breakBuildOnBinaryIncompatibleModifications> <onlyBinaryIncompatible>false</onlyBinaryIncompatible> <includeSynthetic>false</includeSynthetic> - <ignoreMissingClasses>false</ignoreMissingClasses> + <ignoreMissingClasses>true</ignoreMissingClasses> <skipPomModules>true</skipPomModules> </parameter> <skip>false</skip> @@ -235,7 +210,7 @@ <breakBuildOnBinaryIncompatibleModifications>false</breakBuildOnBinaryIncompatibleModifications> <onlyBinaryIncompatible>false</onlyBinaryIncompatible> <includeSynthetic>false</includeSynthetic> - <ignoreMissingClasses>false</ignoreMissingClasses> + <ignoreMissingClasses>true</ignoreMissingClasses> <skipPomModules>true</skipPomModules> </parameter> <skip>false</skip> diff --git a/org.eclipse.jgit/resources/META-INF/services/org.eclipse.jgit.transport.SshSessionFactory b/org.eclipse.jgit/resources/META-INF/services/org.eclipse.jgit.transport.SshSessionFactory deleted file mode 100644 index 1f8828457b..0000000000 --- a/org.eclipse.jgit/resources/META-INF/services/org.eclipse.jgit.transport.SshSessionFactory +++ /dev/null @@ -1 +0,0 @@ -org.eclipse.jgit.transport.DefaultSshSessionFactory diff --git a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties index c9ca11b543..e6da551bb7 100644 --- a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties +++ b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties @@ -269,6 +269,7 @@ exceptionCaughtDuringExecutionOfTagCommand=Exception caught during execution of exceptionHookExecutionInterrupted=Execution of "{0}" hook interrupted. exceptionOccurredDuringAddingOfOptionToALogCommand=Exception occurred during adding of {0} as option to a Log command exceptionOccurredDuringReadingOfGIT_DIR=Exception occurred during reading of $GIT_DIR/{0}. {1} +exceptionWhileFindingUserHome=Problem determining the user home directory, trying Java user.home exceptionWhileReadingPack=Exception caught while accessing pack file {0}, the pack file might be corrupt. Caught {1} consecutive errors while trying to read this pack. expectedACKNAKFoundEOF=Expected ACK/NAK, found EOF expectedACKNAKGot=Expected ACK/NAK, got: {0} @@ -304,15 +305,6 @@ flagsAlreadyCreated={0} flags already created. funnyRefname=funny refname gcFailed=Garbage collection failed. gcTooManyUnpruned=Too many loose, unpruneable objects after garbage collection. Consider adjusting gc.auto or gc.pruneExpire. -gpgFailedToParseSecretKey=Failed to parse secret key file in directory: {0}. Is the entered passphrase correct? -gpgNoCredentialsProvider=missing credentials provider -gpgNoKeyring=neither pubring.kbx nor secring.gpg files found -gpgNoKeyInLegacySecring=no matching secret key found in legacy secring.gpg for key or user id: {0} -gpgNoPublicKeyFound=Unable to find a public-key with key or user id: {0} -gpgNoSecretKeyForPublicKey=unable to find associated secret key for public key: {0} -gpgNotASigningKey=Secret key ({0}) is not suitable for signing -gpgKeyInfo=GPG Key (fingerprint {0}) -gpgSigningCancelled=Signing was cancelled headRequiredToStash=HEAD required to stash local changes hoursAgo={0} hours ago httpConfigCannotNormalizeURL=Cannot normalize URL path {0}: too many .. segments @@ -356,6 +348,7 @@ invalidGitdirRef = Invalid .git reference in file ''{0}'' invalidGitModules=Invalid .gitmodules file invalidGitType=invalid git type: {0} invalidHexString=Invalid hex string: {0} +invalidHomeDirectory=Invalid home directory: {0} invalidHooksPath=Invalid git config core.hooksPath = {0} invalidId=Invalid id: {0} invalidId0=Invalid id @@ -617,6 +610,7 @@ shortReadOfBlock=Short read of block. shortReadOfOptionalDIRCExtensionExpectedAnotherBytes=Short read of optional DIRC extension {0}; expected another {1} bytes within the section. shortSkipOfBlock=Short skip of block. signingNotSupportedOnTag=Signing isn't supported on tag operations yet. +signingServiceUnavailable=Signing service is not available similarityScoreMustBeWithinBounds=Similarity score must be between 0 and 100. skipMustBeNonNegative=skip must be >= 0 skipNotAccessiblePath=The path ''{0}'' isn't accessible. Skip it. @@ -627,7 +621,6 @@ sourceRefDoesntResolveToAnyObject=Source ref {0} doesn''t resolve to any object. sourceRefNotSpecifiedForRefspec=Source ref not specified for refspec: {0} squashCommitNotUpdatingHEAD=Squash commit -- not updating HEAD sshCommandFailed=Execution of ssh command ''{0}'' failed with error ''{1}'' -sshUserNameError=Jsch error: failed to set SSH user name correctly to ''{0}''; using ''{1}'' picked up from SSH config file. sslFailureExceptionMessage=Secure connection to {0} could not be established because of SSL problems sslFailureInfo=A secure connection to {0} could not be established because the server''s certificate could not be validated. sslFailureCause=SSL reported: {0} @@ -688,7 +681,6 @@ transportProtoLocal=Local Git Repository transportProtoSFTP=SFTP transportProtoSSH=SSH transportProtoTest=Test -transportSSHRetryInterrupt=Interrupted while waiting for retry treeEntryAlreadyExists=Tree entry "{0}" already exists. treeFilterMarkerTooManyFilters=Too many markTreeFilters passed, maximum number is {0} (passed {1}) treeWalkMustHaveExactlyTwoTrees=TreeWalk should have exactly two trees. diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java index 0d4b3da6a3..e228e8276a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011, 2012, IBM Corporation and others. and others + * Copyright (C) 2011, 2020 IBM Corporation and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0 which is available at @@ -9,18 +9,15 @@ */ package org.eclipse.jgit.api; -import static java.nio.charset.StandardCharsets.UTF_8; - import java.io.File; -import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; -import java.io.OutputStreamWriter; import java.io.Writer; import java.nio.file.Files; import java.nio.file.StandardCopyOption; import java.text.MessageFormat; import java.util.ArrayList; +import java.util.Iterator; import java.util.List; import org.eclipse.jgit.api.errors.GitAPIException; @@ -168,71 +165,156 @@ public class ApplyCommand extends GitCommand<ApplyResult> { for (int i = 0; i < rt.size(); i++) oldLines.add(rt.getString(i)); List<String> newLines = new ArrayList<>(oldLines); + int afterLastHunk = 0; + int lineNumberShift = 0; + int lastHunkNewLine = -1; for (HunkHeader hh : fh.getHunks()) { + // We assume hunks to be ordered + if (hh.getNewStartLine() <= lastHunkNewLine) { + throw new PatchApplyException(MessageFormat + .format(JGitText.get().patchApplyException, hh)); + } + lastHunkNewLine = hh.getNewStartLine(); + byte[] b = new byte[hh.getEndOffset() - hh.getStartOffset()]; System.arraycopy(hh.getBuffer(), hh.getStartOffset(), b, 0, b.length); RawText hrt = new RawText(b); List<String> hunkLines = new ArrayList<>(hrt.size()); - for (int i = 0; i < hrt.size(); i++) + for (int i = 0; i < hrt.size(); i++) { hunkLines.add(hrt.getString(i)); - int pos = 0; - for (int j = 1; j < hunkLines.size(); j++) { + } + + if (hh.getNewStartLine() == 0) { + // Must be the single hunk for clearing all content + if (fh.getHunks().size() == 1 + && canApplyAt(hunkLines, newLines, 0)) { + newLines.clear(); + break; + } + throw new PatchApplyException(MessageFormat + .format(JGitText.get().patchApplyException, hh)); + } + // Hunk lines as reported by the hunk may be off, so don't rely on + // them. + int applyAt = hh.getNewStartLine() - 1 + lineNumberShift; + // But they definitely should not go backwards. + if (applyAt < afterLastHunk && lineNumberShift < 0) { + applyAt = hh.getNewStartLine() - 1; + lineNumberShift = 0; + } + if (applyAt < afterLastHunk) { + throw new PatchApplyException(MessageFormat + .format(JGitText.get().patchApplyException, hh)); + } + boolean applies = false; + int oldLinesInHunk = hh.getLinesContext() + + hh.getOldImage().getLinesDeleted(); + if (oldLinesInHunk <= 1) { + // Don't shift hunks without context lines. Just try the + // position corrected by the current lineNumberShift, and if + // that fails, the position recorded in the hunk header. + applies = canApplyAt(hunkLines, newLines, applyAt); + if (!applies && lineNumberShift != 0) { + applyAt = hh.getNewStartLine() - 1; + applies = applyAt >= afterLastHunk + && canApplyAt(hunkLines, newLines, applyAt); + } + } else { + int maxShift = applyAt - afterLastHunk; + for (int shift = 0; shift <= maxShift; shift++) { + if (canApplyAt(hunkLines, newLines, applyAt - shift)) { + applies = true; + applyAt -= shift; + break; + } + } + if (!applies) { + // Try shifting the hunk downwards + applyAt = hh.getNewStartLine() - 1 + lineNumberShift; + maxShift = newLines.size() - applyAt - oldLinesInHunk; + for (int shift = 1; shift <= maxShift; shift++) { + if (canApplyAt(hunkLines, newLines, applyAt + shift)) { + applies = true; + applyAt += shift; + break; + } + } + } + } + if (!applies) { + throw new PatchApplyException(MessageFormat + .format(JGitText.get().patchApplyException, hh)); + } + // Hunk applies at applyAt. Apply it, and update afterLastHunk and + // lineNumberShift + lineNumberShift = applyAt - hh.getNewStartLine() + 1; + int sz = hunkLines.size(); + for (int j = 1; j < sz; j++) { String hunkLine = hunkLines.get(j); switch (hunkLine.charAt(0)) { case ' ': - if (!newLines.get(hh.getNewStartLine() - 1 + pos).equals( - hunkLine.substring(1))) { - throw new PatchApplyException(MessageFormat.format( - JGitText.get().patchApplyException, hh)); - } - pos++; + applyAt++; break; case '-': - if (hh.getNewStartLine() == 0) { - newLines.clear(); - } else { - if (!newLines.get(hh.getNewStartLine() - 1 + pos) - .equals(hunkLine.substring(1))) { - throw new PatchApplyException(MessageFormat.format( - JGitText.get().patchApplyException, hh)); - } - newLines.remove(hh.getNewStartLine() - 1 + pos); - } + newLines.remove(applyAt); break; case '+': - newLines.add(hh.getNewStartLine() - 1 + pos, - hunkLine.substring(1)); - pos++; + newLines.add(applyAt++, hunkLine.substring(1)); + break; + default: break; } } + afterLastHunk = applyAt; } - if (!isNoNewlineAtEndOfFile(fh)) + if (!isNoNewlineAtEndOfFile(fh)) { newLines.add(""); //$NON-NLS-1$ - if (!rt.isMissingNewlineAtEnd()) + } + if (!rt.isMissingNewlineAtEnd()) { oldLines.add(""); //$NON-NLS-1$ - if (!isChanged(oldLines, newLines)) - return; // don't touch the file - StringBuilder sb = new StringBuilder(); - for (String l : newLines) { - // don't bother handling line endings - if it was windows, the \r is - // still there! - sb.append(l).append('\n'); } - if (sb.length() > 0) { - sb.deleteCharAt(sb.length() - 1); + if (!isChanged(oldLines, newLines)) { + return; // Don't touch the file } - try (Writer fw = new OutputStreamWriter(new FileOutputStream(f), - UTF_8)) { - fw.write(sb.toString()); + try (Writer fw = Files.newBufferedWriter(f.toPath())) { + for (Iterator<String> l = newLines.iterator(); l.hasNext();) { + fw.write(l.next()); + if (l.hasNext()) { + // Don't bother handling line endings - if it was Windows, + // the \r is still there! + fw.write('\n'); + } + } } - getRepository().getFS().setExecute(f, fh.getNewMode() == FileMode.EXECUTABLE_FILE); } + private boolean canApplyAt(List<String> hunkLines, List<String> newLines, + int line) { + int sz = hunkLines.size(); + int limit = newLines.size(); + int pos = line; + for (int j = 1; j < sz; j++) { + String hunkLine = hunkLines.get(j); + switch (hunkLine.charAt(0)) { + case ' ': + case '-': + if (pos >= limit + || !newLines.get(pos).equals(hunkLine.substring(1))) { + return false; + } + pos++; + break; + default: + break; + } + } + return true; + } + private static boolean isChanged(List<String> ol, List<String> nl) { if (ol.size() != nl.size()) return true; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java index 4e18b5994d..b4f7175036 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java @@ -27,6 +27,7 @@ import org.eclipse.jgit.api.errors.JGitInternalException; import org.eclipse.jgit.api.errors.NoFilepatternException; import org.eclipse.jgit.api.errors.NoHeadException; import org.eclipse.jgit.api.errors.NoMessageException; +import org.eclipse.jgit.api.errors.ServiceUnavailableException; import org.eclipse.jgit.api.errors.UnmergedPathsException; import org.eclipse.jgit.api.errors.UnsupportedSigningFormatException; import org.eclipse.jgit.api.errors.WrongRepositoryStateException; @@ -55,7 +56,6 @@ import org.eclipse.jgit.lib.RefUpdate; import org.eclipse.jgit.lib.RefUpdate.Result; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.lib.RepositoryState; -import org.eclipse.jgit.lib.internal.BouncyCastleGpgSigner; import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.jgit.revwalk.RevObject; import org.eclipse.jgit.revwalk.RevTag; @@ -140,12 +140,16 @@ public class CommitCommand extends GitCommand<RevCommit> { * collected by the setter methods of this class. Each instance of this * class should only be used for one invocation of the command (means: one * call to {@link #call()}) + * + * @throws ServiceUnavailableException + * if signing service is not available e.g. since it isn't + * installed */ @Override - public RevCommit call() throws GitAPIException, NoHeadException, - NoMessageException, UnmergedPathsException, - ConcurrentRefUpdateException, WrongRepositoryStateException, - AbortedByHookException { + public RevCommit call() throws GitAPIException, AbortedByHookException, + ConcurrentRefUpdateException, NoHeadException, NoMessageException, + ServiceUnavailableException, UnmergedPathsException, + WrongRepositoryStateException { checkCallable(); Collections.sort(only); @@ -239,6 +243,10 @@ public class CommitCommand extends GitCommand<RevCommit> { commit.setTreeId(indexTreeId); if (signCommit.booleanValue()) { + if (gpgSigner == null) { + throw new ServiceUnavailableException( + JGitText.get().signingServiceUnavailable); + } gpgSigner.sign(commit, signingKey, committer, credentialsProvider); } @@ -510,7 +518,8 @@ public class CommitCommand extends GitCommand<RevCommit> { * * @throws NoMessageException * if the commit message has not been specified - * @throws UnsupportedSigningFormatException if the configured gpg.format is not supported + * @throws UnsupportedSigningFormatException + * if the configured gpg.format is not supported */ private void processOptions(RepositoryState state, RevWalk rw) throws NoMessageException, UnsupportedSigningFormatException { @@ -581,9 +590,6 @@ public class CommitCommand extends GitCommand<RevCommit> { JGitText.get().onlyOpenPgpSupportedForSigning); } gpgSigner = GpgSigner.getDefault(); - if (gpgSigner == null) { - gpgSigner = new BouncyCastleGpgSigner(); - } } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java index 01306f4129..64314772b7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java @@ -18,6 +18,8 @@ import java.io.IOException; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.lib.RepositoryBuilder; import org.eclipse.jgit.lib.RepositoryCache; +import org.eclipse.jgit.lib.internal.WorkQueue; +import org.eclipse.jgit.nls.NLS; import org.eclipse.jgit.util.FS; /** @@ -171,6 +173,15 @@ public class Git implements AutoCloseable { } /** + * Shutdown JGit and release resources it holds like NLS and thread pools + * @since 5.8 + */ + public static void shutdown() { + WorkQueue.getExecutor().shutdownNow(); + NLS.clear(); + } + + /** * Construct a new {@link org.eclipse.jgit.api.Git} object which can * interact with the specified git repository. * <p> diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/ServiceUnavailableException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/ServiceUnavailableException.java new file mode 100644 index 0000000000..207ded0262 --- /dev/null +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/ServiceUnavailableException.java @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2020, Matthias Sohn <matthias.sohn@sap.com> and + * other copyright owners as documented in the project's IP log. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.api.errors; + +/** + * Exception thrown when an optional service is not available + * + * @since 5.8 + */ +public class ServiceUnavailableException extends GitAPIException { + private static final long serialVersionUID = 1L; + + /** + * Constructor for ServiceUnavailableException + * + * @param message + * error message + * @param cause + * a {@link java.lang.Throwable} + */ + public ServiceUnavailableException(String message, Throwable cause) { + super(message, cause); + } + + /** + * Constructor for ServiceUnavailableException + * + * @param message + * error message + */ + public ServiceUnavailableException(String message) { + super(message); + } +} diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawTextComparator.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawTextComparator.java index 508d07c200..0c41b8598b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawTextComparator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawTextComparator.java @@ -191,21 +191,15 @@ public abstract class RawTextComparator extends SequenceComparator<RawText> { be = trimTrailingWhitespace(b.content, bs, be); while (as < ae && bs < be) { - byte ac = a.content[as]; - byte bc = b.content[bs]; + byte ac = a.content[as++]; + byte bc = b.content[bs++]; - if (ac != bc) - return false; - - if (isWhitespace(ac)) + if (isWhitespace(ac) && isWhitespace(bc)) { as = trimLeadingWhitespace(a.content, as, ae); - else - as++; - - if (isWhitespace(bc)) bs = trimLeadingWhitespace(b.content, bs, be); - else - bs++; + } else if (ac != bc) { + return false; + } } return as == ae && bs == be; } @@ -215,12 +209,12 @@ public abstract class RawTextComparator extends SequenceComparator<RawText> { int hash = 5381; end = trimTrailingWhitespace(raw, ptr, end); while (ptr < end) { - byte c = raw[ptr]; - hash = ((hash << 5) + hash) + (c & 0xff); - if (isWhitespace(c)) + byte c = raw[ptr++]; + if (isWhitespace(c)) { ptr = trimLeadingWhitespace(raw, ptr, end); - else - ptr++; + c = ' '; + } + hash = ((hash << 5) + hash) + (c & 0xff); } return hash; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java index e8e1984306..8c51a7ac2f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java @@ -1217,7 +1217,7 @@ public class DirCacheCheckout { if (e != null && !FileMode.TREE.equals(e.getFileMode())) builder.add(e); if (force) { - if (f.isModified(e, true, walk.getObjectReader())) { + if (f == null || f.isModified(e, true, walk.getObjectReader())) { kept.add(path); checkoutEntry(repo, e, walk.getObjectReader(), false, new CheckoutMetadata(walk.getEolStreamType(CHECKOUT_OP), diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/CharacterHead.java b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/CharacterHead.java index ebffa19b1d..faf4ee66c9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/CharacterHead.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/CharacterHead.java @@ -19,7 +19,7 @@ final class CharacterHead extends AbstractHead { * @param expectedCharacter * expected {@code char} */ - protected CharacterHead(char expectedCharacter) { + CharacterHead(char expectedCharacter) { super(false); this.expectedCharacter = expectedCharacter; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java index ec2414d41b..782a3f872d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java @@ -297,6 +297,7 @@ public class JGitText extends TranslationBundle { /***/ public String exceptionHookExecutionInterrupted; /***/ public String exceptionOccurredDuringAddingOfOptionToALogCommand; /***/ public String exceptionOccurredDuringReadingOfGIT_DIR; + /***/ public String exceptionWhileFindingUserHome; /***/ public String exceptionWhileReadingPack; /***/ public String expectedACKNAKFoundEOF; /***/ public String expectedACKNAKGot; @@ -332,15 +333,6 @@ public class JGitText extends TranslationBundle { /***/ public String funnyRefname; /***/ public String gcFailed; /***/ public String gcTooManyUnpruned; - /***/ public String gpgFailedToParseSecretKey; - /***/ public String gpgNoCredentialsProvider; - /***/ public String gpgNoKeyring; - /***/ public String gpgNoKeyInLegacySecring; - /***/ public String gpgNoPublicKeyFound; - /***/ public String gpgNoSecretKeyForPublicKey; - /***/ public String gpgNotASigningKey; - /***/ public String gpgKeyInfo; - /***/ public String gpgSigningCancelled; /***/ public String headRequiredToStash; /***/ public String hoursAgo; /***/ public String httpConfigCannotNormalizeURL; @@ -384,6 +376,7 @@ public class JGitText extends TranslationBundle { /***/ public String invalidGitModules; /***/ public String invalidGitType; /***/ public String invalidHexString; + /***/ public String invalidHomeDirectory; /***/ public String invalidHooksPath; /***/ public String invalidId; /***/ public String invalidId0; @@ -645,6 +638,7 @@ public class JGitText extends TranslationBundle { /***/ public String shortReadOfOptionalDIRCExtensionExpectedAnotherBytes; /***/ public String shortSkipOfBlock; /***/ public String signingNotSupportedOnTag; + /***/ public String signingServiceUnavailable; /***/ public String similarityScoreMustBeWithinBounds; /***/ public String skipMustBeNonNegative; /***/ public String skipNotAccessiblePath; @@ -655,7 +649,6 @@ public class JGitText extends TranslationBundle { /***/ public String sourceRefNotSpecifiedForRefspec; /***/ public String squashCommitNotUpdatingHEAD; /***/ public String sshCommandFailed; - /***/ public String sshUserNameError; /***/ public String sslFailureExceptionMessage; /***/ public String sslFailureInfo; /***/ public String sslFailureCause; @@ -716,7 +709,6 @@ public class JGitText extends TranslationBundle { /***/ public String transportProtoSSH; /***/ public String transportProtoTest; /***/ public String transportProvidedRefWithNoObjectId; - /***/ public String transportSSHRetryInterrupt; /***/ public String treeEntryAlreadyExists; /***/ public String treeFilterMarkerTooManyFilters; /***/ public String treeWalkMustHaveExactlyTwoTrees; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/revwalk/AddToBitmapWithCacheFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/revwalk/AddToBitmapWithCacheFilter.java new file mode 100644 index 0000000000..d7ccadfbe7 --- /dev/null +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/revwalk/AddToBitmapWithCacheFilter.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2020, Google LLC and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.internal.revwalk; + +import org.eclipse.jgit.lib.BitmapIndex.Bitmap; +import org.eclipse.jgit.lib.BitmapIndex.BitmapBuilder; +import org.eclipse.jgit.lib.Constants; +import org.eclipse.jgit.lib.AnyObjectId; +import org.eclipse.jgit.revwalk.filter.RevFilter; +import org.eclipse.jgit.revwalk.RevWalk; +import org.eclipse.jgit.revwalk.RevCommit; +import org.eclipse.jgit.revwalk.RevFlag; + +/** + * A RevFilter that adds the visited commits to {@code bitmap} as a side effect. + * <p> + * When the walk hits a commit that is the same as {@code cachedCommit} or is + * part of {@code bitmap}'s BitmapIndex, that entire bitmap is ORed into + * {@code bitmap} and the commit and its parents are marked as SEEN so that the + * walk does not have to visit its ancestors. This ensures the walk is very + * short if there is good bitmap coverage. + */ +public class AddToBitmapWithCacheFilter extends RevFilter { + private final AnyObjectId cachedCommit; + + private final Bitmap cachedBitmap; + + private final BitmapBuilder bitmap; + + /** + * Create a filter with a cached BitmapCommit that adds visited commits to + * the given bitmap. + * + * @param cachedCommit + * the cached commit + * @param cachedBitmap + * the bitmap corresponds to {@code cachedCommit}} + * @param bitmap + * bitmap to write visited commits to + */ + public AddToBitmapWithCacheFilter(AnyObjectId cachedCommit, + Bitmap cachedBitmap, + BitmapBuilder bitmap) { + this.cachedCommit = cachedCommit; + this.cachedBitmap = cachedBitmap; + this.bitmap = bitmap; + } + + /** {@inheritDoc} */ + @Override + public final boolean include(RevWalk rw, RevCommit c) { + Bitmap visitedBitmap; + + if (bitmap.contains(c)) { + // already included + } else if ((visitedBitmap = bitmap.getBitmapIndex() + .getBitmap(c)) != null) { + bitmap.or(visitedBitmap); + } else if (cachedCommit.equals(c)) { + bitmap.or(cachedBitmap); + } else { + bitmap.addObject(c, Constants.OBJ_COMMIT); + return true; + } + + for (RevCommit p : c.getParents()) { + p.add(RevFlag.SEEN); + } + return false; + } + + /** {@inheritDoc} */ + @Override + public final RevFilter clone() { + throw new UnsupportedOperationException(); + } + + /** {@inheritDoc} */ + @Override + public final boolean requiresCommitBody() { + return false; + } +} + diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java index 6aa1a0e8ea..0d3a2b4f12 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java @@ -252,6 +252,11 @@ public class BitmapIndexImpl implements BitmapIndex { return bitmapIndex; } + @Override + public EWAHCompressedBitmap retrieveCompressed() { + return build().retrieveCompressed(); + } + private EWAHCompressedBitmap ewahBitmap(Bitmap other) { if (other instanceof CompressedBitmap) { CompressedBitmap b = (CompressedBitmap) other; @@ -372,7 +377,8 @@ public class BitmapIndexImpl implements BitmapIndex { }; } - EWAHCompressedBitmap getEwahCompressedBitmap() { + @Override + public EWAHCompressedBitmap retrieveCompressed() { return bitmap; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java index 6a822d570a..265b71dd2a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java @@ -19,8 +19,8 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; -import java.nio.file.AtomicMoveNotSupportedException; import java.nio.file.Files; +import java.nio.file.NoSuchFileException; import java.nio.file.StandardCopyOption; import java.text.MessageFormat; import java.util.ArrayList; @@ -685,47 +685,46 @@ public class ObjectDirectory extends FileObjectDatabase { FileUtils.delete(tmp, FileUtils.RETRY); return InsertLooseObjectResult.EXISTS_LOOSE; } + try { - Files.move(FileUtils.toPath(tmp), FileUtils.toPath(dst), - StandardCopyOption.ATOMIC_MOVE); - dst.setReadOnly(); - unpackedObjectCache.add(id); - return InsertLooseObjectResult.INSERTED; - } catch (AtomicMoveNotSupportedException e) { - LOG.error(e.getMessage(), e); + return tryMove(tmp, dst, id); + } catch (NoSuchFileException e) { + // It's possible the directory doesn't exist yet as the object + // directories are always lazily created. Note that we try the + // rename/move first as the directory likely does exist. + // + // Create the directory. + // + FileUtils.mkdir(dst.getParentFile(), true); } catch (IOException e) { - // ignore + // Any other IO error is considered a failure. + // + LOG.error(e.getMessage(), e); + FileUtils.delete(tmp, FileUtils.RETRY); + return InsertLooseObjectResult.FAILURE; } - // Maybe the directory doesn't exist yet as the object - // directories are always lazily created. Note that we - // try the rename first as the directory likely does exist. - // - FileUtils.mkdir(dst.getParentFile(), true); try { - Files.move(FileUtils.toPath(tmp), FileUtils.toPath(dst), - StandardCopyOption.ATOMIC_MOVE); - dst.setReadOnly(); - unpackedObjectCache.add(id); - return InsertLooseObjectResult.INSERTED; - } catch (AtomicMoveNotSupportedException e) { - LOG.error(e.getMessage(), e); + return tryMove(tmp, dst, id); } catch (IOException e) { - LOG.debug(e.getMessage(), e); - } - - if (!createDuplicate && has(id)) { + // The object failed to be renamed into its proper location and + // it doesn't exist in the repository either. We really don't + // know what went wrong, so fail. + // + LOG.error(e.getMessage(), e); FileUtils.delete(tmp, FileUtils.RETRY); - return InsertLooseObjectResult.EXISTS_PACKED; + return InsertLooseObjectResult.FAILURE; } + } - // The object failed to be renamed into its proper - // location and it doesn't exist in the repository - // either. We really don't know what went wrong, so - // fail. - // - FileUtils.delete(tmp, FileUtils.RETRY); - return InsertLooseObjectResult.FAILURE; + private InsertLooseObjectResult tryMove(File tmp, File dst, + ObjectId id) + throws IOException { + Files.move(FileUtils.toPath(tmp), FileUtils.toPath(dst), + StandardCopyOption.ATOMIC_MOVE); + dst.setReadOnly(); + unpackedObjectCache.add(id); + return InsertLooseObjectResult.INSERTED; } boolean searchPacksAgain(PackList old) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java index c908e6a244..e6b2cc12f4 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java @@ -14,7 +14,6 @@ package org.eclipse.jgit.internal.storage.file; import java.io.EOFException; import java.io.File; -import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.FilterOutputStream; import java.io.IOException; @@ -116,7 +115,7 @@ class ObjectDirectoryInserter extends ObjectInserter { private ObjectId insertOneObject( File tmp, ObjectId id, boolean createDuplicate) - throws IOException, ObjectWritingException { + throws IOException { switch (db.insertUnpackedObject(tmp, id, createDuplicate)) { case INSERTED: case EXISTS_PACKED: @@ -163,18 +162,16 @@ class ObjectDirectoryInserter extends ObjectInserter { } } - @SuppressWarnings("resource" /* java 7 */) private File toTemp(final SHA1 md, final int type, long len, - final InputStream is) throws IOException, FileNotFoundException, - Error { + final InputStream is) throws IOException { boolean delete = true; File tmp = newTempFile(); - try { - FileOutputStream fOut = new FileOutputStream(tmp); + try (FileOutputStream fOut = new FileOutputStream(tmp)) { try { OutputStream out = fOut; - if (config.getFSyncObjectFiles()) + if (config.getFSyncObjectFiles()) { out = Channels.newOutputStream(fOut.getChannel()); + } DeflaterOutputStream cOut = compress(out); SHA1OutputStream dOut = new SHA1OutputStream(cOut, md); writeHeader(dOut, type, len); @@ -182,53 +179,54 @@ class ObjectDirectoryInserter extends ObjectInserter { final byte[] buf = buffer(); while (len > 0) { int n = is.read(buf, 0, (int) Math.min(len, buf.length)); - if (n <= 0) + if (n <= 0) { throw shortInput(len); + } dOut.write(buf, 0, n); len -= n; } dOut.flush(); cOut.finish(); } finally { - if (config.getFSyncObjectFiles()) + if (config.getFSyncObjectFiles()) { fOut.getChannel().force(true); - fOut.close(); + } } delete = false; return tmp; } finally { - if (delete) + if (delete) { FileUtils.delete(tmp, FileUtils.RETRY); + } } } - @SuppressWarnings("resource" /* java 7 */) private File toTemp(final int type, final byte[] buf, final int pos, - final int len) throws IOException, FileNotFoundException { + final int len) throws IOException { boolean delete = true; File tmp = newTempFile(); - try { - FileOutputStream fOut = new FileOutputStream(tmp); + try (FileOutputStream fOut = new FileOutputStream(tmp)) { try { OutputStream out = fOut; - if (config.getFSyncObjectFiles()) + if (config.getFSyncObjectFiles()) { out = Channels.newOutputStream(fOut.getChannel()); + } DeflaterOutputStream cOut = compress(out); writeHeader(cOut, type, len); cOut.write(buf, pos, len); cOut.finish(); } finally { - if (config.getFSyncObjectFiles()) + if (config.getFSyncObjectFiles()) { fOut.getChannel().force(true); - fOut.close(); + } } - delete = false; return tmp; } finally { - if (delete) + if (delete) { FileUtils.delete(tmp, FileUtils.RETRY); + } } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java index 9538cc5e0a..5666b57609 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java @@ -11,17 +11,16 @@ package org.eclipse.jgit.internal.storage.file; import java.text.MessageFormat; +import java.util.ArrayList; import java.util.Collections; -import java.util.Iterator; +import java.util.LinkedList; import java.util.List; -import java.util.NoSuchElementException; import org.eclipse.jgit.internal.JGitText; -import org.eclipse.jgit.internal.storage.file.BitmapIndexImpl.CompressedBitmap; +import org.eclipse.jgit.internal.storage.pack.BitmapCommit; import org.eclipse.jgit.internal.storage.pack.ObjectToPack; import org.eclipse.jgit.lib.AnyObjectId; import org.eclipse.jgit.lib.BitmapIndex.Bitmap; -import org.eclipse.jgit.lib.BitmapIndex.BitmapBuilder; import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.ObjectIdOwnerMap; @@ -41,8 +40,12 @@ public class PackBitmapIndexBuilder extends BasePackBitmapIndex { private final EWAHCompressedBitmap blobs; private final EWAHCompressedBitmap tags; private final BlockList<PositionEntry> byOffset; - final BlockList<StoredBitmap> - byAddOrder = new BlockList<>(); + + private final LinkedList<StoredBitmap> + bitmapsToWriteXorBuffer = new LinkedList<>(); + + private List<StoredEntry> bitmapsToWrite = new ArrayList<>(); + final ObjectIdOwnerMap<PositionEntry> positionEntries = new ObjectIdOwnerMap<>(); @@ -134,16 +137,64 @@ public class PackBitmapIndexBuilder extends BasePackBitmapIndex { * the flags to be stored with the bitmap */ public void addBitmap(AnyObjectId objectId, Bitmap bitmap, int flags) { - if (bitmap instanceof BitmapBuilder) - bitmap = ((BitmapBuilder) bitmap).build(); + addBitmap(objectId, bitmap.retrieveCompressed(), flags); + } - EWAHCompressedBitmap compressed; - if (bitmap instanceof CompressedBitmap) - compressed = ((CompressedBitmap) bitmap).getEwahCompressedBitmap(); - else - throw new IllegalArgumentException(bitmap.getClass().toString()); + /** + * Processes a commit and prepares its bitmap to write to the bitmap index + * file. + * + * @param c + * the commit corresponds to the bitmap. + * @param bitmap + * the bitmap to be written. + * @param flags + * the flags of the commit. + */ + public void processBitmapForWrite(BitmapCommit c, Bitmap bitmap, + int flags) { + EWAHCompressedBitmap compressed = bitmap.retrieveCompressed(); + compressed.trim(); + StoredBitmap newest = new StoredBitmap(c, compressed, null, flags); + + bitmapsToWriteXorBuffer.add(newest); + if (bitmapsToWriteXorBuffer.size() > MAX_XOR_OFFSET_SEARCH) { + bitmapsToWrite.add( + generateStoredEntry(bitmapsToWriteXorBuffer.pollFirst())); + } - addBitmap(objectId, compressed, flags); + if (c.isAddToIndex()) { + // The Bitmap map in the base class is used to make revwalks + // efficient, so only add bitmaps that keep it efficient without + // bloating memory. + addBitmap(c, bitmap, flags); + } + } + + private StoredEntry generateStoredEntry(StoredBitmap bitmapToWrite) { + int bestXorOffset = 0; + EWAHCompressedBitmap bestBitmap = bitmapToWrite.getBitmap(); + + int offset = 1; + for (StoredBitmap curr : bitmapsToWriteXorBuffer) { + EWAHCompressedBitmap bitmap = curr.getBitmap() + .xor(bitmapToWrite.getBitmap()); + if (bitmap.sizeInBytes() < bestBitmap.sizeInBytes()) { + bestBitmap = bitmap; + bestXorOffset = offset; + } + offset++; + } + + PositionEntry entry = positionEntries.get(bitmapToWrite); + if (entry == null) { + throw new IllegalStateException(); + } + bestBitmap.trim(); + StoredEntry result = new StoredEntry(entry.namePosition, bestBitmap, + bestXorOffset, bitmapToWrite.getFlags()); + + return result; } /** @@ -161,7 +212,6 @@ public class PackBitmapIndexBuilder extends BasePackBitmapIndex { bitmap.trim(); StoredBitmap result = new StoredBitmap(objectId, bitmap, null, flags); getBitmaps().add(result); - byAddOrder.add(result); } /** {@inheritDoc} */ @@ -247,15 +297,18 @@ public class PackBitmapIndexBuilder extends BasePackBitmapIndex { /** {@inheritDoc} */ @Override public int getBitmapCount() { - return getBitmaps().size(); + return bitmapsToWriteXorBuffer.size() + bitmapsToWrite.size(); } /** * Remove all the bitmaps entries added. + * + * @param size + * the expected number of bitmap entries to be written. */ - public void clearBitmaps() { - byAddOrder.clear(); + public void resetBitmaps(int size) { getBitmaps().clear(); + bitmapsToWrite = new ArrayList<>(size); } /** {@inheritDoc} */ @@ -265,64 +318,18 @@ public class PackBitmapIndexBuilder extends BasePackBitmapIndex { } /** - * Get an iterator over the xor compressed entries. + * Get list of xor compressed entries that need to be written. * - * @return an iterator over the xor compressed entries. + * @return a list of the xor compressed entries. */ - public Iterable<StoredEntry> getCompressedBitmaps() { - // Add order is from oldest to newest. The reverse add order is the - // output order. - return () -> new Iterator<StoredEntry>() { - - private int index = byAddOrder.size() - 1; - - @Override - public boolean hasNext() { - return index >= 0; - } - - @Override - public StoredEntry next() { - if (!hasNext()) { - throw new NoSuchElementException(); - } - StoredBitmap item = byAddOrder.get(index); - int bestXorOffset = 0; - EWAHCompressedBitmap bestBitmap = item.getBitmap(); - - // Attempt to compress the bitmap with an XOR of the - // previously written entries. - for (int i = 1; i <= MAX_XOR_OFFSET_SEARCH; i++) { - int curr = i + index; - if (curr >= byAddOrder.size()) { - break; - } - - StoredBitmap other = byAddOrder.get(curr); - EWAHCompressedBitmap bitmap = other.getBitmap() - .xor(item.getBitmap()); - - if (bitmap.sizeInBytes() < bestBitmap.sizeInBytes()) { - bestBitmap = bitmap; - bestXorOffset = i; - } - } - index--; - - PositionEntry entry = positionEntries.get(item); - if (entry == null) { - throw new IllegalStateException(); - } - bestBitmap.trim(); - return new StoredEntry(entry.namePosition, bestBitmap, - bestXorOffset, item.getFlags()); - } + public List<StoredEntry> getCompressedBitmaps() { + while (!bitmapsToWriteXorBuffer.isEmpty()) { + bitmapsToWrite.add( + generateStoredEntry(bitmapsToWriteXorBuffer.pollFirst())); + } - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - }; + Collections.reverse(bitmapsToWrite); + return bitmapsToWrite; } /** Data object for the on disk representation of a bitmap entry. */ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexRemapper.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexRemapper.java index 273eeef7e5..4b25284517 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexRemapper.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexRemapper.java @@ -18,7 +18,6 @@ import org.eclipse.jgit.internal.storage.file.BasePackBitmapIndex.StoredBitmap; import org.eclipse.jgit.lib.AnyObjectId; import org.eclipse.jgit.lib.BitmapIndex; import org.eclipse.jgit.lib.ObjectId; -import org.eclipse.jgit.lib.ObjectIdOwnerMap; import com.googlecode.javaewah.EWAHCompressedBitmap; import com.googlecode.javaewah.IntIterator; @@ -34,7 +33,6 @@ public class PackBitmapIndexRemapper extends PackBitmapIndex private final BasePackBitmapIndex oldPackIndex; final PackBitmapIndex newPackIndex; - private final ObjectIdOwnerMap<StoredBitmap> convertedBitmaps; private final BitSet inflated; private final int[] prevToNewMapping; @@ -65,7 +63,6 @@ public class PackBitmapIndexRemapper extends PackBitmapIndex private PackBitmapIndexRemapper(PackBitmapIndex newPackIndex) { this.oldPackIndex = null; this.newPackIndex = newPackIndex; - this.convertedBitmaps = null; this.inflated = null; this.prevToNewMapping = null; } @@ -74,7 +71,6 @@ public class PackBitmapIndexRemapper extends PackBitmapIndex BasePackBitmapIndex oldPackIndex, PackBitmapIndex newPackIndex) { this.oldPackIndex = oldPackIndex; this.newPackIndex = newPackIndex; - convertedBitmaps = new ObjectIdOwnerMap<>(); inflated = new BitSet(newPackIndex.getObjectCount()); prevToNewMapping = new int[oldPackIndex.getObjectCount()]; @@ -152,10 +148,6 @@ public class PackBitmapIndexRemapper extends PackBitmapIndex if (bitmap != null || oldPackIndex == null) return bitmap; - StoredBitmap stored = convertedBitmaps.get(objectId); - if (stored != null) - return stored.getBitmap(); - StoredBitmap oldBitmap = oldPackIndex.getBitmaps().get(objectId); if (oldBitmap == null) return null; @@ -168,8 +160,6 @@ public class PackBitmapIndexRemapper extends PackBitmapIndex inflated.set(prevToNewMapping[i.next()]); bitmap = inflated.toEWAHCompressedBitmap(); bitmap.trim(); - convertedBitmaps.add( - new StoredBitmap(objectId, bitmap, null, oldBitmap.getFlags())); return bitmap; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCache.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCache.java index 852302f00c..80c8e10dec 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCache.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCache.java @@ -470,7 +470,9 @@ public class WindowCache { mbean = new StatsRecorderImpl(); statsRecorder = mbean; - Monitoring.registerMBean(mbean, "block_cache"); //$NON-NLS-1$ + if (cfg.getExposeStatsViaJmx()) { + Monitoring.registerMBean(mbean, "block_cache"); //$NON-NLS-1$ + } if (maxFiles < 1) throw new IllegalArgumentException(JGitText.get().openFilesMustBeAtLeast1); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/BitmapCommit.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/BitmapCommit.java new file mode 100644 index 0000000000..33c478e4ab --- /dev/null +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/BitmapCommit.java @@ -0,0 +1,163 @@ +/* + * Copyright (c) 2020, Google LLC and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.internal.storage.pack; + +import org.eclipse.jgit.lib.AnyObjectId; +import org.eclipse.jgit.lib.ObjectId; + +/** + * A commit object for which a bitmap index should be built. + */ +public final class BitmapCommit extends ObjectId { + + private final boolean reuseWalker; + + private final int flags; + + private final boolean addToIndex; + + BitmapCommit(AnyObjectId objectId, boolean reuseWalker, int flags) { + super(objectId); + this.reuseWalker = reuseWalker; + this.flags = flags; + this.addToIndex = false; + } + + BitmapCommit(AnyObjectId objectId, boolean reuseWalker, int flags, + boolean addToIndex) { + super(objectId); + this.reuseWalker = reuseWalker; + this.flags = flags; + this.addToIndex = addToIndex; + } + + boolean isReuseWalker() { + return reuseWalker; + } + + int getFlags() { + return flags; + } + + /** + * Whether corresponding bitmap should be added to PackBitmapIndexBuilder. + * + * @return true if the corresponding bitmap should be added to + * PackBitmapIndexBuilder. + */ + public boolean isAddToIndex() { + return addToIndex; + } + + /** + * Get a builder of BitmapCommit whose object id is {@code objId}. + * + * @param objId + * the object id of the BitmapCommit + * @return a BitmapCommit builder with object id set. + */ + public static Builder newBuilder(AnyObjectId objId) { + return new Builder().setId(objId); + } + + /** + * Get a builder of BitmapCommit whose fields are copied from + * {@code commit}. + * + * @param commit + * the bitmap commit the builder is copying from + * @return a BitmapCommit build with fields copied from an existing bitmap + * commit. + */ + public static Builder copyFrom(BitmapCommit commit) { + return new Builder().setId(commit) + .setReuseWalker(commit.isReuseWalker()) + .setFlags(commit.getFlags()) + .setAddToIndex(commit.isAddToIndex()); + } + + /** + * Builder of BitmapCommit. + */ + public static class Builder { + private AnyObjectId objectId; + + private boolean reuseWalker; + + private int flags; + + private boolean addToIndex; + + // Prevent default constructor. + private Builder() { + } + + /** + * Set objectId of the builder. + * + * @param objectId + * the object id of the BitmapCommit + * @return the builder itself + */ + public Builder setId(AnyObjectId objectId) { + this.objectId = objectId; + return this; + } + + /** + * Set reuseWalker of the builder. + * + * @param reuseWalker + * whether the BitmapCommit should reuse bitmap walker when + * walking objects + * @return the builder itself + */ + public Builder setReuseWalker(boolean reuseWalker) { + this.reuseWalker = reuseWalker; + return this; + } + + /** + * Set flags of the builder. + * + * @param flags + * the flags of the BitmapCommit + * @return the builder itself + */ + public Builder setFlags(int flags) { + this.flags = flags; + return this; + } + + /** + * Set whether whether the bitmap of the BitmapCommit should be added to + * PackBitmapIndexBuilder when building bitmap index file. + * + * @param addToIndex + * whether the bitmap of the BitmapCommit should be added to + * PackBitmapIndexBuilder when building bitmap index file + * @return the builder itself + */ + public Builder setAddToIndex(boolean addToIndex) { + this.addToIndex = addToIndex; + return this; + } + + /** + * Builds BitmapCommit from the builder. + * + * @return the new BitmapCommit. + */ + public BitmapCommit build() { + return new BitmapCommit(objectId, reuseWalker, flags, + addToIndex); + } + } +}
\ No newline at end of file diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java index 75dd345f46..824c62ad9a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java @@ -2313,14 +2313,14 @@ public class PackWriter implements AutoCloseable { PackWriterBitmapPreparer bitmapPreparer = new PackWriterBitmapPreparer( reader, writeBitmaps, pm, stats.interestingObjects, config); - Collection<PackWriterBitmapPreparer.BitmapCommit> selectedCommits = bitmapPreparer + Collection<BitmapCommit> selectedCommits = bitmapPreparer .selectCommits(numCommits, excludeFromBitmapSelection); beginPhase(PackingPhase.BUILDING_BITMAPS, pm, selectedCommits.size()); BitmapWalker walker = bitmapPreparer.newBitmapWalker(); AnyObjectId last = null; - for (PackWriterBitmapPreparer.BitmapCommit cmit : selectedCommits) { + for (BitmapCommit cmit : selectedCommits) { if (!cmit.isReuseWalker()) { walker = bitmapPreparer.newBitmapWalker(); } @@ -2331,8 +2331,14 @@ public class PackWriter implements AutoCloseable { throw new IllegalStateException(MessageFormat.format( JGitText.get().bitmapMissingObject, cmit.name(), last.name())); - last = cmit; - writeBitmaps.addBitmap(cmit, bitmap.build(), cmit.getFlags()); + last = BitmapCommit.copyFrom(cmit).build(); + writeBitmaps.processBitmapForWrite(cmit, bitmap.build(), + cmit.getFlags()); + + // The bitmap walker should stop when the walk hits the previous + // commit, which saves time. + walker.setPrevCommit(last); + walker.setPrevBitmap(bitmap); pm.update(1); } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java index 51b4993e26..f1ede2acff 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java @@ -58,6 +58,8 @@ class PackWriterBitmapPreparer { private static final int DAY_IN_SECONDS = 24 * 60 * 60; + private static final int DISTANCE_THRESHOLD = 2000; + private static final Comparator<RevCommit> ORDER_BY_REVERSE_TIMESTAMP = ( RevCommit a, RevCommit b) -> Integer .signum(b.getCommitTime() - a.getCommitTime()); @@ -244,6 +246,7 @@ class PackWriterBitmapPreparer { // This commit is selected. // Calculate where to look for the next one. int flags = nextFlg; + int currDist = distanceFromTip; nextIn = nextSpan(distanceFromTip); nextFlg = nextIn == distantCommitSpan ? PackBitmapIndex.FLAG_REUSE @@ -279,8 +282,17 @@ class PackWriterBitmapPreparer { longestAncestorChain = new ArrayList<>(); chains.add(longestAncestorChain); } - longestAncestorChain.add(new BitmapCommit(c, - !longestAncestorChain.isEmpty(), flags)); + + // The commit bc should reuse bitmap walker from its close + // ancestor. And the bitmap of bc should only be added to + // PackBitmapIndexBuilder when it's an old enough + // commit,i.e. distance from tip should be greater than + // DISTANCE_THRESHOLD, to save memory. + BitmapCommit bc = BitmapCommit.newBuilder(c).setFlags(flags) + .setAddToIndex(currDist >= DISTANCE_THRESHOLD) + .setReuseWalker(!longestAncestorChain.isEmpty()) + .build(); + longestAncestorChain.add(bc); writeBitmaps.addBitmap(c, bitmap, 0); } @@ -288,12 +300,12 @@ class PackWriterBitmapPreparer { selections.addAll(chain); } } - writeBitmaps.clearBitmaps(); // Remove the temporary commit bitmaps. // Add the remaining peeledWant for (AnyObjectId remainingWant : selectionHelper.newWants) { selections.add(new BitmapCommit(remainingWant, false, 0)); } + writeBitmaps.resetBitmaps(selections.size()); // Remove the temporary commit bitmaps. pm.endTask(); return selections; @@ -468,28 +480,6 @@ class PackWriterBitmapPreparer { } /** - * A commit object for which a bitmap index should be built. - */ - static final class BitmapCommit extends ObjectId { - private final boolean reuseWalker; - private final int flags; - - BitmapCommit(AnyObjectId objectId, boolean reuseWalker, int flags) { - super(objectId); - this.reuseWalker = reuseWalker; - this.flags = flags; - } - - boolean isReuseWalker() { - return reuseWalker; - } - - int getFlags() { - return flags; - } - } - - /** * Container for state used in the first phase of selecting commits, which * walks all of the reachable commits via the branch tips that are not * covered by a previous pack's bitmaps ({@code newWants}) and stores them diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableDatabase.java index 4de6c28709..4747be3544 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableDatabase.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableDatabase.java @@ -280,7 +280,7 @@ public abstract class ReftableDatabase { /** * Returns all refs that resolve directly to the given {@link ObjectId}. - * Includes peeled {@linkObjectId}s. + * Includes peeled {@link ObjectId}s. * * @param id * {@link ObjectId} to resolve diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/internal/FullConnectivityChecker.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/connectivity/FullConnectivityChecker.java index 60d8f452ba..b76e3a3caa 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/internal/FullConnectivityChecker.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/connectivity/FullConnectivityChecker.java @@ -8,7 +8,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ -package org.eclipse.jgit.transport.internal; +package org.eclipse.jgit.internal.transport.connectivity; import java.io.IOException; import java.util.Set; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/connectivity/IterativeConnectivityChecker.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/connectivity/IterativeConnectivityChecker.java new file mode 100644 index 0000000000..b44c4ae5cb --- /dev/null +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/connectivity/IterativeConnectivityChecker.java @@ -0,0 +1,152 @@ +/* + * Copyright (c) 2019, Google LLC and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +package org.eclipse.jgit.internal.transport.connectivity; + +import static java.util.stream.Collectors.toList; + +import java.io.IOException; +import java.util.ArrayDeque; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Queue; +import java.util.Set; +import java.util.stream.Stream; + +import org.eclipse.jgit.errors.MissingObjectException; +import org.eclipse.jgit.lib.ObjectId; +import org.eclipse.jgit.lib.ProgressMonitor; +import org.eclipse.jgit.revwalk.RevCommit; +import org.eclipse.jgit.revwalk.RevObject; +import org.eclipse.jgit.revwalk.RevWalk; +import org.eclipse.jgit.transport.ConnectivityChecker; +import org.eclipse.jgit.transport.ReceiveCommand; + +/** + * Implementation of connectivity checker which tries to do check with smaller + * set of references first and if it fails will fall back to check against all + * advertised references. + * + * This is useful for big repos with enormous number of references. + */ +public class IterativeConnectivityChecker implements ConnectivityChecker { + private static final int MAXIMUM_PARENTS_TO_CHECK = 128; + + private final ConnectivityChecker delegate; + + private Set<ObjectId> forcedHaves = Collections.emptySet(); + + /** + * @param delegate + * Delegate checker which will be called for actual checks. + */ + public IterativeConnectivityChecker(ConnectivityChecker delegate) { + this.delegate = delegate; + } + + @Override + public void checkConnectivity(ConnectivityCheckInfo connectivityCheckInfo, + Set<ObjectId> advertisedHaves, ProgressMonitor pm) + throws MissingObjectException, IOException { + try { + Set<ObjectId> newRefs = new HashSet<>(); + Set<ObjectId> expectedParents = new HashSet<>(); + + getAllObjectIds(connectivityCheckInfo.getCommands()) + .forEach(oid -> { + if (advertisedHaves.contains(oid)) { + expectedParents.add(oid); + } else { + newRefs.add(oid); + } + }); + if (!newRefs.isEmpty()) { + expectedParents.addAll(extractAdvertisedParentCommits(newRefs, + advertisedHaves, connectivityCheckInfo.getWalk())); + } + + expectedParents.addAll(forcedHaves); + + if (!expectedParents.isEmpty()) { + delegate.checkConnectivity(connectivityCheckInfo, + expectedParents, pm); + return; + } + } catch (MissingObjectException e) { + // This is fine, retry with all haves. + } + delegate.checkConnectivity(connectivityCheckInfo, advertisedHaves, pm); + } + + private static Stream<ObjectId> getAllObjectIds( + List<ReceiveCommand> commands) { + return commands.stream().flatMap(cmd -> { + if (cmd.getType() == ReceiveCommand.Type.UPDATE || cmd + .getType() == ReceiveCommand.Type.UPDATE_NONFASTFORWARD) { + return Stream.of(cmd.getOldId(), cmd.getNewId()); + } else if (cmd.getType() == ReceiveCommand.Type.CREATE) { + return Stream.of(cmd.getNewId()); + } + return Stream.of(); + }); + } + + /** + * Sets additional haves that client can depend on (e.g. gerrit changes). + * + * @param forcedHaves + * Haves server expects client to depend on. + */ + public void setForcedHaves(Set<ObjectId> forcedHaves) { + this.forcedHaves = Collections.unmodifiableSet(forcedHaves); + } + + private static Set<ObjectId> extractAdvertisedParentCommits( + Set<ObjectId> newRefs, Set<ObjectId> advertisedHaves, RevWalk rw) + throws MissingObjectException, IOException { + Set<ObjectId> advertisedParents = new HashSet<>(); + for (ObjectId newRef : newRefs) { + RevObject object = rw.parseAny(newRef); + if (object instanceof RevCommit) { + int numberOfParentsToCheck = 0; + Queue<RevCommit> parents = new ArrayDeque<>( + MAXIMUM_PARENTS_TO_CHECK); + parents.addAll( + parseParents(((RevCommit) object).getParents(), rw)); + // Looking through a chain of ancestors handles the case where a + // series of commits is sent in a single push for a new branch. + while (!parents.isEmpty()) { + RevCommit parentCommit = parents.poll(); + if (advertisedHaves.contains(parentCommit.getId())) { + advertisedParents.add(parentCommit.getId()); + } else if (numberOfParentsToCheck < MAXIMUM_PARENTS_TO_CHECK) { + RevCommit[] grandParents = parentCommit.getParents(); + numberOfParentsToCheck += grandParents.length; + parents.addAll(parseParents(grandParents, rw)); + } + } + } + } + return advertisedParents; + } + + private static List<RevCommit> parseParents(RevCommit[] parents, + RevWalk rw) { + return Arrays.stream(parents).map((commit) -> { + try { + return rw.parseCommit(commit); + } catch (Exception e) { + throw new RuntimeException(e); + } + }).collect(toList()); + } +} diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/internal/DelegatingSSLSocketFactory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/http/DelegatingSSLSocketFactory.java index d25ecd459d..5aab61ad05 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/internal/DelegatingSSLSocketFactory.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/http/DelegatingSSLSocketFactory.java @@ -7,7 +7,7 @@ * * SPDX-License-Identifier: BSD-3-Clause */ -package org.eclipse.jgit.transport.internal; +package org.eclipse.jgit.internal.transport.http; import java.io.IOException; import java.net.InetAddress; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFile.java index 2fbc9122f1..98c63cdcdd 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFile.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFile.java @@ -32,6 +32,7 @@ import java.util.TreeSet; import org.eclipse.jgit.annotations.NonNull; import org.eclipse.jgit.errors.InvalidPatternException; import org.eclipse.jgit.fnmatch.FileNameMatcher; +import org.eclipse.jgit.transport.SshConfigStore; import org.eclipse.jgit.transport.SshConstants; import org.eclipse.jgit.util.FS; import org.eclipse.jgit.util.StringUtils; @@ -80,7 +81,7 @@ import org.eclipse.jgit.util.SystemReader; * @see <a href="http://man.openbsd.org/OpenBSD-current/man5/ssh_config.5">man * ssh-config</a> */ -public class OpenSshConfigFile { +public class OpenSshConfigFile implements SshConfigStore { /** * "Host" name of the HostEntry for the default options before the first @@ -152,8 +153,9 @@ public class OpenSshConfigFile { * the user supplied; <= 0 if none * @param userName * the user supplied, may be {@code null} or empty if none given - * @return r configuration for the requested name. + * @return the configuration for the requested name. */ + @Override @NonNull public HostEntry lookup(@NonNull String hostName, int port, String userName) { @@ -446,7 +448,7 @@ public class OpenSshConfigFile { * of several matching host entries, %-substitutions, and ~ replacement have * all been done. */ - public static class HostEntry { + public static class HostEntry implements SshConfigStore.HostConfig { /** * Keys that can be specified multiple times, building up a list. (I.e., @@ -489,7 +491,7 @@ public class OpenSshConfigFile { private Map<String, List<String>> listOptions; /** - * Retrieves the value of a single-valued key, or the first is the key + * Retrieves the value of a single-valued key, or the first if the key * has multiple values. Keys are case-insensitive, so * {@code getValue("HostName") == getValue("HOSTNAME")}. * @@ -497,6 +499,7 @@ public class OpenSshConfigFile { * to get the value of * @return the value, or {@code null} if none */ + @Override public String getValue(String key) { String result = options != null ? options.get(key) : null; if (result == null) { @@ -524,6 +527,7 @@ public class OpenSshConfigFile { * to get the values of * @return a possibly empty list of values */ + @Override public List<String> getValues(String key) { List<String> values = listOptions != null ? listOptions.get(key) : null; @@ -778,6 +782,7 @@ public class OpenSshConfigFile { * * @return all single-valued options */ + @Override @NonNull public Map<String, String> getOptions() { if (options == null) { @@ -792,6 +797,7 @@ public class OpenSshConfigFile { * * @return all multi-valued options */ + @Override @NonNull public Map<String, List<String>> getMultiValuedOptions() { if (listOptions == null && multiOptions == null) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/BitmapIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/BitmapIndex.java index f61286d6da..f6695bdf7d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/BitmapIndex.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/BitmapIndex.java @@ -14,6 +14,8 @@ import java.util.Iterator; import org.eclipse.jgit.internal.storage.file.PackBitmapIndex; +import com.googlecode.javaewah.EWAHCompressedBitmap; + /** * A compressed bitmap representation of the entire object graph. * @@ -81,6 +83,14 @@ public interface BitmapIndex { */ @Override Iterator<BitmapObject> iterator(); + + /** + * Returns the corresponding raw compressed EWAH bitmap of the bitmap. + * + * @return the corresponding {@code EWAHCompressedBitmap} + * @since 5.8 + */ + EWAHCompressedBitmap retrieveCompressed(); } /** diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/GpgSigner.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/GpgSigner.java index d953a01945..5b32cf0b5f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/GpgSigner.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/GpgSigner.java @@ -9,11 +9,16 @@ */ package org.eclipse.jgit.lib; +import java.util.Iterator; +import java.util.ServiceConfigurationError; +import java.util.ServiceLoader; + import org.eclipse.jgit.annotations.NonNull; import org.eclipse.jgit.annotations.Nullable; import org.eclipse.jgit.api.errors.CanceledException; -import org.eclipse.jgit.lib.internal.BouncyCastleGpgSigner; import org.eclipse.jgit.transport.CredentialsProvider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * Creates GPG signatures for Git objects. @@ -21,8 +26,23 @@ import org.eclipse.jgit.transport.CredentialsProvider; * @since 5.3 */ public abstract class GpgSigner { + private static final Logger LOG = LoggerFactory.getLogger(GpgSigner.class); + + private static GpgSigner defaultSigner = loadGpgSigner(); - private static GpgSigner defaultSigner = new BouncyCastleGpgSigner(); + private static GpgSigner loadGpgSigner() { + try { + ServiceLoader<GpgSigner> loader = ServiceLoader + .load(GpgSigner.class); + Iterator<GpgSigner> iter = loader.iterator(); + if (iter.hasNext()) { + return iter.next(); + } + } catch (ServiceConfigurationError e) { + LOG.error(e.getMessage(), e); + } + return null; + } /** * Get the default signer, or <code>null</code>. diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDatabase.java index ff5a84ca6e..6832c9cd80 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDatabase.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDatabase.java @@ -441,7 +441,7 @@ public abstract class RefDatabase { /** * Returns all refs that resolve directly to the given {@link ObjectId}. - * Includes peeled {@linkObjectId}s. This is the inverse lookup of + * Includes peeled {@link ObjectId}s. This is the inverse lookup of * {@link #exactRef(String...)}. * * <p> diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/nls/GlobalBundleCache.java b/org.eclipse.jgit/src/org/eclipse/jgit/nls/GlobalBundleCache.java index 6d4437f4c0..9b556393e2 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/nls/GlobalBundleCache.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/nls/GlobalBundleCache.java @@ -70,4 +70,8 @@ class GlobalBundleCache { throw new Error(e); } } + + static void clear() { + cachedBundles.clear(); + } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/nls/NLS.java b/org.eclipse.jgit/src/org/eclipse/jgit/nls/NLS.java index daa039d347..d7dd3bee52 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/nls/NLS.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/nls/NLS.java @@ -100,6 +100,15 @@ public class NLS { return b.get(type); } + /** + * Release resources held by NLS + * @since 5.8 + */ + public static void clear() { + local.remove(); + GlobalBundleCache.clear(); + } + private final Locale locale; private final ConcurrentHashMap<Class, TranslationBundle> map = new ConcurrentHashMap<>(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BitmapWalker.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BitmapWalker.java index 023962e251..8cd5eb2238 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BitmapWalker.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BitmapWalker.java @@ -16,6 +16,7 @@ import java.util.Arrays; import org.eclipse.jgit.errors.IncorrectObjectTypeException; import org.eclipse.jgit.errors.MissingObjectException; import org.eclipse.jgit.internal.revwalk.AddToBitmapFilter; +import org.eclipse.jgit.internal.revwalk.AddToBitmapWithCacheFilter; import org.eclipse.jgit.internal.revwalk.AddUnseenToBitmapFilter; import org.eclipse.jgit.lib.AnyObjectId; import org.eclipse.jgit.lib.BitmapIndex; @@ -41,6 +42,11 @@ public final class BitmapWalker { private long countOfBitmapIndexMisses; + // Cached bitmap and commit to save walk time. + private AnyObjectId prevCommit; + + private Bitmap prevBitmap; + /** * Create a BitmapWalker. * @@ -56,6 +62,28 @@ public final class BitmapWalker { } /** + * Set the cached commit for the walker. + * + * @param prevCommit + * the cached commit. + * @since 5.8 + */ + public void setPrevCommit(AnyObjectId prevCommit) { + this.prevCommit = prevCommit; + } + + /** + * Set the bitmap associated with the cached commit for the walker. + * + * @param prevBitmap + * the bitmap associated with the cached commit. + * @since 5.8 + */ + public void setPrevBitmap(Bitmap prevBitmap) { + this.prevBitmap = prevBitmap; + } + + /** * Return the number of objects that had to be walked because they were not covered by a * bitmap. * @@ -169,7 +197,10 @@ public final class BitmapWalker { } if (marked) { - if (seen == null) { + if (prevCommit != null) { + walker.setRevFilter(new AddToBitmapWithCacheFilter(prevCommit, + prevBitmap, bitmapResult)); + } else if (seen == null) { walker.setRevFilter(new AddToBitmapFilter(bitmapResult)); } else { walker.setRevFilter( diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCacheConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCacheConfig.java index 221353a91b..a12f652598 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCacheConfig.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCacheConfig.java @@ -47,6 +47,8 @@ public class WindowCacheConfig { private int streamFileThreshold; + private boolean exposeStats; + /** * Create a default configuration. */ @@ -58,6 +60,7 @@ public class WindowCacheConfig { packedGitMMAP = false; deltaBaseCacheLimit = 10 * MB; streamFileThreshold = PackConfig.DEFAULT_BIG_FILE_THRESHOLD; + exposeStats = true; } /** @@ -220,6 +223,39 @@ public class WindowCacheConfig { } /** + * Tell whether the statistics JMX bean should be automatically registered. + * <p> + * Registration of that bean via JMX is additionally subject to a boolean + * JGit-specific user config "jmx.WindowCacheStats". The bean will be + * registered only if this user config is {@code true} <em>and</em> + * {@code getExposeStatsViaJmx() == true}. + * </p> + * <p> + * By default, this returns {@code true} unless changed via + * {@link #setExposeStatsViaJmx(boolean)}. + * + * @return whether to expose WindowCacheStats statistics via JMX upon + * {@link #install()} + * @since 5.8 + */ + public boolean getExposeStatsViaJmx() { + return exposeStats; + } + + /** + * Defines whether the statistics JMX MBean should be automatically set up. + * (By default {@code true}.) If set to {@code false}, the JMX monitoring + * bean is not registered. + * + * @param expose + * whether to register the JMX Bean + * @since 5.8 + */ + public void setExposeStatsViaJmx(boolean expose) { + exposeStats = expose; + } + + /** * Update properties by setting fields from the configuration. * <p> * If a property is not defined in the configuration, then it is left diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/DefaultSshSessionFactory.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/DefaultSshSessionFactory.java deleted file mode 100644 index afa0a11c24..0000000000 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/DefaultSshSessionFactory.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (C) 2009, Constantine Plotnikov <constantine.plotnikov@gmail.com> - * Copyright (C) 2009, Google Inc. - * Copyright (C) 2008, Robin Rosenberg <robin.rosenberg@dewire.com> - * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org> and others - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Distribution License v. 1.0 which is available at - * https://www.eclipse.org/org/documents/edl-v10.php. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -package org.eclipse.jgit.transport; - -import com.jcraft.jsch.Session; - -/** - * Loads known hosts and private keys from <code>$HOME/.ssh</code>. - * <p> - * This is the default implementation used by JGit and provides most of the - * compatibility necessary to match OpenSSH, a popular implementation of SSH - * used by C Git. - * <p> - * If user interactivity is required by SSH (e.g. to obtain a password), the - * connection will immediately fail. - * - * @since 5.7 - */ -public class DefaultSshSessionFactory extends JschConfigSessionFactory { - /** {@inheritDoc} */ - @Override - protected void configure(OpenSshConfig.Host hc, Session session) { - // No additional configuration required. - } -} diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java index 8a8c1ae0ba..79f60c3202 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java @@ -48,6 +48,7 @@ import org.eclipse.jgit.internal.JGitText; import org.eclipse.jgit.internal.storage.file.PackLock; import org.eclipse.jgit.internal.submodule.SubmoduleValidator; import org.eclipse.jgit.internal.submodule.SubmoduleValidator.SubmoduleValidationException; +import org.eclipse.jgit.internal.transport.connectivity.FullConnectivityChecker; import org.eclipse.jgit.internal.transport.parser.FirstCommand; import org.eclipse.jgit.lib.AnyObjectId; import org.eclipse.jgit.lib.BatchRefUpdate; @@ -72,7 +73,6 @@ import org.eclipse.jgit.transport.ConnectivityChecker.ConnectivityCheckInfo; import org.eclipse.jgit.transport.PacketLineIn.InputOverLimitIOException; import org.eclipse.jgit.transport.ReceiveCommand.Result; import org.eclipse.jgit.transport.RefAdvertiser.PacketLineOutRefAdvertiser; -import org.eclipse.jgit.transport.internal.FullConnectivityChecker; import org.eclipse.jgit.util.io.InterruptTimer; import org.eclipse.jgit.util.io.LimitedInputStream; import org.eclipse.jgit.util.io.TimeoutInputStream; @@ -2061,6 +2061,16 @@ public class ReceivePack { } /** + * Get the current unpack error handler. + * + * @return the current unpack error handler. + * @since 5.8 + */ + public UnpackErrorHandler getUnpackErrorHandler() { + return unpackErrorHandler; + } + + /** * @param unpackErrorHandler * the unpackErrorHandler to set * @since 5.7 diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConfigStore.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConfigStore.java new file mode 100644 index 0000000000..04a4922bb9 --- /dev/null +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConfigStore.java @@ -0,0 +1,114 @@ +/* + * Copyright (C) 2020, Thomas Wolf <thomas.wolf@paranor.ch> and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.transport; + +import java.util.Collections; +import java.util.List; +import java.util.Map; + +import org.eclipse.jgit.annotations.NonNull; + +/** + * An abstraction for a SSH config storage, like the OpenSSH ~/.ssh/config file. + * + * @since 5.8 + */ +public interface SshConfigStore { + + /** + * Locate the configuration for a specific host request. + * + * @param hostName + * to look up + * @param port + * the user supplied; <= 0 if none + * @param userName + * the user supplied, may be {@code null} or empty if none given + * @return the configuration for the requested name. + */ + @NonNull + HostConfig lookup(@NonNull String hostName, int port, String userName); + + /** + * A host entry from the ssh config. Any merging of global values and of + * several matching host entries, %-substitutions, and ~ replacement have + * all been done. + */ + interface HostConfig { + + /** + * Retrieves the value of a single-valued key, or the first if the key + * has multiple values. Keys are case-insensitive, so + * {@code getValue("HostName") == getValue("HOSTNAME")}. + * + * @param key + * to get the value of + * @return the value, or {@code null} if none + */ + String getValue(String key); + + /** + * Retrieves the values of a multi- or list-valued key. Keys are + * case-insensitive, so + * {@code getValue("HostName") == getValue("HOSTNAME")}. + * + * @param key + * to get the values of + * @return a possibly empty list of values + */ + List<String> getValues(String key); + + /** + * Retrieves an unmodifiable map of all single-valued options, with + * case-insensitive lookup by keys. + * + * @return all single-valued options + */ + @NonNull + Map<String, String> getOptions(); + + /** + * Retrieves an unmodifiable map of all multi- or list-valued options, + * with case-insensitive lookup by keys. + * + * @return all multi-valued options + */ + @NonNull + Map<String, List<String>> getMultiValuedOptions(); + + } + + /** + * An empty {@link HostConfig}. + */ + static final HostConfig EMPTY_CONFIG = new HostConfig() { + + @Override + public String getValue(String key) { + return null; + } + + @Override + public List<String> getValues(String key) { + return Collections.emptyList(); + } + + @Override + public Map<String, String> getOptions() { + return Collections.emptyMap(); + } + + @Override + public Map<String, List<String>> getMultiValuedOptions() { + return Collections.emptyMap(); + } + + }; +} diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshSessionFactory.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshSessionFactory.java index e6d2042422..ef845f4dce 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshSessionFactory.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshSessionFactory.java @@ -43,11 +43,12 @@ public abstract class SshSessionFactory { } return null; } + /** * Get the currently configured JVM-wide factory. * <p> - * A factory is always available. By default the factory will read from the - * user's <code>$HOME/.ssh</code> and assume OpenSSH compatibility. + * By default the factory will read from the user's <code>$HOME/.ssh</code> + * and assume OpenSSH compatibility. * * @return factory the current factory for this JVM. */ @@ -60,7 +61,7 @@ public abstract class SshSessionFactory { * * @param newFactory * factory for future sessions to be created through. If null the - * default factory will be restored.s + * default factory will be restored. */ public static void setInstance(SshSessionFactory newFactory) { if (newFactory != null) { @@ -110,6 +111,15 @@ public abstract class SshSessionFactory { throws TransportException; /** + * The name of the type of session factory. + * + * @return the name of the type of session factory. + * + * @since 5.8 + */ + public abstract String getType(); + + /** * Close (or recycle) a session to a host. * * @param session diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java index 947c4c3222..b9cb2484d8 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java @@ -50,6 +50,8 @@ import org.eclipse.jgit.util.io.StreamCopyThread; * enumeration, save file modification and hook execution. */ public class TransportGitSsh extends SshTransport implements PackTransport { + private static final String EXT = "ext"; //$NON-NLS-1$ + static final TransportProtocol PROTO_SSH = new TransportProtocol() { private final String[] schemeNames = { "ssh", "ssh+git", "git+ssh" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ @@ -127,6 +129,11 @@ public class TransportGitSsh extends SshTransport implements PackTransport { throws TransportException { return new ExtSession(); } + + @Override + public String getType() { + return EXT; + } }); } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java index c3c1f2a405..16169f028b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java @@ -39,11 +39,13 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; +import java.io.InterruptedIOException; import java.io.OutputStream; import java.net.HttpCookie; import java.net.MalformedURLException; import java.net.Proxy; import java.net.ProxySelector; +import java.net.SocketException; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; @@ -573,6 +575,14 @@ public class TransportHttp extends HttpTransport implements WalkTransport, } } catch (NotSupportedException | TransportException e) { throw e; + } catch (InterruptedIOException e) { + // Timeout!? Don't try other authentication methods. + throw new TransportException(uri, MessageFormat.format( + JGitText.get().connectionTimeOut, u.getHost()), e); + } catch (SocketException e) { + // Nothing on other end, timeout, connection reset, ... + throw new TransportException(uri, + JGitText.get().connectionFailed, e); } catch (SSLHandshakeException e) { handleSslFailure(e); continue; // Re-try @@ -1501,6 +1511,10 @@ public class TransportHttp extends HttpTransport implements WalkTransport, } catch (SSLHandshakeException e) { handleSslFailure(e); continue; // Re-try + } catch (SocketException | InterruptedIOException e) { + // Timeout!? Must propagate; don't try other authentication + // methods. + throw e; } catch (IOException e) { if (authenticator == null || authMethod .getType() != HttpAuthMethod.Type.NONE) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/HttpConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/HttpConnection.java index c4d086d4bd..98c231a46d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/HttpConnection.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/HttpConnection.java @@ -41,6 +41,12 @@ public interface HttpConnection { int HTTP_OK = java.net.HttpURLConnection.HTTP_OK; /** + * @see HttpURLConnection#HTTP_NOT_AUTHORITATIVE + * @since 5.8 + */ + int HTTP_NOT_AUTHORITATIVE = java.net.HttpURLConnection.HTTP_NOT_AUTHORITATIVE; + + /** * @see HttpURLConnection#HTTP_MOVED_PERM * @since 4.7 */ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/JDKHttpConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/JDKHttpConnection.java index 925c4e2f84..3b0bae21ef 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/JDKHttpConnection.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/JDKHttpConnection.java @@ -32,7 +32,7 @@ import javax.net.ssl.SSLSocket; import javax.net.ssl.TrustManager; import org.eclipse.jgit.annotations.NonNull; -import org.eclipse.jgit.transport.internal.DelegatingSSLSocketFactory; +import org.eclipse.jgit.internal.transport.http.DelegatingSSLSocketFactory; import org.eclipse.jgit.util.HttpSupport; /** * A {@link org.eclipse.jgit.transport.http.HttpConnection} which simply diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java index 988953b00c..91574efec4 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java @@ -1036,12 +1036,36 @@ public abstract class FS { public File userHome() { Holder<File> p = userHome; if (p == null) { - p = new Holder<>(userHomeImpl()); + p = new Holder<>(safeUserHomeImpl()); userHome = p; } return p.value; } + private File safeUserHomeImpl() { + File home; + try { + home = userHomeImpl(); + if (home != null) { + home.toPath(); + return home; + } + } catch (RuntimeException e) { + LOG.error(JGitText.get().exceptionWhileFindingUserHome, e); + } + home = defaultUserHomeImpl(); + if (home != null) { + try { + home.toPath(); + return home; + } catch (InvalidPathException e) { + LOG.error(MessageFormat + .format(JGitText.get().invalidHomeDirectory, home), e); + } + } + return null; + } + /** * Set the user's home directory location. * @@ -1081,6 +1105,10 @@ public abstract class FS { * @return the user's home directory; null if the user does not have one. */ protected File userHomeImpl() { + return defaultUserHomeImpl(); + } + + private File defaultUserHomeImpl() { final String home = AccessController.doPrivileged( (PrivilegedAction<String>) () -> System.getProperty("user.home") //$NON-NLS-1$ ); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/EolStreamTypeUtil.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/EolStreamTypeUtil.java index deab4e67a0..c33c869b64 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/EolStreamTypeUtil.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/EolStreamTypeUtil.java @@ -140,19 +140,19 @@ public final class EolStreamTypeUtil { } // new git system + if ("auto".equals(attrs.getValue("text"))) { //$NON-NLS-1$ //$NON-NLS-2$ + return EolStreamType.AUTO_LF; + } + String eol = attrs.getValue("eol"); //$NON-NLS-1$ - if (eol != null) + if (eol != null) { // check-in is always normalized to LF return EolStreamType.TEXT_LF; - + } if (attrs.isSet("text")) { //$NON-NLS-1$ return EolStreamType.TEXT_LF; } - if ("auto".equals(attrs.getValue("text"))) { //$NON-NLS-1$ //$NON-NLS-2$ - return EolStreamType.AUTO_LF; - } - switch (options.getAutoCRLF()) { case TRUE: case INPUT: @@ -168,6 +168,8 @@ public final class EolStreamTypeUtil { switch (options.getAutoCRLF()) { case TRUE: return EolStreamType.TEXT_CRLF; + case INPUT: + return EolStreamType.DIRECT; default: // no decision } @@ -205,7 +207,10 @@ public final class EolStreamTypeUtil { // new git system String eol = attrs.getValue("eol"); //$NON-NLS-1$ if (eol != null) { - if ("crlf".equals(eol)) {//$NON-NLS-1$ + if ("crlf".equals(eol)) { //$NON-NLS-1$ + if ("auto".equals(attrs.getValue("text"))) { //$NON-NLS-1$ //$NON-NLS-2$ + return EolStreamType.AUTO_CRLF; + } return EolStreamType.TEXT_CRLF; } else if ("lf".equals(eol)) { //$NON-NLS-1$ return EolStreamType.DIRECT; @@ -162,7 +162,7 @@ <commons-compress-version>1.19</commons-compress-version> <osgi-core-version>4.3.1</osgi-core-version> <servlet-api-version>3.1.0</servlet-api-version> - <jetty-version>9.4.25.v20191220</jetty-version> + <jetty-version>9.4.28.v20200408</jetty-version> <japicmp-version>0.14.3</japicmp-version> <httpclient-version>4.5.10</httpclient-version> <httpcore-version>4.4.12</httpcore-version> @@ -173,7 +173,7 @@ <gson-version>2.8.2</gson-version> <bouncycastle-version>1.65</bouncycastle-version> <spotbugs-maven-plugin-version>4.0.0</spotbugs-maven-plugin-version> - <maven-project-info-reports-plugin-version>3.0.0</maven-project-info-reports-plugin-version> + <maven-project-info-reports-plugin-version>3.1.0</maven-project-info-reports-plugin-version> <maven-jxr-plugin-version>3.0.0</maven-jxr-plugin-version> <maven-surefire-plugin-version>3.0.0-M4</maven-surefire-plugin-version> <maven-surefire-report-plugin-version>${maven-surefire-plugin-version}</maven-surefire-report-plugin-version> @@ -234,7 +234,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> - <version>3.2.3</version> + <version>3.2.4</version> </plugin> <plugin> @@ -766,7 +766,7 @@ <dependency> <groupId>org.bouncycastle</groupId> <artifactId>bcprov-jdk15on</artifactId> - <version>${bouncycastle-version}</version> + <version>1.65.01</version> </dependency> <dependency> @@ -988,9 +988,11 @@ <module>org.eclipse.jgit.ant</module> <module>org.eclipse.jgit.archive</module> <module>org.eclipse.jgit.ui</module> + <module>org.eclipse.jgit.gpg.bc</module> <module>org.eclipse.jgit.http.apache</module> <module>org.eclipse.jgit.http.server</module> <module>org.eclipse.jgit.ssh.apache</module> + <module>org.eclipse.jgit.ssh.jsch</module> <module>org.eclipse.jgit.pgm</module> <module>org.eclipse.jgit.lfs</module> <module>org.eclipse.jgit.lfs.server</module> @@ -1000,11 +1002,13 @@ <module>org.eclipse.jgit.test</module> <module>org.eclipse.jgit.ant.test</module> + <module>org.eclipse.jgit.gpg.bc.test</module> <module>org.eclipse.jgit.http.test</module> <module>org.eclipse.jgit.pgm.test</module> <module>org.eclipse.jgit.lfs.test</module> <module>org.eclipse.jgit.lfs.server.test</module> <module>org.eclipse.jgit.ssh.apache.test</module> + <module>org.eclipse.jgit.ssh.jsch.test</module> <module>org.eclipse.jgit.coverage</module> <module>org.eclipse.jgit.benchmarks</module> </modules> |