Convert to Gradle

This commit converts the build to a Gradle based build. It also setup sonar
integration at https://sonar.springsource.org/dashboard/index/11620

Currently tests in the samples fail on the CI server and are disabled. The
tests were not enabled for the maven based build either.

Issue: LDAP-251
This commit is contained in:
Rob Winch
2013-07-10 11:33:07 -05:00
parent 781fddeddb
commit 8b350a874d
38 changed files with 952 additions and 304 deletions

151
build.gradle Normal file
View File

@@ -0,0 +1,151 @@
buildscript {
repositories {
maven { url "http://repo.springsource.org/plugins-release" }
}
dependencies {
classpath("org.springframework.build.gradle:propdeps-plugin:0.0.3")
classpath("org.springframework.build.gradle:docbook-reference-plugin:0.2.6")
}
}
apply plugin: "docbook-reference"
apply plugin: "sonar-runner"
ext.GRADLE_SCRIPT_DIR = "${rootProject.projectDir}/gradle"
ext.JAVA_MODULE_SCRIPT = "${GRADLE_SCRIPT_DIR}/java-module.gradle"
ext.MAVEN_DEPLOYMENT_SCRIPT = "${GRADLE_SCRIPT_DIR}/maven-deployment.gradle"
ext.JAVA_SCRIPT = "${GRADLE_SCRIPT_DIR}/java.gradle"
ext.coreModules = subprojects.findAll { p-> (!p.name.contains("test") && !p.name.contains("sample")) || p.name == "spring-ldap-test" }
configure(allprojects) {
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'java'
group = "org.springframework.ldap"
ext.javadocLinks = [
"http://download.oracle.com/javase/1.5.0/docs/api",
"http://static.springframework.org/spring/docs/3.0.x/api/",
"http://logging.apache.org/log4j/1.2/apidocs/",
"http://commons.apache.org/logging/apidocs/",
"http://commons.apache.org/dbcp/apidocs/",
"http://commons.apache.org/pool/apidocs/",
"http://junit.sourceforge.net/javadoc/",
] as String[]
}
configure(coreModules) {
apply from: JAVA_MODULE_SCRIPT
}
configure(subprojects - coreModules) {
sonarRunner {
skipProject = true
}
test.enabled = false
}
description = "Spring LDAP"
configurations.archives.artifacts.clear()
sonarRunner {
sonarProperties {
property "sonar.java.coveragePlugin", "jacoco"
property "sonar.jacoco.reportPath", "${buildDir.name}/jacoco.exec"
property "sonar.links.homepage", 'https://github.com/SpringSource/spring-ldap'
property "sonar.links.ci", 'https://build.springsource.org/browse/LDAP-1.3.x'
property "sonar.links.issue", 'https://jira.springsource.org/browse/LDAP'
property "sonar.links.scm", 'https://github.com/SpringSource/spring-ldap'
property "sonar.links.scm_dev", 'https://github.com/SpringSource/spring-ldap.git'
property "sonar.java.coveragePlugin", "jacoco"
}
}
reference {
sourceDir = file("src/docbkx")
pdfFilename = "spring-ldap-reference.pdf"
}
task api(type: Javadoc) {
group = "Documentation"
description = "Generates aggregated Javadoc API documentation."
title = "${rootProject.description} ${version} API"
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
options.author = true
options.header = rootProject.description
options.splitIndex = true
options.links(project.ext.javadocLinks)
maxMemory = "1024m"
destinationDir = new File(buildDir, "api")
source coreModules*.javadoc*.source
classpath = files(coreModules*.javadoc*.classpath)
}
task docsZip(type: Zip) {
group = "Distribution"
baseName = "spring-ldap"
classifier = "docs"
description = "Builds -${classifier} archive containing api and reference " +
"for deployment at http://static.springframework.org/spring-ldap/docs."
from("src/dist") {
include "changelog.txt"
}
from (api) {
into "javadoc-api"
}
from (reference) {
into "spring-ldap-reference"
}
}
task distZip(type: Zip, dependsOn: [docsZip]) {
dependsOn subprojects*.tasks*.matching { task -> task.name == 'assemble' }
group = "Distribution"
baseName = "spring-ldap"
classifier = "dist"
description = "Builds -${classifier} archive, containing all jars and docs, " +
"suitable for community download page."
ext.baseDir = "${baseName}-${project.version}"
from("src/dist") {
include "readme.txt"
include "license.txt"
include "notice.txt"
into "${baseDir}"
expand(copyright: new Date().format("yyyy"), version: project.version)
}
from(zipTree(docsZip.archivePath)) {
into "${baseDir}/docs"
}
coreModules.each { subproject ->
into ("${baseDir}/libs") {
from subproject.jar
if (subproject.tasks.findByPath("sourcesJar")) {
from subproject.sourcesJar
}
if (subproject.tasks.findByPath("javadocJar")) {
from subproject.javadocJar
}
}
}
}
artifacts {
archives docsZip
archives distZip
}

