Commit ac8823a624250c832e72760b31ccdef3d2de4f17
1 parent
085176f3
Exists in
master
and in
2 other branches
1. add gradle upload nexus script
Showing
2 changed files
with
43 additions
and
0 deletions
Show diff stats
build.gradle
| @@ -11,6 +11,7 @@ plugins { | @@ -11,6 +11,7 @@ plugins { | ||
| 11 | id 'java' | 11 | id 'java' |
| 12 | id 'eclipse' | 12 | id 'eclipse' |
| 13 | id 'application' | 13 | id 'application' |
| 14 | + id 'maven' | ||
| 14 | } | 15 | } |
| 15 | 16 | ||
| 16 | jar.enabled = true | 17 | jar.enabled = true |
| @@ -38,3 +39,24 @@ task sourcesJar(type: Jar, dependsOn: classes) { | @@ -38,3 +39,24 @@ task sourcesJar(type: Jar, dependsOn: classes) { | ||
| 38 | artifacts { | 39 | artifacts { |
| 39 | archives sourcesJar | 40 | archives sourcesJar |
| 40 | } | 41 | } |
| 42 | + | ||
| 43 | +uploadArchives { | ||
| 44 | + configuration = configurations.archives | ||
| 45 | + repositories { | ||
| 46 | + mavenDeployer { | ||
| 47 | + snapshotRepository(url: MAVEN_REPO_SNAPSHOT_URL) { | ||
| 48 | + authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD) | ||
| 49 | + } | ||
| 50 | + repository(url: MAVEN_REPO_RELEASE_URL) { | ||
| 51 | + authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD) | ||
| 52 | + } | ||
| 53 | + pom.project { | ||
| 54 | + version '2.0.2' | ||
| 55 | + artifactId ARTIFACT_Id | ||
| 56 | + groupId GROUP_ID | ||
| 57 | + packaging TYPE | ||
| 58 | + description DESCRIPTION | ||
| 59 | + } | ||
| 60 | + } | ||
| 61 | + } | ||
| 62 | +} |
| @@ -0,0 +1,21 @@ | @@ -0,0 +1,21 @@ | ||
| 1 | +#Maven Repo URL | ||
| 2 | +MAVEN_REPO_RELEASE_URL=http://47.93.122.69:9001/repository/maven-releases/ | ||
| 3 | +MAVEN_REPO_SNAPSHOT_URL=http://47.93.122.69:9001/repository/maven-snapshots/ | ||
| 4 | + | ||
| 5 | +#maven GroupId | ||
| 6 | +GROUP=com.taover | ||
| 7 | +#nexus ossde | ||
| 8 | +NEXUS_USERNAME=dev | ||
| 9 | +#nexus oss | ||
| 10 | +NEXUS_PASSWORD=Nexus@dev | ||
| 11 | + | ||
| 12 | +# groupid | ||
| 13 | +GROUP_ID=com.taover | ||
| 14 | + | ||
| 15 | +ARTIFACT_Id=com-taover-repository | ||
| 16 | + | ||
| 17 | +# type | ||
| 18 | +TYPE=jar | ||
| 19 | + | ||
| 20 | +# description | ||
| 21 | +DESCRIPTION=repository base pack | ||
| 0 | \ No newline at end of file | 22 | \ No newline at end of file |