0

The error I get - "" The property uploadURL is defined as scp://user@host/data/apps/repo/m2 Here are the relevant sections

configurations {
    deployerJars
}
// Apply the java plugin to add support for Java
apply plugin: 'java'
//----------------------
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'net.researchgate:gradle-release:2.0.2'
    }
}
//----------------------
apply plugin: 'maven'
uploadArchives {
    repositories {
        mavenDeployer {
            //uploadURL is defined in a properties file. It is properly recognied
            //by gradle
            repository(url:upLoadURL) 
            uniqueVersion = false
        }

    }
}
//----------------------
apply plugin: 'net.researchgate.release'


//----------------------
// In this section you declare where to find the dependencies of your project
repositories {
    // Use 'maven central' for resolving your dependencies.
    // You can declare any Maven/Ivy/file repository here.
    mavenCentral()
}

// In this section you declare the dependencies for your production and test code
dependencies {
    deployerJars "org.apache.maven.wagon:wagon-ssh:2.2"

    compile 'org.springframework:spring-context:4.1.6.RELEASE'
    compile 'org.springframework:spring-webmvc:4.1.6.RELEASE'


    // Declare the dependency for your favourite test framework you want to use in your tests.
    // TestNG is also supported by the Gradle Test task. Just change the
    // testCompile dependency to testCompile 'org.testng:testng:6.8.1' and add
    // 'test.useTestNG()' to your build script.

    testCompile 'junit:junit:4.11'


}
Prashant
  • 1,002
  • 13
  • 29
  • I forgot to put in the error. Here it is - "Unsupported Protocol: 'scp': Cannot find wagon which supports the requested protocol: scp" – Prashant Jun 02 '15 at 19:16

1 Answers1

1

You created a configuration called deployJars that is unnecessary.

You are missing the wagon dependency for the archives configuration:

dependencies {
    archives "org.apache.maven.wagon:wagon-ssh-external:3.4.0"
}

So change deployJars to archives.

Then for uploadArchives, you need to specify the configuration:

uploadArchives {
    repositories {
        mavenDeployer {
            configuration = configurations.archives // <-- missing
            repository(url: "scpexe://yourhost/yourdir/") 
            uniqueVersion = false
        }

    }
}
Janning Vygen
  • 8,877
  • 9
  • 71
  • 102
Jared Burrows
  • 54,294
  • 25
  • 151
  • 185