瀏覽代碼

Fix Gradle Eclipse/AspectJ integration

Rob Winch 12 年之前
父節點
當前提交
4ef184d520
共有 2 個文件被更改,包括 2 次插入4 次删除
  1. 1 3
      buildSrc/src/main/groovy/aspectj/AspectJPlugin.groovy
  2. 1 1
      gradle/ide-integration.gradle

+ 1 - 3
buildSrc/src/main/groovy/aspectj/AspectJPlugin.groovy

@@ -64,11 +64,9 @@ class AspectJPlugin implements Plugin<Project> {
         project.tasks.withType(GenerateEclipseClasspath) {
             project.eclipse.classpath.file.whenMerged { classpath ->
                 def entries = classpath.entries.findAll { it instanceof ProjectDependency}.findAll { entry ->
-                    def projectPath = entry.path.replaceAll('/',':')
-println projectPath
+                    def projectPath = entry.path.replaceAll('/','')
                     project.rootProject.allprojects.find{ p-> 
                         if(p.plugins.findPlugin(EclipsePlugin)) {
-                             println "    checking " + p.eclipse.project.name
                              return p.eclipse.project.name == projectPath && p.plugins.findPlugin(AspectJPlugin)
                         }
                         false

+ 1 - 1
gradle/ide-integration.gradle

@@ -51,7 +51,7 @@ project(':spring-security-samples-aspectj') {
         doLast {
             def classpath = new XmlParser().parse(srcFile)
 
-            classpath.classpathentry.findAll{ it.@path == '/spring-security-aspects' }.each { node ->
+            classpath.classpathentry.findAll{ it.@path.startsWith('/spring-security-aspects') }.each { node ->
                 if(node.children().size() == 0) {
                     def attrs = new Node(node,'attributes')
                     def adjtAttr = new Node(attrs,'attributes',[name: 'org.eclipse.ajdt.aspectpath', value: 'org.eclipse.ajdt.aspectpath'])