小编May*_*ank的帖子

使用 S3 Bucket 作为带有 gradle 的 Maven 私有存储库

我正在尝试使用 AWS S3 作为 maven 私有仓库..下面是我的 build.gradle 看起来像-:

import java.util.regex.Matcher
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.profile.ProfileCredentialsProvider;

buildscript {

repositories {
    mavenCentral()
}
dependencies {
    classpath 'com.amazonaws:aws-java-sdk-core:1.11.5' 
}
}



plugins {
id "java"
id "idea"
id "eclipse" //run "./gradlew cleanEclipse eclipse" after importing to eclipse
id "maven-publish"
id "maven"
id 'base'
id 'signing'
id 'jacoco'
id "net.researchgate.release" version "2.4.1"
id "org.springframework.boot" version "1.5.2.RELEASE"
}

def fetchAwsCredentials = {
try {
    return new ProfileCredentialsProvider().getCredentials()
} catch (Exception e) {
    logger.debug('Unable to retrieve AWS credentials …
Run Code Online (Sandbox Code Playgroud)

amazon-s3 gradle maven

3
推荐指数
1
解决办法
2899
查看次数

标签 统计

amazon-s3 ×1

gradle ×1

maven ×1