8
core-tiger/build.gradle Normal file
View File

@@ -0,0 +1,8 @@
dependencies {
compile project(":spring-ldap-core"),
"org.springframework:spring-tx:$springVersion"
testCompile "junit:junit:$junitVersion",
"org.easymock:easymock:2.5.1"
}

3
core/.gitignore vendored
View File

@@ -2,3 +2,6 @@ target
.classpath
.project
.settings
.gradle
bin
build

20
core/build.gradle Normal file
View File

@@ -0,0 +1,20 @@
apply from: 'javacc.gradle'
dependencies {
compile "commons-logging:commons-logging:$commonsLoggingVersion",
"commons-lang:commons-lang:$commonsLangVersion",
"org.springframework:spring-core:$springVersion",
"org.springframework:spring-beans:$springVersion",
"org.springframework:spring-tx:$springVersion"
provided "commons-pool:commons-pool:$commonsPoolVersion",
"com.sun:ldapbp:1.0",
"org.springframework:spring-context:$springVersion",
"org.springframework:spring-jdbc:$springVersion",
"org.springframework:spring-orm:$springVersion"
testCompile "junit:junit:$junitVersion",
"easymock:easymock:$easyMockVersion",
"gsbase:gsbase:$gsbaseVersion"
}

59
core/javacc.gradle Normal file
View File

@@ -0,0 +1,59 @@
task downloadJavacc {
ext.file = "javacc-5.0.tar.gz"
ext.dest = file("$buildDir/javacc/$file")
ext.url = "https://java.net/downloads/javacc/$file"
outputs.file dest
doLast {
dest.parentFile.mkdirs()
new URL(url).withInputStream{ i -> dest.withOutputStream{ it << i }}
}
}
task installJavacc(type:Copy,dependsOn:downloadJavacc) {
ext.archive = downloadJavacc.dest
ext.javaccHome = file("$buildDir/javacc/")
inputs.file archive
outputs.dir javaccHome
if(archive.name.endsWith('.zip')) {
from zipTree(archive)
} else {
from tarTree(archive)
}
into javaccHome
}
task javacc(dependsOn:installJavacc) {
ext.srcFile = file("src/main/javacc/DnParserImpl.jj")
ext.srcDestDir = file("$buildDir/generated-src/javacc")
ext.destDir = file("$srcDestDir/org/springframework/ldap/core")
ext.homeDir = file("${installJavacc.javaccHome.path}/javacc-5.0")
inputs.file srcFile
outputs.dir destDir
doLast {
destDir.mkdirs()
ant.javacc (target:"src/main/javacc/DnParserImpl.jj", outputdirectory : destDir, javacchome: homeDir)
}
}
sourceSets {
main {
java {
srcDir project.javacc.srcDestDir
}
}
}
sourcesJar {
from javacc.srcDestDir
include "**/*.java"
}
sourcesJar.dependsOn javacc
compileJava.dependsOn javacc

1
gradle.properties Normal file
View File

@@ -0,0 +1 @@
version=1.3.2.CI-SNAPSHOT

64
gradle/java-module.gradle Normal file
View File

