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

AspectJ trouble using around advice and ProceedingJoinPoint

I'm new to AOP and I need to use AspectJ on my project. I need to use around advice but I have a problem using it, I've the following code in my .aj class, pointcut checkUser(ProceedingJoinPoint jp,User user): call(*…
Reza P.
  • 306
  • 2
  • 18
0
votes
1 answer

Aspectj class is not found by test class when running test with maven

I have created a test for my aspectj class. When I execute my test it works fine to "Run as TestNG" from Eclipse. Then when I execute it in maven: mvn clean test I get the following error: [15:15] [eraonel/git/java-runtime-stats] -> mvn clean…
0
votes
1 answer

Maven Plugin with a profile

I have a maven plugin with a profile that is active by default. I want to disable this profile and there doesn't seem to be an option to disable it using the plugin's configuration. I have tried De-activate a maven profile from command line and it…
0
votes
1 answer

OpenClover - Getting to work with AspectJ

I'm trying to use Openclover with a project that uses AspectJ and that instruments aspects into its code. The pom.xml has these dependencies with relation to AspectJ: ... org.aspectj
amportugal
  • 124
  • 1
  • 12
0
votes
1 answer

AspectJ and multi module setup Intellij

I have been dealing with the problem for a day. I have a quite simple project so far, but still not able to configure AspectJ My project structure looks as follows. -- root ---- DesktopGUI ---- DataStore ---- localsettings ----…
user4671628
0
votes
0 answers

AspectJ compile time weaving with Spring boot and maven

I'm trying to use the AspectJ aspects in conjunction with Spring boot. But seems Spring can't see aspect classes compiled with Ajc compiler, and I get the error that there is no package containing my aspects found. I'm using the following…
androberz
  • 744
  • 10
  • 25
0
votes
1 answer

Prevent AspectJ Maven plugin from rewriting classes

I'm stuck with the following problem: my plugin adda certain annotations to certain classes after they are compiled. I need AspectJ plugin to process them. So my plugin runs before AspectJ plugin. My plugin adds annotations but then AspectJ plugin…
0
votes
2 answers

Make aspectj work with scala model

I have a domain made in Scala and some classes made in Java. I need to make some aspects with Aspectj that I know that work because with a Java class and it works. The problem is that when the Scala class is annotated it does not work. Other…
Motomine
  • 4,205
  • 5
  • 20
  • 23
0
votes
1 answer

Can't make my aspect run

Basically I have a normal Java app, with a main. I use Intelij Ultimate. I have the following pom
Mocktheduck
  • 1,333
  • 1
  • 22
  • 43
0
votes
1 answer

AspectJ pointcut expression for Jackson DeserializationContext reportMappingException

I am trying to write a pointcut to have an around advice around: com.fasterxml.jackson.databind.DeserializationContext.reportMappingException() method. This is what I have so far and it's not working i.e. maven complains: [WARNING] advice defined…
user770119
  • 422
  • 1
  • 5
  • 11
0
votes
1 answer

How to add test-jar as aspectLibrary in Maven

I have an aspect that I want to use in my test-classes. I don't want to add it to the main jar, as it would pull in test libraries like junit and mockito. While there's a configuration setting to add an aspectLibrary, it always adds the main jar,…
Mark Boon
  • 113
  • 2
  • 9
0
votes
1 answer

export AspectJ project as jar and use in another application

I am writing an Aspect in Mavenised project. PROJECT_A Now I want to use the PROJECT_A.jar in PROJECT_B which is non mavenised. And in PROJECT_B i want to use the annotaition which I have written using the aspect in PROJECT_A . I tried exporting…
Ashish Shetkar
  • 1,414
  • 2
  • 18
  • 35
0
votes
1 answer

AOP cut module from another module using aspectj-maven-plugin

I create a apring-boot project which has two module test-aop and test-web. I have upload this project in github https://github.com/zhxjouc/test .In test-aop, I define some AOP class and I want it cuts the test-web module. And I think the codes might…
user2256235
  • 295
  • 4
  • 15
0
votes
0 answers

How to build a project with AspectJ plugin which also has dependencies on querydsl plugin

I have Aspects defined in project A which can be referred from project B without any compilations issues because project A has project B as dependency. However project B needs AspectJ plugin so that aspects can be weaved via compilation/build. Issue…
coretechie
  • 1,050
  • 16
  • 38
0
votes
1 answer

Can I hide ***$AjcClosure*.class files created by aspectj-maven-plugin?

I am using aspectj-maven-plugin to generate loggers in methods, and the approach is annotation driven. Upon compiling, for every method the annotation is defined, I can see a ***$AjcClosure*.class file getting generated in my respective target class…
coretechie
  • 1,050
  • 16
  • 38