pom文件中定义的工件或版本不匹配

时间:2017-04-08 07:35:29

标签: java android maven jcenter

我制作了android开源库并尝试在ext { bintrayRepo = 'PersianDate' bintrayName = 'PersianDate' publishedGroupId = 'com.github.samanzamani.persiandate' libraryName = 'PersianDate' artifact = 'PersianDate' libraryDescription = 'A simple jalali date converter' siteUrl = 'https://github.com/samanzamani/PersianDate' gitUrl = 'https://github.com/samanzamani/PersianDate.git' libraryVersion = '0.0.2' developerId = 'zamani' developerName = 'Saman Zamani' developerEmail = 'saman.zamani1@gmail.com' licenseName = 'The Apache Software License, Version 2.0' licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt' allLicenses = ["Apache-2.0"] } 上传。为此,我按照this整理,但在上传项目的最后一步,我收到此错误:

  

无法上传到   ' https://api.bintray.com/content/saman/PersianDate/PersianDate/0.0.2/com/github/samanzamani/persiandate/persiandate/0.0.2/persiandate-0.0.2.pom&#39 ;:   HTTP / 1.1 400错误请求[消息:无法上传文件:Maven组,   pom文件中定义的工件或版本与文件路径不匹配   ' COM / github上/ samanzamani / persiandate / persiandate / 0.0.2 / persiandate-0.0.2.pom']

球泡

install.gradle文件:

version = libraryVersion

if (project.hasProperty("android")) { // Android libraries
    task sourcesJar(type: Jar) {
        classifier = 'sources'
        from android.sourceSets.main.java.srcDirs
    }

    task javadoc(type: Javadoc) {
        source = android.sourceSets.main.java.srcDirs
        classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
    }
} else { // Java libraries
    task sourcesJar(type: Jar, dependsOn: classes) {
        classifier = 'sources'
        from sourceSets.main.allSource
    }
}

task javadocJar(type: Jar, dependsOn: javadoc) {
    classifier = 'javadoc'
    from javadoc.destinationDir
}

artifacts {
    archives javadocJar
    archives sourcesJar
}

// Bintray
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

bintray {
    user = properties.getProperty("bintray.user")
    key = properties.getProperty("bintray.apikey")

    configurations = ['archives']
    pkg {
        repo = bintrayRepo
        name = bintrayName
        userOrg=properties.getProperty("bintray.org")
        desc = libraryDescription
        websiteUrl = siteUrl
        vcsUrl = gitUrl
        licenses = allLicenses
        publish = true
        publicDownloadNumbers = true
        version {
            desc = libraryDescription
            gpg {
                sign = true //Determines whether to GPG sign the files. The default is false
                passphrase = properties.getProperty("bintray.gpg.password")
                name = libraryVersion
                //Optional. The passphrase for GPG signing'
            }
        }
    }
}

bintray.gradle文件:

apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'
apply from: 'install.gradle'
android {
    compileSdkVersion 25
    buildToolsVersion "25.0.0"

    defaultConfig {
        minSdkVersion 2
        targetSdkVersion 25
        versionCode 2
        versionName "Alfa"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
}
tasks.withType(Javadoc) {
    options.addStringOption('Xdoclint:none', '-quiet')
    options.addStringOption('encoding', 'UTF-8')
    options.addStringOption('charSet', 'UTF-8')
}
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'bintray.gradle'

build.gradle文件:

$stmt->store_result();
$resultrow = array();
stmt_bind_assoc($stmt, $resultrow);
$stmt->store_result();

while($stmt->fetch()){
   var_dump($resultrow);
}

任何想法..!?

0 个答案:

没有答案