Skip to content

Commit

Permalink
Revert "merge (#1)"
Browse files Browse the repository at this point in the history
This reverts commit b265cfd.
  • Loading branch information
CCLiu authored Jan 11, 2018
1 parent b265cfd commit 4edaf7b
Show file tree
Hide file tree
Showing 75 changed files with 473 additions and 1,362 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
.settings/

# Output dirs
out/
target/
classes/
build/
Expand Down
29 changes: 2 additions & 27 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,5 @@
language: java
dist: trusty
sudo: required

services:
- docker

sudo: false
jdk:
- oraclejdk7
- oraclejdk8
- openjdk8
- oraclejdk9

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/

cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/

before_install:
- pip install --user codecov

script:
- ./gradlew check
- ./gradlew integrationTest

after_success:
- codecov
18 changes: 3 additions & 15 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
= sshj - SSHv2 library for Java
Jeroen van Erp
:sshj_groupid: com.hierynomus
:sshj_version: 0.23.0
:sshj_version: 0.21.1
:source-highlighter: pygments

image:https://api.bintray.com/packages/hierynomus/maven/sshj/images/download.svg[link="https://bintray.com/hierynomus/maven/sshj/_latestVersion"]
image:https://travis-ci.org/hierynomus/sshj.svg?branch=master[link="https://travis-ci.org/hierynomus/sshj"]
image:https://api.codacy.com/project/badge/Grade/14a0a316bb9149739b5ea26dbfa8da8a["Codacy code quality", link="https://www.codacy.com/app/jeroen_2/sshj?utm_source=github.com&utm_medium=referral&utm_content=hierynomus/sshj&utm_campaign=Badge_Grade"]
image:https://codecov.io/gh/hierynomus/sshj/branch/master/graph/badge.svg["codecov", link="https://codecov.io/gh/hierynomus/sshj"]
image:http://www.javadoc.io/badge/com.hierynomus/sshj.svg?color=blue["JavaDocs", link="http://www.javadoc.io/doc/com.hierynomus/sshj"]
image:https://maven-badges.herokuapp.com/maven-central/com.hierynomus/sshj/badge.svg["Maven Central",link="https://maven-badges.herokuapp.com/maven-central/com.hierynomus/sshj"]
image:https://javadoc-emblem.rhcloud.com/doc/com.hierynomus/sshj/badge.svg["Javadoc",link="http://www.javadoc.io/doc/com.hierynomus/sshj"]

Expand Down Expand Up @@ -78,7 +75,7 @@ key exchange::
`diffie-hellman-group16-sha256`, `diffie-hellman-group16-sha384@ssh.com`, `diffie-hellman-group16-sha512@ssh.com`, `diffie-hellman-group18-sha512@ssh.com`

signatures::
`ssh-rsa`, `ssh-dss`, `ecdsa-sha2-nistp256`, `ecdsa-sha2-nistp384`, `ecdsa-sha2-nistp521`, `ssh-ed25519`
`ssh-rsa`, `ssh-dss`, `ecdsa-sha2-nistp256`, `ssh-ed25519`

mac::
`hmac-md5`, `hmac-md5-96`, `hmac-sha1`, `hmac-sha1-96`, `hmac-sha2-256`, `hmac-sha2-512`
Expand Down Expand Up @@ -107,16 +104,7 @@ Google Group: http://groups.google.com/group/sshj-users
Fork away!

== Release history
SSHJ 0.23.0 (2017-10-13)::
* Merged https://github.com/hierynomus/sshj/pulls/372[#372]: Upgrade to 'net.i2p.crypto:eddsa:0.2.0'
* Fixed https://github.com/hierynomus/sshj/issues/355[#355] and https://github.com/hierynomus/sshj/issues/354[#354]: Correctly decode signature bytes
* Fixed https://github.com/hierynomus/sshj/issues/365[#365]: Added support for new-style OpenSSH fingerprints of server keys
* Fixed https://github.com/hierynomus/sshj/issues/356[#356]: Fixed key type detection for ECDSA public keys
* Made SSHJ Java9 compatible
SSHJ 0.22.0 (2017-08-24)::
* Fixed https://github.com/hierynomus/sshj/pulls/341[#341]: Fixed path walking during recursive copy
* Merged https://github.com/hierynomus/sshj/pulls/338[#338]: Added ConsolePasswordFinder to read password from stdin
* Merged https://github.com/hierynomus/sshj/pulls/336[#336]: Added support for ecdsa-sha2-nistp384 and ecdsa-sha2-nistp521 signatures
SSHJ 0.22.0 (2017-??-??)::
* Fixed https://github.com/hierynomus/sshj/issues/331[#331]: Added support for wildcards in known_hosts file
SSHJ 0.21.1 (2017-04-25)::
* Merged https://github.com/hierynomus/sshj/pulls/322[#322]: Fix regression from 40f956b (invalid length parameter on outputstream)
Expand Down
115 changes: 30 additions & 85 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,54 +1,42 @@
import java.text.SimpleDateFormat
import com.bmuschko.gradle.docker.tasks.container.*
import com.bmuschko.gradle.docker.tasks.image.*

plugins {
id "java"
id "groovy"
id "jacoco"
id "osgi"
id "maven-publish"
id "com.bmuschko.docker-remote-api" version "3.2.1"
id 'pl.allegro.tech.build.axion-release' version '1.8.1'
id "org.ajoberstar.release-opinion" version "1.4.2"
id "com.github.hierynomus.license" version "0.12.1"
id "com.jfrog.bintray" version "1.7"
id 'ru.vyarus.java-lib' version '1.0.5'
// id 'ru.vyarus.pom' version '1.0.3'
id 'ru.vyarus.pom' version '1.0.3'
id 'ru.vyarus.github-info' version '1.1.0'
id 'ru.vyarus.animalsniffer' version '1.4.2'
}

