-
Notifications
You must be signed in to change notification settings - Fork 880
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
JPAAnnotationProcessor with classifier jakarta fails with "Attempt to recreate a file for type" #3431
Comments
see this #3422 (comment) |
I had actually tried removing the maven plugin, noting that it runs twice, and was getting a stack overflow error. Tried this again upon your comment, thank you, and got the same error, but noted it's coming from the aspectj plugin. I resolved that by moving to the aspectj.dev version of that plugin, so all good. However, in the future, it might be nice/necessary to alter the compilation directory for the querydsl apt processing. This was possible using the plugin. Any way to do this now that I'm not using he plugin? |
How is this supposed to solve the problem since entity classes are not compiled into "Q" classes when apt-maven-plugin is changed? |
@eocak I don't understand what you mean -> the generation of the Q-classes works without problems. The problem is that the Q-classes may be generated twice in different packages by the compiler and the plugin |
My mistake. I supposed there was a problem with "Q" classes not read from annotations folder but it was something different. I handled it now. Thanks. |
Having removed the maven plugin to avoid double generation of the Q sources, which does solve that problem btw, thank you, I was wondering if there was a way to alter the directory in which the Q sources are generated, sans plugin. This is not a huge deal as I can use the default annotations directory, but I was wondering. By the way, my underlying problem is actually aspectj, which also runs annotation processing if you don't shut it off, because you can never have too much of a good thing, and aspectj calls on the eclipse compiler, and the that calls into JDT, the eclipse tools, and throws a stack overflow exception trying to handle jakarta persistence annotations like MappedSuperclass. eclipse-jdt/eclipse.jdt.core#565 But all that is not a problem in the QueryDSL project, so I guess I can close this ticket. Thank you. |
Following the advice above, I removed the plugin. But I need to overwrite the generate directory(outputDirectory), what should I do? |
Hi! Is there a way to config the outputDierctory? |
Using querydsl 5.0.0, exact same setup in maven except one has no jakarta classifier and an 11 jvm, and the other adds the jakarta classifier and uses java 17. The java classifier plus java 17 version fails with "Attempt to recreate a file for type.."
In the jvm 11 non-jakarta case the apt processor executes only during the generate-sources phase, in the jvm 17 jakarta case the apt processor also executes on the compilation phase...
This happens even when I add...
<phase>generate-sources</phase>
I think this setup is pretty vanilla. Anyone else with this issue?
The text was updated successfully, but these errors were encountered: