From ac8823a624250c832e72760b31ccdef3d2de4f17 Mon Sep 17 00:00:00 2001 From: 王彬 Date: Tue, 20 Aug 2019 14:48:25 +0800 Subject: [PATCH] 1. add gradle upload nexus script --- build.gradle | 22 ++++++++++++++++++++++ gradle.properties | 21 +++++++++++++++++++++ 2 files changed, 43 insertions(+), 0 deletions(-) create mode 100644 gradle.properties diff --git a/build.gradle b/build.gradle index ce7a99e..d139085 100644 --- a/build.gradle +++ b/build.gradle @@ -11,6 +11,7 @@ plugins { id 'java' id 'eclipse' id 'application' + id 'maven' } jar.enabled = true @@ -38,3 +39,24 @@ task sourcesJar(type: Jar, dependsOn: classes) { artifacts { archives sourcesJar } + +uploadArchives { + configuration = configurations.archives + repositories { + mavenDeployer { + snapshotRepository(url: MAVEN_REPO_SNAPSHOT_URL) { + authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD) + } + repository(url: MAVEN_REPO_RELEASE_URL) { + authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD) + } + pom.project { + version '2.0.2' + artifactId ARTIFACT_Id + groupId GROUP_ID + packaging TYPE + description DESCRIPTION + } + } + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..12c53bd --- /dev/null +++ b/gradle.properties @@ -0,0 +1,21 @@ +#Maven Repo URL +MAVEN_REPO_RELEASE_URL=http://47.93.122.69:9001/repository/maven-releases/ +MAVEN_REPO_SNAPSHOT_URL=http://47.93.122.69:9001/repository/maven-snapshots/ + +#maven GroupId +GROUP=com.taover +#nexus ossde +NEXUS_USERNAME=dev +#nexus oss +NEXUS_PASSWORD=Nexus@dev + +# groupid +GROUP_ID=com.taover + +ARTIFACT_Id=com-taover-repository + +# type +TYPE=jar + +# description +DESCRIPTION=repository base pack \ No newline at end of file -- libgit2 0.21.2