Skip to content
This repository was archived by the owner on Apr 5, 2022. It is now read-only.

Commit ebc156d

Browse files
author
Costin Leau
committed
+ initial migration to Gradle
1 parent f58e644 commit ebc156d

File tree

200 files changed

+3441
-771
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

200 files changed

+3441
-771
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
target
22
bin
3+
build
34
.settings
45
.classpath
56
.project
File renamed without changes.

build.gradle

+206
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
// used for artifact names, building doc upload urls, etc.
2+
description = 'Spring Hadoop'
3+
abbreviation = 'SHDP'
4+
5+
apply plugin: 'base'
6+
7+
buildscript {
8+
repositories {
9+
add(new org.apache.ivy.plugins.resolver.URLResolver()) {
10+
name = "GitHub"
11+
addIvyPattern 'http://cloud.github.com/downloads/costin/gradle-stuff/[organization].[module]-[artifact]-[revision].[ext]'
12+
addArtifactPattern 'http://cloud.github.com/downloads/costin/gradle-stuff/[organization].[module]-[revision].[ext]'
13+
}
14+
mavenCentral()
15+
mavenLocal()
16+
mavenRepo name: "springsource-org-release", urls: "http://repository.springsource.com/maven/bundles/release"
17+
mavenRepo name: "springsource-org-external", urls: "http://repository.springsource.com/maven/bundles/external"
18+
}
19+
20+
dependencies {
21+
classpath 'org.springframework:gradle-stuff:0.1-20110421'
22+
classpath 'net.sf.docbook:docbook-xsl:1.75.2:ns-resources@zip'
23+
}
24+
}
25+
26+
allprojects {
27+
group = 'org.springframework.hadoop'
28+
version = "$springHadoopVersion"
29+
30+
releaseBuild = version.endsWith('RELEASE')
31+
snapshotBuild = version.endsWith('SNAPSHOT')
32+
33+
34+
repositories {
35+
mavenLocal()
36+
mavenCentral()
37+
// Public Spring artefacts
38+
mavenRepo name: "springsource-org-release", urls: "http://repository.springsource.com/maven/bundles/release"
39+
mavenRepo name: "spring-release", urls: "http://maven.springframework.org/release"
40+
mavenRepo name: "spring-milestone", urls: "http://maven.springframework.org/milestone"
41+
mavenRepo name: "spring-snapshot", urls: "http://maven.springframework.org/snapshot"
42+
mavenRepo name: "sonatype-snapshot", urls: "http://oss.sonatype.org/content/repositories/snapshots"
43+
mavenRepo name: "ext-snapshots", urls: "http://springframework.svn.sourceforge.net/svnroot/springframework/repos/repo-ext/"
44+
}
45+
46+
}
47+
48+
49+
apply plugin: "java"
50+
apply plugin: "maven"
51+
apply plugin: 'eclipse' // `gradle eclipse` to generate .classpath/.project
52+
apply plugin: 'idea' // `gradle idea` to generate .ipr/.iml
53+
apply plugin: 'docbook'
54+
apply plugin: 'bundlor' // all core projects should be OSGi-compliant
55+
56+
bundlor.useProjectProps = true
57+
[compileJava, compileTestJava]*.options*.compilerArgs = ["-Xlint:-serial"]
58+
59+
//test {
60+
// forkEvery = 1
61+
//}
62+
63+
// Common dependencies
64+
dependencies {
65+
// Logging
66+
compile "org.slf4j:slf4j-api:$slf4jVersion"
67+
compile "org.slf4j:jcl-over-slf4j:$slf4jVersion"
68+
runtime "log4j:log4j:$log4jVersion"
69+
runtime "org.slf4j:slf4j-log4j12:$slf4jVersion"
70+
71+
// Spring Framework
72+
compile("org.springframework:spring-core:$springVersion") {
73+
exclude module: "commons-logging"
74+
}
75+
compile "org.springframework:spring-context-support:$springVersion"
76+
compile "org.springframework:spring-tx:$springVersion"
77+
compile "org.springframework:spring-aop:$springVersion"
78+
compile "org.springframework:spring-oxm:$springVersion"
79+
80+
// Hadoop
81+
compile "org.apache.hadoop:hadoop-core:$hadoopVersion"
82+
83+
compile "commons-io:commons-io:$commonsioVersion"
84+
compile "org.codehaus.jackson:jackson-core-asl:$jacksonVersion"
85+
compile "org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion"
86+
compile "cglib:cglib:$cglibVersion"
87+
88+
// Testing
89+
testCompile "junit:junit:$junitVersion"
90+
testCompile "org.mockito:mockito-core:$mockitoVersion"
91+
testCompile "org.springframework:spring-test:$springVersion"
92+
testCompile("javax.annotation:jsr250-api:1.0") { optional = true }
93+
}
94+
95+
javaprojects = rootProject
96+
97+
sourceCompatibility = 1.5
98+
targetCompatibility = 1.5
99+
100+
javadoc {
101+
srcDir = file("${projectDir}/docs/src/api")
102+
destinationDir = file("${buildDir}/api")
103+
tmpDir = file("${buildDir}/api-work")
104+
105+
configure(options) {
106+
stylesheetFile = file("${srcDir}/spring-javadoc.css")
107+
overview = "${srcDir}/overview.html"
108+
docFilesSubDirs = true
109+
outputLevel = org.gradle.external.javadoc.JavadocOutputLevel.QUIET
110+
breakIterator = true
111+
showFromProtected()
112+
groups = [
113+
'Spring Hadoop' : ['org.springframework.hadoop*'],
114+
]
115+
116+
links = [
117+
"http://static.springframework.org/spring/docs/3.1.x/javadoc-api",
118+
"http://download.oracle.com/javase/6/docs/api",
119+
"http://logging.apache.org/log4j/docs/api/",
120+
"http://atinject.googlecode.com/svn/trunk/javadoc/",
121+
"http://jakarta.apache.org/commons/logging/apidocs/"
122+
]
123+
124+
exclude "org/springframework/hadoop/config/**"
125+
}
126+
127+
title = "${rootProject.description} ${version} API"
128+
129+
// collect all the sources that will be included in the javadoc output
130+
source javaprojects.collect {project ->
131+
project.sourceSets.main.allJava
132+
}
133+
134+
// collect all main classpaths to be able to resolve @see refs, etc.
135+
// this collection also determines the set of projects that this
136+
// task dependsOn, thus the runtimeClasspath is used to ensure all
137+
// projects are included, not just *dependencies* of all classes.
138+
// this is awkward and took me a while to figure out.
139+
classpath = files(javaprojects.collect {project ->
140+
project.sourceSets.main.runtimeClasspath
141+
})
142+
143+
// copy the images from the doc-files dir over to the target
144+
doLast { task ->
145+
copy {
146+
from file("${task.srcDir}/doc-files")
147+
into file("${task.destinationDir}/doc-files")
148+
}
149+
}
150+
}
151+
152+
ideaProject {
153+
withXml { provider ->
154+
provider.node.component.find { it.@name == 'VcsDirectoryMappings' }.mapping.@vcs = 'Git'
155+
}
156+
}
157+
158+
task wrapper(type: Wrapper) {
159+
gradleVersion = '1.0-milestone-3'
160+
description = "Generate the Gradle wrapper"
161+
group = "Distribution"
162+
}
163+
164+
apply from: "$rootDir/maven.gradle"
165+
166+
assemble.dependsOn = ['jar', 'sourceJar', 'javadocJar']
167+
168+
// Distribution tasks
169+
task dist(type: Zip) {
170+
description = "Generate the ZIP Distribution"
171+
group = "Distribution"
172+
dependsOn assemble, subprojects*.tasks*.matching { task -> task.name == 'assemble' }
173+
174+
evaluationDependsOn(':docs')
175+
176+
def zipRootDir = "${project.name}-$version"
177+
into(zipRootDir) {
178+
from('/docs/src/info') {
179+
include '*.txt'
180+
}
181+
from('/docs/build/') {
182+
into 'docs'
183+
include 'reference/**/*'
184+
}
185+
from('build/') {
186+
into 'docs'
187+
include 'api/**/*'
188+
}
189+
into('dist') {
190+
from javaprojects.collect {project -> project.libsDir }
191+
}
192+
}
193+
doLast {
194+
ant.checksum(file: archivePath, algorithm: 'SHA1', fileext: '.sha1')
195+
}
196+
}
197+
198+
task uploadDist(type: org.springframework.gradle.tasks.S3DistroUpload, dependsOn: dist) {
199+
description = "Upload the ZIP Distribution"
200+
group = "Distribution"
201+
archiveFile = dist.archivePath
202+
projectKey = 'SGF'
203+
projectName = 'Spring GemFire'
204+
}
205+
206+
defaultTasks 'clean', 'build'

