Gradle 1.0 +Spring + AspectJ build problems

落花浮王杯 提交于 2019-11-30 22:51:29

I know this post is 5 years old but I have the answer and it seems nobody else on the internet does. I'm using Gradle 3.3 though (Give me a break, it's 2017). Here's my Gradle build file to get AWS SWF Workflows along with @Asynchronous tags working.

buildscript {
    repositories {
        maven {
            url "https://maven.eveoh.nl/content/repositories/releases"
        }
    }

    dependencies {
        classpath "nl.eveoh:gradle-aspectj:1.6"
    }
}

project.ext {
    aspectjVersion = '1.8.9'
}

apply plugin: 'aspectj'
apply plugin: 'java'

dependencies {
    compile group: 'org.aspectj', name: 'aspectjrt', version:'1.8.9'
    compile group: 'org.aspectj', name: 'aspectjtools', version:'1.8.9'
    compile group: 'org.freemarker', name: 'freemarker', version:'2.3.25-incubating'
    compile group: 'com.amazonaws', name: 'aws-java-sdk-swf-libraries', version:'1.11.22'
    compile group: 'com.amazonaws', name: 'aws-swf-build-tools', version:'1.1'
    compile(group: 'org.springframework.boot', name: 'spring-boot-starter', version:'1.4.0.RELEASE') {
        exclude(module: 'commons-logging')
    }
    compile group: 'org.springframework.boot', name: 'spring-boot-configuration-processor', version:'1.4.0.RELEASE'
    testCompile(group: 'org.springframework.boot', name: 'spring-boot-starter-test', version:'1.4.0.RELEASE') {
        exclude(module: 'commons-logging')
    }
    aspectpath group: 'com.amazonaws', name: 'aws-java-sdk-swf-libraries', version:'1.11.22'
}

The key thing that caught me was adding the aspectpath to the dependencies. Took me ages to figure that out.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!