@@ -0,0 +1,64 @@
apply from: JAVA_SCRIPT
apply from: MAVEN_DEPLOYMENT_SCRIPT
configurations {
jacoco //Configuration Group used by Sonar to provide Code Coverage using JaCoCo
}
dependencies {
jacoco group: "org.jacoco", name: "org.jacoco.agent", version: "0.6.2.201302030002", classifier: "runtime"
}
test {
jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=${project.group}.*"
}
jar {
manifest.attributes["Created-By"] =
"${System.getProperty("java.version")} (${System.getProperty("java.specification.vendor")})"
manifest.attributes["Implementation-Title"] = project.name
manifest.attributes["Implementation-Version"] = project.version
from("${rootProject.projectDir}/src/dist") {
include "license.txt"
include "notice.txt"
into "META-INF"
expand(copyright: new Date().format("yyyy"), version: project.version)
}
}
javadoc {
description = "Generates project-level javadoc for use in -javadoc jar"
options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED
options.author = true
options.header = project.name
options.links(project.ext.javadocLinks)
// suppress warnings due to cross-module @see and @link references;
// note that global 'api' task does display all warnings.
logging.captureStandardError LogLevel.INFO
logging.captureStandardOutput LogLevel.INFO // suppress "## warnings" message
}
task sourcesJar(type: Jar, dependsOn:classes) {
description = "Generates the -sources.jar"
classifier = "sources"
from sourceSets.main.allJava.srcDirs
include "**/*.java", "**/*.aj"
}
assemble.dependsOn sourcesJar
task javadocJar(type: Jar) {
description = "Generates the -javadoc.jar"
classifier = "javadoc"
from javadoc
}
assemble.dependsOn javadocJar
artifacts {
archives sourcesJar
archives javadocJar
}

19
gradle/java.gradle Normal file
View File

@@ -0,0 +1,19 @@
apply plugin: 'java'
apply plugin: 'propdeps'
sourceCompatibility = '1.5'
targetCompatibility = '1.5'
ext.springVersion = '3.0.5.RELEASE'
ext.springBatchVersion = '2.0.3.RELEASE'
ext.junitVersion = '4.8.2'
ext.commonsPoolVersion = '1.5.4'
ext.commonsLangVersion = '2.4'
ext.commonsLoggingVersion = '1.0.4'
ext.easyMockVersion = '1.2_Java1.3'
ext.gsbaseVersion = '2.0.1'
ext.log4jVersion = '1.2.9'
repositories {
mavenCentral()
}

View File

@@ -0,0 +1,87 @@
apply plugin: 'maven'
install {
customizePom(repositories.mavenInstaller.pom, project)
}
def customizePom(pom, gradleProject) {
pom.project {
name = gradleProject.name
description = gradleProject.name
url = 'http://www.springframework.org/ldap'
organization {
name = 'SpringSource'
url = 'http://springsource.org/'
}
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution 'repo'
}
}
scm {
url = 'https://github.com/SpringSource/spring-ldap'
connection = 'scm:git:git://github.com/SpringSource/spring-ldap'
developerConnection = 'scm:git:git://github.com/SpringSource/spring-ldap'
}
developers {
developer {
id = 'rwinch'
name = 'Rob Winch'
email = 'rwinch@gopivotal.com'
}
developer {
id = "marthursson"
name = "Mattias Hellborg Arthursson"
email = "mattias.arthursson@jayway.com"
organization = "Jayway"
organizationUrl = "http://www.jayway.co"
}
developer {
id = "ulsa"
name = "Ulrik Sandberg"
email = "ulrik.sandberg@jayway.com"
organization = "Jayway"
organizationUrl = "http://www.jayway.co"
}
}
contributors {
contributor {
name = "Eric Dalquist"
}
contributor {
name = "Marius Scurtescu"
}
contributor {
name = "Tim Terry"
}
contributor {
name = "Keith Barlow"
}
contributor {
name = "Paul Harvey"
}
contributor {
name = "Marvin S. Addison"
}
}
}
}
task generatePom {
group = 'Build'
description = 'Generates the Maven pom.xml'
ext.generatedPomFileName = 'pom.xml'
inputs.files('**/*.gradle')
outputs.files(generatedPomFileName)
doLast() {
def p = pom {}
customizePom(p, project)
p.writeTo(generatedPomFileName)
}
}

