我正在尝试使用 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)