简体   繁体   English

Ubuntu:Gradle Maven发布插件-无法通过sftp连接

[英]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.

相关问题 Maven-publish gradle插件会跳过该版本 - Maven-publish gradle plugin skips the version 如何使用maven-publish gradle插件附加AAR文件的源? - How to attach sources of an AAR file with maven-publish gradle plugin? 如何使用 gradle maven-publish 插件和 Kotlin DSL 发布带有空 pom 的 shadow jar? - How to publish a shadow jar with an empty pom using gradle maven-publish plugin and Kotlin DSL? Bintray:Maven-Publish with Gradle Bintray 插件不上传 maven-metadata.xml 校验和文件 - Bintray : Maven-Publish with Gradle Bintray Plugin doesn't upload maven-metadata.xml checksum file maven-publish插件中versionMapping的作用是什么 - What is the role of versionMapping in maven-publish plugin gradle maven-publish插件添加了时间戳,如何避免将其添加到后缀中 - gradle maven-publish plugin adds timestamp, how to avoid putting it into suffix 使用 gradle 中的 maven-publish 插件生成 SHA512 校验和文件 - Generate SHA512 Checksum File using maven-publish Plugin in gradle Gradle Maven-publish:仅发布一个任务 - Gradle maven-publish : task to publish only one Gradle 的“maven”和“maven-publish”插件有什么区别? - What is the difference between Gradle's "maven" and "maven-publish" plugins? 如何使用 Maven-Publish Android Gradle Plugin 生成的组件在 Kotlin DSL (build.gradle.kts) 中? - How do you use Maven-Publish Android Gradle Plugin's generated components in Kotlin DSL (build.gradle.kts)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM