Fix Gradle Eclipse/AspectJ integration

This commit is contained in:
Rob Winch 2012-11-02 10:40:39 -05:00
parent 0f6c3affda
commit 4ef184d520
2 changed files with 2 additions and 4 deletions

View File

@ -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

View File

@ -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'])