1
- usePlugin(' java' )
2
- usePlugin(' maven' )
3
-
1
+ apply id : ' java'
4
2
group = ' org.jfrog.buildinfo'
5
3
version = ' 1.1-SNAPSHOT'
6
4
7
5
/*
8
6
(5) Define the Maven attributes that will be used for POM auto-generation
9
7
*/
10
- def artifactId = projectDir . name
8
+ def artifactId = ' buildinfo '
11
9
def groupId = group
12
10
def versionNumber = version
13
11
14
- dependencies {
15
- compile group : ' com.thoughtworks.xstream' , name : ' xstream' , version : ' 1.3.1'
16
- compile group : ' com.google.collections' , name : ' google-collections' , version : ' 1.0-rc5'
12
+
13
+ subprojects {
14
+ apply id : ' java'
15
+ apply id : ' maven'
16
+ apply url : ' http://gradle.artifactoryonline.com/gradle/plugins-releases-local/artifactoryplugin/artifactoryplugin/0.3/artifactoryplugin-0.3.gradle'
17
+
18
+ dependencies {
19
+ compile group : ' commons-lang' , name : ' commons-lang' , version : ' 2.4'
20
+ compile group : ' commons-logging' , name : ' commons-logging' , version : ' 1.1.1'
21
+ testCompile group : ' org.testng' , name : ' testng' , version : ' 5.11' , classifier : ' jdk15'
22
+ }
17
23
}
18
24
19
- /*
20
- (1) Define an Artifactory virtual repository used for dependency resolution
21
- */
22
- repositories {
23
- /*
24
- (2) An optional login/password (will is kept in gradle.properties) and used to authenticate a reader to Artifactory.
25
- USER, PASSWORD and REALM are coming from gradle.properties
26
- Uncomment if anonymous access is not allowed.
27
- */
28
- // org.apache.ivy.util.url.CredentialsStore.INSTANCE.addCredentials(REALM, HOST, USER, PASSWORD);
29
- mavenRepo urls : " http://localhost:8080/artifactory/libs-releases" ;
25
+ project(' :build-info-api' ) {
26
+ dependencies {
27
+ compile group : ' commons-codec' , name : ' commons-codec' , version : ' 1.3'
28
+ compile group : ' com.thoughtworks.xstream' , name : ' xstream' , version : ' 1.3.1'
29
+ compile group : ' com.google.collections' , name : ' google-collections' , version : ' 1.0'
30
+ }
31
+ }
32
+
33
+ project(' :build-info-client' ) {
34
+ dependencies {
35
+ compile project(' :build-info-api' )
36
+ compile group : ' org.codehaus.jackson' , name : ' jackson-mapper-asl' , version : ' 1.4.1'
37
+ compile group : ' org.codehaus.jackson' , name : ' jackson-core-asl' , version : ' 1.4.1'
38
+ compile group : ' org.apache.httpcomponents' , name : ' httpclient' , version : ' 4.0.1'
39
+ compile group : ' org.apache.httpcomponents' , name : ' httpcore' , version : ' 4.0.1'
40
+ }
30
41
}
31
42
43
+
44
+ dependsOnChildren()
45
+
32
46
uploadArchives {
33
47
repositories {
34
48
/*
35
- (6) This will be used to deploy the Gradle artifact and ivy modules
36
- */
37
- mavenRepo urls : " http://localhost:8080/artifactory/libs-releases-local" ;
49
+ (6) This will be used to deploy the Gradle artifact and ivy modules
50
+ */
51
+
52
+ mavenRepo urls : " http://localhost:8080/artifactory/libs-snapshots-local" ;
53
+ org.apache.ivy.util.url.CredentialsStore . INSTANCE . addCredentials(REALM , HOST , USER , PASSWORD )
38
54
39
55
/*
40
- (3) Use this to also deploy an auto-generated POM
41
- */
56
+ (3) Use this to also deploy an auto-generated POM
57
+ */
58
+
42
59
repositories. mavenDeployer {
43
- repository(url : " http://localhost:8080/artifactory/libs-releases -local" ) {
60
+ repository(url : " http://localhost:8080/artifactory/libs-snapshots -local" ) {
44
61
/*
45
- (4) The login/password of an Artifactory user with deploy privileges.
46
- USER and PASSWORD are coming from gradle.properties
47
- */
62
+ (4) The login/password of an Artifactory user with deploy privileges.
63
+ USER and PASSWORD are coming from gradle.properties
64
+ */
65
+
48
66
authentication(userName : USER , password : PASSWORD )
49
67
}
50
- pom. version = versionNumber
51
- pom. artifactId = artifactId
52
- pom. groupId = groupId
68
+ /* pom.version = versionNumber
69
+ pom.artifactId = artifactId
70
+ pom.groupId = groupId*/
53
71
}
54
72
}
55
- }
73
+ }
0 commit comments