BIN
gradle/wrapper/gradle-wrapper.jar vendored Normal file

Binary file not shown.

View File

@@ -0,0 +1,6 @@
#Fri Jul 05 13:57:19 CDT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.7-rc-1-bin.zip

164
gradlew vendored Executable file
View File

@@ -0,0 +1,164 @@
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS="-Xmx1024M -XX:MaxPermSize=256M"
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

90
gradlew.bat vendored Normal file
View File

@@ -0,0 +1,90 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=-Xmx1024M -XX:MaxPermSize=256M
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

View File

@@ -0,0 +1,10 @@
dependencies {
compile project(':spring-ldap-ldif-core'),
"org.springframework.batch:spring-batch-core:$springBatchVersion",
"org.springframework.batch:spring-batch-infrastructure:$springBatchVersion"
testCompile "junit:junit:$junitVersion",
"org.springframework.batch:spring-batch-test:$springBatchVersion"
}

View File

@@ -0,0 +1,10 @@
dependencies {
compile project(":spring-ldap-core"),
"commons-lang:commons-lang:$commonsLangVersion",
"org.springframework.batch:spring-batch-core:$springBatchVersion",
"org.springframework.batch:spring-batch-infrastructure:$springBatchVersion"
testCompile "junit:junit:$junitVersion",
"log4j:log4j:$log4jVersion"
}

22
odm/build.gradle Normal file
View File

@@ -0,0 +1,22 @@
dependencies {
compile project(":spring-ldap-core"),
project(":spring-ldap-core-tiger"),
"org.springframework:spring-core:$springVersion",
"org.freemarker:freemarker:2.3.9",
"commons-logging:commons-logging:$commonsLoggingVersion",
"commons-lang:commons-lang:$commonsLangVersion",
"commons-cli:commons-cli:1.2"
runtime "org.springframework:spring-context:$springVersion"
provided "commons-pool:commons-pool:$commonsPoolVersion",
"com.sun:ldapbp:1.0",
"org.springframework:spring-context:$springVersion",
"org.springframework:spring-jdbc:$springVersion",
"org.springframework:spring-orm:$springVersion"
testCompile project(":spring-ldap-test"),
"junit:junit:$junitVersion",
"jdepend:jdepend:2.9.1"
}

View File

