Bläddra i källkod

Added gradle build files for taglibs, tutorial, contacts and openid.

Changed build file names to match module names (by manipulating the project objects in the settings.gradle file).
Luke Taylor 15 år sedan
förälder
incheckning
b323098167

+ 2 - 1
.gitignore

@@ -3,4 +3,5 @@ target/
 .project
 .settings/
 build/
-*.log
+*.log
+.gradle/

+ 1 - 1
acl/build.gradle → acl/acl.gradle

@@ -1,7 +1,7 @@
 // Acl Module build file
 
 dependencies {
-    compile project(':core'),
+    compile project(':spring-security-core'),
             "net.sf.ehcache:ehcache:$ehcacheVersion",
             "org.springframework:spring-context:$springVersion",
             "org.springframework:spring-core:$springVersion",

+ 20 - 11
build.gradle

@@ -1,8 +1,4 @@
 
-import org.gradle.api.tasks.diagnostics.GraphvizReportRenderer
-
-usePlugin('java')
-
 version = '3.0.0.CI-SNAPSHOT'
 
 allprojects {
@@ -13,19 +9,25 @@ allprojects {
 }
 
 subprojects {
-    usePlugin 'java'
-    usePlugin 'project-reports'
-    
+    apply id: 'java'
+
+    group = 'org.springframework.security'
+
     springVersion = '3.0.0.RELEASE'
     springLdapVersion = '1.3.0.RELEASE'
     ehcacheVersion = '1.6.2'
     aspectjVersion = '1.6.5'
-    apacheDsVersion = '1.5.5'    
+    apacheDsVersion = '1.5.5'
+    jstlVersion = '1.1.2'
 
 /*    dependencyReport {
         renderer = new GraphvizReportRenderer()
     }*/
 
+    configurations {
+        provided
+    }
+
     dependencies {
         compile     'commons-logging:commons-logging:1.1.1'
 
@@ -37,11 +39,18 @@ subprojects {
                     'org.hamcrest:hamcrest-library:1.1',
                     "org.springframework:spring-test:$springVersion"
     }
-    
+
+    sourceSets {
+        main {
+            compileClasspath = compileClasspath + configurations.provided
+        }
+        test {
+            compileClasspath = compileClasspath + configurations.provided
+        }
+    }
+
     test {
         options.fork(forkMode: ForkMode.ONCE, jvmArgs: ["-ea", '-Xms128m', '-Xmx1g', '-XX:MaxPermSize=128m', '-XX:+HeapDumpOnOutOfMemoryError'])
     }
-
-    group = 'org.springframework.security'
 }
 

+ 2 - 2
cas/build.gradle → cas/cas.gradle

@@ -1,7 +1,7 @@
 
 dependencies {
-    compile project(':core'),
-            project(':web'),
+    compile project(':spring-security-core'),
+            project(':spring-security-web'),
             "javax.servlet:servlet-api:2.5",
             "org.springframework:spring-core:$springVersion",
             "org.springframework:spring-context:$springVersion",            

+ 6 - 6
config/build.gradle → config/config.gradle

@@ -1,10 +1,10 @@
 // Config Module build file
 
-compileTestJava.dependsOn(':core:compileTestJava')
+compileTestJava.dependsOn(':spring-security-core:compileTestJava')
 
 dependencies {
-    compile project(':core'),
-            project(':web'),
+    compile project(':spring-security-core'),
+            project(':spring-security-web'),
             "javax.servlet:servlet-api:2.5",
             "org.aspectj:aspectjweaver:$aspectjVersion",
             "org.springframework:spring-aop:$springVersion",
@@ -14,9 +14,9 @@ dependencies {
             "org.springframework:spring-beans:$springVersion",
             "org.springframework:spring-tx:$springVersion"
 
-    testCompile project(':ldap'),
-                project(':openid'),
-                files(this.project(':core').sourceSets.test.classesDir),
+    testCompile project(':spring-security-ldap'),
+                project(':spring-security-openid'),
+                files(this.project(':spring-security-core').sourceSets.test.classesDir),
                 'javax.annotation:jsr250-api:1.0',
                 'aopalliance:aopalliance:1.0',
                 "org.springframework.ldap:spring-ldap-core:$springLdapVersion",

+ 0 - 0
core/build.gradle → core/core.gradle


+ 6 - 6
docs/manual/build.gradle

@@ -7,12 +7,12 @@ docbookHtml.stylesheet = new File(projectDir, 'src/xsl/html-custom.xsl')
 docbookFoPdf.stylesheet = new File(projectDir, 'src/xsl/pdf-custom.xsl')
 
 docbookHtml.doLast {
-	resourcesDir = new File(projectDir, 'src/resources')
-	ant {
-		docsDir = new File(buildDir, 'docs')
-		copy(toDir: docsDir) {fileset(dir: resourcesDir)}
-		copy(toDir: new File(docsDir, 'images')) {fileset(dir: new File(projectDir, 'src/docbook/images'))}		
-	}
+    resourcesDir = new File(projectDir, 'src/resources')
+    ant {
+        docsDir = new File(buildDir, 'docs')
+        copy(toDir: docsDir) {fileset(dir: resourcesDir)}
+        copy(toDir: new File(docsDir, 'images')) {fileset(dir: new File(projectDir, 'src/docbook/images'))}
+    }
 }
 
 /*docbookSrc = new File(project.buildDir, 'docbook/src')

+ 1 - 1
ldap/build.gradle → ldap/ldap.gradle

@@ -3,7 +3,7 @@
 test.exclude('**/OpenLDAPIntegrationTestSuite.class')
 
 dependencies {
-    compile project(':core'),
+    compile project(':spring-security-core'),
             "org.springframework:spring-core:$springVersion",
             "org.springframework:spring-beans:$springVersion",
             "org.springframework:spring-context:$springVersion",

+ 4 - 3
openid/build.gradle → openid/openid.gradle

@@ -1,9 +1,8 @@
 // OpenID Module build file
 
 dependencies {
-    compile project(':core'),
-            project(':web'),
-            "javax.servlet:servlet-api:2.5",
+    compile project(':spring-security-core'),
+            project(':spring-security-web'),
             'org.openid4java:openid4java-nodeps:0.9.5',
             "org.springframework:spring-aop:$springVersion",
             "org.springframework:spring-core:$springVersion",
@@ -12,5 +11,7 @@ dependencies {
             "org.springframework:spring-tx:$springVersion",            
             "org.springframework:spring-web:$springVersion"
 
+    provided "javax.servlet:servlet-api:2.5"
+
     runtime 'commons-httpclient:commons-httpclient:3.1'
 }

+ 12 - 0
samples/cas/cas.gradle

@@ -0,0 +1,12 @@
+apply id: 'war'
+apply id: 'jetty'
+
+dependencies {
+//    providedCompile 'javax.servlet:servlet-api:2.5@jar'
+
+    runtime project(':spring-security-core'),
+            project(':spring-security-web'),
+            project(':spring-security-config'),
+//            project(':taglibs'),
+            'log4j:log4j:1.2.15@jar'
+}

+ 25 - 0
samples/contacts/contacts.gradle

@@ -0,0 +1,25 @@
+// Contacts sample build file
+
+apply id: 'war'
+apply id: 'jetty'
+
+dependencies {
+    providedCompile 'javax.servlet:servlet-api:2.5@jar'
+    compile project(':spring-security-core'),
+            project(':spring-security-acl'),
+            "org.springframework:spring-core:$springVersion",
+            "org.springframework:spring-beans:$springVersion",
+            "org.springframework:spring-context:$springVersion",
+            "org.springframework:spring-jdbc:$springVersion",
+            "org.springframework:spring-tx:$springVersion",
+            "org.springframework:spring-web:$springVersion",
+            "org.springframework:spring-webmvc:$springVersion",
+            "org.aspectj:aspectjrt:$aspectjVersion"
+
+    runtime project(':spring-security-web'),
+            project(':spring-security-config'),
+            project(':spring-security-taglibs'),
+            "org.springframework:spring-context-support:$springVersion",
+            "net.sf.ehcache:ehcache:$ehcacheVersion",
+            'log4j:log4j:1.2.15@jar'
+}

+ 13 - 0
samples/openid/openid.gradle

@@ -0,0 +1,13 @@
+// OpenID sample build file
+
+apply id: 'war'
+apply id: 'jetty'
+
+dependencies {
+    providedCompile 'javax.servlet:servlet-api:2.5@jar'
+
+    runtime project(':spring-security-web'),
+            project(':spring-security-config'),
+            project(':spring-security-openid'),
+            'log4j:log4j:1.2.15@jar'
+}

+ 19 - 0
samples/tutorial/tutorial.gradle

@@ -0,0 +1,19 @@
+// Tutorial sample build file
+
+apply id: 'war'
+apply id: 'jetty'
+
+dependencies {
+    providedCompile 'javax.servlet:servlet-api:2.5@jar'
+    compile project(':spring-security-core'),
+            "org.springframework:spring-core:$springVersion",
+            "org.springframework:spring-beans:$springVersion",
+            "org.springframework:spring-web:$springVersion",
+            "org.springframework:spring-webmvc:$springVersion",
+            "org.aspectj:aspectjrt:$aspectjVersion"
+
+    runtime project(':spring-security-web'),
+            project(':spring-security-config'),
+            project(':spring-security-taglibs'),
+            'log4j:log4j:1.2.15@jar'
+}

+ 39 - 1
settings.gradle

@@ -1 +1,39 @@
-include 'core', 'web', 'ldap', 'acl', 'config', 'cas', 'openid'
+String[] modules = [
+    'core',
+    'web',
+    'ldap',
+    'acl',
+    'config',
+    'cas',
+    'openid',
+    'taglibs'
+]
+
+String[] samples = [
+    'tutorial',
+    'contacts',
+    'openid'
+]
+
+include modules
+
+modules.each {name ->
+    p = findProject(":${name}")
+    p.name = "spring-security-${name}"
+    p.buildFileName = "${name}.gradle"
+}
+
+include samples
+
+samples.each {name ->
+    p = findProject(":${name}")
+    p.name = "spring-security-samples-${name}"
+    p.buildFileName = "${name}.gradle"
+    p.projectDir = new File(settingsDir, "samples/${name}");
+}
+
+
+rootProject.children.each {project ->
+    assert project.buildFile.isFile()
+    assert project.projectDir.isDirectory()
+}

+ 20 - 0
taglibs/taglibs.gradle

@@ -0,0 +1,20 @@
+// Taglibs build file
+
+dependencies {
+    compile project(':spring-security-core'),
+            project(':spring-security-web'),
+            project(':spring-security-acl'),
+            "org.springframework:spring-core:$springVersion",
+            "org.springframework:spring-beans:$springVersion",
+            "org.springframework:spring-context:$springVersion",
+            "org.springframework:spring-expression:$springVersion",
+            "org.springframework:spring-web:$springVersion"
+
+    provided 'javax.servlet:jsp-api:2.0'
+    
+    testCompile 'javax.servlet:servlet-api:2.5',
+                'javax.servlet:jsp-api:2.0'
+    
+    testRuntime "taglibs:standard:$jstlVersion"
+
+}

+ 1 - 1
web/build.gradle → web/web.gradle

@@ -1,7 +1,7 @@
 // Web module build file
 
 dependencies {
-    compile project(':core'),
+    compile project(':spring-security-core'),
             'aopalliance:aopalliance:1.0',
             'javax.servlet:servlet-api:2.5',
             'org.aspectj:aspectjweaver:1.6.5',