forked from apache/wicket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.disabled
204 lines (170 loc) · 6.85 KB
/
build.gradle.disabled
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
// ----------------------------------------------------------------------------
// Licensed to the Apache Software Foundation (ASF) under one or more
// contributor license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright ownership.
// The ASF licenses this file to You under the Apache License, Version 2.0
// (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------
// Wicket Gradle build file
//
// @author Juergen Donnerstag
// ----------------------------------------------------------------------------
// A convenience method that calls the dependsOn method of the parent project
// for every child project (not every sub project). It declares an execution
// dependency on all children.
dependsOnChildren()
// For testing purposes
/*
def localReleaseRepo = new File("${System.properties.'user.home'}/local-gradle-repository/release").toURL().toString()
def localSnapshotRepo = new File("${System.properties.'user.home'}/local-gradle-repository/snapshot").toURL().toString()
*/
// The root project is like a container and the subprojects method iterates
// over the elements of this container - the projects in this instance, but
// not deep subprojects - and injects the specified configuration. This way
// we can easily define some common dependencies
subprojects { prj ->
apply plugin: 'java'
apply plugin: 'maven'
// apply plugin: 'code-quality'
// apply plugin: 'project-reports'
// Wicket Maven group and version
group = 'org.apache.wicket'
version = '1.5'
if(!System.properties.'release') {
version = version + '-SNAPSHOT'
}
/*
gradle.taskGraph.whenReady {taskGraph ->
if (taskGraph.hasTask(':release')) {
version = '1.5'
} else {
version = '1.5-SNAPSHOT'
}
}
*/
// Subproject "wicket" is only used to build the uber jars. No need to have eclipse project files
if (prj.name != "wicket") {
apply plugin: 'eclipse'
apply plugin: 'idea'
// We don't need / want the WTP/WST natures and facets
prj.eclipseProject.whenConfigured { p ->
p.natures.removeAll 'org.eclipse.wst.common.project.facet.core.nature', 'org.eclipse.wst.common.modulecore.ModuleCoreNature', 'org.eclipse.jem.workbench.JavaEMFNature'
p.buildCommands.removeAll { it.name.startsWith('org.eclipse.wst.') }
}
// No need to create .settings/org.eclipse.wst.* files either
prj.tasks.all { if(it.name.contains('eclipseWtp')) { it.enabled = false }}
// org.eclipse.jdt.core.prefs is provided via SVN. No need for gradle to modify them
prj.tasks.all { if(it.name.contains('eclipseJdt')) { it.enabled = false }}
prj.tasks.all { if(it.name.contains('cleanEclipseJdt')) { it.enabled = false }}
}
// Use maven output dir
setBuildDir 'target'
sourceCompatibility = 1.5
targetCompatibility = 1.5
compileJava.options.compilerArgs = ['-Xlint:unchecked', '-Xlint:deprecation', '-g']
// We have plenty of *.html, *.xml and *.properties files which we want to
// copy/forward, like we do for *.java files.
sourceSets.main.resources.srcDir 'src/main/java'
sourceSets.test.resources.srcDir 'src/test/java'
task packageTests(type: Jar) {
from sourceSets.test.classes
classifier = 'tests'
}
artifacts.archives packageTests
task sourceJar(type: Jar) { from sourceSets.main.allSource; classifier = 'source' }
task javadocJar(type: Jar) { from javadoc.outputs.files; classifier = 'javadoc' }
artifacts { archives sourceJar, javadocJar }
repositories {
mavenLocal()
mavenCentral()
// Add the Apache snapshot maven repository
mavenRepo urls: ["http://repository.apache.org/snapshots"]
// mavenRepo urls: localReleaseRepo
// mavenRepo urls: localSnapshotRepo
}
dependencies {
compile "org.slf4j:slf4j-api:1.6.1"
testCompile "org.slf4j:slf4j-log4j12:1.6.1"
testCompile "org.slf4j:jcl-over-slf4j:1.6.1"
compile("javax.servlet:servlet-api:2.5") {
// Not available in any maven repo
provided : true
}
testCompile "junit:junit:4.8.2"
testCompile "org.mockito:mockito-all:1.8.5"
}
// TODO Should this maven config be per module or wicket "root" only??
configure(install.repositories.mavenInstaller) {
pom.project {
description = 'Wicket is a Java-based open source component web application framework.'
url = 'http://wicket.apache.org/'
inceptionYear = '2004'
organization {
name 'Apache Software Foundation'
url 'http://apache.org'
}
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
issueManagement {
system 'jira'
url 'http://issues.apache.org/jira/browse/WICKET'
}
ciManagement {
system 'hudson'
url 'https://hudson.apache.org/hudson/job/Apache%20Wicket%201.5.x/'
}
scm {
connection 'scm:svn:http://svn.apache.org/repos/asf/wicket/releases/1.5-SNAPSHOT'
developerConnection 'scm:svn:https://svn.apache.org/repos/asf/wicket/releases/1.5-SNAPSHOT'
url 'http://svn.apache.org/viewvc/wicket/releases/1.5-SNAPSHOT'
}
mailingLists {
mailingList {
name 'Wicket Announcements List'
post '[email protected]'
subscribe '[email protected]'
unsubscribe '[email protected]'
archive 'http://www.nabble.com/Wicket---Announce-f13975.html'
}
mailingList {
name 'Wicket User List'
post '[email protected]'
subscribe '[email protected]'
unsubscribe '[email protected]'
archive 'http://www.nabble.com/Wicket---User-f13976.html'
}
mailingList {
name 'Wicket Development List'
post '[email protected]'
subscribe '[email protected]'
unsubscribe '[email protected]'
archive 'http://www.nabble.com/Wicket---Dev-f13977.html'
}
mailingList {
name 'Wicket commit List'
subscribe '[email protected]'
unsubscribe '[email protected]'
archive 'http://mail-archives.apache.org/mod_mbox/wicket-commits/'
}
}
properties {
'project.build.sourceEncoding' 'UTF-8'
'project.reporting.outputEncoding' 'UTF-8'
}
}
}
}