ソースを参照

Adding bundlor template for aspects project, plus minor build updates.

Luke Taylor 15 年 前
コミット
6e831d6504
3 ファイル変更46 行追加14 行削除
  1. 12 0
      aspects/template.mf
  2. 27 5
      build.gradle
  3. 7 9
      gradle/maven.gradle

+ 12 - 0
aspects/template.mf

@@ -0,0 +1,12 @@
+Bundle-SymbolicName: org.springframework.security.aspects
+Bundle-Name: Spring Security Aspects
+Bundle-Vendor: SpringSource
+Bundle-ManifestVersion: 2
+Bundle-Version: ${version}
+Ignored-Existing-Headers:
+ Import-Package,
+ Export-Package
+Import-Template: 
+ org.aspectj.*;version="[1.6.0, 1.7.0)";resolution:=optional,
+ org.apache.commons.logging.*;version="[1.0.4, 2.0.0)",
+ org.springframework.security.core.*;version="[${version}, 3.2.0)"

+ 27 - 5
build.gradle

@@ -28,7 +28,7 @@ allprojects {
 }
 }
 
 
 allprojects {
 allprojects {
-    apply plugin: 'org.gradle.idea'
+    apply plugin: 'idea'
     ideaModule {
     ideaModule {
         downloadJavadoc=false
         downloadJavadoc=false
         excludeDirs.add(buildDir)
         excludeDirs.add(buildDir)
@@ -51,15 +51,33 @@ ideaModule {
 ideaProject {
 ideaProject {
     wildcards += ['?*.gradle']
     wildcards += ['?*.gradle']
     javaVersion = '1.6'
     javaVersion = '1.6'
-}
 
 
+    withXml { node ->
+        node.component.find { it.@name == 'VcsDirectoryMappings' }.mapping.@vcs = 'Git'
+    }
+}
+/*
+ideaWorkspace {
+    withXml { node ->
+        Node servers = node.component.find{ it.@name == 'TaskManager' }.servers[0]
+        def bldr = new NodeBuilder()
+        servers.append(
+            bldr.JIRA(shared: false, url: 'https://jira.springsource.org') {
+                if (project.hasProperty('jiraUser')) {
+                    password project.property('jiraPassword')
+                    username project.property('jiraUser')
+                }
+            })
+    }
+}
+*/
 configure(javaProjects) {
 configure(javaProjects) {
     apply from: "$rootDir/gradle/javaprojects.gradle"
     apply from: "$rootDir/gradle/javaprojects.gradle"
-    apply from: "$rootDir/gradle/maven.gradle"
 }
 }
 
 
 configure(coreModuleProjects) {
 configure(coreModuleProjects) {
     apply from: "$rootDir/gradle/bundlor.gradle"
     apply from: "$rootDir/gradle/bundlor.gradle"
+    apply from: "$rootDir/gradle/maven.gradle"
     // Gives better names in structure101 jar diagram
     // Gives better names in structure101 jar diagram
     sourceSets.main.classesDir = new File(buildDir, "classes/" + project.name.substring("spring-security".length() + 1))
     sourceSets.main.classesDir = new File(buildDir, "classes/" + project.name.substring("spring-security".length() + 1))
 }
 }
@@ -187,11 +205,15 @@ def getItestProjects() {
 }
 }
 
 
 def getCoreModuleProjects() {
 def getCoreModuleProjects() {
-    javaProjects - sampleProjects - itestProjects - aspectjProjects
+    javaProjects - sampleProjects - itestProjects
 }
 }
 
 
 def getAspectjProjects() {
 def getAspectjProjects() {
-    subprojects.findAll {project -> project.name == 'spring-security-aspects' || project.name == 'spring-security-samples-aspectj'}
+    [project(':spring-security-aspects'), project(':spring-security-samples-aspectj')]
+}
+
+def getReleaseProjects() {
+    coreModuleProjects +project(':spring-security-aspects')
 }
 }
 
 
 class UploadDist extends DefaultTask {
 class UploadDist extends DefaultTask {

+ 7 - 9
gradle/maven.gradle

@@ -6,12 +6,16 @@ task sourceJar(type: Jar) {
     from sourceSets.main.java
     from sourceSets.main.java
 }
 }
 
 
+artifacts {
+    archives sourceJar
+}
+
+// Configuration for SpringSource s3 maven deployer
 configurations {
 configurations {
     deployerJars
     deployerJars
 }
 }
-
-artifacts {
-    archives sourceJar
+dependencies {
+    deployerJars "org.springframework.build.aws:org.springframework.build.aws.maven:3.0.0.RELEASE"
 }
 }
 
 
 // Remove the archive configuration from the runtime configuration, so that anything added to archives
 // Remove the archive configuration from the runtime configuration, so that anything added to archives
@@ -20,10 +24,6 @@ configurations.default.extendsFrom = [configurations.runtime] as Set
 // Add the main jar into the default configuration
 // Add the main jar into the default configuration
 artifacts { 'default' jar }
 artifacts { 'default' jar }
 
 
-dependencies {
-    deployerJars "org.springframework.build.aws:org.springframework.build.aws.maven:3.0.0.RELEASE"
-}
-
 gradle.taskGraph.whenReady {graph ->
 gradle.taskGraph.whenReady {graph ->
     if (graph.hasTask(uploadArchives)) {
     if (graph.hasTask(uploadArchives)) {
         // check properties defined and fail early
         // check properties defined and fail early
@@ -37,8 +37,6 @@ def deployer = null
 uploadArchives {
 uploadArchives {
     deployer = repositories.mavenDeployer {
     deployer = repositories.mavenDeployer {
         configuration = configurations.deployerJars
         configuration = configurations.deployerJars
-    }
-    doFirst {
         if (releaseBuild) {
         if (releaseBuild) {
             // "mavenSyncRepoDir" should be set in properties
             // "mavenSyncRepoDir" should be set in properties
             repository(url: mavenSyncRepoDir)
             repository(url: mavenSyncRepoDir)