Commit c1d9d4b9f1d5c3cf951358c86e8c1a5e448d2ca7
1 parent
dce2849c
Exists in
master
1. add gradle update jar 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 |
@@ -42,3 +43,24 @@ task sourcesJar(type: Jar, dependsOn: classes) { | @@ -42,3 +43,24 @@ task sourcesJar(type: Jar, dependsOn: classes) { | ||
42 | artifacts { | 43 | artifacts { |
43 | archives sourcesJar | 44 | archives sourcesJar |
44 | } | 45 | } |
46 | + | ||
47 | +uploadArchives { | ||
48 | + configuration = configurations.archives | ||
49 | + repositories { | ||
50 | + mavenDeployer { | ||
51 | + snapshotRepository(url: MAVEN_REPO_SNAPSHOT_URL) { | ||
52 | + authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD) | ||
53 | + } | ||
54 | + repository(url: MAVEN_REPO_RELEASE_URL) { | ||
55 | + authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD) | ||
56 | + } | ||
57 | + pom.project { | ||
58 | + version '1.0.4' | ||
59 | + artifactId ARTIFACT_Id | ||
60 | + groupId GROUP_ID | ||
61 | + packaging TYPE | ||
62 | + description DESCRIPTION | ||
63 | + } | ||
64 | + } | ||
65 | + } | ||
66 | +} |
@@ -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-util | ||
16 | + | ||
17 | +# type | ||
18 | +TYPE=jar | ||
19 | + | ||
20 | +# description | ||
21 | +DESCRIPTION=util package | ||
0 | \ No newline at end of file | 22 | \ No newline at end of file |