docs/build.gradle

+97
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
import org.apache.tools.ant.filters.ReplaceTokens
2+
3+
// -----------------------------------------------------------------------------
4+
// Configuration for the docs subproject
5+
// -----------------------------------------------------------------------------
6+
7+
apply plugin: 'base'
8+
apply plugin: 'docbook'
9+
10+
assemble.dependsOn = [rootProject.javadoc, 'reference']
11+
12+
[docbookHtml, docbookFoPdf, docbookHtmlSingle]*.group = 'Documentation'
13+
[docbookHtml, docbookFoPdf, docbookHtmlSingle]*.sourceFileName = 'index.xml'
14+
[docbookHtml, docbookFoPdf, docbookHtmlSingle]*.sourceDirectory = new File(projectDir, 'src/reference/docbook')
15+
16+
docbookHtml.stylesheet = new File(projectDir, 'src/reference/resources/xsl/html-custom.xsl')
17+
docbookHtmlSingle.stylesheet = new File(projectDir, 'src/reference/resources/xsl/html-single-custom.xsl')
18+
docbookFoPdf.stylesheet = new File(projectDir, 'src/reference/resources/xsl/pdf-custom.xsl')
19+
20+
def imagesDir = new File(projectDir, 'src/reference/resources/images');
21+
[docbookHtml, docbookFoPdf, docbookHtmlSingle]*.admonGraphicsPath = "./images/admon/"
22+
[docbookHtml, docbookFoPdf, docbookHtmlSingle]*.imgSrcPath = "${imagesDir}"
23+
24+
// defined separately to prevent the replacement from taking place (seems to affect the images)
25+
imgSpec = copySpec {
26+
into ('reference') {
27+
from("$projectDir/src/reference/resources") {
28+
include "css/**/*"
29+
}
30+
}
31+
32+
into ('reference/images') {
33+
from (imagesDir)
34+
}
35+
}
36+
37+
38+
refSpec = copySpec {
39+
into ('reference') {
40+
from("$buildDir/docs") {
41+
exclude '*.fo'
42+
}
43+
}
44+
45+
p = new Properties()
46+
47+
for (e in project.properties) {
48+
if (e.key != null && e.value != null)
49+
p.setProperty(e.key, e.value.toString())
50+
}
51+
52+
filter(ReplaceTokens, tokens: p)
53+
54+
with(imgSpec)
55+
}
56+
57+
task reference (type: Copy) {
58+
dependsOn 'docbook'
59+
description = "Builds aggregated DocBook"
60+
group = "Documentation"
61+
destinationDir = buildDir
62+
with(refSpec)
63+
}
64+
65+
66+
apiSpec = copySpec {
67+
into('api') {
68+
from(rootProject.javadoc.destinationDir)
69+
}
70+
}
71+
72+
task docSiteLogin(type: org.springframework.gradle.tasks.Login) {
73+
if (project.hasProperty('sshHost')) {
74+
host = project.property('sshHost')
75+
username = project.property('sshUsername')
76+
key = project.property('sshPrivateKey')
77+
}
78+
}
79+
80+
infoSpec = copySpec {
81+
from("$projectDir/src/info") {
82+
include 'changelog.txt'
83+
}
84+
}
85+
86+
// upload task
87+
task uploadDocs(type: org.springframework.gradle.tasks.ScpUpload) {
88+
dependsOn rootProject.javadoc, reference
89+
description = "Upload API Distribution"
90+
group = "Distribution"
91+
remoteDir = "/opt/www/domains/springframework.org/www/htdocs/spring-hadoop/docs/${project.version}"
92+
login = docSiteLogin
93+
94+
with(apiSpec)
95+
with(refSpec)
96+
with(infoSpec)
97+
}
2.77 KB
Loading

