Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lack of documentation for get #310

Open
liemle3893 opened this issue Dec 7, 2017 · 0 comments
Open

Lack of documentation for get #310

liemle3893 opened this issue Dec 7, 2017 · 0 comments

Comments

@liemle3893
Copy link

liemle3893 commented Dec 7, 2017

Problem: get destination required absolute path instead of relative/projectDir.

I've got this problem when trying to get generated files from my server.
This link does not told about absolute path. So I end-up myself to use projectDir.getAbsolutePath();

Environment info

gradle-ssh-plugin-2.7.1 (groovy-ssh-2.7.1, jsch-0.1.53, groovy-2.4.11, java-1.8.0_111)

Steps to reproduce

  1. Create a submodule
  2. Create remote and get file from remote
  3. Build from root project.

settings.gradle:

include 'libs'
project(':libs').projectDir = new File('thrift')

build.gradle

compile project(":libs")

thirft/build.gradle

task genThriftJar {
    doLast {
        def projectLocaltion = projectDir.getAbsolutePath();
        ssh.run {
            session(remotes.compilerServer) {
                // Delete existing thrift file.
                cleanGeneratedFiles()
                put from: file("thrift/$serviceName" + ".thrift"), into: "$compilerLocation/$serviceName" + ".thrift"
                execute "mkdir -p $compilerLocation/gen-java"
                def compileResult = execute "bash $compilerLocation/genjar $serviceName", logging: 'stdout', pty: true
                assert compileResult.contains('SUCCESSFUL')
                get from: "$compilerLocation/$serviceName" + '.jar', into: "libs/"
            }
        }
    }
}

P/s: Sorry for my bad English.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant