When using gradle with maven-publish, I get Cannot find wagon which supports the requested protocol: scp -
the error - "" property uploadurl
defined scp://user@host/data/apps/repo/m2
here relevant sections
configurations { deployerjars } // apply java plugin add support java apply plugin: 'java' //---------------------- buildscript { repositories { jcenter() } dependencies { classpath 'net.researchgate:gradle-release:2.0.2' } } //---------------------- apply plugin: 'maven' uploadarchives { repositories { mavendeployer { //uploadurl defined in properties file. recognied //by gradle repository(url:uploadurl) uniqueversion = false } } } //---------------------- apply plugin: 'net.researchgate.release' //---------------------- // in section declare find dependencies of project repositories { // use 'maven central' resolving dependencies. // can declare maven/ivy/file repository here. mavencentral() } // in section declare dependencies production , 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 dependency favourite test framework want use in tests. // testng supported gradle test task. change // testcompile dependency testcompile 'org.testng:testng:6.8.1' , add // 'test.usetestng()' build script. testcompile 'junit:junit:4.11' }
you created configuration called deployjars
unnecessary.
you missing wagon
dependency archives
configuration
:
dependencies { archives "org.apache.maven.wagon:wagon-ssh-external:2.10" // <-- latest ssh dependency }
so change deployjars
archives
.
then uploadarchives
, need specify configuration:
uploadarchives { repositories { mavendeployer { configuration = configurations.archives // <-- missing repository(url:uploadurl) uniqueversion = false } } }
Comments
Post a Comment