docs/src/api/overview.html

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<html>
2+
<body>
3+
This document is the API specification for the Spring GemFire project.
4+
<hr/>
5+
6+
<div id="overviewBody">
7+
<!--
8+
<p>
9+
For further API reference and developer documentation, see the
10+
<a href="http://static.springframework.org/spring/docs/2.0.x/reference/index.html" target="_top">Spring Framework reference documentation</a>.
11+
That documentation contains more detailed, developer-targeted
12+
descriptions, with conceptual overviews, definitions of terms,
13+
workarounds, and working code examples.
14+
</p>
15+
-->
16+
<p>
17+
If you are interested in commercial training, consultancy and
18+
support for the Spring GemFire project,
19+
<a href="http://www.SpringSource.com/" target="_top">SpringSource</a> provides
20+
such commercial support.
21+
</p>
22+
</div>
23+
</body>
24+
</html>

docs/src/api/spring-javadoc.css

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/* Spring-specific Javadoc style sheet rules */
2+
3+
#overviewBody {
4+
5+
}
6+
7+
.code {
8+
border: 1px solid black;
9+
background-color: #F4F4F4;
10+
padding: 5px;
11+
}
12+
13+
/* Vanilla Javadoc style sheet rules */
14+
15+
body {
16+
font-family: Helvetica, Arial, sans-serif;
17+
background-color: white;
18+
font-size: 10pt;
19+
}
20+
21+
td { font-size: 10pt; font-family: Helvetica, Arial, sans-serif }/* Javadoc style sheet */
22+
23+
/* Define colors, fonts and other style attributes here to override the defaults */
24+
25+
/* Page background color */
26+
body { background-color: #FFFFFF }
27+
28+
/* Headings */
29+
h1 { font-size: 145% }
30+
31+
/* Table colors */
32+
.TableHeadingColor { background: #CCCCFF } /* Dark mauve */
33+
.TableSubHeadingColor { background: #EEEEFF } /* Light mauve */
34+
.TableRowColor { background: #FFFFFF } /* White */
35+
36+
/* Font used in left-hand frame lists */
37+
.FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif }
38+
.FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif }
39+
.FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif }
40+
41+
/* Navigation bar fonts and colors */
42+
.NavBarCell1 { background-color:#EEEEFF;} /* Light mauve */
43+
.NavBarCell1Rev { background-color:#00008B;} /* Dark Blue */
44+
.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;}
45+
.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;}
46+
47+
.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
48+
.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}

docs/src/info/changelog.txt

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
SPRING HADOOP CHANGELOG
2+
=======================
3+
http://www.springsource.org/spring-hadoop
4+
5+
Changes in version 1.1.0.M1 (2011-mm-dd)
6+
----------------------------------------
7+
8+
General

0 commit comments

Comments
 (0)