Questions tagged [aspectj-maven-plugin]

Handles AspectJ usage within Maven.

Handles AspectJ usage within Maven.

The following functionalities are provided: weaving of aspects (or existing aspects from libraries) with the test and/or main classes, weaving of pre-existing jars and ajdoc reporting.

Check the official usage page for a first look at it.

More Info

212 questions
0
votes
1 answer

Intellij: annotations are only available if source level is 1.5 or greater

I am trying to create a custom aspectj annotation. I have following in pom: org.aspectj aspectjrt 1.9.5
Mandroid
  • 6,200
  • 12
  • 64
  • 134
0
votes
1 answer

Spring Roo errors in Roo_Service_Impl.aj

In the domain model, Category that has a ManyToOne relation with Tag entity, and Tag has ManyToOne with OfferingDetail. I'm getting these errors in the TagServiceImpl_Roo_Service_Impl.aj file: The method setTag(null) is undefined for the type…
0
votes
1 answer

Unittesting pomless aspectJ project

In a Tycho build I have a pomless plugin-project/bundle A with some aspectj classes in it (*.aj). The project builds fine and another project B can reference project A via its manifest.mf. Now a separate unittest project C exists for testing…
0
votes
0 answers

(ClassGenException) Couldn't find target for branch: ifeq[153]

Aspectj version : 1.8.13 I have a project which I am trying to run through aspect compiler through maven plug-in but getting following error. Any pointers to debug this issue or find the exact issue where it lies? . The error couldn't find the…
0
votes
1 answer

AspectJ : Find the source method code/name of a found JoinPoint

I want to retrieve the calling method where a specific method is called. Example : The method I consider : public void methodA(int a, int b){...} is called in a test method and also in the program itself @Test public void testMethodA( ... some…
max152
  • 505
  • 1
  • 4
  • 6
0
votes
1 answer

AspectJ @DeclareMixin, Methods that are not declared by an interface are not weaved

I am trying to give a default implementation to Methods declared by java.lang#Object. Here is an MCVE for the problem I encounter. In the interface IAspect I declare an equals Method. In the implementation of this class I define it as always…
Leslie
  • 333
  • 1
  • 3
  • 12
0
votes
1 answer

Using AspectJ in maven project: weaving is not working

I am trying to reproduce the example in Using AspectJ annotations in maven project: weaving is not working with the answer given there. In articular, now I am using Eclipse Photon, JDK 1.8 but with no success. My Final POM.XML is:
0
votes
1 answer

AspectJ @DeclareParents defaultImpl code is not used when using it as dependency

I am working with AspectJ at the moment. I seperated AspectJ code in a dependency. Within that dependency everything works as intended. But as soon as I import it in another project only some functionality does not work anymore. When using the…
Leslie
  • 333
  • 1
  • 3
  • 12
0
votes
1 answer

Aspectj exceptions handling on multiple matching advices

I have 2 aspects that are applied on the same method. When the method executes correctly I have no problem, everything is working fine and both aspects work as expected. The problem is when the method throw an exception. In these cases, the first…
0
votes
1 answer

How to create an @Aspect in one jar and intercept methods from another jar using Load Time Weaving?

I've gone through many Aspect related posts, but none of them seem to help me. I see a lot of the posts are really old, and all the example GitHub repositories only feature a single .jar when I'm working with multiple. I know my common jar is being…
wheeleruniverse
  • 1,511
  • 2
  • 20
  • 37
0
votes
1 answer

AspectJ weaving with ajc and IntelliJ

I am at a loss ... I have followed the steps from Intro to AspectJ, but when I try to compile the samples with ajc, I get a "ajc: advice defined in learning.AccountAspect has not been applied [Xlint:adviceDidNotMatch]" warning on my before, around…
Darek
  • 4,687
  • 31
  • 47
0
votes
0 answers

AspectJ plugin builds fine but at runtime annotations don't work

I am using the AspectJ Maven plugin to build my project and use an AspectLibrary, which is a jar in which I have my aspects defined. Here is the Aspect that I am trying to use @Around("execution(*…
Arnav Sengupta
  • 423
  • 1
  • 7
  • 19
0
votes
1 answer

Maven AspectJ plugin non spring project won't work

I have a project, which is NOT a spring application. I am trying to use AspectJ annotations in it. The Annotation classes are being referenced from another jar I have. I have mentioned my plugin section of POM below. My build succeeds but the…
Arnav Sengupta
  • 423
  • 1
  • 7
  • 19
0
votes
0 answers

AspectJ How to override an advice

I have the following issue with AspectJ. My java web application includes multiple dependencies which uses aspects (contain their own META-INF/aop.xml inside jars). Here is an example of aop.xml:
igor
  • 179
  • 1
  • 1
  • 5
0
votes
1 answer

Project not compiling properly with AspectJ Maven

I am trying to work with AspectJ in IntelliJ Community Edition. It's not working as expected. Where do am I making a mistake? Any help/insights would be very much appreciated. Technology Ref: IntelliJ IDEA 2018.2.4 (Community Edition) java version…
user6457056