forked from ow2-proactive/scheduling-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
160 lines (133 loc) · 5.48 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
subprojects {
apply plugin: 'java'
apply plugin: 'jetty'
apply plugin: 'maven'
group = 'org.ow2.proactive_grid_cloud_portal'
version = schedulingPortalVersion
sourceCompatibility = 1.7
repositories {
if (project.hasProperty('local')) mavenLocal()
jcenter()
maven { url 'http://repository.sonatype.org/content/groups/forge/' }
maven { url 'http://repository.activeeon.com/content/repositories/thirdparty/' }
}
uploadArchives {
repositories {
mavenDeployer {
snapshotRepository(url: "http://repository.activeeon.com/content/repositories/snapshots/") {
authentication(userName: "${System.getProperty('nexusUsername')}",
password: "${System.getProperty('nexusPassword')}")
}
repository(url: "http://repository.activeeon.com/content/repositories/releases/") {
authentication(userName: "${System.getProperty('nexusUsername')}",
password: "${System.getProperty('nexusPassword')}")
}
}
}
}
dependencies {
providedCompile 'com.google.gwt:gwt-user:2.7.0'
providedCompile 'com.google.gwt:gwt-dev:2.7.0'
providedCompile 'com.google.gwt:gwt-codeserver:2.7.0'
// needed on the server side because we use GWT-RPC
compile 'com.smartgwt:smartgwt:5.1d-2015-05-23'
providedCompile 'com.google.gwt.google-apis:gwt-visualization:1.1.1'
// Needed for GWT compile and at runtime for RequestBuilder
// Specify two artifacts as workaround for GRADLE-1934
compile('javax.validation:validation-api:1.0.0.GA')
compile('javax.validation:validation-api:1.0.0.GA:sources')
compile 'org.slf4j:slf4j-api:1.7.12'
compile 'commons-io:commons-io:1.3.1'
compile 'commons-fileupload:commons-fileupload:1.2'
compile 'org.apache.httpcomponents:httpclient:4.2.6'
compile 'org.apache.commons:gwt-commons-patricia-trie:4.0'
compile 'org.jboss.resteasy:resteasy-jaxrs:3.0.11.Final'
compile 'org.apache.httpcomponents:httpmime:4.2.6'
runtime 'com.google.gwt:gwt-servlet:2.7.0'
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'
}
jar { // build jar with sources for GWT
from sourceSets.main.allSource
}
}
project(':applet') {
task visu(type: Jar) {
from sourceSets.main.output
exclude '**/DataServerLauncher*'
archiveName = "visu.jar"
manifest.attributes("Main-Class": "org.ow2.proactive_grid_cloud_portal.extra.RemoteViewer")
}
task dataserver(type: Jar) {
from sourceSets.main.output
exclude '**/RemoteViewer*'
archiveName = "servers.jar"
manifest.attributes("Main-Class": "org.ow2.proactive_grid_cloud_portal.extra.DataServerLauncher")
}
build.dependsOn visu, dataserver
}
project(':rm-portal') {
dependencies {
compile 'codemirror:codemirror2-gwt:1.2.0'
compile 'org.jboss.resteasy:resteasy-client:3.0.11.Final'
runtime 'org.slf4j:slf4j-simple:1.7.12'
compile project(':common-portal')
}
war {
exclude('WEB-INF/deploy/portal/symbolMaps')
def replaceTokens = {
it.filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: ['portal_version': project.version])
}
filesMatching('**/portal.html', replaceTokens)
filesMatching('**/rm.conf', replaceTokens)
}
}
project(':scheduler-portal') {
dependencies {
compile 'raphaelgwt:raphaelgwt:r28'
compile 'org.vectomatic:lib-gwt-file:0.3.3'
compile 'org.codehaus.jettison:jettison:1.2'
compile 'org.jboss.resteasy:resteasy-multipart-provider:3.0.11.Final'
compile 'org.apache.commons:commons-csv:1.1'
compile project(':common-portal')
runtime 'org.slf4j:slf4j-simple:1.7.12'
}
war {
exclude('WEB-INF/deploy/portal/symbolMaps')
from project(':applet').visu.outputs
from project(':applet').dataserver.outputs
def replaceTokens = {
it.filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: ['portal_version': project.version])
}
filesMatching('**/portal.html', replaceTokens)
filesMatching('**/scheduler.conf', replaceTokens)
}
}
configure([project(':scheduler-portal'), project(':rm-portal')]) {
apply plugin: 'war'
task compileGwt(dependsOn: classes, type: JavaExec) {
inputs.source sourceSets.main.java.srcDirs
inputs.dir sourceSets.main.output.resourcesDir
outputs.dir "$buildDir/portal"
logging.captureStandardOutput LogLevel.INFO
main = 'com.google.gwt.dev.Compiler'
classpath {
[sourceSets.main.java.srcDirs, // Java source
sourceSets.main.output.resourcesDir, // Generated resources
sourceSets.main.output.classesDir, // Generated classes
sourceSets.main.compileClasspath, // Deps
]
}
args = ["org.ow2.proactive_grid_cloud_portal.${project.name.capitalize() - "-portal"}",
'-war', "$buildDir/portal",
'-logLevel', 'INFO',
'-localWorkers', '2',
]
systemProperties = ['gwt.persistentunitcachedir': buildDir]
jettyRun.dependsOn compileGwt
war.dependsOn compileGwt
}
war {
from "$buildDir/portal"
}
}