-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eclipse integration issue #28
Comments
Hello, can you provide the complete Stack trace please ? For eclipse configuration steps are :
For the class not found stack trace will help akka which class is not found. Last, generated class are placed where compiler tells it, using maven by default it will be in target/generated-sources, there should be a setting in gradle to specify it. Perhaps this will help you with gradle ? [http://stackoverflow.com/questions/25239243/annotation-processor-in-gradle-outputs-source-files-to-build-classes-making-java] I will try a demo build with gradle to see what happens. |
Hi, I figured out what was my issue, it's AJDT. For AJDT I knew they was an issue, but it supposed to be fixed according to this blog Your previous link help me, it works with javac but not with ajc (aspectJ) Thanks |
I've read the blog post and saw that you should be running the same java version as the one used to compile the processor. I personally use IntelliJ for long time but I know others succeed with eclipse builds smoothly. Can you provide me a demo project ? Also please tell me youre eclipse release. |
Hi again, I managed to download a clean Luna workbench, then imported the sample project provided in the source tree. So there is still a bug in AJDT with annotation processors, we should report a bug. |
Thanks, Did you try a project without Aspect, but just with APT enabled ? I think I find a workaround, it's not perfect but it works. |
I did try starting a brand new project with only APT enabled. The good news is that it does work without AJDT at all. |
One Solution, First you need this gradle plugin https://github.com/eveoh/gradle-aspectj One it's done,
buildscript {
dependencies {
classpath files('lib/gradle-aspectj-1.5.jar')
}
}
project.ext {
aspectjVersion = '1.8.2'
}
apply plugin: 'aspectj' It needs to be at last the 1.8.2 version to work with Annotation Processor
ext.generatedSrc = "$buildDir/generated-src"
ext.generatedSrcDir = file("$generatedSrc")
compileAspect {
doFirst {
generatedSrcDir.exists() || generatedSrcDir.mkdirs()
}
additionalAjcArgs = [
's' : "$generatedSrc"
]
}
sourceSets {
main {
java {
srcDir generatedSrcDir
}
}
} Now Eclipse, after "gradle compileAspect", will know the generated classes, and you can deploy your favorite app in Tomcat for example. But each time you modify your bean, DTO, Mapper, you need to run "gradle compileAspect" |
Hi Séven,
My projects work fine with gradle, but I couldn’t get them work with Eclipse 4.4:
==> no generated class and when I deploy it in Tomcat 8, I obviously have a nice "java.lang.ClassNotFoundException"
It's really important for me that it work under Eclipse. What am I missing here ?
Thanks.
PS : My projects works fine with gradle, except selma generates the class at the root,
it's a bit weird, it's not an issue but is it possible to choose the location ?
The text was updated successfully, but these errors were encountered: