|
|
@@ -0,0 +1,67 @@
|
|
|
+ext {
|
|
|
+ artifactoryBaseUrl = 'http://113.105.74.141:8081/artifactory'
|
|
|
+ artifactorySnapshotRepoUrl = "$artifactoryBaseUrl/libs-snapshot-local"
|
|
|
+ artifactoryReleaseRepoUrl = "$artifactoryBaseUrl/libs-release-local"
|
|
|
+}
|
|
|
+
|
|
|
+apply plugin: 'maven-publish'
|
|
|
+
|
|
|
+task sourcesJar(type: Jar) {
|
|
|
+ baseName "${project.name}"
|
|
|
+ classifier 'sources'
|
|
|
+ from sourceSets.main.allSource
|
|
|
+}
|
|
|
+
|
|
|
+task persistJar(type: Jar) {
|
|
|
+ baseName "sso-persist"
|
|
|
+ from sourceSets.main.output
|
|
|
+ exclude "spring", "config"
|
|
|
+ include "**/entity/**", "**/dao/**"
|
|
|
+}
|
|
|
+
|
|
|
+task persistSourcesJar(type: Jar) {
|
|
|
+ baseName "sso-persist"
|
|
|
+ classifier 'sources'
|
|
|
+ from sourceSets.main.allSource
|
|
|
+ exclude "spring", "config"
|
|
|
+ include "**/entity/**", "**/dao/**"
|
|
|
+}
|
|
|
+
|
|
|
+publishing {
|
|
|
+ publications {
|
|
|
+ plugin(MavenPublication) {
|
|
|
+ groupId "${project.group}"
|
|
|
+ artifactId "${project.name}"
|
|
|
+ version "${project.version}"
|
|
|
+
|
|
|
+ from components.java
|
|
|
+ artifact sourcesJar
|
|
|
+ }
|
|
|
+
|
|
|
+ persist(MavenPublication) {
|
|
|
+ groupId "${project.group}"
|
|
|
+ artifactId 'sso-persist'
|
|
|
+ version "${project.version}"
|
|
|
+
|
|
|
+ artifact persistJar
|
|
|
+ artifact persistSourcesJar
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ repositories {
|
|
|
+ maven {
|
|
|
+ name 'myLocal'
|
|
|
+ url "file://$projectDir/repo"
|
|
|
+ }
|
|
|
+
|
|
|
+ maven {
|
|
|
+ name 'remoteArtifactory'
|
|
|
+ url project.version.endsWith('-SNAPSHOT') ? artifactorySnapshotRepoUrl : artifactoryReleaseRepoUrl
|
|
|
+
|
|
|
+ credentials {
|
|
|
+ username = 'yingp'
|
|
|
+ password = '111111'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|