Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Maven 忽略将Android库上载到Bintray-userOrg参数_Maven_Gradle_Bintray_Jcenter - Fatal编程技术网

Maven 忽略将Android库上载到Bintray-userOrg参数

Maven 忽略将Android库上载到Bintray-userOrg参数,maven,gradle,bintray,jcenter,Maven,Gradle,Bintray,Jcenter,我正在尝试使用以下指南将Android库上载到Bintray: 在我尝试运行bintrayUpload之前,一切正常,但出现以下错误: 任务“:MAS:bintrayUpload”的执行失败 无法创建包“user/maven/my repo”:未找到HTTP/1.1 404[消息:未找到repo“maven] 我认为问题在于存储库是由Bintray上的组织拥有的。但它正在用户下寻找它。 即:用户/maven/my repo应为组织/maven/my repo 我的local.propertie

我正在尝试使用以下指南将Android库上载到Bintray:

在我尝试运行bintrayUpload之前,一切正常,但出现以下错误:

任务“:MAS:bintrayUpload”的执行失败

无法创建包“user/maven/my repo”:未找到HTTP/1.1 404[消息:未找到repo“maven]

我认为问题在于存储库是由Bintray上的组织拥有的。但它正在用户下寻找它。 即:用户/maven/my repo应为组织/maven/my repo

我的local.properties如下所示:

...    
bintray.userOrg=organisation
bintray.user=user
bintray.apikey=key
bintray.gpg.password=password
...
/*
 * Copyright (c) 2016 CA. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license.  See the LICENSE file for details.
 *
 */

//noinspection GradleCompatible
// In order to build messaging using gradle 2 environment variables must be exportedd
// 1. prefix - this is the aar prefix, for example 'android'
// 2. versionName - this is the v.r.m formatted version name as used in the AndroidManifest.xml.
// For example, 1.1.0

plugins {
    id "com.jfrog.bintray" version "1.7"
    id "com.github.dcendents.android-maven" version "1.5"
}

apply plugin: 'com.android.library'
apply plugin: 'maven-publish'



ext {
    bintrayRepo = 'maven'
    bintrayName = 'mobile-app-services'

    publishedGroupId = 'com.ca'
    libraryName = 'MobileAppServices'
    artifact = 'mobile-app-services'

    libraryDescription = 'The Android Mobile SDK gives developers simple and secure access to the services of CA Mobile API Gateway and CA Mobile App Services. '

    siteUrl = 'https://github.com/CAAPIM/Android-MAS-SDK'
    gitUrl = 'https://github.com/CAAPIM/Android-MAS-SDK.git'

    libraryVersion = '3.2.00'

    developerId = 'devId'
    developerName = 'Full Name'
    developerEmail = 'user@email.com'

    licenseName = 'The MIT License (MIT)'
    licenseUrl = 'license.com'
    allLicenses = ["MIT"]
}

println '------> Executing mas library build.gradle'
repositories {
    mavenCentral()
    flatDir {
        dirs 'libs'
    }
}
android {
    compileSdkVersion 24
    buildToolsVersion '24.0.2'
    defaultConfig {
        minSdkVersion 19
        targetSdkVersion 24
        versionCode 12
        versionName "1.2"
    }

    lintOptions {
        abortOnError false
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

task javadoc(type: Javadoc) {
    source = android.sourceSets.main.java.srcDirs
    println "Source: $source"
    classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
    println "Classpath: $source"
    options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
    destinationDir = file("../docs/mas_javadoc/")
    failOnError false

    include '**/*MAS*.java'
    include '**/Device.java'
    include '**/ScimUser.java'

    exclude '**/MASTransformable.java'
    exclude '**/MASResultReceiver.java'
    exclude '**/MASWebServiceClient.java'
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:24.2.1'
    compile project(':MAG')
}

apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
库模块的My build.gradle如下所示:

...    
bintray.userOrg=organisation
bintray.user=user
bintray.apikey=key
bintray.gpg.password=password
...
/*
 * Copyright (c) 2016 CA. All rights reserved.
 *
 * This software may be modified and distributed under the terms
 * of the MIT license.  See the LICENSE file for details.
 *
 */

//noinspection GradleCompatible
// In order to build messaging using gradle 2 environment variables must be exportedd
// 1. prefix - this is the aar prefix, for example 'android'
// 2. versionName - this is the v.r.m formatted version name as used in the AndroidManifest.xml.
// For example, 1.1.0

plugins {
    id "com.jfrog.bintray" version "1.7"
    id "com.github.dcendents.android-maven" version "1.5"
}

apply plugin: 'com.android.library'
apply plugin: 'maven-publish'



ext {
    bintrayRepo = 'maven'
    bintrayName = 'mobile-app-services'

    publishedGroupId = 'com.ca'
    libraryName = 'MobileAppServices'
    artifact = 'mobile-app-services'

    libraryDescription = 'The Android Mobile SDK gives developers simple and secure access to the services of CA Mobile API Gateway and CA Mobile App Services. '

    siteUrl = 'https://github.com/CAAPIM/Android-MAS-SDK'
    gitUrl = 'https://github.com/CAAPIM/Android-MAS-SDK.git'

    libraryVersion = '3.2.00'

    developerId = 'devId'
    developerName = 'Full Name'
    developerEmail = 'user@email.com'

    licenseName = 'The MIT License (MIT)'
    licenseUrl = 'license.com'
    allLicenses = ["MIT"]
}

println '------> Executing mas library build.gradle'
repositories {
    mavenCentral()
    flatDir {
        dirs 'libs'
    }
}
android {
    compileSdkVersion 24
    buildToolsVersion '24.0.2'
    defaultConfig {
        minSdkVersion 19
        targetSdkVersion 24
        versionCode 12
        versionName "1.2"
    }

    lintOptions {
        abortOnError false
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

task javadoc(type: Javadoc) {
    source = android.sourceSets.main.java.srcDirs
    println "Source: $source"
    classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
    println "Classpath: $source"
    options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
    destinationDir = file("../docs/mas_javadoc/")
    failOnError false

    include '**/*MAS*.java'
    include '**/Device.java'
    include '**/ScimUser.java'

    exclude '**/MASTransformable.java'
    exclude '**/MASResultReceiver.java'
    exclude '**/MASWebServiceClient.java'
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:24.2.1'
    compile project(':MAG')
}

apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'

将上下文上载到组织拥有的存储库时,必须通过使用以下路径遵守Bintray REST API约定:OrganizationName/RepoName而不是UserName/RepoName

我不知道在你上面写的路径中“maven”这个词有什么用

对于上述情况,以下Bintray REST API链接可能会有所帮助:

在上述情况下,:subject指的是组织名称(而不是用户名)。在任何情况下,存储库位于用户下,:subject指的是用户名

有关更多详细信息,请按照完整的说明进行操作


上载文件的另一种方法是使用,它可以更直观地了解存储库、包、版本和工件的结构。

将上下文上载到组织拥有的存储库时,您必须通过使用以下路径遵守Bintray REST API约定:OrganizationName/RepoName而不是UserName/RepoName

我不知道在你上面写的路径中“maven”这个词有什么用

对于上述情况,以下Bintray REST API链接可能会有所帮助:

在上述情况下,:subject指的是组织名称(而不是用户名)。在任何情况下,存储库位于用户下,:subject指的是用户名

有关更多详细信息,请按照完整的说明进行操作

上载文件的另一种方法是使用,它可以更直观地了解存储库、包、版本和工件的结构