Hi *,
inside a Java module build by Gradle, I want to upload the resulting JAR(s)
of my project to a remote location which is reachable via SSH/SCP. All
examples I found did not work, at least not inside my environment.
Also the SCP example inside the Gradle tutorial did not work
(http://gradle.org/docs/current/userguide/maven_plugin.html)
I adapted the example a bit and now have this build.gradle:
apply plugin: 'java'
apply plugin: 'maven'
description = "User Service Implementation"
repositories {
mavenCentral()
}
configurations {
deployerJars "org.apache.maven.wagon:wagon-ssh:2.2"
}
dependencies {
deployerJars "org.apache.maven.wagon:wagon-ssh:2.2"
}
uploadArchives {
repositories.mavenDeployer {
name = 'sshDeployer' // optional
configuration = configurations.deployerJars
repository(url: "scp://miniappserver") {
authentication(userName: "root", password: "test")
}
}
}
But when I test that script I'm getting this error:
$ gradle uploadArchives -q
FAILURE: Build failed with an exception.
* Where:
Build file '/home/ifischer/git/userservice/implementation/build.gradle'
line: 11
* What went wrong:
A problem occurred evaluating project ':implementation'.
Cause: Could not find method deployerJars() for arguments
[org.apache.maven.wagon:wagon-ssh:2.2] on project ':implementation'.
What am I doing wrong? Can anybody provide a complete working example?
Cheers,
Ingo
--
View this message in context:
http://gradle.1045684.n5.nabble.com/Upload-via-SCP-with-Gradle-tp5435729p5435729.html
Sent from the gradle-user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email