@@ -15,7 +15,7 @@ public class TestsWithJdepend {
@Before
public void setUp() throws IOException {
jdepend = new JDepend();
jdepend.addDirectory("target/classes");
jdepend.addDirectory("build/classes/main");
}
@Test

View File

@@ -0,0 +1,25 @@
apply from: JAVA_SCRIPT
apply plugin: 'war'
apply plugin: 'jetty'
ext.springVersion = "2.0.8"
dependencies {
compile project(':spring-ldap-test'),
project(':spring-ldap-samples-utils'),
'log4j:log4j:1.2.9',
'javax.servlet:jstl:1.2',
"org.springframework:spring-beans:$springVersion",
"org.springframework:spring-core:$springVersion",
"org.springframework:spring-dao:$springVersion",
"org.springframework:spring-jdbc:$springVersion",
"org.springframework:spring-context:$springVersion",
"org.springframework:spring-web:$springVersion",
"org.springframework:spring-webmvc:$springVersion",
"org.springframework:spring-support:$springVersion"
provided "javax.servlet:servlet-api:2.5"
testCompile "org.springframework:spring-mock:$springVersion",
"junit:junit:$junitVersion"
}

View File

@@ -0,0 +1,23 @@
apply from: JAVA_SCRIPT
apply plugin: 'war'
apply plugin: 'jetty'
dependencies {
compile project(':spring-ldap-test'),
project(':spring-ldap-samples-utils'),
'log4j:log4j:1.2.9',
'javax.servlet:jstl:1.2',
"org.springframework:spring-beans:$springVersion",
"org.springframework:spring-core:$springVersion",
"org.springframework:spring-tx:$springVersion",
"org.springframework:spring-jdbc:$springVersion",
"org.springframework:spring-context:$springVersion",
"org.springframework:spring-web:$springVersion",
"org.springframework:spring-webmvc:$springVersion",
"org.springframework:spring-aop:$springVersion"
provided "javax.servlet:servlet-api:2.5"
testCompile "org.springframework:spring-test:$springVersion",
"junit:junit:$junitVersion"
}

View File

@@ -0,0 +1,17 @@
apply from: JAVA_SCRIPT
apply plugin: 'war'
apply plugin: 'jetty'
dependencies {
compile project(':spring-ldap-test'),
project(':spring-ldap-samples-utils'),
'log4j:log4j:1.2.9',
'javax.servlet:jstl:1.2',
"org.springframework:spring-context:$springVersion",
"org.springframework:spring-webmvc:$springVersion"
provided "javax.servlet:servlet-api:2.5"
testCompile "org.springframework:spring-test:$springVersion",
"junit:junit:$junitVersion"
}

View File

@@ -0,0 +1,12 @@
apply from: JAVA_SCRIPT
description = "Example code for demonstrating the process of refactoring from plain JNDI to Spring LDAP (Java 5)."
dependencies {
compile project(':spring-ldap-test'),
project(':spring-ldap-core-tiger'),
"org.springframework:spring-context:$springVersion"
testCompile "org.springframework:spring-test:$springVersion",
"junit:junit:$junitVersion"
}

View File

@@ -0,0 +1,12 @@
apply from: JAVA_SCRIPT
description = "Example code for demonstrating the process of refactoring from plain JNDI to Spring LDAP (Java 1.4)."
dependencies {
compile project(':spring-ldap-test'),
project(':spring-ldap-core'),
"org.springframework:spring-context:$springVersion"
testCompile "org.springframework:spring-test:$springVersion",
"junit:junit:$junitVersion"
}

View File

@@ -0,0 +1,11 @@
apply from: JAVA_SCRIPT
dependencies {
compile project(':spring-ldap-core-tiger'),
project(':spring-ldap-test')
testCompile "org.springframework:spring-test:$springVersion",
"junit:junit:$junitVersion"
}
test.enabled = false // FIXME this needs to be enabled, but fails since no LDAP server is started

View File

@@ -0,0 +1,14 @@
apply from: JAVA_SCRIPT
dependencies {
compile project(":spring-ldap-core"),
project(":spring-ldap-odm"),
"org.springframework:spring-core:$springVersion",
"org.springframework:spring-context:$springVersion",
"commons-pool:commons-pool:$commonsPoolVersion"
runtime "log4j:log4j:$log4jVersion"
testCompile project(":spring-ldap-test"),
"junit:junit:$junitVersion"
}

11
sandbox/build.gradle Normal file
View File

@@ -0,0 +1,11 @@
apply from: JAVA_SCRIPT
dependencies {
compile project(":spring-ldap-core")
provided "com.sun:ldapbp:1.0"
testCompile "junit:junit:$junitVersion",
"easymock:easymock:$easyMockVersion",
"gsbase:gsbase:$gsbaseVersion"
}

31
settings.gradle Normal file
View File

@@ -0,0 +1,31 @@
rootProject.name = 'spring-ldap'
include 'core'
include 'core-tiger'
include 'ldif/ldif-batch'
include 'ldif/ldif-core'
include 'odm'
include 'sandbox'
include 'samples/article'
include 'samples/article-spring20'
include 'samples/article-spring30'
include 'samples/demos/demo'
include 'samples/demos/demo-tiger'
include 'samples/samples-utils'
include 'samples/simple-odm'
include 'test/integration-tests'
include 'test/integration-tests-openldap'
include 'test/integration-tests-sunone'
include 'test-support'
rootProject.children.each { p->
def name = p.name
def isSample = name.contains("sample")
name = name.replaceFirst(".*?/","")
if(isSample && !name.contains("sample")) {
name += "-sample"
}
p.name = "spring-ldap-" + name
}
findProject(":spring-ldap-test-support").name = "spring-ldap-test"

View File

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

View File

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 81 KiB

View File

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

@@ -1,303 +0,0 @@
body {
text-align: justify;
margin-right: 2em;
margin-left: 2em;
}
a,
a[accesskey^="h"],
a[accesskey^="n"],
a[accesskey^="u"],
a[accesskey^="p"] {
font-family: Verdana, Arial, helvetica, sans-serif;
font-size: 12px;
color: #003399;
}
a:active {
color: #003399;
}
a:visited {
color: #888888;
}
p {
font-family: Verdana, Arial, sans-serif;
}
dt {
font-family: Verdana, Arial, sans-serif;
font-size: 12px;
}
p, dl, dt, dd, blockquote {
color: #000000;
margin-bottom: 3px;
margin-top: 3px;
padding-top: 0;
}
ol, ul, p {
margin-top: 6px;
margin-bottom: 6px;
}
p, blockquote {
font-size: 90%;
}
p.releaseinfo {
font-size: 100%;
font-weight: bold;
font-family: Verdana, Arial, helvetica, sans-serif;
padding-top: 10px;
}
p.pubdate {
font-size: 120%;
font-weight: bold;
font-family: Verdana, Arial, helvetica, sans-serif;
}
td {
font-size: 80%;
}
td, th, span {
color: #000000;
}
td[width^="40%"] {
font-family: Verdana, Arial, helvetica, sans-serif;
font-size: 12px;
color: #003399;
}
table[summary^="Navigation header"] tbody tr th[colspan^="3"] {
font-family: Verdana, Arial, helvetica, sans-serif;
}
blockquote {
margin-right: 0;
}
h1, h2, h3, h4, h6 {
color: #000000;
font-weight: 500;
margin-top: 0;
padding-top: 14px;
font-family: Verdana, Arial, helvetica, sans-serif;
margin-bottom: 0;
}
h2.title {
font-weight: 800;
margin-bottom: 8px;
}
h2.subtitle {
font-weight: 800;
margin-bottom: 20px;
}
.firstname, .surname {
font-size: 12px;
font-family: Verdana, Arial, helvetica, sans-serif;
}
table {
border-collapse: collapse;
border-spacing: 0;
border: 1px black;
empty-cells: hide;
margin: 10px 0 30px 50px;
width: 90%;
}
div.table {
margin: 30px 0 10px 0;
border: 1px dashed gray;
padding: 10px;
}
div .table-contents table {
border: 1px solid black;
}
div.table > p.title {
padding-left: 10px;
}
table[summary^="Navigation footer"] {
border-collapse: collapse;
border-spacing: 0;
border: 1px black;
empty-cells: hide;
margin: 0px;
width: 100%;
}
table[summary^="Note"],
table[summary^="Warning"],
table[summary^="Tip"] {
border-collapse: collapse;
border-spacing: 0;
border: 1px black;
empty-cells: hide;
margin: 10px 0px 10px -20px;
width: 100%;
}
td {
padding: 4pt;
font-family: Verdana, Arial, helvetica, sans-serif;
}
div.warning TD {
text-align: justify;
}
h1 {
font-size: 150%;
}
h2 {
font-size: 110%;
}
h3 {
font-size: 100%; font-weight: bold;
}
h4 {
font-size: 90%; font-weight: bold;
}
h5 {
font-size: 90%; font-style: italic;
}
h6 {
font-size: 100%; font-style: italic;
}
tt {
font-size: 110%;
font-family: "Courier New", Courier, monospace;
color: #000000;
}
.navheader, .navfooter {
border: none;
}
div.navfooter table {
border-style: dashed;
border-color: gray;
border-width: 1px 1px 1px 1px;
background-color: #cde48d;
}
pre {
font-size: 110%;
padding: 5px;
border-style: solid;
border-width: 1px;
border-color: #CCCCCC;
background-color: #f3f5e9;
}
ul, ol, li {
list-style: disc;
}
hr {
width: 100%;
height: 1px;
background-color: #CCCCCC;
border-width: 0;
padding: 0;
}
.variablelist {
padding-top: 10px;
padding-bottom: 10px;
margin: 0;
}
.term {
font-weight:bold;
}
.mediaobject {
padding-top: 30px;
padding-bottom: 30px;
}
.legalnotice {
font-family: Verdana, Arial, helvetica, sans-serif;
font-size: 12px;
font-style: italic;
}
.sidebar {
float: right;
margin: 10px 0 10px 30px;
padding: 10px 20px 20px 20px;
width: 33%;
border: 1px solid black;
background-color: #F4F4F4;
font-size: 14px;
}
.property {
font-family: "Courier New", Courier, monospace;
}
a code {
font-family: Verdana, Arial, monospace;
font-size: 12px;
}
td code {
font-size: 110%;
}
div.note * td,
div.tip * td,
div.warning * td,
div.calloutlist * td {
text-align: justify;
font-size: 100%;
}
.programlisting {
clear: both;
}
.programlisting .interfacename,
.programlisting .literal,
.programlisting .classname {
font-size: 95%;
}
.title .interfacename,
.title .literal,
.title .classname {
font-size: 130%;
}
/* everything in a <lineannotation/> is displayed in a coloured, comment-like font */
.programlisting * .lineannotation,
.programlisting * .lineannotation * {
color: green;
}
.question * p {
font-size: 100%;
}
.answer * p {
font-size: 100%;
}

22
test-support/build.gradle Normal file
View File

@@ -0,0 +1,22 @@
dependencies {
compile project(":spring-ldap-core"),
"com.google.code.typica:typica:1.3",
"commons-io:commons-io:1.4",
"javax.xml:jsr173:1.0",
"javax.activation:activation:1.1",
"javax.xml.bind:jaxb-api:2.1",
"javax.xml:jaxb-impl:2.1",
"org.springframework:spring-core:$springVersion",
"org.springframework:spring-beans:$springVersion",
"org.springframework:spring-context:$springVersion",
"org.springframework:spring-test:$springVersion",
"log4j:log4j:$log4jVersion",
"org.slf4j:slf4j-log4j12:1.0.1"
compile("org.apache.directory.server:apacheds-server-main:1.0.2") {
exclude group: "org.slf4j", module: "nlog4j"
}
provided "junit:junit:$junitVersion"
}

View File

@@ -0,0 +1,19 @@
apply from: JAVA_SCRIPT
dependencies {
compile project(":spring-ldap-core-tiger"),
project(":spring-ldap-test"),
"commons-logging:commons-logging:$commonsLoggingVersion",
"commons-httpclient:commons-httpclient:3.1",
"commons-codec:commons-codec:1.3"
provided "org.springframework:spring-jdbc:$springVersion"
testCompile "org.springframework:spring-aop:$springVersion",
"org.springframework:spring-test:$springVersion",
"gsbase:gsbase:$gsbaseVersion",
"junit:junit:$junitVersion",
"com.sun:ldapbp:1.0"
}
test.enabled = false // FIXME this needs to be enabled (error due to missing host)

View File

@@ -0,0 +1,19 @@
apply from: JAVA_SCRIPT
dependencies {
compile project(":spring-ldap-test"),
project(":spring-ldap-integration-tests"),
project(":spring-ldap-sandbox"),
project(":spring-ldap-core-tiger"),
"commons-pool:commons-pool:1.4"
provided "org.springframework:spring-jdbc:$springVersion",
"com.sun:ldapbp:1.0"
testCompile "junit:junit:$junitVersion",
"org.springframework:spring-aop:$springVersion",
"org.springframework:spring-aop:$springVersion",
"gsbase:gsbase:$gsbaseVersion"
}
test.enabled = false // FIXME this needs to be enabled (error due to missing host)

View File

@@ -0,0 +1,21 @@
repositories {
maven { url "http://download.java.net/maven/2/" }
}
apply from: JAVA_SCRIPT
dependencies {
compile project(":spring-ldap-test"),
project(":spring-ldap-core-tiger")
provided "commons-pool:commons-pool:$commonsPoolVersion",
"org.springframework:spring-jdbc:$springVersion",
"org.springframework:spring-orm:$springVersion"
testCompile "org.springframework:spring-test:$springVersion",
"org.springframework:spring-aop:$springVersion",
"org.hibernate:hibernate:3.2.6.ga",
"aspectj:aspectjrt:1.5.3",
"aspectj:aspectjweaver:1.5.3",
"hsqldb:hsqldb:1.8.0.7",
"junit:junit:$junitVersion"
}