Below you will find pages that utilize the taxonomy term “Aspectj”
The nuclear option
I have been using open source software now for about 20 years. One of the things that I always saw discussed back in the day was if you don’t like the way a project is being run you can always fork it and do things differently. In all my years I have never actually felt the need to do such a thing because lets be honest running an open source project is a ton of work. As readers of my blog know I have been wanting to update to Spring 4.1. What has been holding us back was a change in aspectj 1.8.2 where it would automatically process annotations found in the code. This ends up generating the hibernate meta-model and dumping the files wherever maven was invoked. So trying to work within the project I opened up a jira for an enhancement which would allow me to pass a flag to the compiler to not process the annotations. There was a quick response at the beginning of January and I was left with the impression that this would be handled in a couple of weeks. Finally in the middle of February with the work still not done Ralph Engelmann submitted a patch which would actually implement the feature.
Spring 4.1 / AspectJ Progress
My coworker discovered that the new version of AspectJ already has the flags built in to turn off the annotation processing. If we can do that we can continue using the Maven Processor Plugin to generate the Hibernate Metamodel data and not have to abandon this. The problem at this point is the AspectJ Maven plugin doesn’t support passing those flags along to AspectJ. So the next step is to get a patch in to that plugin and hopefully we can make the jump to Spring 4.1 at the start of the new year. After that I am going to focus on updating our container so we can finally make the move to Java 8 at work.
Maven Compiler Plugins, AspectJ, and the Hibernate Metamodel generator
For a while now I have been avoiding upgrading the maven java compiler plugin. We are running 2.5.1 at work. The problem is, in the 3.x version, they seemed to have rewritten it, and it doesn’t want to play nice with the maven-processor-plugin that we used to run the hibernate meta model generator. So far it was like cool, I just won’t upgrade to the new version.
Then AspectJ came out with 1.8.2 and the new AspectJ compiler plugin which also seems to be built like the new compiler plugin. At this point I was like well then I might as well update both since Spring 4.1 wants at least AspectJ 1.8.2. But I still have the whole thing fall apart at that meta model step. I found a flag for the maven compiler about forceJavacCompilerUse but even that didn’t solve the problem for me. A coworker said basically AspectJ seems to be doing what we were using the maven-processor-plugin for and generating the meta models for the entities, so he disabled that plugin. However for some reason instead of dumping the generated files in the target directory it is putting them in whatever directory you are in for the build and we can’t seem to find a way to get it to drop them in the target folder.