Skip to content

Commit 0d76e60

Browse files
committed
Merge pull request #26 from WASdev/fixed_deps_build
Move the repository definitions centrally and move dependency versions
2 parents c0598e6 + 321f8de commit 0d76e60

9 files changed

Lines changed: 82 additions & 52 deletions

File tree

LARS-1_versions.gradle

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* The purpose of this file is to provide fixed versions of some
3+
* dependencies to build against for v1 release. To build against
4+
* these version run the gradle build with:
5+
*
6+
* -PversionFile=LARS-1_versions.gradle
7+
*/
8+
9+
ext {
10+
// Packaged runtime dependencies
11+
// Fixed versions for the LARS 1 release
12+
aries_util_version = "1.1.0"
13+
osgi_core_version = "5.0.0"
14+
jackson_version="2.4.4"
15+
wink_json4j_version="1.4"
16+
mongodb_java_version="2.11.1"
17+
18+
// Test/compile time only dependencies
19+
// Fixed at 1.15 as 1.16beta was getting picked up, which had a bug in it.
20+
jmockit_version="1.15"
21+
hamcrest_version="1.+"
22+
junit_version="4.+"
23+
httpclient_version="4.3.+"
24+
httpmime_version="4.3.+"
25+
wlp_ant_tasks_version="1.0"
26+
}

LARS_versions.gradle

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
ext {
2+
// Packaged runtime dependencies
3+
aries_util_version = "1.1.+"
4+
osgi_core_version = "5.0.+"
5+
jackson_version="2.2.+"
6+
wink_json4j_version="1.4"
7+
mongodb_java_version="2.11.1"
8+
9+
// Test/compile time only dependencies
10+
// Fixed at 1.15 as 1.16beta was getting picked up, which had a bug in it.
11+
jmockit_version="1.15"
12+
hamcrest_version="1.+"
13+
junit_version="4.+"
14+
httpclient_version="4.3.+"
15+
httpmime_version="4.3.+"
16+
wlp_ant_tasks_version="1.0"
17+
}

build.gradle

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@
1717
apply plugin: 'base'
1818
apply plugin: 'eclipse'
1919

20+
if (hasProperty('versionFile')) {
21+
apply from: versionFile
22+
} else {
23+
apply from: 'LARS_versions.gradle'
24+
}
25+
2026
boolean haveAnyTestsFailed = false;
2127

