[英]Ubuntu: Gradle maven-publish plugin - Failing to connect by sftp
I'm trying to get my gradle script to upload to an sftp account, but it keeps failing with error, 我正在尝试将gradle脚本上载到sftp帐户,但是它始终会因错误而失败,
Failed to deploy artifacts: Could not transfer artifact com.himself12794:Heroes-Mod:jar:0.9-rev1 from/to remote (sftp://himself1@ftp.himself12794-develops.com:18765/public_html/maven): Could not write to resource 'com/himself12794/Heroes-Mod/0.9-rev1/Heroes-Mod-0.9-rev1.jar' 无法部署工件:无法从/到远程传输工件com.himself12794:Heroes-Mod:jar:0.9-rev1(sftp://himself1@ftp.himself12794-develops.com:18765 / public_html / maven):无法写入资源'com / himself12794 / Heroes-Mod / 0.9-rev1 / Heroes-Mod-0.9-rev1.jar'
I'm able to connect via sftp command: 我可以通过sftp命令连接:
sftp -P 18765 himself1@ftp.himself12794-develops.com
However, the publishMavenJavaPublicationToMavenRepository task fails, with the above error. 但是,publishMavenJavaPublicationToMavenRepository任务失败,出现上述错误。
This is a Minecraft Forge mod, if that sheds any light on things. 这是Minecraft Forge模组,如果可以说明的话。
My build.gradle is like so: 我的build.gradle像这样:
buildscript {
repositories {
jcenter()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.0- SNAPSHOT'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: "maven-publish"
// for people who want stable
/*plugins {
id "net.minecraftforge.gradle.forge" version "2.0.1"
id "maven-publish"
}*/
repositories {
maven {
name = "himself12794-develops"
url = "http://maven.himself12794-develops.com"
}
}
version = "0.9-rev1"
group = "com.himself12794"
archivesBaseName = "Heroes-Mod"
minecraft {
version = "1.8-11.14.3.1514"
runDir = "run"
mappings = "snapshot_20141130"
// makeObfSourceJar = false
}
dependencies {
compile "com.himself12794:powersAPI:1.1-rev2"
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}
publishing {
repositories {
maven {
url "sftp://himself1@ftp.himself12794-develops.com:18765"
}
}
}
processResources
{
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'version':project.version, 'mcversion':project.minecraft.version
}
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
Any assistance anyone can give is greatly appreciated. 任何人都可以给予的任何帮助,我们将不胜感激。
I have not solved this specific problem yet, but I have discovered that the problem with the original maven plugin that caused me to try the maven-publish plugin was actually an issue with the current stable version of Gradle (2.7). 我还没有解决这个特定的问题,但是我发现原来的maven插件导致我尝试使用maven-publish插件的问题实际上是当前稳定版Gradle(2.7)的问题。 Using the current nightly wrapper build has allowed me to circumvent this. 使用当前的每晚包装程序版本,使我得以规避。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.