group = "com.hierynomus"

defaultTasks "build"

repositories {
mavenCentral()
maven {
url "https://dl.bintray.com/mockito/maven/"
}
}

sourceCompatibility = 1.6
targetCompatibility = 1.6

configurations.compile.transitive = false

def bouncycastleVersion = "1.57"
def bouncycastleVersion = "1.56"

dependencies {
signature 'org.codehaus.mojo.signature:java16:1.1@signature'

compile "org.slf4j:slf4j-api:1.7.7"
compile "org.bouncycastle:bcprov-jdk15on:$bouncycastleVersion"
compile "org.bouncycastle:bcpkix-jdk15on:$bouncycastleVersion"
compile "com.jcraft:jzlib:1.1.3"

compile "net.i2p.crypto:eddsa:0.2.0"
compile "net.i2p.crypto:eddsa:0.1.0"

testCompile "junit:junit:4.11"
testCompile 'org.spockframework:spock-core:1.0-groovy-2.4'
testCompile "org.mockito:mockito-core:2.9.2"
testCompile "org.mockito:mockito-core:2.8.47"
testCompile "org.apache.sshd:sshd-core:1.2.0"
testRuntime "ch.qos.logback:logback-classic:1.1.2"
testCompile 'org.glassfish.grizzly:grizzly-http-server:2.3.17'
Expand All @@ -65,19 +53,14 @@ license {
excludes(['**/djb/Curve25519.java', '**/sshj/common/Base64.java'])
}

scmVersion {
tag {
prefix = 'v'
versionSeparator = ''
}
hooks {
pre 'fileUpdate', [file: 'README.adoc', pattern: { v, c -> /:sshj_version: .*/}, replacement: { v, c -> ":sshj_version: $v" }]
pre 'commit'
if (project.file('.git').isDirectory()) {
release {
grgit = org.ajoberstar.grgit.Grgit.open(project.projectDir)
}
} else {
version = "0.0.0-no.git"
}

project.version = scmVersion.version

// This disables the pedantic doclint feature of JDK8
if (JavaVersion.current().isJava8Compatible()) {
tasks.withType(Javadoc) {
Expand All @@ -95,6 +78,7 @@ task writeSshjVersionProperties {
}

jar.dependsOn writeSshjVersionProperties

jar {
manifest {
// please see http://bnd.bndtools.org/chapters/390-wrapping.html
Expand All @@ -115,7 +99,14 @@ jar {
}
}

sourcesJar {
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}

task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
manifest {
attributes(
// Add the needed OSGI attributes
Expand All @@ -128,27 +119,6 @@ sourcesJar {
}
}

configurations {
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
}

sourceSets {
integrationTest {
groovy {
compileClasspath += sourceSets.main.output + sourceSets.test.output
runtimeClasspath += sourceSets.main.output + sourceSets.test.output
srcDir file('src/itest/groovy')
}
resources.srcDir file('src/itest/resources')
}
}

task integrationTest(type: Test) {
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
}

tasks.withType(Test) {
testLogging {
exceptionFormat = 'full'
Expand Down Expand Up @@ -215,12 +185,21 @@ pom {
}
}

publishing.publications {
Sshj(MavenPublication) {
from components.java
artifact sourcesJar
artifact javadocJar
}
}


if (project.hasProperty("bintrayUsername") && project.hasProperty("bintrayApiKey")) {
bintray {
user = project.property("bintrayUsername")
key = project.property("bintrayApiKey")
publish = true
publications = ["maven"]
publications = ["Sshj"]
pkg {
repo = "maven"
name = project.name
Expand All @@ -247,38 +226,4 @@ if (project.hasProperty("bintrayUsername") && project.hasProperty("bintrayApiKey
}
}

jacocoTestReport {
reports {
xml.enabled true
html.enabled true
}
}


task buildItestImage(type: DockerBuildImage) {
inputDir = file('src/itest/docker-image')
tag = 'sshj/sshd-itest'
}

task createItestContainer(type: DockerCreateContainer) {
dependsOn buildItestImage
targetImageId { buildItestImage.getImageId() }
portBindings = ['2222:22']
}

task startItestContainer(type: DockerStartContainer) {
dependsOn createItestContainer
targetContainerId { createItestContainer.getContainerId() }
}

task stopItestContainer(type: DockerStopContainer) {
targetContainerId { createItestContainer.getContainerId() }
}

project.tasks.integrationTest.dependsOn(startItestContainer)
project.tasks.integrationTest.finalizedBy(stopItestContainer)

project.tasks.release.dependsOn([project.tasks.integrationTest, project.tasks.build])
project.tasks.release.finalizedBy(project.tasks.bintrayUpload)
project.tasks.jacocoTestReport.dependsOn(project.tasks.test)
project.tasks.check.dependsOn(project.tasks.jacocoTestReport)
project.tasks.release.dependsOn([project.tasks.build, project.tasks.bintrayUpload])
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip
16 changes: 0 additions & 16 deletions src/itest/docker-image/Dockerfile

This file was deleted.

1 change: 0 additions & 1 deletion src/itest/docker-image/id_rsa.pub

This file was deleted.

5 changes: 0 additions & 5 deletions src/itest/docker-image/test-container/ssh_host_ecdsa_key

This file was deleted.

This file was deleted.

36 changes: 0 additions & 36 deletions src/itest/groovy/com/hierynomus/sshj/IntegrationBaseSpec.groovy

This file was deleted.

Loading

0 comments on commit 4edaf7b

Please sign in to comment.