2228
loadProperties("${rootProject.rootDir}/test-utils/src/main/resources/config.properties");
@@ -30,6 +36,11 @@ subprojects {
3036
apply plugin: 'eclipse'
3137
apply plugin: 'findbugs'
3238

39+
40+
repositories {
41+
mavenCentral()
42+
}
43+
3344
sourceSets {
3445
fat {
3546
compileClasspath += sourceSets.main.output
@@ -46,10 +57,10 @@ subprojects {
4657
}
4758

4859
findbugsMain {
49-
reports {
50-
xml.enabled = false
51-
html.enabled = true
52-
}
60+
reports {
61+
xml.enabled = false
62+
html.enabled = true
63+
}
5364
}
5465

5566
configurations {
@@ -148,7 +159,7 @@ subprojects {
148159
task dist(type: Sync) {
149160
into 'build/distributions'
150161
from subprojects*.getTasksByName('distZip', false)
151-
from tasks.getByPath(':server:packageLars');
162+
from tasks.getByPath(':server:packageLars');
152163
}
153164

154165
task globalTestReport(type: TestReport) {

cli-client/build.gradle

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,15 @@ apply plugin: 'distribution'
2020

2121
archivesBaseName = 'larsClient'
2222

23-
repositories {
24-
mavenCentral();
25-
}
26-
2723
dependencies {
28-
compile group:'org.apache.aries', name:'org.apache.aries.util', version:'1.1.+'
29-
compile group:'org.osgi', name:'org.osgi.core', version:'5.0.+'
24+
compile group:'org.apache.aries', name:'org.apache.aries.util', version:aries_util_version
25+
compile group:'org.osgi', name:'org.osgi.core', version:osgi_core_version
3026
compile project(':upload-lib')
3127

32-
testCompile group:'org.jmockit', name:'jmockit', version:'1.15'
33-
testCompile group:'org.hamcrest', name:'hamcrest-library', version:'1.+'
34-
testCompile group:'junit', name:'junit', version:'4.+'
35-
testCompile group:'org.mongodb', name:'mongo-java-driver', version:'2.11.1'
28+
testCompile group:'org.jmockit', name:'jmockit', version:jmockit_version
29+
testCompile group:'org.hamcrest', name:'hamcrest-library', version:hamcrest_version
30+
testCompile group:'junit', name:'junit', version:junit_version
31+
testCompile group:'org.mongodb', name:'mongo-java-driver', version:mongodb_java_version
3632
testCompile project(':test-utils')
3733
}
3834

client-lib-tests/build.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717
apply plugin: 'java'
1818
apply plugin: 'eclipse'
1919

20-
repositories {
21-
mavenCentral();
22-
}
23-
2420
dependencies {
2521
testCompile project(':client-lib')
2622
testCompile project(':test-utils')

client-lib/build.gradle

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,10 @@
1717
apply plugin: 'java'
1818
apply plugin: 'eclipse'
1919

20-
repositories {
21-
mavenCentral();
22-
}
23-
2420
dependencies {
25-
compile group:'org.apache.aries', name:'org.apache.aries.util', version:'1.1.+'
26-
compile group:'org.osgi', name:'org.osgi.core', version:'5.0.+'
27-
compile group:'org.apache.wink', name:'wink-json4j', version:'1.4'
21+
compile group:'org.apache.aries', name:'org.apache.aries.util', version:aries_util_version
22+
compile group:'org.osgi', name:'org.osgi.core', version:osgi_core_version
23+
compile group:'org.apache.wink', name:'wink-json4j', version:wink_json4j_version
2824
}
2925

3026

server/build.gradle

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,36 +31,32 @@ ext {
3131
testServerName = 'testServer'
3232
}
3333

34-
repositories {
35-
mavenCentral();
36-
}
37-
3834
configurations {
3935
sharedLibs
4036
providedCompile.extendsFrom sharedLibs
4137
antTasks
4238
}
4339

4440
dependencies {
45-
compile group:'com.fasterxml.jackson.core', name:'jackson-core', version:'2.2.+'
46-
compile group:'com.fasterxml.jackson.core', name:'jackson-databind', version:'2.2.+'
47-
compile group:'com.fasterxml.jackson.core', name:'jackson-annotations', version:'2.2.+'
41+
compile group:'com.fasterxml.jackson.core', name:'jackson-core', version:jackson_version
42+
compile group:'com.fasterxml.jackson.core', name:'jackson-databind', version:jackson_version
43+
compile group:'com.fasterxml.jackson.core', name:'jackson-annotations', version:jackson_version
4844

49-
sharedLibs group:'org.mongodb', name:'mongo-java-driver', version:'2.11.1'
45+
sharedLibs group:'org.mongodb', name:'mongo-java-driver', version:mongodb_java_version
5046
providedCompile fileTree(dir: "${libertyRoot}/dev/api", include: '**/*.jar')
5147

52-
testCompile group:'junit', name:'junit', version:'4.+'
53-
testCompile group:'org.hamcrest', name:'hamcrest-library', version:'1.+'
54-
testCompile group:'org.apache.httpcomponents', name:'httpclient', version:'4.3.+'
55-
testCompile group:'org.apache.httpcomponents', name:'httpmime', version:'4.3.+'
56-
testCompile group:'org.jmockit', name:'jmockit', version:'1.15'
48+
testCompile group:'junit', name:'junit', version:junit_version
49+
testCompile group:'org.hamcrest', name:'hamcrest-library', version:hamcrest_version
50+
testCompile group:'org.apache.httpcomponents', name:'httpclient', version:httpclient_version
51+
testCompile group:'org.apache.httpcomponents', name:'httpmime', version:httpmime_version
52+
testCompile group:'org.jmockit', name:'jmockit', version:jmockit_version
5753
testCompile project(':test-utils')
5854

5955
// The unit tests need some Liberty classes at runtime, but they should
6056
// not be compiling against these.
6157
testRuntime fileTree(dir: "${libertyRoot}/lib", include: '*slf4*.jar')
6258

63-
antTasks group:'net.wasdev.wlp.ant', name:'wlp-anttasks', version:'1.0'
59+
antTasks group:'net.wasdev.wlp.ant', name:'wlp-anttasks', version:wlp_ant_tasks_version
6460
}
6561

6662
clean {

test-utils/build.gradle

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,10 @@
1717
apply plugin: 'java'
1818
apply plugin: 'eclipse'
1919

20-
repositories {
21-
mavenCentral();
22-
}
23-
2420
dependencies {
25-
compile group:'org.hamcrest', name:'hamcrest-library', version:'1.+'
26-
compile group:'junit', name:'junit', version:'4.+'
27-
compile group:'org.mongodb', name:'mongo-java-driver', version:'2.11.1'
21+
compile group:'org.hamcrest', name:'hamcrest-library', version:hamcrest_version
22+
compile group:'junit', name:'junit', version:junit_version
23+
compile group:'org.mongodb', name:'mongo-java-driver', version:mongodb_java_version
2824
compile project(':client-lib')
2925
}
3026

upload-lib/build.gradle

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,9 @@
1717
apply plugin: 'java'
1818
apply plugin: 'eclipse'
1919

20-
repositories {
21-
mavenCentral();
22-
}
23-
2420
dependencies {
2521
compile project(':client-lib')
26-
testCompile group:'junit', name:'junit', version:'4.+'
22+
testCompile group:'junit', name:'junit', version:junit_version
2723
testCompile project(':test-utils')
2824
}
2925

0 commit comments

Comments
 (0)